<?php

class MBCtaBox extends MBComponentBase {
  protected function init_options($options) {
    $options->enabled = true;
    $options->id = "inoby-cta-box";
    $options->title = __("Banner zistiť viac", "inoby");
    $options->icon = "visibility";
    $options->render_template = get_theme_file_path("components/cta-box/template.php");
    $options->fields = [
      [
        'id'       => 'cta_box_headline',
        'name'    => __('Nadpis', 'inoby'),
        'placeholder'   => __('Vložte nadpis', 'inoby'),
        'type'     => 'text',
        "sanitize_callback" => "none",
      ],
      [
        'id'       => 'cta_box_text',
        'name'    => __('Text', 'inoby'),
        'placeholder'   => __('Vložte text', 'inoby'),
        'type'     => 'textarea',
        "sanitize_callback" => "none",
      ],
      [
        'id'      => 'cta_box_buttons',
        "name" => __("Tlačidlá", "inoby"),
        'type'    => 'text_list',
        'clone' => true,
        'options' => [
            'Zisti viac'      => 'Text',
            'https://www.google.com/' => 'Odkaz',
            '_self' => 'target',
            '' => 'Špeciálna trieda',
        ],
        "add_button" => __("Pridať tlačidlo", "inoby"),
      ],
      [
        'id'               => "cta_box_image",
        'name'             => __('Obrázok', 'inoby'),
        'type'             => 'image_advanced',
        'force_delete'     => false,
        'max_file_uploads' => 1,
        'max_status'       => false,
        'image_size'       => 'thumbnail',
      ],
      [
        'name' => __('Obrátiť strany?', 'inoby'),
        'id'   => 'cta_box_align',
        'type' => 'checkbox',
        'std'  => 0,
      ],
      [
        'name' => __('Svetlá verzia', 'inoby'),
        'id'   => 'cta_box_light',
        'type' => 'checkbox',
        'std'  => 0,
      ],
    ];
  }
}