<?php
/*** tz-header ***/
$slider_arr = array('select slide');
if (class_exists('RevSlider')) {
    $rev_slider = new RevSlider();
    $sliders = $rev_slider->getAllSliderAliases();

    foreach ($sliders as $slide) {
        $slider_arr[] = $slide;
    }
}

$menus = get_registered_nav_menus();
global $menuArray;
foreach ($menus as $location => $description) {
    $menuArray[$description] = $location;
}

vc_map(array(
    "name" => esc_html__("Header Option", "tz-interiart"),
    "icon" => "icon-element",
    "base" => "tz-header",
    "weight" => 1,
    "description" => "",
    "class" => "tzElement_extended",
    "category" => esc_html__("Built for Templaza", "tz-interiart"),
    "params" => array(
        array(
            "type" => "dropdown",
            "heading" => esc_html__("Header Option", "tz-interiart"),
            "param_name" => "tz_header_option",
            "value" => array(
                esc_html__("General Option", "tz-interiart") => '1',
                esc_html__("Custom Option", "tz-interiart") => '2'),
            "description" => "",
        ),
        array(
            "type" => "dropdown",
            "heading" => esc_html__("Header Type", "tz-interiart"),
            "param_name" => "tz_header_type",
            "value" => array(
                esc_html__("Header Type 1", "tz-interiart") => '1',
                esc_html__("Header Type 2", "tz-interiart") => '2',
                esc_html__("Header Type 3", "tz-interiart") => '3',
                esc_html__("Header Type 4", "tz-interiart") => '4',
                esc_html__("Header Type 5", "tz-interiart") => '5',
                esc_html__("Header Type 6", "tz-interiart") => '6',
                esc_html__("Header Type 7", "tz-interiart") => '7',
                esc_html__("Header Type 8", "tz-interiart") => '8',
                esc_html__("Header Type 9", "tz-interiart") => '9',
                esc_html__("Header Type 10", "tz-interiart") => '10',
                esc_html__("Header Type 11", "tz-interiart") => '11',
                esc_html__("Header Type 12", "tz-interiart") => '12',
            ),
            "description" => "",
            "dependency" => Array('element' => "tz_header_option", 'value' => array('2'))
        ),
        array(
            "type"          => "tzpreview",
            "class"         => "",
            "admin_label"   => false,
            "heading"       => esc_html__("Preview Type 1", "tz-interiart"),
            "param_name"    => "preview_type_1",
            "value"         => PLUGIN_PATH."assets/images/header-type-1.jpg",
            "dependency" => array('element' => 'tz_header_type', 'value' => '1'),
        ),
        array(
            "type"          => "tzpreview",
            "class"         => "",
            "admin_label"   => false,
            "heading"       => esc_html__("Preview Type 2", "tz-interiart"),
            "param_name"    => "preview_type_2",
            "value"         => PLUGIN_PATH."assets/images/header-type-2.jpg",
            "dependency" => array('element' => 'tz_header_type', 'value' => '2'),
        ),
        array(
            "type"          => "tzpreview",
            "class"         => "",
            "admin_label"   => false,
            "heading"       => esc_html__("Preview Type 3", "tz-interiart"),
            "param_name"    => "preview_type_3",
            "value"         => PLUGIN_PATH."assets/images/header-type-3.jpg",
            "dependency" => array('element' => 'tz_header_type', 'value' => '3'),
        ),
        array(
            "type"          => "tzpreview",
            "class"         => "",
            "admin_label"   => false,
            "heading"       => esc_html__("Preview Type 4", "tz-interiart"),
            "param_name"    => "preview_type_4",
            "value"         => PLUGIN_PATH."assets/images/header-type-4.jpg",
            "dependency" => array('element' => 'tz_header_type', 'value' => '4'),
        ),
        array(
            "type"          => "tzpreview",
            "class"         => "",
            "admin_label"   => false,
            "heading"       => esc_html__("Preview Type 5", "tz-interiart"),
            "param_name"    => "preview_type_5",
            "value"         => PLUGIN_PATH."assets/images/header-type-5.jpg",
            "dependency" => array('element' => 'tz_header_type', 'value' => '5'),
        ),
        array(
            "type"          => "tzpreview",
            "class"         => "",
            "admin_label"   => false,
            "heading"       => esc_html__("Preview Type 6", "tz-interiart"),
            "param_name"    => "preview_type_6",
            "value"         => PLUGIN_PATH."assets/images/header-type-6.jpg",
            "dependency" => array('element' => 'tz_header_type', 'value' => '6'),
        ),
        array(
            "type"          => "tzpreview",
            "class"         => "",
            "admin_label"   => false,
            "heading"       => esc_html__("Preview Type 7", "tz-interiart"),
            "param_name"    => "preview_type_7",
            "value"         => PLUGIN_PATH."assets/images/header-type-7.jpg",
            "dependency" => array('element' => 'tz_header_type', 'value' => '7'),
        ),
        array(
            "type"          => "tzpreview",
            "class"         => "",
            "admin_label"   => false,
            "heading"       => esc_html__("Preview Type 7", "tz-interiart"),
            "param_name"    => "preview_type_8",
            "value"         => PLUGIN_PATH."assets/images/header-type-8.jpg",
            "dependency" => array('element' => 'tz_header_type', 'value' => '8'),
        ),
        array(
            "type"          => "tzpreview",
            "class"         => "",
            "admin_label"   => false,
            "heading"       => esc_html__("Preview Type 9", "tz-interiart"),
            "param_name"    => "preview_type_9",
            "value"         => PLUGIN_PATH."assets/images/header-type-9.jpg",
            "dependency" => array('element' => 'tz_header_type', 'value' => '9'),
        ),
        array(
            "type"          => "tzpreview",
            "class"         => "",
            "admin_label"   => false,
            "heading"       => esc_html__("Preview Type 10", "tz-interiart"),
            "param_name"    => "preview_type_10",
            "value"         => PLUGIN_PATH."assets/images/header-type-10.jpg",
            "dependency" => array('element' => 'tz_header_type', 'value' => '10'),
        ),
        array(
            "type"          => "tzpreview",
            "class"         => "",
            "admin_label"   => false,
            "heading"       => esc_html__("Preview Type 11", "tz-interiart"),
            "param_name"    => "preview_type_11",
            "value"         => PLUGIN_PATH."assets/images/header-type-11.jpg",
            "dependency" => array('element' => 'tz_header_type', 'value' => '11'),
        ),
        array(
            "type"          => "tzpreview",
            "class"         => "",
            "admin_label"   => false,
            "heading"       => esc_html__("Preview Type 12", "tz-interiart"),
            "param_name"    => "preview_type_12",
            "value"         => PLUGIN_PATH."assets/images/header-type-12.jpg",
            "dependency" => array('element' => 'tz_header_type', 'value' => '12'),
        ),
        array(
            "type" => "dropdown",
            "class" => "",
            "heading" => esc_html__("Revolution slide", "tz-interiart"),
            "param_name" => "tz_slide",
            "value" => $slider_arr,
            "description" => esc_html__("Select revolution slide of home page.", "tz-interiart"),
            "dependency" => Array('element' => "tz_header_type", 'value' => array('4'))
        ),
        array(
            "type" => "dropdown",
            "class" => "",
            "heading" => esc_html__("Position", "tz-interiart"),
            "param_name" => "tz_position",
            "dependency" => Array('element' => "tz_header_type", 'value' => array('11')),
             "value" => array(
                 esc_html__("Overlay the slides", "tz-interiart") => '1',
                 esc_html__("Above the slides", "tz-interiart") => '2',
             )
        ),
        array(
            "type" => "dropdown",
            "heading" => esc_html__("Logo Type", "tz-interiart"),
            "param_name" => "tz_logo_type",
            "value" => array(
                esc_html__("choose type logo", "tz-interiart") => '',
                esc_html__("Logo Image", "tz-interiart") => 'image',
                esc_html__("Logo Text", "tz-interiart") => 'text'),
            "description" => "",
            "dependency" => Array('element' => "tz_header_option", 'value' => array('2'))
        ),
        array(
            "type" => "attach_image",
            "heading" => esc_html__("Upload Logo Image", "tz-interiart"),
            "param_name" => "tz_logo_image",
            "description" => "",
            "dependency" => Array('element' => "tz_logo_type", 'value' => array('image')),
        ),
        array(
            "type" => "textfield",
            "class" => "",
            "admin_label" => true,
            "heading" => esc_html__("Logo Text", "tz-interiart"),
            "param_name" => "tz_logo_text",
            "description" => "",
            "dependency" => Array('element' => "tz_logo_type", 'value' => array('text'))
        ),
        array(
            "type" => "colorpicker",
            "class" => "",
            "admin_label" => true,
            "heading" => esc_html__('Color Logo Text', 'tz-interiart'),
            "param_name" => "tz_color_logo_text",
            "description" => esc_html__("You can set a color of logo Text.", "tz-interiart"),
            "dependency" => Array('element' => "tz_logo_type", 'value' => array('text'))
        ),

        array(
            "type" => "dropdown",
            "class" => "",
            "heading" => esc_html__("Location Menu", "tz-interiart"),
            "param_name" => "tz_location_menu",
            "value" => $menuArray,
            "description" => esc_html__("Select location menu of home page.", "tz-interiart"),
            "dependency" => Array('element' => "tz_header_option", 'value' => array('2'))
        ),

    )
));
?>