<?php

use App\Libs\Services\FcmService;
use App\Models\Exhibition;

return [
    "type"           => "exhibition",
    "model"          => App\Models\Exhibition::class,
    "label"          => "Exhibitions",
    "label_singular" => "Exhibition",
    "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"          => "sponsored",
            "label"         => "Sponsored",
            "type"          => "checkBox",
            "inList"        => TRUE,
        ],
        /*  [
            "name"          => "description",
            "label"         => "Description",
            "type"          => "editor",
            "multiLanguage" => TRUE,
            "preValidation" => "xss_clean|trim",
            "validation"    => ""
        ], */
        [
            "name"          => "location_id",
            "label"         => "Location",
            "type"          => "selectBox",
            "boxSearch"     => true,
            "contentType"   => "location",
            "labelField"    => "title",
            "validation"    => "required"
        ],
        [
            "name"          => "curator",
            "label"         => "Curator",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "max:150"
        ],
        [
            "name"          => "press_release_link",
            "label"         => "Press release URL",
            "type"          => "textBox",
            "maxLength"     => 255,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "url|max:255"
        ],
        [
            "name"          => "artists",
            "label"         => "Artists",
            "type"          => "multiplePicker",
            "longList"      => TRUE,
            "allowInsert"   => TRUE,
            "objectTypes"   => ["artist"],
            "order"         => TRUE,
            "maxSize"       => 50
        ],
        [
            "name"          => "collections",
            "label"         => "Collections",
            "type"          => "multiplePicker",
            "longList"      => TRUE,
            "allowInsert"   => TRUE,
            "objectTypes"   => ["collection"],
            "order"         => TRUE,
            "maxSize"       => 50
        ],
        [
            "name"          => "image_label",
            "label"         => "Image Label",
            "type"          => "textBox",
            "maxLength"     => 255,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "nullable|max:150",
            "placement"     => "sidebar",
            "multiLanguage" => TRUE,
        ],
        [
            "name"          => "image",
            "label"         => "Image",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => "image",
            "placement"     => "sidebar"
        ],
        [
            "name"          => "gifImage",
            "label"         => "Gif Image",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => "image",
            "placement"     => "sidebar",
            'info'          => 'Escolha uma imagem do tipo gif. Caso inclua um video esta imagem não será mostrada.',
            'allowed'       => 'gif',
        ],
        [
            "name"          => "video",
            "label"         => "Video",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => "video",
            "placement"     => "sidebar",
            'info'          => 'Escolha um video.'
        ],
        [
            "name"          => "theme",
            "label"         => "Theme",
            "type"          => "selectBox",
            "list"          => Exhibition::getThemes(),
            "defaultValue"  => "",
            "preValidation" => "trim",
            "validation"    => "",
            "placement"     => "sidebar"
        ],
        [
            "name"          => "bgcolor",
            "label"         => "Background Color",
            "type"          => "colorPicker",
            "defaultValue"  => "",
            "preValidation" => "trim",
            "validation"    => "",
            "placement"     => "sidebar"
        ],
        [
            "name"          => "MediaGalleryItems",
            "label"         => "Media Gallery",
            "type"          => "singlePicker",
            "allowInsert"   => true,
            "objectType"    => "media_gallery_item",
            "order"         => true,
            "maxSize"       => 50,

        ],
        [
            "name"          => "tags",
            "label"         => "Tags",
            "type"          => "multiplePicker",
            "longList"      => TRUE,
            "allowInsert"   => TRUE,
            "objectTypes"   => ["tag"],
            "order"         => TRUE,
            "maxSize"       => 50,
            "placement"     => "sidebar"
        ],
        [
            "name"          => "date_from",
            "label"         => "From",
            "type"          => "datePicker",
            "inputType"     => "datetime", //time|date|datetime
            "multiLanguage" => false,
            "validation"    => "required|date",
            "placement"     => "sidebar",
            "inList"        => true,
            "search"        => true,
            "sort"          => true
        ],
        [
            "name"          => "date_to",
            "label"         => "Until",
            "type"          => "datePicker",
            "inputType"     => "datetime", //time|date|datetime
            "multiLanguage" => false,
            "validation"    => "required|date|after:date_from",
            "placement"     => "sidebar",
            "inList"        => true,
            "search"        => true,
            "sort"          => true
        ],
        [
            "name"          => "section_room_sheet",
            "label"         => "Room Sheet information",
            "type"          => "section",
            "state"         => "open"
        ],
        [
            "name"          => "room_sheet_title",
            "label"         => "Room Sheet Title",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "max:150",
            "inList"        => FALSE,
            "search"        => FALSE,
            "sort"          => FALSE
        ],
        [
            "name"          => "room_sheet_author",
            "label"         => "Room Sheet Author",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "max:150",
            "inList"        => FALSE,
            "search"        => FALSE,
            "sort"          => FALSE
        ],
        [
            "name"          => "room_sheet_subtitle",
            "label"         => "Room Sheet Subtitle",
            "type"          => "textArea",
            "maxLength"     => 512,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "max:512",
            "inList"        => FALSE,
            "search"        => FALSE,
            "sort"          => FALSE
        ],
        [
            "name"          => "room_sheet_description",
            "label"         => "Room Sheet Description",
            "type"          => "editor",
            "multiLanguage" => TRUE,
            "preValidation" => "xss_clean|trim",
            "validation"    => ""
        ],
        [
            "name"          => "room_sheet_footnotes",
            "label"         => "Room Sheet Footnotes",
            "type"          => "textArea",
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "",
            "inList"        => FALSE,
            "search"        => FALSE,
            "sort"          => FALSE
        ],
        [
            "name"          => "roomSheetImage",
            "label"         => "Room Sheet Image",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => "image",
        ],
        [
            "name"          => "room_sheet_image_label",
            "label"         => "Room Sheet Image Label",
            "type"          => "textArea",
            "multiLanguage" => TRUE,
            "maxLength"     => 512,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "max:512",
            "inList"        => FALSE,
            "search"        => FALSE,
            "sort"          => FALSE
        ],
        [
            "name"          => "section_room_sheet",
            "label"         => "",
            "type"          => "section",
            "state"         => "close"
        ],
        FcmService::getConfigForSendPushNotifications('exhibititions', 'New Exhibitions'),
    ],
    "actions"        => [
        "edit", "order", "insert", "delete"
    ]
];
