<?php

return [
    "type"           => "members",
    "model"          => App\Models\Member::class,
    "label"          => "Members",
    "label_singular" => "Member",
    "group"          => "content types",
    "order"          => FALSE,
    // "search" => [
    //     "fields" => [
    //         "title",
    //         "description",
    //     ],
    //     "relations" => [
    //         "memberType",
    //         "country",
    //     ],
    // ],
    "fields"         => [
        [
            "name"          => "title",
            "label"         => "Company Name",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "required|max:150",
            "inList"        => TRUE,
            "search"        => TRUE,
            "sort"          => TRUE
        ],
        [
            "name"          => "description",
            "label"         => "Description",
            "type"          => "editor",
            "multiLanguage" => TRUE,
            "preValidation" => "xss_clean|trim",
        ],
        [
            "name"          => "cta",
            "label"         => "Call to action",
            "type"          => "link",
            "multiLanguage" => TRUE,
            "objectTypes"   => ["page"],
            "maxLabel" => 50,
            "required"      => false,
        ],
        [
            "name"        => "member_type_id",
            "label"       => "Member Type",
            "type"        => "selectBox",
            "contentType" => "memberTypes",
            "preValidation" => "trim",
            "validation" => "required|integer|min:1",
            "inList" => true,
            "search" => true,
            "sort" => true,
            "boxSearch" => true,
            "allowInsert" => true
        ],
        [
            "name"        => "country_id",
            "label"       => "Country",
            "type"        => "selectBox",
            "contentType" => "countries",
            "preValidation" => "trim",
            "validation" => "required|integer|min:1",
            "inList" => true,
            "search" => true,
            "sort" => true,
            "boxSearch" => true,
            "allowInsert" => true
        ],
        [
            "name"      => "logo",
            "label"     => "Logo",
            "type"      => "mediaPicker",
            "multiple"  => FALSE,
            "mediaType" => ["image", "svg"],
            "placement" => "sidebar"
        ],
    ],
    "actions"        => [
        "edit", "insert", "delete"
    ]
];
