<?php

return [
    "type"           => "archive",
    "model"          => App\Models\Archive::class,
    "label"          => "content_types.archive_plural",
    "label_singular" => "content_types.archive_singular",
    "hierarchic"     => FALSE,
    "group"          => "content",
    "isPage"         => TRUE,
    "baseUri"        => [
        'en'         => '/archives',
        'de'         => '/archiv'
    ],
    "search"         => [
        "title" => "title",
        "fields" => [
            "title",
        ],
        "relations" => [],
    ],
    "fields"         => [
        [
            "name"          => "title",
            "label"         => "content_types.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"         => "content_types.subtitle",
            "type"          => "textBox",
            "maxLength"     => 255,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "nullable|max:255",
        ],
        [
            "name"          => "label",
            "label"         => "content_types.label",
            "type"          => "textBox",
            "maxLength"     => 255,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "nullable|max:255",
        ],
        [
            "name"          => "archive_date",
            "label"         => "content_types.archive_date",
            "type"          => "datePicker",
            "inputType"     => "date",
            "validation"    => "required",
            "inList"        => TRUE,
            "sort"          => TRUE
        ],
        [
            "name"          => "document",
            "label"         => "content_types.document",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => "document",
            "baseFolder"    => "archive",
        ],
        [
            "name"          => "image",
            "label"         => "content_types.image",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => "image",
        ],
        [
            "name"          => "archiveAccordions",
            "label"         => "content_types.archive_accordion_plural",
            "type"          => "repeater",
            "objectType"    => "archive_accordion",
            "order"         => true,
        ],
    ],
    "actions"        => [
        "insert", "edit", "delete"
    ]
];
