<?php

class MBNavigation extends MBComponentBase {
  protected function init_options($options) {
    $options->enabled = true;
    $options->id = "inoby-navigation";
    $options->title = __("Navigácia", "inoby");
    $options->icon = "editor-ul";
    $options->render_template = get_theme_file_path("components/navigation/template.php");
    $options->fields = [
      [
        'group_title'   => __('Navigácia - {headline}', 'inoby'),
        'id'            => 'navigation',
        'type'          => 'group',
        'clone'         => true,
        'collapsible'   => true,
        'sort_clone'    => true,
        'max_clone'     => 3,
        'add_button'    => __('Pridať ďalšiu sekciu', 'inoby'),
        'fields' => array(
          [
            'id'       => 'headline',
            'title'    => __('Nadpis', 'inoby'),
            'placeholder'   => __('Vložte nadpis', 'inoby'),
            'type'     => 'text',
            'sanitize_callback' => 'none',
          ],
          [
            'id'      => 'navigation',
            'name'    =>  __('Navigácia', 'inoby'),
            'type'    => 'text_list',
            'clone' => true,
            'add_button'   => __('Pridať položku', 'inoby'),
            'options' => [
                'Vložte text'     => 'Text',
                'Vložte odkaz'    => 'Odkaz',
            ],
          ],
        )
      ],
    ];
  }
}