<?php

    return [
        "type"           => "blocks",
        "model"          => "Block",
        "label"          => "Blocks",
        "label_singular" => "Block",
        "group"          => "general",
        "order"          => TRUE,
        "fields"         => [
            [
                "name"          => "title",
                "label"         => "Block Title",
                "type"          => "textBox",
                "maxLength"     => 150,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "required|max:150",
                "inList"        => TRUE,
                "search"        => TRUE,
                "sort"          => TRUE
            ],
            [
                "name"          => "type",
                "label"         => "Block Type",
                "type"          => "selectBox",
                "list"          => [
                    "hero"          => "Hero",
                    "album"         => "Album",
                    "gallery"       => "Gallery",
                    "textCta"       => "Text Hero",
                    "titleHero"     => "Title Hero",
                    "titleHeroClip" => "Title Hero Clip",
                    "squareGrid"    => "Square Grid",
                    "concerts"      => "Liveshows",
                    "buttonCta"     => "Button CTA"
                ],
                "defaultValue"  => "hero",
                "preValidation" => "trim",
                "validation"    => "",
                "placement"     => "sidebar"
            ],
            [
                "name"          => "size",
                "label"         => "Block Size",
                "type"          => "selectBox",
                "list"          => [
                    "full"        => "Full Viewport",
                    "viewport_70" => "70% Viewport"
                ],
                "defaultValue"  => "full",
                "preValidation" => "trim",
                "validation"    => "",
                "placement"     => "sidebar",
                "parent"        => [
                    "name"   => "type",
                    "values" => ["hero"]
                ]
            ],
            [
                "name"          => "overlap",
                "label"         => "Overlap Top Block?",
                "type"          => "selectBox",
                "list"          => [
                    ""        => "No",
                    "overlap" => "Overlap"
                ],
                "defaultValue"  => "",
                "preValidation" => "trim",
                "validation"    => "",
                "placement"     => "sidebar",
                "parent"        => [
                    "name"   => "type",
                    "values" => ["album"]
                ]
            ],
            [
                "name"          => "block_title",
                "label"         => "Title",
                "type"          => "textBox",
                "maxLength"     => 150,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:150",
                "inList"        => FALSE,
                "search"        => FALSE,
                "sort"          => FALSE,
                "parent"        => [
                    "name"   => "type",
                    "values" => ["hero", "titleHero"]
                ]
            ],
            [
                "name"          => "subtitle",
                "label"         => "Subtitle",
                "type"          => "textBox",
                "maxLength"     => 150,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:150",
                "inList"        => FALSE,
                "search"        => FALSE,
                "sort"          => FALSE,
                "parent"        => [
                    "name"   => "type",
                    "values" => ["hero"]
                ]
            ],
            [
                "name"          => "text",
                "label"         => "Text",
                "type"          => "textArea",
                "maxLength"     => 600,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:600",
                "inList"        => FALSE,
                "search"        => FALSE,
                "sort"          => FALSE,
                "parent"        => [
                    "name"   => "type",
                    "values" => ["textHero"]
                ]
            ],
            [
                "name"          => "clip_text",
                "label"         => "Cliped Title",
                "type"          => "textBox",
                "maxLength"     => 10,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:10",
                "inList"        => FALSE,
                "search"        => FALSE,
                "sort"          => FALSE,
                "parent"        => [
                    "name"   => "type",
                    "values" => ["titleHeroClip"]
                ]
            ],
            [
                "name"          => "clip_text_second",
                "label"         => "Regular Title",
                "type"          => "textBox",
                "maxLength"     => 10,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:10",
                "inList"        => FALSE,
                "search"        => FALSE,
                "sort"          => FALSE,
                "parent"        => [
                    "name"   => "type",
                    "values" => ["titleHeroClip"]
                ]
            ],
            [
                "name"        => "squareGrid",
                "label"       => "Square Grid",
                "type"        => "multiplePicker",
                "longList"    => TRUE,
                "allowInsert" => TRUE,
                "objectTypes" => ["square_grid_item"],
                "order"       => TRUE,
                "maxSize"     => 8,
                "parent"      => [
                    "name"   => "type",
                    "values" => ["squareGrid"]
                ]
            ],
            [
                "name"        => "liveshowList",
                "label"       => "Live Show List",
                "type"        => "multiplePicker",
                "longList"    => TRUE,
                "allowInsert" => TRUE,
                "objectTypes" => ["liveshow_item"],
                "order"       => TRUE,
                "maxSize"     => 8,
                "parent"      => [
                    "name"   => "type",
                    "values" => ["concerts"]
                ]
            ],
            [
                "name"          => "gallery",
                "label"         => "Gallery",
                "type"          => "mediaPicker",
                "multiLanguage" => FALSE,
                "mediaType"     => [
                    'image'
                ],
                "multiple"      => TRUE,
                "minSize"       => "0",
                "maxSize"       => "15",
                "parent"        => [
                    "name"   => "type",
                    "values" => ["gallery"]
                ]
            ],
            [
                "name"      => "highResolutionImage",
                "label"     => "High Resolution Image",
                "type"      => "mediaPicker",
                "multiple"  => FALSE,
                "mediaType" => "image",
                "placement" => "sidebar",
                "parent"    => [
                    "name"   => "type",
                    "values" => ["hero"]
                ]
            ],
            [
                "name"      => "squareImage",
                "label"     => "Square Image",
                "type"      => "mediaPicker",
                "multiple"  => FALSE,
                "mediaType" => "image",
                "placement" => "sidebar",
                "parent"    => [
                    "name"   => "type",
                    "values" => ["album", "titleHeroClip"]
                ]
            ],
            [
                "name"      => "squareImageAux",
                "label"     => "[Aux] Square Image",
                "type"      => "mediaPicker",
                "multiple"  => FALSE,
                "mediaType" => "image",
                "placement" => "sidebar",
                "parent"    => [
                    "name"   => "type",
                    "values" => ["album"]
                ]
            ],
            [
                "name"          => "cta",
                "label"         => "[1] Call to action",
                "type"          => "link",
                "maxLength"     => 150,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:150",
                "inList"        => FALSE,
                "search"        => FALSE,
                "sort"          => FALSE,
                "parent"        => [
                    "name"   => "type",
                    "values" => ["hero", "album", "buttonCta"]
                ]
            ],
            [
                "name"          => "cta_icon",
                "label"         => "[1] Call to action icon",
                "type"          => "selectBox",
                "list"          => [
                    ""      => "None",
                    "video" => "Video"
                ],
                "defaultValue"  => "",
                "preValidation" => "trim",
                "validation"    => "",
                "parent"        => [
                    "name"   => "type",
                    "values" => ["hero", "album"]
                ]
            ],
            [
                "name"          => "cta_second",
                "label"         => "[2] Call to action",
                "type"          => "link",
                "maxLength"     => 150,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:150",
                "inList"        => FALSE,
                "search"        => FALSE,
                "sort"          => FALSE,
                "parent"        => [
                    "name"   => "type",
                    "values" => ["hero", "album"]
                ]
            ],
            [
                "name"          => "cta_icon_second",
                "label"         => "[2] Call to action icon",
                "type"          => "selectBox",
                "list"          => [
                    ""      => "None",
                    "video" => "Video"
                ],
                "defaultValue"  => "",
                "preValidation" => "trim",
                "validation"    => "",
                "parent"        => [
                    "name"   => "type",
                    "values" => ["hero", "album"]
                ]
            ],
        ],
        "actions"        => [
            "edit", "order", "insert", "delete"
        ]
    ];

