<?php

    return [
        "type"           => "firmware",
        "model"          => App\Models\Firmware::class,
        "label"          => "Firmwares",
        "label_singular" => "Firmware",
        "template"       => FALSE,
        "hierarchic"     => FALSE,
        "group"          => "products",
        "order"          => TRUE,
        "showSlug"       => TRUE,
        "showUri"        => FALSE,
        
        "search" => [
            "title" => "block_title",
            "fields" => [
                "block_title",
            ],
            "relations" => [
                "rows",
            ],
        ],

        "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"          => "rows",
                "label"         => "Text rows",
                "type"          => "multiplePicker",
                "longList"      => false,
                "allowInsert"   => true,
                "objectTypes"   => ["simpleRow"],
                "order"         => true
            ],
            [  
                "name"          => "models",
                "label"         => "Models",
                "type"          => "multiplePicker",
                "longList"      => false,
                "allowInsert"   => true,
                "objectTypes"   => ["productGroup"],
                "order"         => false
            ],
            [  
                "name"          => "links",
                "label"         => "Links",
                "type"          => "multiplePicker",
                "longList"      => false,
                "allowInsert"   => true,
                "objectTypes"   => ["webLinks"],
                "order"         => false
            ],
            [  
                "name"          => "authors",
                "label"         => "Authors",
                "type"          => "multiplePicker",
                "longList"      => false,
                "allowInsert"   => true,
                "objectTypes"   => ["simpleLinks"],
                "order"         => false
            ],
            [
                "name"          => "reference",
                "label"         => "Reference",
                "type"          => "link",
                "maxLabel"      => 150,
                "multiLanguage" => FALSE,
                "objectTypes"   => [
                    "page", "product"
                ],
                "required"      => false,
            ],
            [
                "name"          => "image",
                "label"         => "Image",
                "type"          => "mediaPicker",
                "multiple"      => false,
                "mediaType"     => "image",
                "placement"     => "sidebar",
            ],
        ],
        "actions"        => [
            "insert", "edit", "delete", "order"
        ]
    ];
