<?php
return [
    "type"           => "newsTickerSliderItems",
    "model"          => App\Models\NewsTickerSliderItem::class,
    "label"          => "News Ticker Slider Items",
    "label_singular" => "News Ticker Slider Item",
    "group"          => "none",
    "parent" => array(
        "field" => "block_id",
        "contentType" => "blocks"
    ),
    "order"          => TRUE,
    "search" => [
        "fields" => [
            "title",
        ],
        "parentRelationships" => [
            "block",
        ]
    ],
    "fields" => [
        [
            "name"          => "title",
            "label"         => "Title",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "required|max:150",
            "inList"        => TRUE,
            "search"        => TRUE,
            "sort"          => TRUE
        ],
        [
            "name"          => "description",
            "label"         => "Description",
            "type"          => "editor",
            "multiLanguage" => TRUE,
            "preValidation" => "xss_clean|trim",
            "validation"    => "",
        ],
        [
            "name"          => "image",
            "label"         => "Image",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => ["image"],
            "placement"     => "sidebar",
        ],
        [
            "name"          => "color",
            "label"         => "Color",
            "type"          => "selectBox",
            "list"          => [
                "#009DE4" => "Blue",
                "#00628F" => "Dark Blue",
                "#009AB5" => "Teal",
                "#FFA400" => "Orange",
                "#001633" => "Neutral",
            ],
            "defaultValue"  => "#009DE4",
            "preValidation" => "trim",
            "validation"    => "required|in:#009DE4,#00628F,#009AB5,#FFA400,#001633",
        ],
        [
            "name"          => "date",
            "label"         => "Date",
            "type"          => "datePicker",
            "inputType"     => "date",
            "multiLanguage" => FALSE,
            "validation"    => "nullable",
            "placement"     => "sidebar",
        ],
        [
            "name"          => "status_badge",
            "label"         => "Status",
            "type"          => "selectBox",
            "list"          => [
                "completed"   => "Completed",
                "in_progress" => "In Progress",
                "not_started" => "Not Started",
                "new"         => "New",
                "update"      => "Update",
                "milestone"   => "Milestone",
                "started"     => "Started"

            ],
            "defaultValue"  => "",
            "preValidation" => "trim",
            "validation"    => "required|in:completed,in_progress,not_started,new,update,milestone,started",
            "inList"        => TRUE,
        ],
        [
            "name"         => "type_gas",
            "label"        => "Gas",
            "type"         => "checkBox",
            "defaultValue" => FALSE,
            "inList"       => TRUE,
        ],
        [
            "name"         => "type_power",
            "label"        => "Power",
            "type"         => "checkBox",
            "defaultValue" => FALSE,
        ],
        [
            "name"         => "type_carbon",
            "label"        => "Carbon",
            "type"         => "checkBox",
            "defaultValue" => FALSE,
        ],
        [
            "name"         => "type_simplification",
            "label"        => "Simplification",
            "type"         => "checkBox",
            "defaultValue" => FALSE,
        ],
        [
            "name"          => "cta",
            "label"         => "Call to action",
            "type"          => "link",
            "multiLanguage" => TRUE,
            "objectTypes"   => ["page"],
            "maxLabel"      => 50,
            "required"      => false,
        ],
        [
            "name"         => "show_button_option",
            "label"        => "Show Button Option",
            "type"         => "checkBox",
            "defaultValue" => FALSE,
        ],
    ],
    "actions" => [
        "edit", "insert", "delete"
    ]
];
