<?php

    return [
        "type"           => "addon",
        "model"          => App\Models\Addon::class,
        "label"          => "Addons",
        "label_singular" => "Addon",
        "template"       => FALSE,
        "hierarchic"     => FALSE,
        "group"          => "none",
        "order"          => TRUE,
        "showSlug"       => TRUE,
        "showUri"        => 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"          => "block_title",
                "label"         => "Frontend title",
                "type"          => "textBox",
                "maxLength"      => 150,
                "multiLanguage" => true,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "required|max:150",
                "inList"        => TRUE,
                "search"        => TRUE,
                "sort"          => TRUE
            ],
            [
                "name"          => "description",
                "label"         => "Description",
                "type"          => "textArea",
                "maxLength"     => 550,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:550",
                "height"        => "medium",
            ],
            [
                "name"          => "link",
                "label"         => "Link",
                "type"          => "link",
                "maxLabel"     => 30,
                "multiLanguage" => FALSE,
                "objectTypes"   => [
                    "page", "product"
                ],
                "required"      => false,
            ],
            [
                "name"          => "file_label",
                "label"         => "File label",
                "type"          => "textBox",
                "maxLength"      => 30,
                "multiLanguage" => true,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "required_with:file|max:30",
            ],
            [
                "name"      => "file",
                "label"     => "File",
                "type"      => "mediaPicker",
                "multiple"  => FALSE,
                "mediaType" => "document",
            ],
        ],
        "actions"        => [
            "insert", "edit", "delete", "order"
            ]
        ];
