<?php

    return [
        "type"           => "pressReleases",
        "model"          => App\Models\PressRelease::class,
        "label"          => "Press Releases",
        "label_singular" => "Press Release",
        "group"          => "content types",
        "order"          => FALSE,
        "search" => [
            "title" => "title",
            "fields" => [
                "title",
                "subtitle",
                "intro",
                "wysiwyg",
                "label_banner",
            ],
            "relations" => [
                "country",
                "topic",
                "tags",
            ],
        ],
        "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"          => "subtitle",
                "label"         => "Subtitle",
                "type"          => "textBox",
                "maxLength"     => 150,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:150"
            ],
            [
                "name"        => "country_id",
                "label"       => "Country",
                "type"        => "selectBox",
                "contentType" => "countries",
                "preValidation" => "trim",
                "validation" => config('app.locale') === 'de' ? "nullable" : "required|integer",
                "inList" => true,
                "search" => true,
                "sort" => true,
                "boxSearch" => true,
                "allowInsert" => true
            ],
            [
                "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"          => "imageMobile",
                "label"         => "Image Mobile",
                "type"          => "mediaPicker",
                "multiple"      => FALSE,
                "mediaType"     => ["image"],
                "placement"     => "sidebar",
            ],
            [
                "name"          => "document",
                "label"         => "Document",
                "type"          => "mediaPicker",
                "multiple"      => FALSE,
                "mediaType"     => ["document"],
                "placement"     => "sidebar",
            ],
            [
                "name"          => "intro",
                "label"         => "Intro",
                "type"          => "textArea",
                "maxLength"     => 500,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:500",
                "inList"        => TRUE,
                "search"        => TRUE,
                "sort"          => TRUE
            ],
            [
                "name"          => "wysiwyg",
                "label"         => "Editor",
                "type"          => "editor",
                "multiLanguage" => TRUE,
                "preValidation" => "xss_clean|trim",
                "validation"    => "",
            ],
            [
                "name"          => "label_banner",
                "label"         => "Label Banner",
                "type"          => "textBox",
                "maxLength"     => 100,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:100"
            ],
            [
                "name"        => "tags",
                "label"       => "Tags",
                "type"        => "multiplePicker",
                "longList"    => TRUE,
                "allowInsert" => TRUE,
                "objectTypes" => ["tags"],
                "order"       => TRUE,
            ],
            [
                "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"
        ]
    ];
