<?php

    return [
        "type"           => "listBoxItems",
        "model"          => App\Models\ListBoxItem::class,
        "label"          => "List Box Items",
        "label_singular" => "List Box Item",
        "template"       => FALSE,
        "hierarchic"     => FALSE,
        "group"          => "none",
        "order"          => FALSE,
        "showSlug"       => TRUE,
        "showUri"        => FALSE,

        "search" => [
            "fields" => [
                "block_title"
            ],
            "relations" => [
                "rows",
            ],
            "parentRelationships" => [
                "block",
            ]
        ],

        "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"         => "Rows",
                "type"          => "multiplePicker",
                "longList"      => true,
                "allowInsert"   => true,
                "objectTypes"   => ["rows"],
                "order"         => true,
            ],
            [
                "name"          => "authors",
                "label"         => "Authors",
                "type"          => "textBox",
                "maxLength"     => 100,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:100",
            ],
            [
                "name"          => "references",
                "label"         => "References",
                "type"          => "multiplePicker",
                "longList"      => true,
                "allowInsert"   => true,
                "objectTypes"   => ["simpleLinks"],
                "order"         => true,
            ],
            [
                "name"          => "button_type",
                "label"         => "Button Type",
                "type"          => "selectBox",
                "list"          => [
                    "green"       => "Green",
                    "round_green" => "Round Green",
                ],
                "preValidation" => "trim",
                "placement"     => "sidebar",
            ],
            [
                "name"          => "long_title",
                "label"         => "Has long title",
                "type"          => "checkBox",
                "placement"     => "sidebar",
            ],
        ],
        "actions"        => [
            "insert", "edit", "delete"
        ]
    ];
