<?php

    return [
        "type"           => "pageTab",
        "model"          => App\Models\PageTab::class,
        "label"          => "Page tabs",
        "label_singular" => "Page tab",
        "group"          => "tabs",
        "order"          => TRUE,

        "search" => [
            "title" => "tab_title",
            "relations" => [
                "tabBlocks",
            ]
        ],

        "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"          => "tab_title",
                "label"         => "Tab Title",
                "type"          => "textBox",
                "maxLength"     => 150,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "required|max:150",
                "inList"        => TRUE,
                "search"        => TRUE,
                "sort"          => TRUE
            ],
            [
                "name"          => "tabBlocks",
                "label"         => "Tab Blocks",
                "type"          => "multiplePicker",
                "longList"      => true,
                "allowInsert"   => true,
                "objectTypes"   => ["blocks"],
                "order"         => true,
            ],
            
        ],
        "actions"        => [
            "edit", "insert", "delete", 'order'
        ]
    ];
