<div class="m_headline">
  <fieldset>
    {% include 'text.twig' with {
      label : "title",
      value: title,
      title_text: __("Title", constant('M_TD')),
      class: "widefat"
    } %}
    {% include 'editor.twig' with { label: "text", value: text, title_text:__("Description", constant('M_TD')), class: "text-text" } %}
  </fieldset>
  <fieldset>  
  {% include 'checkbox.twig' with {
        label : "archive",
        array: archive,
        value: "true",
        title_text: __("Display archive page button", constant('M_TD')),
        class: "widefat"
      } %}
  </fieldset>
  
</div>
<div class="m_main">
  {# AUTO PANEL #}
  <section>

     <fieldset>
      <label class="m_label"  for="{{ widget.get_field_id(order)|raw }}">{{ __( "Order" , constant('M_TD')) }}</label>
      {% include 'radio.twig' with {
        label : "order",
        array: order,
        value: "asc",
        title_text: __("Ascending", constant('M_TD')),
        class: "widefat"
      } %}
      {% include 'radio.twig' with {
        label : "order",
        array: order,
        value: "desc",
        title_text: __("Descending", constant('M_TD')),
        class: "widefat"
      } %}
    </fieldset>
    <fieldset>
            <label class="m_label">{{ __( "Order by" , constant('M_TD')) }}</label>
            {% include 'radio.twig' with {
              label : "orderby",
              array: orderby,
              value: "latest",
              title_text:  __("Created date", constant('M_TD')),
              class: "widefat"
            } %}
            {% include 'radio.twig' with {
              label : "orderby",
              array: orderby,
              value: "alphabetic",
              title_text:  __("Alphabetic", constant('M_TD')),
              class: "widefat"
            } %}
            {% include 'radio.twig' with {
              label : "orderby",
              array: orderby,
              value: "rand",
              title_text:  __("Random", constant('M_TD')),
              class: "widefat"
            } %}
          </fieldset>
  </section>

  <section>
    <label class="m_label"  for="{{ widget.get_field_id('selected')}}">{{__("Display options", constant('M_TD'))}}</label>

    {% include 'm_components/form/postType/tabs.twig' %}

    <div class="wp-tab-panel {% if (actual_tab == 'auto') or (actual_tab is empty) %} wp-tab-panel-active {% endif %}" id="auto">

      {% include 'm_components/form/postType/quantity.twig' with {
        post_type : __("faqs", constant('M_TD'))
      } %}

      {% include 'm_components/form/postType/taxonomy.twig' %}

    </div>

    {# MANUEL PANEL #}
   <div class="wp-tab-panel {% if actual_tab == 'manual' %} wp-tab-panel-active {% endif %}" id="manual">
      {% include 'm_components/form/postType/posts.twig' %}
    </div>

    <input type="hidden" class="actual_tab" name="{{ widget.get_field_name('actual_tab')|raw }}" value="{{actual_tab|raw}}">

  </section>

</div>
