<?php

    return [
        "type"           => "trackerCategories",
        "model"          => App\Models\TrackerCategory::class,
        "label"          => "Tracker Categories",
        "label_singular" => "Tracker Category",
        "group"          => "none",
        "parent" => array(
            "field" => "block_id",
            "contentType" => "blocks"
        ),
        "order"          => TRUE,
        "search" => [
            "fields" => [
                "title",
            ],
            "relations" => [
                "trackerActions",
            ],
            "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"          => "color",
                "label"         => "Color",
                "type"          => "selectBox",
                "list"          => [
                    "#009DE4" => "Blue (Driving...)",
                    "#00628F" => "Dark Blue (Securing...)",
                    "#009AB5" => "Teal (Reaching...)",
                    "#FFA400" => "Orange (Simplifying...)",
                ],
                "defaultValue"  => "#009DE4",
                "preValidation" => "trim",
                "validation"    => "required|in:#009DE4,#00628F,#009AB5,#FFA400",
            ],
            [
                "name"        => "trackerActions",
                "label"       => "Tracker Actions",
                "type"        => "singlePicker",
                "objectType"  => "trackerActions",
                "order"       => TRUE,
            ],
        ],
        "actions" => [
            "edit", "insert", "delete"
        ]
    ];
