<?php

class MBReferences extends MBComponentBase {
  protected function init_options($options) {
    $options->enabled = true;
    $options->id = "inoby-references";
    $options->title = __("Slider s referenciami", "inoby");
    $options->icon = "admin-users";
    $options->render_template = get_theme_file_path("components/references/template.php");
    $options->fields = [
      [
        "type" => "number",
        "id" => "component-references-slider-slides",
        'std'   => 1,
        "name" => __("Počet referencií za slide", "inoby"),
      ],
      [
        "type" => "divider",
      ],
      [
        'group_title'   => __('Referencia - {heading}', 'inoby'),
        'id'            => 'component-references',
        'type'          => 'group',
        'clone'         => true,
        'collapsible'   => true,
        'sort_clone'    => true,
        'add_button'    => __('Pridať ďalšiu referenciu', 'inoby'),
        'fields' => array(
          [
            'id'       => 'heading',
            'name'    => __('Nadpis', 'inoby'),
            'placeholder'   => __('Zadajte nadpis', 'inoby'),
            'type'     => 'text',
          ],
          [
            'id'       => 'reference',
            'name'    => __('Referencia', 'inoby'),
            'placeholder'   => __('Napíšte referenciu', 'inoby'),
            'type'     => 'textarea',
            'sanitize_callback' => 'none',
          ],
          [
            'id'       => 'author',
            'name'    => __('Autor', 'inoby'),
            'placeholder'   => __('Meno a priezvisko', 'inoby'),
            'type'     => 'text',
          ],
          [
            'id'               => "author-image",
            'name'             => __('Fotka autora', 'inoby'),
            'type'             => 'image_advanced',
            'force_delete'     => false,
            'max_file_uploads' => 1,
            'max_status'       => false,
            'image_size'       => 'thumbnail',
          ],
        )
      ],
    ];
  }
}