<?php

class MBNumericList extends MBComponentBase
{
  protected function init_options($options)
  {
    $options->enabled = true;
    $options->id = "inoby-numeric-list";
    $options->title = __("Číslovaný zoznam", "inoby");
    $options->icon = "list-view";
    $options->render_template = get_theme_file_path("components/numeric-list/template.php");
    $options->fields = [
      [
        'group_title'   => __('Položka {#}', 'inoby'),
        'id'            => 'numeric_list_items',
        'type'          => 'group',
        'clone'         => true,
        'collapsible'   => true,
        'sort_clone'    => true,
        'add_button'    => __('Pridať ďalšiu položku', 'inoby'),
        'fields' => array(
          //text
          [
            'id'               => "rewrite_number",
            'name'             => __('Náhrada čísla', 'inoby'),
            'type'             => 'text',
            'placeholder'      => __('Zadajte náhradu čísla', 'inoby'),
          ],
          //wysiwyg
          [
            'id'               => "content",
            'name'             => __('Obsah', 'inoby'),
            'type'             => 'wysiwyg',
            'toolbar'          => 'basic',
            'media_buttons'    => true,
            'teeny'            => false,
            'quicktags'        => true,
            'placeholder'      => __('Vložte obsah', 'inoby'),
          ],
        )
      ],
    ];
  }
}
