<?php
class WPPAS_DEF {	
	
	public function __construct() 
	{
		
	}
	
	
	
	
	
	public static function layer_css($args = array())
	{
		/* MAIN */
		$css_defaults = array(
			'layer' => array(),
			'item' => array()
		);
		$args['css'] = wp_parse_args( $args['css'], $css_defaults );
		
		/* LAYER */
		$css_layer_defaults = array(
			'width' => '',
			'height' => '',
			'pos_h' => '',
			'pos_v' => '',
			'background-color' => '',
			'padding' => '',
			'padding_top' => '',
			'padding_bottom' => '',
			'padding_left' => '',
			'padding_right' => '',
			'left' => '',
			'right' => '',
			'top' => '',
			'bottom' => '',
			'transform' => '',
			'transform-origin' => ''
		);
		$args['css']['layer'] = wp_parse_args( $args['css']['layer'], $css_layer_defaults );
		
		/* ITEM */
		$css_item_defaults = array(
			'background-color' => '',
			'color' => '',
			'font-family' => '',
			'font-size' => '',
			'text-align' => '',
			'border-color' => '',
			'border' => 0,
			'border-style' => '',
			'border-radius' => array()
		);
		$args['css']['item'] = wp_parse_args( $args['css']['item'], $css_item_defaults );
		
		return $args['css'];
	}
	
	
	
	
	
	/**
	 * PREDEFINED BUTTONS
	 */
	public static function predefined_buttons($args = array())
	{
		$defaults = array(
			'localize' => 0,
			'class' => ''
		);
		$args = wp_parse_args( $args, $defaults );
		
		$buttons = array(
			'wppas_btn_1' => array(
				'css' => array(
					'default' => array(
						'background-color' => 'rgba(0, 0, 0, 0.74902)',
						'color' => '#FFFFFF',
						'border-radius' => '3px',
						/*'padding' => '10px 30px',*/
						'font-family' => '"Merriweather Sans", sans-serif',
						'font-size' => '13px',
						'line-height' => '1'
					),
					'hover' => array(
						'background-color' => 'rgba(0, 0, 0, 0.74902)',
						'color' => '#FFFFFF'
					)
				),
				'content' => array(
					'text' => __('Click Here','wpproads'),
					'icon' => array()
				)
			),
			'wppas_btn_2' => array(
				'css' => array(
					'default' => array(
						'background-color' => 'rgba(0, 0, 0, 0.74902)',
						'color' => '#FFFFFF',
						'border-radius' => '3px',
						/*'padding' => '10px 30px',*/
						'font-family' => '"Merriweather Sans", sans-serif',
						'font-size' => '13px',
						'line-height' => '1'
					),
					'hover' => array(
						'background-color' => 'rgba(0, 0, 0, 0.74902)',
						'color' => '#FFFFFF'
					)
				),
				'content' => array(
					'text' => __('Click Here','wpproads'),
					'icon' => array(
						'class' => 'fa-angle-right',
						'type' => 'fa',
						'position' => 'after', // before | after (text)
						'style' => 'margin-left:10px;'
					)
				)
			),
			'wppas_btn_border_only' => array(
				'css' => array(
					'default' => array(
						'border' => 'solid',
						'border-width' => '2px',
						'border-color' => 'rgb(134, 96, 246)',
						'background-color' => 'transparent',
						'color' => 'rgb(134, 96, 246)',
						'border-radius' => '3px',
						'font-family' => '"Merriweather Sans", sans-serif',
						'font-size' => '13px',
						'line-height' => '1'
					),
					'hover' => array(
						'border-color' => 'rgb(112, 76, 220)',
						'color' => 'rgb(112, 76, 220)'
					)
				),
				'content' => array(
					'text' => __('Click Here','wpproads'),
					'icon' => array()
				)
			),
			'wppas_fb_btn_1' => array(
				'css' => array(
					'default' => array(
						'background-color' => '#3B5998',
						'color' => '#FFFFFF',
						'border-radius' => '3px',
						/*'padding' => '8px 15px',*/
						'font-family' => '"Merriweather Sans", sans-serif',
						'font-size' => '14px',
						'line-height' => '1'
					),
					'hover' => array(
						'background-color' => 'rgba(59, 89, 152, 0.85)',
						'color' => '#FFFFFF'
					)
				),
				'content' => array(
					'text' => 'Facebook',
					'icon' => array(
						'class' => 'fa-facebook',
						'type' => 'fa',
						'position' => 'before', // before | after (text)
						'style' => 'margin-right:10px;'
					)
				)
			),
			'wppas_twitter_btn_1' => array(
				'css' => array(
					'default' => array(
						'background-color' => '#00A0D1',
						'color' => '#FFFFFF',
						'border-radius' => '3px',
						/*'padding' => '8px 15px',*/
						'font-family' => '"Merriweather Sans", sans-serif',
						'font-size' => '14px',
						'line-height' => '1'
					),
					'hover' => array(
						'background-color' => 'rgba(0, 160, 209, 0.73)',
						'color' => '#FFFFFF',
					)
				),
				'content' => array(
					'text' => 'Twitter',
					'icon' => array(
						'class' => 'fa-twitter',
						'type' => 'fa',
						'position' => 'before', // before | after (text)
						'style' => 'margin-right:10px;'
					)
				)
			),
			'wppas_google_btn_1' => array(
				'css' => array(
					'default' => array(
						'background-color' => '#DD4B39',
						'color' => '#FFFFFF',
						'border-radius' => '3px',
						/*'padding' => '8px 15px',*/
						'font-family' => '"Merriweather Sans", sans-serif',
						'font-size' => '14px',
						'line-height' => '1'
					),
					'hover' => array(
						'background-color' => 'rgba(221, 75, 57, 0.77)',
						'color' => '#FFFFFF'
					)
				),
				'content' => array(
					'text' => 'Google',
					'icon' => array(
						'class' => 'fa-google',
						'type' => 'fa',
						'position' => 'before', // before | after (text)
						'style' => 'margin-right:10px;'
					)
				)
			)
		);
		
		if( $args['localize'] )
		{
			wp_localize_script( 'WPPAS_VBC_EDITR', 'predefined', array('buttons' => json_encode($buttons)) );
		}
		
		return empty($args['class']) ? $buttons : $buttons[$args['class']];
	}
	
}
?>