<%- include('../operationsContent/assets.ejs') %>
<main class="kt-ops" data-ops-page
  data-ops-required-message="<%= i18n.__('operationsContent.validationRequired') %>"
  data-ops-arabic-message="<%= i18n.__('operationsContent.validationArabic') %>"
  data-ops-english-message="<%= i18n.__('operationsContent.validationEnglish') %>"
  data-ops-action-success="<%= i18n.__('operationsContent.actionSuccess') %>"
  data-ops-action-error="<%= i18n.__('operationsContent.actionError') %>">
  <div class="kt-ops__stack">
    <%- include('../operationsContent/hero.ejs', {
      heading: i18n.__('common.edit {{module}}', { module: i18n.__('fqs.fq') }),
      description: i18n.__('operationsContent.formDescription'),
      icon: 'ti-message-edit', count: 0, showCount: false,
      primaryUrl: null, primaryLabel: null, backUrl: '/dashboard/fqs'
    }) %>
    <form class="kt-ops-form-surface" id="editFqs" action="/dashboard/fqs/edit/<%= fqs.id %>" method="post" data-ops-form novalidate>
      <input type="hidden" name="_csrf" value="<%= csrfToken %>">
      <header class="kt-ops-form-surface__header"><span class="kt-ops-section-icon"><i class="ti ti-help-circle"></i></span><div><h2><%= i18n.__('operationsContent.contentSection') %></h2><p><%= i18n.__('operationsContent.formDescription') %></p></div></header>
      <div class="kt-ops-form__body">
        <div class="kt-ops-form-grid">
          <section class="kt-ops-language-card">
            <div class="kt-ops-language-card__head"><strong><%= i18n.__('operationsContent.arabic') %></strong><span class="kt-ops-language-chip kt-ops-language-chip--ar">AR · عربي</span></div>
            <div class="kt-ops-field" data-ops-field><label for="faq-question-ar"><%= i18n.__('fqs.questionAr') %></label><textarea class="kt-ops-control" id="faq-question-ar" name="question.ar" dir="rtl" lang="ar" data-ops-script="arabic" placeholder="اكتب السؤال باللغة العربية" required><%= fqs.question?.ar || '' %></textarea><p class="kt-ops-field__error" data-ops-field-error aria-live="polite"></p></div>
            <div class="kt-ops-field" data-ops-field><label for="faq-answer-ar"><%= i18n.__('fqs.answerAr') %></label><textarea class="kt-ops-control" id="faq-answer-ar" name="answer.ar" dir="rtl" lang="ar" data-ops-script="arabic" placeholder="اكتب الإجابة باللغة العربية" required><%= fqs.answer?.ar || '' %></textarea><p class="kt-ops-field__error" data-ops-field-error aria-live="polite"></p></div>
          </section>
          <section class="kt-ops-language-card">
            <div class="kt-ops-language-card__head"><strong><%= i18n.__('operationsContent.english') %></strong><span class="kt-ops-language-chip">EN · English</span></div>
            <div class="kt-ops-field" data-ops-field><label for="faq-question-en"><%= i18n.__('fqs.questionEn') %></label><textarea class="kt-ops-control" id="faq-question-en" name="question.en" dir="ltr" lang="en" data-ops-script="latin" placeholder="Enter the question in English" required><%= fqs.question?.en || '' %></textarea><p class="kt-ops-field__error" data-ops-field-error aria-live="polite"></p></div>
            <div class="kt-ops-field" data-ops-field><label for="faq-answer-en"><%= i18n.__('fqs.answerEn') %></label><textarea class="kt-ops-control" id="faq-answer-en" name="answer.en" dir="ltr" lang="en" data-ops-script="latin" placeholder="Enter the answer in English" required><%= fqs.answer?.en || '' %></textarea><p class="kt-ops-field__error" data-ops-field-error aria-live="polite"></p></div>
          </section>
        </div>
      </div>
      <footer class="kt-ops-form__footer"><a class="kt-ops-btn" href="/dashboard/fqs"><%= i18n.__('operationsContent.cancel') %></a><button class="kt-ops-btn kt-ops-btn--primary" type="submit" data-ops-loading-label="<%= i18n.__('operationsContent.saving') %>"><span class="kt-ops-btn__spinner" data-ops-button-spinner hidden></span><span data-ops-button-label><%= i18n.__('operationsContent.save') %></span></button></footer>
    </form>
  </div>
</main>
<%- include('../operationsContent/scripts.ejs') %>
