/**
  * Enqueue admin-specific javascript.
  *
  * @since 4.0.0
  */
 public function enqueue_builder_scripts($hook_suffix)
 {
     UI_Text::enqueue_assets();
     UI_Textarea::enqueue_assets();
     UI_Select::enqueue_assets();
     UI_Checkbox::enqueue_assets();
     UI_Radio::enqueue_assets();
     UI_Switcher::enqueue_assets();
     UI_Colorpicker::enqueue_assets();
     UI_Repeater::enqueue_assets();
     UI_Media::enqueue_assets();
     UI_Stepper::enqueue_assets();
     UI_Slider::enqueue_assets();
     UI_Range_Slider::enqueue_assets();
     UI_Background::enqueue_assets();
     UI_Typography::enqueue_assets();
     UI_Ace_Editor::enqueue_assets();
     UI_Layout_Editor::enqueue_assets();
     UI_Static_Area_Editor::enqueue_assets();
     UI_Tooltip::enqueue_assets();
     wp_enqueue_script('editor');
     wp_enqueue_script('interface-builder');
 }
        public static function cherry_statics_page_build()
        {
            global $cherry_registered_statics;
            $statics = self::get_current_statics();
            ?>
			<div class="statics-wrapper">
				<form id="cherry-statics" method="post">
				<?php 
            $ui_statics = new UI_Static_Area_Editor(array('id' => 'statics', 'name' => 'statics', 'value' => $statics, 'options' => $cherry_registered_statics));
            echo $ui_statics->render();
            ?>
					<div class="submit-wrapper">
						<div class="wrap-cherry-save-statics">
							<a href="#" id="cherry-save-statics" class="button button-primary_">
								<?php 
            echo __('Save statics', 'cherry');
            ?>
								<div class="cherry-spinner-wordpress spinner-wordpress-type-2"><span class="cherry-inner-circle"></span></div>
							</a>
						</div>
						<div class="wrap-cherry-restore-statics">
							<a href="#" id="cherry-restore-statics" class="button button-default_">
								<?php 
            echo __('Restore statics', 'cherry');
            ?>
							</a>
						</div>
						<div class="wrap-cherry-export-statics">
							<a href="<?php 
            echo esc_url(self::$options_export_url);
            ?>
" id="cherry-export-statics" class="button button-default_">
								<?php 
            _e('Export statics', 'cherry');
            ?>
							</a>
						</div>
						<div class="wrap-cherry-default-statics-backup">
							<a href="#" id="cherry-default-statics-backup" class="button button-default_">
								<?php 
            _e('Default statics', 'cherry');
            ?>
								<div class="cherry-spinner-wordpress spinner-wordpress-type-3"><span class="cherry-inner-circle"></span></div>
							</a>
						</div>
					</div>
				</form>

			</div>
			<?php 
        }
    /**
     * Add form item. Returns form item with selected arguments.
     *
     * @since 4.0.0
     * @param array $args Input argument name => argument value
     */
    public function add_form_item($args = array())
    {
        $default = array('class' => '', 'inline_style' => '', 'type' => '', 'value' => '', 'multiple' => false, 'max_value' => '100', 'min_value' => '0', 'step_value' => '1', 'default_value' => '', 'options' => '', 'placeholder' => '', 'upload_button_text' => __('Choose Media', 'cherry'), 'remove_button_text' => __('Remove Media', 'cherry'), 'return_data_type' => 'id', 'multi_upload' => true, 'display_image' => true, 'display_input' => true, 'library_type' => '', 'label' => '', 'title' => '', 'description' => '', 'hint' => '', 'toggle' => array('true_toggle' => __('On', 'cherry'), 'false_toggle' => __('Off', 'cherry'), 'true_slave' => '', 'false_slave' => ''), 'master' => '');
        extract(array_merge($default, $args));
        $value = $value == '' || $value == false && $value != 0 ? $default_value : $value;
        $item_id = $id;
        $name = $this->generate_field_name($id);
        $id = $this->generate_field_id($id);
        $item_inline_style = $inline_style ? 'style="' . $inline_style . '"' : '';
        $output = '';
        if (is_array($this->options['hidden_items']) && in_array($item_id, $this->options['hidden_items'])) {
            return;
        }
        switch ($type) {
            case 'submit':
                // $output .= '<input ' . $item_inline_style . ' class="' . $class . ' '.$this->options['class']['submit'].'" id="' . $id . '" name="' . $name . '" type="'.$type.'" value="' . esc_html( $value ) . '" >';
                $type .= ' ' . $class;
                $item_inline_style .= ' id=' . $id;
                $output .= get_submit_button($value, $type, $name, false, $item_inline_style);
                break;
            case 'reset':
                $output .= '<input ' . $item_inline_style . ' class="' . $class . ' ' . $this->options['class']['submit'] . '" id="' . $id . '" name="' . $name . '" type="reset" value="' . esc_html($value) . '" >';
                break;
            case 'text':
                $ui_text = new UI_Text(array('id' => $id, 'name' => $name, 'value' => $value, 'placeholder' => $placeholder, 'class' => $class));
                $output .= $ui_text->render();
                break;
            case 'textarea':
                $ui_textarea = new UI_Textarea(array('id' => $id, 'name' => $name, 'value' => $value, 'placeholder' => $placeholder, 'class' => $class));
                $output .= $ui_textarea->render();
                break;
            case 'select':
                $ui_select = new UI_Select(array('id' => $id, 'name' => $name, 'multiple' => $multiple, 'value' => $value, 'options' => $options, 'class' => $class));
                $output .= $ui_select->render();
                break;
            case 'checkbox':
                $ui_checkbox = new UI_Checkbox(array('id' => $id, 'name' => $name, 'value' => $value, 'options' => $options, 'class' => $class));
                $output .= $ui_checkbox->render();
                break;
            case 'radio':
                $ui_radio = new UI_Radio(array('id' => $id, 'name' => $name, 'value' => $value, 'options' => $options, 'class' => $class));
                $output .= $ui_radio->render();
                break;
            case 'switcher':
                $ui_switcher = new UI_Switcher(array('id' => $id, 'name' => $name, 'value' => $value, 'toggle' => $toggle, 'class' => $class));
                $output .= $ui_switcher->render();
                break;
            case 'stepper':
                $ui_stepper = new UI_Stepper(array('id' => $id, 'name' => $name, 'value' => $value, 'max_value' => $max_value, 'min_value' => $min_value, 'step_value' => $step_value, 'class' => $class));
                $output .= $ui_stepper->render();
                break;
            case 'slider':
                $ui_slider = new UI_Slider(array('id' => $id, 'name' => $name, 'value' => $value, 'max_value' => $max_value, 'min_value' => $min_value, 'step_value' => $step_value, 'class' => $class));
                $output .= $ui_slider->render();
                break;
            case 'rangeslider':
                $ui_range_slider = new UI_Range_Slider(array('id' => $id, 'name' => $name, 'value' => $value, 'max_value' => $max_value, 'min_value' => $min_value, 'step_value' => $step_value, 'class' => $class));
                $output .= $ui_range_slider->render();
                break;
            case 'colorpicker':
                $ui_colorpicker = new UI_Colorpicker(array('id' => $id, 'name' => $name, 'value' => $value, 'class' => $class));
                $output .= $ui_colorpicker->render();
                break;
            case 'media':
                $ui_media = new UI_Media(array('id' => $id, 'name' => $name, 'value' => $value, 'multi_upload' => $multi_upload, 'library_type' => $library_type, 'class' => $class));
                $output .= $ui_media->render();
                break;
            case 'background':
                $ui_background = new UI_Background(array('id' => $id, 'name' => $name, 'value' => $value, 'multi_upload' => $multi_upload, 'library_type' => $library_type, 'class' => $class));
                $output .= $ui_background->render();
                break;
            case 'typography':
                $ui_typography = new UI_Typography(array('id' => $id, 'name' => $name, 'value' => $value, 'class' => $class));
                $output .= $ui_typography->render();
                break;
            case 'ace-editor':
                $ui_ace_editor = new UI_Ace_Editor(array('id' => $id, 'name' => $name, 'value' => $value, 'class' => $class));
                $output .= $ui_ace_editor->render();
                break;
            case 'repeater':
                $ui_repeater = new UI_Repeater(array('id' => $id, 'name' => $name, 'value' => $value, 'class' => $class));
                $output .= $ui_repeater->render();
                break;
            case 'static_area_editor':
                $ui_statics = new UI_Static_Area_Editor(array('id' => $id, 'name' => $name, 'value' => $value, 'options' => $options, 'class' => $class));
                $output .= $ui_statics->render();
                break;
            case 'layouteditor':
                $ui_layout_editor = new UI_Layout_Editor(array('id' => $id, 'name' => $name, 'value' => $value, 'class' => $class));
                $output .= $ui_layout_editor->render();
                break;
            case 'webfont':
                $ui_webfont = new UI_Webfont(array('id' => $id, 'name' => $name, 'value' => $value, 'class' => $class));
                $output .= $ui_webfont->render();
                break;
            case 'editor':
                //$wrap = false;
                ob_start();
                $settings = array('textarea_name' => $name, 'media_buttons' => 1, 'teeny' => 0, 'textarea_rows' => 10, 'tinymce' => array('setup' => 'function(ed) {
								ed.onChange.add(function(ed) {
									tinyMCE.triggerSave();
								});
							}'));
                wp_editor($value, $id, $settings);
                $output .= ob_get_clean();
                _WP_Editors::editor_js();
                _WP_Editors::enqueue_scripts();
                //Cherry_Shortcodes_Generator::popup();
                break;
        }
        return $this->wrap_item($output, $id, $item_id, 'cherry-section cherry-' . $type . ' ' . $this->options['class']['section'], $title, $label, $description, $master, $hint);
    }