<?php

// Make sure we don't expose any info if called directly
if ( !defined( 'ABSPATH' ) )
	exit;

	include_once 'page-header.php';
	$form = new BtnsxFormElements();
?>
	
	<div class="" style="margin-right: 20px;background-color:#fcfcfc;">
		<!-- Page Content goes here -->
		<div class="row">
			<?php
			ob_start();
			?>
				<div class="col s12">
					<h6><?php _e('Select the predefined button styles to import','buttons-x'); ?></h6>
				</div>
			<?php
			$html_head = ob_get_clean();
	    	ob_start();
			?>
				<div class="col s12">
					<br>
					<button id="btnsx-click-import" class="btn btn-import btn-settings"><?php _e( 'Import', 'btnsx' ); ?></button>
				</div>
			<?php
			$html = ob_get_clean();
			?>
			<div class="col l9 m12" style="padding:0;">
				<?php
					$btnsx_default_options = array(
						array(
		        			'icon_class'	=>	'fa fa-star',
		        			'text'			=>	__( 'Demo Buttons', 'btnsx' ),
		        			'elements'		=> array(
		        				array(
									'type'			=>	'html',
									'value'			=>	$html_head
								),
		        				array(
		        					'type'			=>	'checkbox',
		        					'id'			=>	'btnsx_opt_predefined_style_classic',
		        					'name'			=>	'btnsx_opt_predefined_style[]',
		        					'label'			=>	__( 'Classic', 'buttons-x' ),
		        					'value'			=>	'3208'
		        				),
		        				array(
		        					'type'			=>	'checkbox',
		        					'id'			=>	'btnsx_opt_predefined_style_flat',
		        					'name'			=>	'btnsx_opt_predefined_style[]',
		        					'label'			=>	__( 'Flat', 'buttons-x' ),
		        					'value'			=>	'1259'
		        				),
		        				array(
		        					'type'			=>	'checkbox',
		        					'id'			=>	'btnsx_opt_predefined_style_gradient',
		        					'name'			=>	'btnsx_opt_predefined_style[]',
		        					'label'			=>	__( 'Gradient', 'buttons-x' ),
		        					'value'			=>	'3804'
		        				),
		        				array(
		        					'type'			=>	'checkbox',
		        					'id'			=>	'btnsx_opt_predefined_style_outlined',
		        					'name'			=>	'btnsx_opt_predefined_style[]',
		        					'label'			=>	__( 'Outlined', 'buttons-x' ),
		        					'value'			=>	'3770'
		        				),
		        				array(
									'type'			=>	'html',
									'value'			=>	$html
								)
		        			)
		        		),
		        		array(
		        			'icon_class'	=>	'fa fa-upload',
		        			'text'			=>	__( 'Manual Import', 'btnsx' ),
		        			'elements'		=> array(
		        				array(
									'type'			=>	'html',
									'value'			=>	'<div class="col s12" style=""><p style="padding:10px;background-color:#fff;color:#c0392b;border-radius:4px;border:1px solid #c0392b;margin-top:0;margin-bottom:0;">'.__('Please make sure you import individual buttons used for creating a dual button before importing a dual button.','btnsx').'</p></div>'
								),
								array(
									'type'			=>	'file',
									'size'			=>	'12',
									'id'			=>	'btnsx_import',
									'name'			=>	'btnsx_import'
								),
								array(
									'type'			=>	'button',
									'size'			=>	'12',
									'id'			=>	'btnsx-submit-import',
									'name'			=>	'btnsx-submit-import',
									'class'			=>	'btn btn-import btn-settings',
									'label'			=>	__( 'Import', 'btnsx' )
								)
							),
						)
			        );
					// filter to add custom options
		        	$btnsx_filtered_options = apply_filters( 'btnsx_import_filter', array() );
		        	$btnsx_options = wp_parse_args( $btnsx_filtered_options, $btnsx_default_options );
		        	$btnsx_form_design->tabs(
		        		array(
		        			'id'			=>	'btnsx-tabs-0',
		        			'outer_group'	=>	$btnsx_options
		        		)
		        	);
				?>
			</div>
			<div class="col l3 m12">
				<!-- packs here -->
			</div>
		</div>
	</div>

</div>