<?php

return [
    "type"           => "add",
    "model"          => App\Models\Add::class,
    "label"          => "Ads",
    "label_singular" => "Ad",
    "group"          => "Ads",
    "order"          => TRUE,
    "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"          => "entry_screen",
            "label"         => "Entry Screen",
            "type"          => "checkBox",
            "inList"        => TRUE,
            'info'          => "If checked this ad will be displayed in the app entry screen"
        ],
        [
            "name"          => "in_agenda",
            "label"         => "In agenda",
            "type"          => "checkBox",
            "inList"        => TRUE,
            'info'          => "If checked this ad will be displayed in the agenda section"
        ],
        [
            "name"          => "display_duration",
            "label"         => "Display duration",
            "type"          => "textBox",
            "inList"        => TRUE,
            'info'          => "Display duration in entry screen",
            "validation"    => "numeric",
            "defaultValue"  => 5,
        ],
        [
            "name"          => "description",
            "label"         => "Description",
            "type"          => "textarea",
            "multiLanguage" => TRUE,
            "preValidation" => "xss_clean|trim",
            "validation"    => ""
        ],
        [
            "name"          => "cta",
            "label"         => "Cta",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "sometimes|max:150",
            "inList"        => FALSE,
            "search"        => FALSE,
            "sort"          => FALSE
        ],
        [
            "name"          => "link",
            "label"         => "Link",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "sometimes|max:150|url",
            "inList"        => FALSE,
            "search"        => FALSE,
            "sort"          => FALSE
        ],
        [
            "name"          => "image",
            "label"         => "Image",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => "image",
            "placement"     => "sidebar",
            "minSize"       => 1,
        ],
        [
            "name"          => "video",
            "label"         => "Video",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => "video",
            "placement"     => "sidebar"
        ],

    ],
    "actions"        => [
        "edit", "order", "insert", "delete"
    ]
];
