<?php

return [
    "type"           => "sliderItems",
    "model"          => App\Models\SliderItem::class,
    "label"          => "Slider Items",
    "label_singular" => "Slider Item",
    "group"          => "content",
    "order"          => TRUE,
    "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"         => "Slider Item Type",
            "type"          => "selectBox",
            "list"          => [
                "image" => "Image",
                "video" => "Video"
            ],
            "defaultValue"  => "image",
            "preValidation" => "trim",
            "validation"    => "",
            "placement"     => "sidebar",
            "inList"        => TRUE,
            "search"        => TRUE,
            "sort"          => TRUE
        ],
        [
            "name"          => "image",
            "label"         => "Image",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => "image",
            "parent"        => [
                "name"   => "type",
                "values" => ["image"]
            ]
        ],
        [
            "name"          => "video",
            "label"         => "Video",
            "type"          => "textBox",
            "maxLength"     => 500,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "max:500",
            "parent"        => [
                "name"   => "type",
                "values" => ["video"]
            ]
        ],
        [
            "name"          => "description",
            "label"         => "Description",
            "type"          => "textArea",
            "maxLength"     => 500,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "max:500",
            "inList"        => TRUE,
            "search"        => TRUE,
            "sort"          => TRUE
        ],
    ],
    "actions"        => [
        "edit", "order", "insert", "delete"
    ]
];
