<?php
return array(
    "type" => "overlay_block",
    "model" => "App\Models\OverlayBlock",
    "label" => "Overlay Content Blocks",
    "label_singular" => "Overlay Block",
    "template" => false,
    "order" => false,
    "group" => "none",
    "shareable" => "none",
    "parent" => array(
        "field" => "overlay_id",
        "contentType" => "overlay"
    ),
    "fields" => array(
        array(
            "name" => "title",
            "label" => "Title - Ref",
            "type" => "textBox",
            "maxLength" => 150,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "required|max:150"
        ),
        array(
            "name" => "type",
            "label" => "Block Type",
            "type" => "selectBox",
            "list" => array(
              "image-content-cta" => "Image / Content / CTA"
            ),
            "inList" => true,
            "placement" => "sidebar",
            "preValidation" => "trim",
            "validation" => "required|alpha_dash"
        ),
        array(
            "name" => "title1",
            "label" => "Title 1",
            "type" => "textBox",
            "maxLength" => 150,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:150",
            "parent" => [
                "name" => "type",
                "values" => [
                    "image-content-cta",
                ]
            ],
        ),
        array(
            "name" => "content1",
            "label" => "Content 1",
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "xss_clean|trim",
            "parent" => [
                "name" => "type",
                "values" => [
                    "image-content-cta",
                ]
            ],
        ),
        array(
            "name" => "cta1",
            "label" => "Call to action 1",
            "type" => "link",
            "multiLanguage" => true,
            "required" => false,
            "maxLabel" => 50,
            "parent"      => [
                "name"   => "type",
                "values" => [
                    "image-content-cta",
                ]
            ],
        ),
        array(
            "name" => "image1",
            "label" => "Image 1",
            "type" => "mediaPicker",
            "mediaType" => "image",
            "placement" => "sidebar",
            "parent" => [
                "name" => "type",
                "values" => [
                    "image-content-cta",
                ]
            ],
        ),
    ),
    "actions" => array(
        "insert", "edit", "delete"
    )
);
