<?php

return [
    "type"           => "eventItems",
    "model"          => App\Models\EventItem::class,
    "label"          => "Events",
    "label_singular" => "Event",
    "group"          => "content types",
    "order"          => FALSE,
    // "search" => [
    //     "fields" => [
    //         "title",
    //         "location",
    //     ],
    //     "relations" => [
    //         "topic",
    //     ],
    // ],
    "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"          => "location",
            "label"         => "Location",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "max:150"
        ],
        [
            "name"          => "date",
            "label"         => "Date",
            "type"          => "datePicker",
            "inputType"     => "date",
            "validation"    => "nullable",
            "placement"     => "sidebar",
            "info"          => "The time you select here will be considered in Berlin/Brussels timezone (CET/CEST)",
        ],
        [
            "name"        => "topic_id",
            "label"       => "Topic",
            "type"        => "selectBox",
            "contentType" => "topics",
            "preValidation" => "trim",
            "validation" => "integer|nullable",
            "inList" => true,
            "search" => true,
            "sort" => true,
            "boxSearch" => true,
            "allowInsert" => false,
        ],
        [
            "name"          => "image",
            "label"         => "Image",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => ["image"],
            "placement"     => "sidebar",
        ],
        [
            "name"          => "cta",
            "label"         => "Call to action",
            "type"          => "link",
            "multiLanguage" => TRUE,
            "objectTypes"   => ["page"],
            "maxLabel"      => 50,
            "required"      => false,
        ],
        [
            "name"          => "start_date",
            "label"         => "Start Date",
            "type"          => "datePicker",
            "inputType"     => "datetime",
            "validation"    => "required",
            "placement"     => "sidebar",
            "info"          => "The time you select here will be considered in Berlin/Brussels timezone (CET/CEST)",
        ],
        [
            "name"          => "end_date",
            "label"         => "End Date",
            "type"          => "datePicker",
            "inputType"     => "datetime",
            "validation"    => "nullable",
            "placement"     => "sidebar",
            "info"          => "The time you select here will be considered in Berlin/Brussels timezone (CET/CEST)",
        ],
        [
            "name"          => "expiration_date",
            "label"         => "Expiration Date",
            "type"          => "datePicker",
            "inputType"     => "datetime",
            "validation"    => "nullable",
            "placement"     => "sidebar",
            "info"          => "The time you select here will be considered in Berlin/Brussels timezone (CET/CEST)",
        ],
    ],
    "actions"        => [
        "edit", "insert", "delete"
    ]
];
