<?php

    return [
        "type"           => "project",
        "model"          => App\Models\Project::class,
        "label"          => "projects",
        "label_singular" => "project",
        "template"       => FALSE,
        "hierarchic"     => FALSE,
        "group"          => "community",
        "order"          => TRUE,
        "showSlug"       => TRUE,
        "showUri"        => FALSE,
        
        "search" => [
            "title" => "block_title",
            "fields" => [
                "block_title",
                "sub_title",
                "description",
            ],
        ],

        "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"          => "link",
                "maxLabel"      => 180,
                "multiLanguage" => true,
                "objectTypes"   => [
                    "page", "product"
                ],
                "required"      => TRUE,
            ],
            [
                "name"          => "sub_title",
                "label"         => "Sub title",
                "type"          => "textBox",
                "maxLength"     => 150,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:150",
                "inList"        => TRUE,
                "search"        => TRUE,
                "sort"          => TRUE
            ],
            [
                "name"          => "authors",
                "label"         => "Authors",
                "type"          => "multiplePicker",
                "longList"      => false,
                "allowInsert"   => true,
                "objectTypes"   => ["simpleLinks"],
                "order"         => true
            ],
            [
                "name"          => "description",
                "label"         => "Description",
                "type"          => "textArea",
                "maxLength"     => 500,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:500",
                "height"        => "medium",
            ],
            [
                "name"      => "highlightImage",
                "label"     => "Highlight image",
                "type"      => "mediaPicker",
                "multiple"  => FALSE,
                "mediaType" => "image",
            ],
            [
                "name"      => "secondaryImage",
                "label"     => "List image",
                "type"      => "mediaPicker",
                "multiple"  => FALSE,
                "mediaType" => "image",
            ],
            [  
                "name"          => "categories",
                "label"         => "Categories",
                "type"          => "multiplePicker",
                "longList"      => false,
                "allowInsert"   => true,
                "objectTypes"   => ["categories"],
                "order"         => false
            ],
            [  
                "name"          => "tags",
                "label"         => "Tags",
                "type"          => "multiplePicker",
                "longList"      => false,
                "allowInsert"   => true,
                "objectTypes"   => ["tags"],
                "order"         => false
            ],
        ],
        "actions"        => [
            "insert", "edit", "delete", "order"
            ]
        ];
