<?php
return array(
    "type" => "case_study_slide",
    "model" => "CaseStudySlide",
    "label" => "case study slides",
    "label_singular" => "case study slide",
    "parent" => array(
        "field" => "case_study_template_configuration_id",
        "contentType" => "case_study_template_configuration"
    ),
    "group" => "none",
    "template" => false,
    "order" => true,
    "websites" => array(1),
    "shareable" => "none",
    "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" => "topic",
            "label" => "topic",
            "type" => "textBox",
            "maxLength" => 100,
            "multiLanguage" => true,
            "preValidation" => "xss_clean|trim",
            "validation" => "required|max:100",
            "inList" => false,
            "search" => true,
            "sort" => false
        ),
        array(
            "name" => "color_scheme",
            "label" => "color scheme",
            "type" => "selectBox",
            "list" => array(
                "blue" => "Blue",
                "yellow" => "Yellow"
            ),
            "preValidation" => "trim",
            "validation" => "required|in:blue,yellow",
            "inList" => false,
            "placement" => "sidebar",
            "search" => false,
            "sort" => false
        ),
        array(
            "name" => "slide_type",
            "label" => "Type",
            "type" => "selectBox",
            "list" => array(
                "generic" => "Generic",
                "testimonial" => "Testimonial"
            ),
            "preValidation" => "trim",
            "validation" => "required|in:generic,testimonial",
            "inList" => false,
            "placement" => "sidebar",
            "search" => false,
            "sort" => false
        ),
        array(
            "name" => "image",
            "label" => "background image",
            "type" => "mediaPicker",
            "mediaType" => "image",
            "placement" => "sidebar",
            /*
            "thumbnailSizes" => array(
                array("type" => "fit", "name" => "1920x768", "width" => 1920, "height" => 768),
                array("type" => "fit", "name" => "800x320", "width" => 800, "height" => 320),
                array("type" => "fit", "name" => "768x912", "width" => 768, "height" => 912),
            ),
            */
            "minSize" => 1
        ),
        array(
            "name" => "subtitle",
            "label" => "subtitle",
            "type" => "textBox",
            "maxLength" => 100,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:100",
            "inList" => false,
            "search" => true,
            "sort" => false,
            "parent" => array(
                "name" => "slide_type",
                "values" => array("generic")
            )
        ),
        array(
            "name" => "content",
            "label" => "Content",
            "type" => "editor",
            "validation" => "required_if:type,generic,testimonial",
            "multiLanguage" => true,
            "parent" => array(
                "name" => "slide_type",
                "values" => array("generic")
            )
        ),
        array(
            "name" => "testimonial_id",
            "label" => "testimonial",
            "type" => "selectBox",
            "contentType" => "testimonial",
            "validation" => "nullable|required_if:type,testimonial|integer|min:1",
            "parent" => array(
                "name" => "slide_type",
                "values" => array("testimonial")
            )
        ),
        array(
            "name" => "call_to_action",
            "label" => "call to action",
            "type" => "link",
            "multiLanguage" => true,
            "required" => false,
            "maxLabel" => 40,
            "objectTypes" => array("project", "page", "solution", "case_study")
        )
    ),
    "actions" => array(
        "insert", "edit", "delete"
    )
);
