<?php

return [
    "type"           => "tracked_result",
    "model"          => App\Models\TrackedResult::class,
    "label"          => "content_types.tracked_result_plural",
    "label_singular" => "content_types.tracked_result_singular",
    "hierarchic"     => FALSE,
    "group"          => "competitions",
    "isPage"         => TRUE,
    "baseUri"        => [
        'en'         => '/tracked-results',
        'de'         => '/ergebnisse-weiterverfolgt'
    ],
    "search"         => [
        "title" => "title",
        "fields" => [
            "title",
        ],
        "relations" => [
        ],
    ],
    "fields"         => [
        [
            "name"          => "competition_id",
            "label"         => "content_types.competition_tender",
            "type"          => "selectBox",
            "contentType"   => "competition",
            "contentField"  => "wa_id",
            "mandatory"     => TRUE,
            "inList"        => TRUE,
            "search"        => TRUE,
            "listField"     => "wa_id",
            "preValidation" => "trim",
            "validation"    => "required",
        ],
        [
            "name"          => "title",
            "label"         => "content_types.title",
            "type"          => "textBox",
            "maxLength"     => 255,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "required|max:255",
            "inList"        => TRUE,
            "search"        => TRUE,
            "sort"          => TRUE,
        ],
        /*
        [
            "name"          => "is_public",
            "label"         => "Is public?",
            "type"          => "checkBox",
            "validation"    => "nullable|boolean",
            "inList"        => TRUE,
            "sort"          => TRUE,
        ],
        */
        [
            "name"          => "subtitle",
            "label"         => "content_types.subtitle",
            "type"          => "textBox",
            "maxLength"     => 255,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "nullable|string|max:255",
        ],
        [
            "name"          => "updated_date",
            "label"         => "content_types.updated_date",
            "type"          => "datePicker",
            "inputType"     => "date",
        ],
        [
            "name"          => "finished_date",
            "label"         => "content_types.finished_date",
            "type"          => "datePicker",
            "inputType"     => "date",
        ],
        [
            "name"          => "magazin",
            "label"         => "content_types.magazin",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "nullable|string|max:150",
        ],
        [
            "name"          => "construction_ownership",
            "label"         => "content_types.construction_ownership",
            "type"          => "textArea",
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "nullable|string",
        ],
        [
            "name"          => "street",
            "label"         => "content_types.street",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "nullable|string|max:150",
        ],
        [
            "name"          => "location",
            "label"         => "content_types.location",
            "type"          => "textBox",
            "maxLength"     => 100,
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "nullable|string|max:100",
        ],
        [
            "name"          => "postal_code",
            "label"         => "content_types.postal_code",
            "type"          => "textBox",
            "maxLength"     => 10,
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "nullable|string|max:10",
        ],
        [
            "name" => "executingPartyGroups",
            "label" => "content_types.executing_party_groups",
            "type" => "repeater",
            "objectType" => "executing_party_group",
            "order" => true,
        ],
        [
            "name"          => "content",
            "label"         => "content_types.tracked_result_content",
            "type"          => "editor",
            "multiLanguage" => FALSE,
            "preValidation" => "xss_clean|trim",
        ],
        [
            "name" => "manufacturerGroups",
            "label" => "content_types.manufacturer_groups",
            "type" => "repeater",
            "objectType" => "manufacturer_group",
            "order" => true,
        ],
        [
            "name"          => "pdfDocument",
            "label"         => "content_types.pdf_document",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => "document",
        ],
        [
            "name"          => "images",
            "label"         => "content_types.images",
            "type"          => "mediaPicker",
            "multiple"      => TRUE,
            "mediaType"     => "image",
        ],
        [
            "name"          => "image",
            "label"         => "content_types.main_image",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => "image",
        ],
        [
            "name"          => "homepageImage",
            "label"         => "content_types.homepage_image",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => "image",
        ],
    ],
    "actions"        => [
        "insert", "edit", "delete"
    ]
];
