<?php
return array(
    "type" => "solution",
    "model" => "App\Models\Solution",
    "label" => "solutions",
    "label_singular" => "solution",
    "group" => "solutions",
    "template" => false,
    "order" => false,
    "websites" => array(1),
    "baseUri" => array(
        1 => array(
            "en" => "/sustainability-solutions",
            "de" => "/nachhaltigkeitsloesungen",
            "sv" => "/hallbarhetslosningar",
            "fr" => "/sustainability-solutions",
            "es" => "/sustainability-solutions",
            "pt" => "/sustainability-solutions"
        )
    ),
    "search" => array(
        1 => array(
            "primary" => array("title", "tagline"),
            "secondary" => array("content", "in_depth", "objective", "blocks.block_title"),
            "display" => array(
                "title" => "title",
                "content" => "reference_summary|objective",
                "image_id" => "overviewImage"
            ),
            "uri" => array(
                "en" => "/sustainability-solutions/{slug}",
                "de" => "/nachhaltigkeitsloesungen/{slug}",
                "sv" => "/hallbarhetslosningar/{slug}",
                "fr" => "/sustainability-solutions/{slug}",
                "es" => "/sustainability-solutions/{slug}",
                "pt" => "/sustainability-solutions/{slug}"
            ),
            "relations" => [
                "blocks",
            ]
        )
    ),
    "fields" => array(
        array(
            "name" => "title",
            "label" => "title",
            "type" => "textBox",
            "maxLength" => 100,
            "multiLanguage" => true,
            "preValidation" => "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"          => "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" => "tagline",
            "label" => "tagline",
            "type" => "textBox",
            "maxLength" => 255,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:255",
            "inList" => true,
            "search" => true,
            "sort" => true,
            "parent" => array(
                "name" => "layout_type",
                "values" => array("standard", "")
            )
        ),
        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" => "header_overlap",
            "label" => "Header overlaps content?",
            "type" => "checkBox",
            "placement" => "sidebar",
            "blocksMode" => "also",
            "parent" => array(
                "name" => "layout_type",
                "values" => array("blocks")
            )
        ),
        array(
            "name" => "type",
            "label" => "type",
            "type" => "selectBox",
            "list" => array(
                "regular" => "Regular",
                "top_level" => "Top Level Solution"
            ),
            "preValidation" => "trim",
            "validation" => "required|in:regular,top_level",
            "placement" => "sidebar",
            "inList" => true,
            "search" => true,
            "sort" => true
        ),
        array(
            "name" => "objective",
            "label" => "objective",
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "trim|xss_clean",
            "validation" => "",
            "parent" => array(
                "name" => "layout_type",
                "values" => array("standard", "")
            )
        ),
        array(
            "name" => "content",
            "label" => "content",
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "trim",
            "validation" => "",
            "parent" => array(
                "name" => "layout_type",
                "values" => array("standard", "")
            )
        ),
        array(
            "name" => "in_depth",
            "label" => "in depth",
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "trim",
            "validation" => "",
            "parent" => array(
                "name" => "layout_type",
                "values" => array("standard", "")
            )
        ),
        array(
            "name" => "fact_sheet_id",
            "label" => "fact sheet",
            "type" => "selectBox",
            "contentType" => "publication",
            "preValidation" => "trim",
            "validation" => "nullable|integer|min:1",
            "inList" => false,
            "search" => false,
            "sort" => false,
            "placement" => "sidebar"
        ),
        array(
            "name" => "slides",
            "label" => "slider images",
            "type" => "mediaPicker",
            "multiLanguage" => false,
            "mediaType" => 'image',
            "multiple" => true,
            "minSize" => "0",
            "relatedContentType" => 'solution',
            "parent" => array(
                "name" => "layout_type",
                "values" => array("standard", "")
            )
        ),
        array(
            "name" => "solutions",
            "label" => "Child Solutions",
            "type" => "multiplePicker",
            "objectTypes" => array("solution"),
            "order" => true
        ),
        array(
            "name" => "codeEmbeds",
            "label" => "Code Embeds",
            "type" => "multiplePicker",
            "objectTypes" => array("code_embed"),
            "order" => true,
            "allowInsert" =>false,
        ),
        array(
            "name" => "businessLines",
            "label" => "Business Line",
            "type" => "multiplePicker",
            "websiteFiltered" => false,
            "objectTypes" => array("business_line"),
            "order" => true
        ),
        array(
            "name" => "sustainability_topics",
            "label" => "Sustainability Topics",
            "type" => "multiplePicker",
            "websiteFiltered" => false,
            "objectTypes" => array("sustainability_topic"),
            "order" => true
        ),
        array(
            "name" => "values",
            "label" => "Values",
            "type" => "multiplePicker",
            "websiteFiltered" => false,
            "objectTypes" => array("value"),
            "order" => true
        ),
        array(
            "name" => "sectors",
            "label" => "industry sectors",
            "type" => "multiplePicker",
            "websiteFiltered" => false,
            "objectTypes" => array("sector"),
            "order" => true
        ),
        array(
            "name" => "overviewImage",
            "label" => "overview image",
            "type" => "mediaPicker",
            "multiLanguage" => false,
            "mediaType" => "image",
            "placement" => "sidebar",
            "multiple" => false,
            "minSize" => "0",
            "relatedContentType" => 'solution'
        ),
        array(
            "name" => "icon",
            "label" => "Icon",
            "type" => "mediaPicker",
            "multiLanguage" => false,
            "mediaType" => "image",
            "placement" => "sidebar",
            "multiple" => false,
            "minSize" => "0",
            "relatedContentType" => 'solution'
        ),
        array(
            "name" => "iconHover",
            "label" => "Icon",
            "type" => "mediaPicker",
            "multiLanguage" => false,
            "mediaType" => "image",
            "placement" => "sidebar",
            "multiple" => false,
            "minSize" => "0",
            "relatedContentType" => 'solution'
        ),
        array(
            "name" => "recommend",
            "label" => "Also Recommended",
            "type" => "multiplePicker",
            "websiteFiltered" => true,
            "longList" => true,
            "objectTypes" => array("project", "solution", "case_study", "blog_post", "news", "publication", "page", "event_item"),
            "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" => "sidebarWidgets",
            "label" => "Sidebar Widgets",
            "type" => "singlePicker",
            "objectType" => "sidebar_widget",
            "pivotTable" => "solution_sb_widgets",
            "order" => true,
            "maxSize" => 20,
            "parent" => array(
                "name" => "layout_type",
                "values" => array("standard", "")
            )
        ),
        array(
            "name" => "sticky_cta_id",
            "label" => "Sticky Cta",
            "type" => "selectBox",
            "contentType" => "sticky_cta",
            "labelField" => "title",
            "validation" => "nullable|integer|min:1",
            "websites" => array(1),
            "placement" => "sidebar",
            "blocksMode" => "also",
            "multiLanguage" => true,
        )
    ),
    "actions" => array(
        "insert", "edit", "duplicate", "delete", "order"
    )
);
