<?php

    return [
        "type"           => "notification",
        "model"          => App\Models\Notification::class,
        "label"          => "Notifications",
        "label_singular" => "Notification",
        "group"          => "general",
        "order"          => FALSE,
        "fields"         => [
            [
                "name"          => "title",
                "label"         => "Reference Title",
                "info"          => "(not used on the frontend)",
                "type"          => "textBox",
                "maxLength"     => 150,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "required|max:150",
                "inList"        => TRUE,
                "search"        => TRUE,
                "sort"          => TRUE
            ],
            [
                "name"          => "notification_text",
                "label"         => "Notification text",
                "type"          => "textBox",
                "maxLength"     => 255,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:255"
            ],
            [
                "name" => "cta",
                "label" => "Notification Link", 
                "type" => "link",
                "multiLanguage" => true,
                "required" => false,
                "maxLabel" => 50,
                "objectTypes" => ["page"]
            ],
            [
                "name"          => "icon",
                "label"         => "Image Icon",
                "info"          => "SVG",
                "type"          => "mediaPicker",
                "multiple"      => false,
                "multiLanguage" => false,
                "mediaType"     => "document",
                "allowed"       => "svg",
                "placement"     => "sidebar",
            ],
            [
                "name"          => "start_date",
                "label"         => "Start date",
                "info"          => "IMPORTANT: date / time should be UTC",
                "type"          => "datePicker",
                "inputType"     => "datetime",
                "multiLanguage" => false,
                "validation" => "required",
                "placement"     => "sidebar",
                "inList" => true
            ],
            [
                "name"          => "end_date",
                "label"         => "End date",
                "info"          => "IMPORTANT: date / time should be UTC",
                "type"          => "datePicker",
                "inputType"     => "datetime",
                "multiLanguage" => false,
                "validation"    => "required",
                "placement"     => "sidebar",
                "inList"        => true
            ]
        ],
        "actions"        => [
            "edit", "insert", "delete"
        ]
    ];
