<?php
return array(
    "type" => "generic_block",
    "model" => "App\Models\GenericBlock",
    "label" => "Generic Content Blocks",
    "label_singular" => "Generic Content Block",
    "template" => false,
    "order" => false,
    "group" => "none",
    "shareable" => "none",
    "search" => [
        1 => [
            "primary" => [
                "title", "subject"
            ],
            "secondary" => [
                "content", "excerpt"
            ],
            "parentRelationships" => [
                "block",
            ]
        ]
    ],
    "fields" => array(
        array(
            "name" => "title",
            "label" => "title",
            "type" => "textBox",
            "maxLength" => 150,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "required|max:150"
        ),
        array(
            "name" => "type",
            "label" => "Content Type",
            "type" => "selectBox",
            "list" => array(
                "regular" => "Regular (self content)",
                "reference" => "Reference (linked content)"
            ),
            "placement" => "sidebar",
            "preValidation" => "trim",
            "validation" => "nullable|alpha_dash",
            "info" => "Content by reference for Two Cards, Featured 3 Items and Featured Slider Blocks"
        ),
        array(
            "name" => "subject",
            "label" => "Block subject",
            "info" => "Only used for 2nd blocks row",
            "type" => "textBox",
            "maxLength" => 50,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:50",
            "info" => "Tab label for tabs card (SHOULD BE LESS THAN 25 CHARS IN THIS CASE)",
            "parent"        => [
                "name"   => "type",
                "values" => [
                    "", "regular"
                ]
            ]
        ),
        array(
            "name" => "excerpt",
            "label" => "Excerpt",
            "info" => "Used for 'Featured 3 items and Featured Slider blocks' (max. 220 chars)",
            "type" => "textArea",
            "maxLength" => 210,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:210",
            "parent"        => [
                "name"   => "type",
                "values" => [
                    "", "regular"
                ]
            ]
        ),
        array(
            "name" => "content",
            "label" => "content",
            "info" => "Only used for 1st blocks row",
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "trim",
            "validation" => "",
            "parent"        => [
                "name"   => "type",
                "values" => [
                    "", "regular"
                ]
            ]
        ),
        array(
            "name" => "image",
            "label" => "image",
            "type" => "mediaPicker",
            "multiLanguage" => false,
            "mediaType" => "image",
            "placement" => "sidebar",
            "multiple" => false,
            "minSize" => "0",
            "info" => "For two card block: > 1180x640",
            "parent"        => [
                "name"   => "type",
                "values" => [
                    "", "regular"
                ]
            ]
        ),
        array(
            "name" => "svg",
            "label" => "SVG",
            "type" => "mediaPicker",
            "multiLanguage" => false,
            "mediaType" => "document",
            "placement" => "sidebar",
            "multiple" => false,
            "minSize" => "0",
            "info" => "Used for Journey Block",
            "parent"        => [
                "name"   => "type",
                "values" => [
                    "", "regular"
                ]
            ]
        ),
        array(
            "name" => "cta",
            "label" => "Link / Button",
            "type" => "link",
            "multiLanguage" => true,
            "required" => false,
            "maxLabel" => 30,
            "objectTypes" => array("project", "page", "solution", "case_study", "news", "blog_post"),
            "parent"        => [
                "name"   => "type",
                "values" => [
                    "", "regular"
                ]
            ]
        ),
        array(
            "name" => "cta2",
            "label" => "Link / Button 2",
            "type" => "link",
            "multiLanguage" => true,
            "required" => false,
            "maxLabel" => 30,
            "objectTypes" => array("project", "page", "solution", "case_study", "news", "blog_post"),
            "parent"        => [
                "name"   => "type",
                "values" => [
                    "", "regular"
                ]
            ]
        ),
        array(
            "name" => "cta_label",
            "label" => "CTA label",
            "type" => "textBox",
            "maxLength" => 40,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:40",
            "parent"        => [
                "name"   => "type",
                "values" => [
                    "reference"
                ]
            ]
        ),
        array(
            "name" => "cta2_label",
            "label" => "CTA 2 label",
            "type" => "textBox",
            "maxLength" => 40,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:40",
            "parent"        => [
                "name"   => "type",
                "values" => [
                    "reference"
                ]
            ]
        ),
        array(
            "name" => "bg_color",
            "label" => "Background color",
            "type" => "selectBox",
            "list" => array(
                "primary" => "Primary (Darkest)",
                "dark" => "Dark Blue",
                "medium" => "Medium Blue",
                "secondary" => "Light Blue (Secondary)",
                "lighter" => "Lighter Blue",
                "orange" => "Orange",
                "yellow" => "Yellow",
                "green" => "Green",
                "vivid-blue" => "Vivid blue",

            ),
            "preValidation" => "trim",
            "validation" => "nullable|in:orange,secondary,yellow,green,primary,vivid-blue,lighter,medium,dark",
            "placement" => "sidebar",
            "info" => "Used for Values Blocks",
            "parent"        => [
                "name"   => "type",
                "values" => [
                    "", "regular"
                ]
            ]
        ),
        array(
            "name" => "reference_objects",
            "label" => "Reference objects",
            "type" => "multiplePicker",
            "websiteFiltered" => true,
            "objectTypes" => array("project", "solution", "case_study", "blog_post", "news", "event_item", "publication", "page", "sector"),
            "order" => true,
            "longList" => true,
            "maxSize" => 1,
            "parent"        => [
                "name"   => "type",
                "values" => [
                    "reference"
                ]
            ]
        ),
        array(
            "name" => "embed",
            "label" => "Embed / Code",
            "info" => "Used for prices block cards",
            "type" => "textArea",
            "maxLength" => 1000,
            "multiLanguage" => false,
            "preValidation" => "",
            "validation" => "",
        ),
        array(
            "name"     => "location",
            "label"    => "location",
            "type"     => "location",
            "parent"        => [
                "name"   => "type",
                "values" => [
                    "", "regular"
                ]
            ]
        ),
    ),
    "actions" => array(
        "insert", "edit", "delete"
    )
);
