<?php

return [
    "type"           => "meetings",
    "model"          => App\Models\Meeting::class,
    "label"          => "Meetings",
    "label_singular" => "Meeting",
    "group"          => "content types",
    "order"          => FALSE,
    "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"          => "type",
            "label"         => "Meeting Type",
            "type"          => "selectBox",
            "list"          => [
                "general_meeting" => "General Meeting",
                "committee" => "Committee",
                "work_group" => "Task Force / Work Group",
            ],
            "defaultValue"  => "general_meeting",
            "preValidation" => "trim",
            "validation"    => "in:general_meeting,committee,work_group",
        ],
        [
            "name"      => "committee_id",
            "label"     => "Committee",
            "type"        => "selectBox",
            "contentType" => "committees",
            "preValidation" => "trim",
            "inList" => true,
            "search" => true,
            "sort" => true,
            "boxSearch" => true,
            "allowInsert" => true,
            "parent"        => [
                "name"   => "type",
                "values" => [
                    "committee",
                ]
            ]
        ],
        [
            "name"        => "work_group_id",
            "label"       => "Work Group",
            "type"        => "selectBox",
            "contentType" => "work_groups",
            "preValidation" => "trim",
            "inList" => true,
            "search" => true,
            "sort" => true,
            "boxSearch" => true,
            "allowInsert" => true,
            "parent"        => [
                "name"   => "type",
                "values" => [
                    "work_group",
                ]
            ]
        ],
        [
            "name"          => "start_date",
            "label"         => "Start Date",
            "type"          => "datePicker",
            "inputType"     => "datetime",
            "validation"    => "required",
            "placement"     => "sidebar"
        ],
        [
            "name"          => "end_date",
            "label"         => "End Date",
            "type"          => "datePicker",
            "inputType"     => "datetime",
            "validation"    => "nullable",
            "placement"     => "sidebar"
        ],
        [
            "name"          => "location",
            "label"         => "Location",
            "type"          => "editor",
            "multiLanguage" => TRUE,
            "preValidation" => "xss_clean|trim",
            "validation"    => "",
        ],
        [
            "name"          => "maps_link",
            "label"         => "Google Maps Link",
            "type"          => "textBox",
            "maxLength"     => 250,
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "max:250",
        ],
        [
            "name"          => "contact_details",
            "label"         => "Contact Details",
            "type"          => "editor",
            "multiLanguage" => TRUE,
            "preValidation" => "xss_clean|trim",
            "validation"    => "",
        ],
        [
            "name"          => "agenda",
            "label"         => "Agenda",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => ["image", "document"],
            "placement"     => "sidebar",
        ],
        [
            "name"          => "cta",
            "label"         => "Call to action",
            "type"          => "link",
            "multiLanguage" => TRUE,
            "objectTypes"   => ["page"],
            "maxLabel"      => 50,
            "required"      => false,
        ],
        [
            "name"        => "documentLists",
            "label"       => "Document Lists",
            "type"        => "multiplePicker",
            "longList"    => TRUE,
            "allowInsert" => TRUE,
            "objectTypes" => ["document_lists"],
            "order"       => TRUE,
            "maxSize"     => 1,
        ],
    ],
    "actions"        => [
        "edit", "order", "insert", "delete"
    ]
];
