<?php

class MBTabs extends MBComponentBase {
  protected function init_options($options) {
    $options->enabled = true;
    $options->id = "inoby-tabs";
    $options->title = __("Obsah v taboch", "inoby");
    $options->icon = "table-row-after";
    $options->render_template = get_theme_file_path("components/tabs/template.php");
    $options->fields = [
      [
        'group_title'   => __('Tab - {headline}', 'inoby'),
        'id'            => 'component-tabs',
        'type'          => 'group',
        'clone'         => true,
        'collapsible'   => true,
        'sort_clone'    => true,
        'add_button'    => __('Pridať ďalšiu sekciu', 'inoby'),
        'fields' => array(
          [
            'id'       => 'headline',
            'title'    => __('Nadpis sekcie', 'inoby'),
            'placeholder'   => __('Vložte nadpis', 'inoby'),
            'type'     => 'text',
            'sanitize_callback' => 'none',
          ],
          [
            'id'      => 'content',
            'name'    =>  __('Obsah', 'inoby'),
            'type'    => 'wysiwyg',
          ],
        )
      ],
    ];
  }
}