<?php

    return [
        "type"           => "accordionItem",
        "model"          => App\Models\AccordionItem::class,
        "label"          => "Accordion items",
        "label_singular" => "Accordion item",
        "template"       => FALSE,
        "hierarchic"     => FALSE,
        "group"          => "none",
        "order"          => TRUE,
        "showSlug"       => TRUE,
        "showUri"        => FALSE,

        "search" => [
            "fields" => [
                "question",
                "answer",
            ],
            "parentRelationships" => [
                "block",
            ]
        ],

        "fields"         => [
            [
                "name"          => "title",
                "label"         => "title",
                "type"          => "textBox",
                "maxLength"     => 40,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "required|max:40",
                "inList"        => TRUE,
                "search"        => TRUE,
                "sort"          => TRUE
            ],
            [
                "name"          => "question",
                "label"         => "Question",
                "type"          => "textBox",
                "maxLength"     => 150,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "required|max:150",
                "inList"        => TRUE,
                "search"        => TRUE,
                "sort"          => TRUE
            ],
            [
                "name"          => "answer",
                "label"         => "Answer",
                "type"          => "textArea",
                "maxLength"     => 1000,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "required|htmlMax:1000",
            ],
        ],
        "actions"        => [
            "insert", "edit", "delete", "order"
        ]
    ];
