<?php
return array(
    "type" => "sector",
    "model" => "Sector",
    "label" => "sectors",
    "label_singular" => "sector",
    "group" => "solutions",
    "template" => false,
    "order" => true,
    "websites" => array(1),
    "baseUri" => array(
        1 => "/sectors"
    ),
    "search" => array(
        1 => array(
            "primary" => array("title","tagline"),
            "secondary" => array("content", "summary"),
            "display" => array(
                "title" => "title",
                "content" => "reference_summary|summary"
            ),
            "uri" => '/sectors/{slug}',
            "relations" => [
                "blocks",
            ]
        )
    ),
    "fields" => array(
        array(
            "name" => "title",
            "label" => "title",
            "type" => "textBox",
            "maxLength" => 100,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "required|max:100",
            "inList" => true,
            "search" => true,
            "sort" => true
        ),
        array(
            "name" => "reference_summary",
            "label" => "Reference Summary",
            "type" => "textBox",
            "maxLength" => 220,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:220"
        ),
        array(
            "name" => "tagline",
            "label" => "tagline",
            "type" => "textBox",
            "maxLength" => 255,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:255",
            "inList" => true,
            "search" => true,
            "sort" => true
        ),
        array(
            "name" => "header_overlap",
            "label" => "Header overlaps content?",
            "type" => "checkBox",
            "placement" => "sidebar",
            "blocksMode" => "also",
            "parent" => array(
                "name" => "layout_type",
                "values" => array("blocks")
            )
        ),
        array(
            "name" => "layout_type",
            "label" => "Layout Type",
            "type" => "selectBox",
            "list" => array(
                "standard" => "Standard",
                "blocks" => "Blocks"
            ),
            "preValidation" => "trim",
            "validation" => "nullable|in:standard,blocks",
            "placement" => "sidebar",
            "inList" => true,
            "search" => true,
            "sort" => true
        ),
        array(
            "name" => "summary",
            "label" => "summary",
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "trim|xss_clean",
            "validation" => "",
        ),
        array(
            "name" => "content",
            "label" => "details",
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "trim",
            "validation" => "",
            "parent" => array(
                "name" => "layout_type",
                "values" => array("standard", "")
            )
        ),
        array(
            "name"          => "blocks",
            "label"         => "Blocks",
            "type"          => "multiplePicker",
            "longList"      => true,
            "multiLanguage" => true,
            "allowInsert"   => true,
            "objectTypes"   => ["block"],
            "order"         => true,
            "blocksMode" => "also",
            "duplicateRelated" => true,
            "parent" => array(
                "name" => "layout_type",
                "values" => array("blocks")
            )
        ),
        /*
        array(
            "name" => "relatedCaseStudies",
            "label" => "related case studies",
            "type" => "multiplePicker",
            "websiteFiltered" => false,
            "objectTypes" => array("case_study"),
            "order" => true,
            "maxSize" => 3
        ),   */
        array(
            "name" => "sector_type",
            "label" => "type",
            "type" => "selectBox",
            "list" => array(
                "corporate" => "Corporate",
                "public" => "Public"
            ),
            "preValidation" => "trim",
            "validation" => "required|in:corporate,public",
            "inList" => true,
            "search" => true,
            "sort" => true,
            "placement" => "sidebar"
        ),
        array(
            "name" => "contact_id",
            "label" => "contact",
            "type" => "selectBox",
            "contentType" => "contact",
            "labelField" => "name",
            "dropdownSortField" => "contacts.name",
            "allowInsert" => true,
            "preValidation" => "trim",
            "validation" => "nullable|integer|min:1",
            "inList" => false,
            "search" => false,
            "sort" => false,
            "placement" => "sidebar"
        ),
        array(
            "name" => "sidebarWidgets",
            "label" => "Sidebar Widgets",
            "type" => "singlePicker",
            "objectType" => "sidebar_widget",
            "pivotTable" => "sector_sb_widgets",
            "order" => true,
            "maxSize" => 20,
            "parent" => array(
                "name" => "layout_type",
                "values" => array("standard", "")
            )
        ),
        array(
            "name" => "relatedSolutions",
            "label" => "Related Solutions",
            "type" => "multiplePicker",
            "objectTypes" => array("solution"),
            "order" => true
        ),
        array(
            "name" => "recommend",
            "label" => "Related Case Studies",
            "type" => "multiplePicker",
            "websiteFiltered" => true,
            "longList" => true,
            "objectTypes" => array("case_study"),
            "order" => true
        ),
        array(
            "name" => "meta_title",
            "label" => "SEO - Title Tag",
            "type" => "textBox",
            "maxLength" => 150,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:150"
        ),
        array(
            "name" => "meta_keywords",
            "label" => "SEO - Keywords",
            "type" => "textBox",
            "maxLength" => 150,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:150"
        ),
        array(
            "name" => "meta_description",
            "label" => "SEO - Description",
            "type" => "textArea",
            "maxLength" => 300,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:300"
        ),
        array(
            "name" => "codeEmbeds",
            "label" => "Code Embeds",
            "type" => "multiplePicker",
            "objectTypes" => array("code_embed"),
            "order" => true,
            "allowInsert" =>false,
        ),
        /* NOT USED ANYMORE
        array(
            "name" => "highlight",
            "label" => "Highlight this section?",
            "type" => "selectBox",
            "list" => array(
                "true" => "Yes",
                "false" => "No"
            ),
            "preValidation" => "trim",
            "validation" => "required",
            "inList" => false,
            "search" => false,
            "sort" => false
        ),
        */
        array(
            "name" => "highlightImage",
            "label" => "Imagem Preview",
            "type" => "mediaPicker",
            "multiLanguage" => false,
            "mediaType" => "image",
            "multiple" => false,
            "minSize" => "0",
            "info" => "(Size Ref: 1440x768)",
            "placement" => "sidebar"
        ),
        /*
        array(
            "name" => "highlight_image_pos",
            "label" => "Where is the most important content of the image?",
            "type" => "selectBox",
            "list" => array(
                "left" => "Left",
                "center" => "Center",
                "right"  => "Right",
            ),
            "preValidation" => "trim",
            "validation" => "",
        ),
        array(
            "name" => "highlight_text",
            "label" => "Highlight Text",
            "type" => "textBox",
            "maxLength" => 300,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:300",
            "parent" => array(
                "name" => "highlight",
                "values" => array("true")
            )
        ),
        array(
            "name" => "highlight_cta",
            "label" => "Call to Action text",
            "type" => "textBox",
            "maxLength" => 50,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:50",
            "parent" => array(
                "name" => "highlight",
                "values" => array("true")
            )
        ),
        */
        array(
            "name" => "show_on_list",
            "label" => "Show on List",
            "type" => "checkBox",
            "placement" => "sidebar",
        ),
    ),
    "actions" => array(
        "insert", "edit", "duplicate", "delete", "order"
    )
);
