<?php

use App\Libs\Services\FcmService;

return [
    "type"           => "collection",
    "model"          => App\Models\Collection::class,
    "label"          => "Collections",
    "label_singular" => "Collection",
    "group"          => "Exhibitions",
    "order"          => FALSE,
    "fields"         => [
        [
            "name"          => "title",
            "label"         => "Name",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "required|max:150",
            "inList"        => TRUE,
            "search"        => TRUE,
            "sort"          => TRUE
        ],
        [
            "name"          => "share_url",
            "label"         => "Share url",
            "type"          => "textBox",
            "maxLength"     => 512,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "url|max:512",
            "inList"        => FALSE,
            "search"        => FALSE,
            "sort"          => FALSE,
            'info'          => "This will be the corresponding link for this content in the website. If not provided a default will be assumed."
        ],
        [
            "name"          => "highlight",
            "label"         => "Highlight",
            "type"          => "checkBox",
            "inList"        => TRUE,
        ],
        [
            "name"          => "description",
            "label"         => "Description",
            "type"          => "textArea",
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => ""
        ],
        [
            "name"          => "collection_catalogue_id",
            "label"         => "Catalogue",
            "type"          => "selectBox",
            "boxSearch"     => true,
            "contentType"   => "collection_catalogue",
            "labelField"    => "title",
            "validation"    => "",
            "allowInsert"   => TRUE,
        ],
        [
            "name"          => "address_name",
            "label"         => "Address Name",
            "type"          => "textBox",
            "maxLength"     => 255,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "nullable|max:255",
        ],
        [
            "name"          => "address",
            "label"         => "Address",
            "type"          => "textArea",
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => ""
        ],
        [
            "name"  => "map_position",
            "label" => "Map position",
            "type"  => "location"
        ],
        [
            "name"          => "website",
            "label"         => "Website",
            "type"          => "textBox",
            "maxLength"     => 255,
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "url|max:150",
        ],
        [
            "name" => "city_id",
            "label" => "City",
            "type" => "selectBox",
            "contentType" => "city",
            "labelField" => "title",
            "validation" => "nullable"
        ],
        /* [
            "name" => "city_zone_id",
            "label" => "City Zone",
            "type" => "selectBox",
            "contentType" => "city_zone",
            "labelField" => "title",
            "validation" => "nullable",
            "allowInsert" => TRUE,
        ], */
        FcmService::getConfigForSendPushNotifications('collection', 'New Collections'),
        [
            "name"          => "image_label",
            "label"         => "Image Label",
            "type"          => "textBox",
            "maxLength"     => 255,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "nullable|max:255",
            "placement"     => "sidebar",
            "multiLanguage" => TRUE,
        ],
        [
            "name"          => "image",
            "label"         => "Image",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => "image",
            "placement"     => "sidebar"
        ],
        [
            "name"          => "exploreCollectionImage",
            "label"         => "Explore collection Image",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => "image",
            "placement"     => "sidebar",
        ],
        [
            "name"          => "artists",
            "label"         => "Artists",
            "type"          => "multiplePicker",
            "longList"      => TRUE,
            "allowInsert"   => TRUE,
            "objectTypes"   => ["artist"],
            "order"         => TRUE,
            "maxSize"       => 100,
            "placement"     => "sidebar",
            "info"          => "Artists included in this collection",
        ],
        /*  [
            "name"          => "blocks",
            "label"         => "Blocks",
            "type"          => "multiplePicker",
            "longList"      => true,
            "allowInsert"   => true,
            "objectTypes"   => ["blocks"],
            "order"         => true
        ], */
    ],
    "actions"        => [
        "edit", "order", "insert", "delete"
    ]
];
