<?php
/*
 * Element Tz View Post
 * */
$tz_categories_array = array('choose category');
$tz_categories = get_categories();
foreach($tz_categories as $tz_category){
    $tz_categories_array[] = $tz_category->name;
}

vc_map( array(
    "name"          => esc_html__("View Post", "tz-interiart"),
    "icon"          => "icon-element",
    "base"          => "tz-view-post",
    "weight"        => 1,
    "description"   => "",
    "class"         => "tzElement_extended",
    "category"      => esc_html__("Built for Templaza", "tz-interiart"),
    "params"        => array(
        array(
            "type"          => "dropdown",
            "class"         => "",
            "admin_label"   => true,
            "heading"       => esc_html__("Type Of View", "tz-interiart"),
            "param_name"    => "tz_type_view",
            "value"         => array(
                esc_html__("choose type", "tz-interiart")        => "",
                esc_html__("grid", "tz-interiart")               => "grid",
                esc_html__("Slide", "tz-interiart")              => "slide",
                esc_html__("Slide Type 2", "tz-interiart")       => "slide-type2",
                esc_html__("Slide Advance", "tz-interiart")      => "slide-advance"),
            "description"   => "",
        ),
        array(
            "type"          => "dropdown",
            "class"         => "",
            "admin_label"   => true,
            "heading"       => esc_html__("Category", "tz-interiart"),
            "param_name"    => "tz_category",
            "value"         => $tz_categories_array,
            "description"   => esc_html__("Choose category.", "tz-interiart"),
        ),
        array(
            "type"          => "textfield",
            "class"         => "",
            "admin_label"   => true,
            "heading"       => esc_html__("Limit", "tz-interiart"),
            "param_name"    => "tz_limit",
            "value"         => "",
        ),
        array(
            "type"          => "dropdown",
            "class"         => "",
            "admin_label"   => true,
            "heading"       => esc_html__("Order by", "tz-interiart"),
            "param_name"    => "tz_orderby",
            "value"         => array(
                esc_html__("choose order by", "tz-interiart")        => '',
                esc_html__("Date", "tz-interiart")                   => 'date',
                esc_html__("ID", "tz-interiart")                     => "id",
                esc_html__("Title", "tz-interiart")                  => "title"),
            "description"   => "",
        ),
        array(
            "type"          => "dropdown",
            "class"         => "",
            "admin_label"   => true,
            "heading"       => esc_html__("Order", "tz-interiart"),
            "param_name"    => "tz_order",
            "value"         => array(
                esc_html__("choose order", "tz-interiart")       => '',
                esc_html__("desc", "tz-interiart")               => 'desc',
                esc_html__("asc", "tz-interiart")                => "asc"),
            "description"   => "",
        ),
        array(
            "type"          => "dropdown",
            "class"         => "",
            "admin_label"   => true,
            "heading"       => esc_html__("Button Read More Option", "tz-interiart"),
            "param_name"    => "tz_read_option",
            "value"         => array(
                esc_html__("choose option", "tz-interiart")      => "",
                esc_html__("Show", "tz-interiart")               => "show",
                esc_html__("Hide", "tz-interiart")               => "hide"),
            "description"   => "",
        ),
        array(
            "type"          => "textfield",
            "class"         => "",
            "admin_label"   => true,
            "heading"       => esc_html__("Button Text Read All", "tz-interiart"),
            "param_name"    => "tz_read_text",
            "value"         => "",
            "dependency"    => array('element' => 'tz_read_option', 'value' => array('show')),
        ),
        array(
            "type"          => "dropdown",
            "class"         => "",
            "admin_label"   => true,
            "heading"       => esc_html__("Height Image Option", "tz-interiart"),
            "param_name"    => "tz_height_option",
            "value"         => array(
                esc_html__("choose option", "tz-interiart")      => "",
                esc_html__("Auto Height", "tz-interiart")        => "auto",
                esc_html__("Fix Height", "tz-interiart")         => "fix",),
            "description"   => "",
            "dependency"    => array('element' => 'tz_type_view', 'value' => array('grid')),
        ),
        array(
            "type"          => "textfield",
            "class"         => "",
            "admin_label"   => true,
            "heading"       => esc_html__("Height Image", "tz-interiart"),
            "param_name"    => "tz_height_value",
            "value"         => "",
            "dependency"    => array('element' => 'tz_height_option', 'value' => array('fix')),
        ),
        array(
            "type"          => "textfield",
            "class"         => "",
            "admin_label"   => true,
            "heading"       => esc_html__("Number Items Desktop", "tz-interiart"),
            "param_name"    => "tz_number_desktop",
            "value"         => "",
            "dependency"    => array('element' => 'tz_type_view', 'value' => array('slide','slide-type2','grid')),
        ),
        array(
            "type"          => "textfield",
            "class"         => "",
            "admin_label"   => true,
            "heading"       => esc_html__("Number Items Desktop Small", "tz-interiart"),
            "param_name"    => "tz_number_desktopsmall",
            "value"         => "",
            "dependency"    => array('element' => 'tz_type_view', 'value' => array('slide','slide-type2','grid')),
        ),
        array(
            "type"          => "textfield",
            "class"         => "",
            "admin_label"   => true,
            "heading"       => esc_html__("Number Items Tablet", "tz-interiart"),
            "param_name"    => "tz_number_tablet",
            "value"         => "",
            "dependency"    => array('element' => 'tz_type_view', 'value' => array('slide','slide-type2','grid')),
        ),
        array(
            "type"          => "textfield",
            "class"         => "",
            "admin_label"   => true,
            "heading"       => esc_html__("Number Items Mobile", "tz-interiart"),
            "param_name"    => "tz_number_mobile",
            "value"         => "",
            "dependency"    => array('element' => 'tz_type_view', 'value' => array('slide','slide-type2','grid')),
        ),
        array(
            "type" => "checkbox",
            "class" => "",
            "admin_label" => true,
            "heading"       => esc_html__("Auto Play", "tz-interiart"),
            "param_name"    => "tz_auto_option",
            "description"   => "",
            "value" => "",
            "dependency" => array('element' => 'tz_type_view', 'value' => array('slide','slide-type2','slide-advance')),
        ),

        array(
            "type" => "checkbox",
            "class" => "",
            "admin_label" => true,
            "heading"       => esc_html__("Slider Loop", "tz-interiart"),
            "param_name"    => "tz_loop_option",
            "description"   => "",
            "value" => "",
            "dependency" => array('element' => 'tz_type_view', 'value' => array('slide','slide-type2','slide-advance')),
        ),

        array(
            "type" => "checkbox",
            "class" => "",
            "admin_label" => true,
            "heading"       => esc_html__("Show next/prev buttons", "tz-interiart"),
            "param_name"    => "tz_nav_option",
            "description"   => "",
            "value" => "",
            "dependency" => array('element' => 'tz_type_view', 'value' => array('slide','slide-type2','slide-advance')),
        ),

        array(
            "type" => "checkbox",
            "class" => "",
            "admin_label" => true,
            "heading"       => esc_html__("Show dots navigation.", "tz-interiart"),
            "param_name"    => "tz_dots_option",
            "description"   => "",
            "value" => "",
            "dependency" => array('element' => 'tz_type_view', 'value' => array('slide','slide-type2','slide-advance')),
        ),
        array(
            "type" => "dropdown",
            "class" => "",
            "admin_label" => true,
            "heading"       => esc_html__("Css Animation", "tz-interiart"),
            "param_name"    => "tz_css_animation",
            "description"   => "",
            "value"         => array(
                esc_html__("No animation", "tz-interiart")           => '',
                esc_html__("Top to bottom", "tz-interiart")          => 'top-to-bottom',
                esc_html__("Bottom to top", "tz-interiart")          => 'bottom-to-top',
                esc_html__("Left to right", "tz-interiart")          => 'left-to-right',
                esc_html__("Right to left", "tz-interiart")          => 'right-to-left',
                esc_html__("Appear from center", "tz-interiart")     => 'appear'),
        ),
    )
));
?>