<?php

    return [
        "type"           => "blocks",
        "model"          => App\Models\Block::class,
        "label"          => "Blocks",
        "label_singular" => "Block",
        "group"          => "content",
        "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"          => [
                    "blockSlider"      => "Slider",
                    "blockLocation"    => "Location",
                    "richText"         => "Editor",
                    "hero"             => "Hero",
                    "leftImage"        => "Left Image",
                    "leftCard"         => "Left Card Price",
                    "rightImage"       => "Right Image",
                    "topImage"         => "Top Image",
                    "mobileAppBlock"   => "Mobile App Block",
                    "headerWithImage"  => "Header with Image",
                    "standardHeader"   => "Standard Header",
                    "tariffList"       => "Tariff List",
                    "moreLink"         => "More Link",
                    "roamingPage"      => "Roaming Page Block",
                    "newRoamingPage"   => "New Roaming Page Block",
                    "packagesPage"     => "Packages Page Block",
                    "centerBlock"      => "Center Block",
                    "doubleImage"      => "Double Image Block",
                    "topUpBlock"       => "Top Up Block",
                    "supportHeader"    => "Support page Header",
                    "popularFaqs"      => "Most popular faqs",
                    "landingHeader"    => "Landing Page Header",
                    "contactForm"      => "Contact Form"
                ],
                "defaultValue"  => "blockSlider",
                "preValidation" => "trim",
                "validation"    => "",
                "placement"     => "sidebar"
            ],
            [
                "name"          => "pre_title",
                "label"         => "Pre Title",
                "type"          => "textBox",
                "maxLength"     => 100,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:100",
                "inList"        => FALSE,
                "search"        => FALSE,
                "sort"          => FALSE,
                "parent"        => [
                    "name"   => "type",
                    "values" => [
                        "hero",
                        "leftImage",
                        "leftCard",
                        "rightImage",
                        "topImage",
                        "mobileAppBlock",
                        "standardHeader",
                        "roamingPage",
                        "newRoamingPage",
                        "packagesPage",
                        "centerBlock",
                        "supportHeader",
                        "popularFaqs",
                        "landingHeader",
                        "contactForm"
                    ]
                ]
            ],
            [
                "name"          => "block_title",
                "label"         => "Title",
                "type"          => "textBox",
                "maxLength"     => 300,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:300",
                "inList"        => FALSE,
                "search"        => FALSE,
                "sort"          => FALSE,
                "parent"        => [
                    "name"   => "type",
                    "values" => [
                        "blockLocation",
                        "richText",
                        "hero",
                        "leftImage",
                        "leftCard",
                        "rightImage",
                        "topImage",
                        "mobileAppBlock",
                        "headerWithImage",
                        "standardHeader",
                        "tariffList",
                        "roamingPage",
                        "newRoamingPage",
                        "packagesPage",
                        "centerBlock",
                        "supportHeader",
                        "popularFaqs",
                        "landingHeader",
                        "contactForm"
                    ]
                ]
            ],
            [
                "name"          => "tagline",
                "label"         => "Subtitle Tagline",
                "type"          => "textArea",
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:200",
                "inList"        => FALSE,
                "search"        => FALSE,
                "sort"          => FALSE,
                "parent"        => [
                    "name"   => "type",
                    "values" => [
                        "contactForm",
                    ]
                ]
            ],
            [
                "name"        => "slider",
                "label"       => "Slider",
                "type"        => "multiplePicker",
                "longList"    => TRUE,
                "allowInsert" => TRUE,
                "objectTypes" => ["sliderItems"],
                "order"       => TRUE,
                "maxSize"     => 32,
                "parent"      => [
                    "name"   => "type",
                    "values" => ["blockSlider", "doubleImage"]
                ]
            ],
            [
                "name"        => "tariffs",
                "label"       => "Tariffs",
                "type"        => "multiplePicker",
                "longList"    => TRUE,
                "allowInsert" => TRUE,
                "objectTypes" => ["tariff"],
                "order"       => TRUE,
                "maxSize"     => 32,
                "parent"      => [
                    "name"   => "type",
                    "values" => [
                        "tariffList",
                        "roamingPage",
                        "newRoamingPage"
                    ]
                ]
            ],
            [
                "name"  => "location",
                "label" => "Location",
                "type"  => "location",
                "parent"      => [
                    "name"   => "type",
                    "values" => ["blockLocation"]
                ]
            ],
            [
                "name"          => "wysiwyg",
                "label"         => "Editor",
                "type"          => "editor",
                "multiLanguage" => TRUE,
                "preValidation" => "xss_clean|trim",
                "validation"    => "",
                "parent"      => [
                    "name"   => "type",
                    "values" => [
                        "richText",
                        "hero",
                        "leftImage",
                        "leftCard",
                        "rightImage",
                        "topImage",
                        "mobileAppBlock",
                        "tariffList",
                        "centerBlock",
                        "landingHeader",
                        "contactForm"
                    ]
                ]
            ],
            [
                "name" => "cta_1",
                "label" => "Call to action 1",
                "type" => "link",
                "multiLanguage" => true,
                "required" => false,
                "maxLabel" => 50,
                "objectTypes" => ["page"],
                "parent"      => [
                    "name"   => "type",
                    "values" => [
                        "hero",
                        "leftImage",
                        "leftCard",
                        "rightImage",
                        "topImage",
                        "mobileAppBlock",
                        "moreLink",
                        "centerBlock",
                        "landingHeader",
                        "doubleImage",
                        "packagesPage"
                    ]
                ]
            ],
            [
                "name" => "cta_2",
                "label" => "Call to action 2",
                "type" => "link",
                "multiLanguage" => true,
                "required" => false,
                "maxLabel" => 50,
                "objectTypes" => ["page"],
                "parent"      => [
                    "name"   => "type",
                    "values" => [
                        "hero",
                        "leftImage",
                        "leftCard",
                        "rightImage",
                        "mobileAppBlock",
                        "doubleImage"
                    ]
                ]
            ],
            [
                "name"          => "image",
                "label"         => "Image",
                "type"          => "mediaPicker",
                "multiple"      => false,
                "multiLanguage" => true,
                "mediaType"     => "image",
                "parent"      => [
                    "name"   => "type",
                    "values" => [
                        "hero",
                        "leftImage",
                        "leftCard",
                        "rightImage",
                        "topImage",
                        "mobileAppBlock",
                        "headerWithImage",
                        "landingHeader"
                    ]
                ]
            ],
            /*
            [
                "name"          => "badge_discount",
                "label"         => "Price Discount",
                "type"          => "textBox",
                "maxLength"     => 20,
                "multiLanguage" => FALSE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:5",
                "inList"        => FALSE,
                "search"        => FALSE,
                "sort"          => FALSE,
                "placement"     => "sidebar",
                "parent"        => [
                    "name"   => "type",
                    "values" => [
                        "leftCard",
                        "hero",
                    ]
                ]
            ],
            [
                "name"          => "badge_text",
                "label"         => "Price tag text",
                "type"          => "textArea",
                "maxLength"     => 200,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:200",
                "inList"        => FALSE,
                "search"        => FALSE,
                "sort"          => FALSE,
                "placement"     => "sidebar",
                "parent"        => [
                    "name"   => "type",
                    "values" => [
                        "leftCard",
                        "hero",
                    ]
                ]
            ],
            [
                "name"          => "price_tag",
                "label"         => "Price tag label",
                "type"          => "textBox",
                "maxLength"     => 20,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:20",
                "inList"        => FALSE,
                "search"        => FALSE,
                "sort"          => FALSE,
                "placement"     => "sidebar",
                "parent"        => [
                    "name"   => "type",
                    "values" => [
                        "leftCard",
                        "hero",
                    ]
                ]
            ],
            [
                "name"          => "price",
                "label"         => "Price",
                "type"          => "textBox",
                "maxLength"     => 10,
                "multiLanguage" => FALSE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:10",
                "placement"     => "sidebar",
                "parent"        => [
                    "name"   => "type",
                    "values" => [
                        "leftCard",
                        "hero",
                    ]
                ]
            ],
            [
                "name"          => "badge_old_price",
                "label"         => "Old Price",
                "type"          => "textBox",
                "maxLength"     => 5,
                "multiLanguage" => FALSE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:10",
                "placement"     => "sidebar",
                "parent"        => [
                    "name"   => "type",
                    "values" => [
                        "leftCard",
                        "hero",
                    ]
                ]
            ],
            */
            [
                "name"          => "checklist",
                "label"         => "Subtitle checklist",
                "type"          => "textArea",
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:500",
                "inList"        => FALSE,
                "search"        => FALSE,
                "sort"          => FALSE,
                "info"          => 'One line for each check item.',
                "parent"        => [
                    "name"   => "type",
                    "values" => [
                        "standardHeader",
                    ]
                ]
            ],
        ],
        "actions"        => [
            "edit", "order", "insert", "delete"
        ]
    ];
