<?php

class MBTimeline extends MBComponentBase
{
    protected function init_options($options)
    {
        $options->enabled = true;
        $options->id = "inoby-timeline";
        $options->title = __("Časová os", "inoby");
        $options->icon = "clock";
        $options->render_template = get_theme_file_path("components/timeline/template.php");
        $options->fields = [
            [
                "name" => __("Nadpis", "inoby"),
                "id" => "timeline_headline",
                "type" => "text",
                "sanitize_callback" => "none",
            ],
            [
                "group_title" => __("Bod", "inoby"),
                "id" => "timeline_points",
                "type" => "group",
                'clone' => true,
                'collapsible'   => true,
                'sort_clone'    => true,
                'max_clone' => 16,
                "sanitize_callback" => "none",
                'fields'    => [
                    [
                        'id'    => 'done',
                        'type'  => 'checkbox',
                        'std'   => 0,
                        'name'  => __('Splnené', 'inoby'),
                    ],
                    [
                        'id'    => 'date',
                        'type'  => 'text',
                        'name'  => __("Rok", 'inoby'),
                    ],
                    [
                        'id'    => 'desc',
                        'name'  => __('Popis', 'inoby'),
                        'type'  => 'text',
                    ],
                    [
                        'id'    => 'link',
                        'name'  => __('Link', 'inoby'),
                        'type'  => 'text',
                    ],
                ],
            ],
        ];
    }
}