<?php

class MbNewsletter extends MBComponentBase {
  protected function init_options($options) {
    $options->id = "newsletter";
    $options->title = "Newsletter";
    $options->icon = "fas fa-image";

    $options->render_template = get_theme_file_path("/components/newsletter/template.php");

    $options->fields = [
      [
        'name' => __('Newsletter ako popup', 'inoby'),
        'id'   => 'newsletter_popup_check',
        'type' => 'checkbox',
        'std'  => 1,
      ],
      [
        "name" => "Nadpis",
        "id" => "newsletter_heading",
        "type" => "text",
        "sanitize_callback" => "none",
      ],
      [
        "type" => "divider",
      ],
      [
        "name" => "Text tlačidla",
        'desc' => __("Text tlačidla čo otvorí popup formulár", "inoby"),
        "id" => "newsletter_btn_text",
        "type" => "text",
        'visible' => array( 'newsletter_popup_check', '=', 1 ),
      ],
    ];
  }
}