<?php

class MBNotice extends MBComponentBase {
  protected function init_options($options) {
    $options->enabled = true;
    $options->id = "inoby-notice";
    $options->title = __("Oznam", "inoby");
    $options->icon = "format-aside";
    $options->render_template = get_theme_file_path("components/notice/template.php");
    $options->fields = [
      [
        'name'           => __('Úroveň nadpisu', 'inoby'),
        'id'              => 'notice_heading_level',
        'type'            => 'select_advanced',
        'options'         => [
            'h1'          => 'H1',
            'h2'          => 'H2',
            'h3'          => 'H3',
            'h4'          => 'H4',
            'h5'          => 'H5',
            'h6'          => 'H6',
        ],
        'placeholder'     => 'Vyberte úroveň nadpisu',
      ],
      [
        'id'       => 'notice_heading',
        'name'    => __('Nadpis', 'inoby'),
        'placeholder'   => __('Vložte nadpis', 'inoby'),
        'type'     => 'text',
        'sanitize_callback' => 'none',
      ],
      [
        'id'       => 'notice_heading_color',
        'name'    => __('Farba nadpisu', 'inoby'),
        'type'          => 'color',
        'alpha_channel' => true,
      ],
      [
        'type'          => 'divider',
      ],
      [
        'id'       => 'notice_text',
        'name'    => __('Text', 'inoby'),
        'placeholder'   => __('Vložte nadpis', 'inoby'),
        'type'     => 'textarea',
        'sanitize_callback' => 'none',
      ],
      [
        'id'       => 'notice_text_color',
        'name'    => __('Farba textu', 'inoby'),
        'type'          => 'color',
        'alpha_channel' => true,
      ],
      [
        'type'          => 'divider',
      ],
      [
        'id'       => 'notice_bg_color',
        'name'    => __('Farba pozadia oznamu', 'inoby'),
        'type'          => 'color',
        'alpha_channel' => true,
      ],
    ];
  }
}