<?php
/**
 * The layout Meta-box configurations.
 *
 * @package Smart_Post_Show_Pro
 * @subpackage admin
 */

if ( ! defined( 'ABSPATH' ) ) {
	die;
} // Cannot access pages directly.

/**
 * The Layout building class.
 */
class SPSP_Layout {

	/**
	 * Layout metabox section.
	 *
	 * @param string $prefix The metabox key.
	 * @return void
	 */
	public static function section( $prefix ) {
		SP_PCP::createSection(
			$prefix,
			array(
				'fields' => array(
					array(
						'type'  => 'heading',
						// 'image' => SP_PCP_URL . 'admin/img/logo.svg',
						'image' => SP_PCP_URL . 'admin/img/logo.svg',
						'after' => '<i class="fa fa-life-ring"></i> Support',
						'link'  => 'https://shapedplugin.com/support/',
						'class' => 'pcp-admin-header',
					),
					array(
						'id'      => 'pcp_layout_preset',
						'type'    => 'layout_preset',
						'class'   => 'img_custom_width-3 pcp_layout_preset',
						'title'   => __( 'Layout Preset', 'smart-post-show-pro' ),
						'options' => array(
							'carousel_layout'   => array(
								'image' => SP_PCP_URL . 'admin/img/layout-preset/carousel.svg',
								'text'  => __( 'Carousel', 'smart-post-show-pro' ),
							),
							'slider_layout'     => array(
								'image' => SP_PCP_URL . 'admin/img/layout-preset/slider.svg',
								'text'  => __( 'Slider', 'smart-post-show-pro' ),
							),
							'thumbnails_slider' => array(
								'image' => SP_PCP_URL . 'admin/img/layout-preset/thumb_slider.svg',
								'text'  => __( 'Thumbs Slider', 'smart-post-show-pro' ),
							),
							'grid_layout'       => array(
								'image' => SP_PCP_URL . 'admin/img/layout-preset/grid.svg',
								'text'  => __( 'Grid', 'smart-post-show-pro' ),
							),
							'masonry_layout'    => array(
								'image' => SP_PCP_URL . 'admin/img/layout-preset/masonry.svg',
								'text'  => __( 'Masonry', 'smart-post-show-pro' ),
							),
							'list_layout'       => array(
								'image' => SP_PCP_URL . 'admin/img/layout-preset/list.svg',
								'text'  => __( 'List', 'smart-post-show-pro' ),
							),
							'filter_layout'     => array(
								'image' => SP_PCP_URL . 'admin/img/layout-preset/isotope.svg',
								'text'  => __( 'Isotope', 'smart-post-show-pro' ),
							),
							'glossary_layout'   => array(
								'image' => SP_PCP_URL . 'admin/img/layout-preset/glossary.svg',
								'text'  => __( 'Glossary', 'smart-post-show-pro' ),
							),
							'large_with_small'  => array(
								'image' => SP_PCP_URL . 'admin/img/layout-preset/hierarchical_grid.svg',
								'text'  => __( 'Hierarchical Grid', 'smart-post-show-pro' ),
							),
							'timeline_layout'   => array(
								'image' => SP_PCP_URL . 'admin/img/layout-preset/timeline.svg',
								'text'  => __( 'Timeline', 'smart-post-show-pro' ),
							),
							'zigzag_layout'     => array(
								'image' => SP_PCP_URL . 'admin/img/layout-preset/zigzag.svg',
								'text'  => __( 'Zigzag', 'smart-post-show-pro' ),
							),
							'table_layout'      => array(
								'image' => SP_PCP_URL . 'admin/img/layout-preset/table.svg',
								'text'  => __( 'Table', 'smart-post-show-pro' ),
							),
							'accordion_layout'  => array(
								'image' => SP_PCP_URL . 'admin/img/layout-preset/accordion.svg',
								'text'  => __( 'Accordion', 'smart-post-show-pro' ),
							),
						),
						'default' => 'carousel_layout',
					),
					array(
						'id'         => 'pcp_carousel_mode',
						'type'       => 'layout_preset',
						'class'      => 'img_custom_width-3 hide-active-sign pcp_carousel_mode',
						'title'      => __( 'Carousel Style', 'smart-post-show-pro' ),
						'options'    => array(
							'standard'   => array(
								'image' => SP_PCP_URL . 'admin/img/carousel-style/standard.svg',
								'text'  => __( 'Standard', 'smart-post-show-pro' ),
							),
							'center'     => array(
								'image' => SP_PCP_URL . 'admin/img/carousel-style/center.svg',
								'text'  => __( 'Center', 'smart-post-show-pro' ),
							),
							'ticker'     => array(
								'image' => SP_PCP_URL . 'admin/img/carousel-style/ticker.svg',
								'text'  => __( 'Ticker', 'smart-post-show-pro' ),
							),
							'multi-rows' => array(
								'image' => SP_PCP_URL . 'admin/img/carousel-style/multi_rows.svg',
								'text'  => __( 'Multi Rows', 'smart-post-show-pro' ),
							),
						),
						'default'    => 'standard',
						'dependency' => array( 'pcp_layout_preset', '==', 'carousel_layout' ),
					),
					array(
						'id'         => 'pcp_thumb_style',
						'type'       => 'layout_preset',
						'class'      => 'img_custom_width-3 hide-active-sign pcp_thumb_style',
						'title'      => __( 'Thumbnails Slider Style', 'smart-post-show-pro' ),
						'options'    => array(
							'bottom' => array(
								'image' => SP_PCP_URL . 'admin/img/thumb-style/bottom.svg',
								'text'  => __( 'Bottom', 'smart-post-show-pro' ),
							),
							'top'    => array(
								'image' => SP_PCP_URL . 'admin/img/thumb-style/top.svg',
								'text'  => __( 'Top', 'smart-post-show-pro' ),
							),
							'left'   => array(
								'image' => SP_PCP_URL . 'admin/img/thumb-style/left.svg',
								'text'  => __( 'Left', 'smart-post-show-pro' ),
							),
							'right'  => array(
								'image' => SP_PCP_URL . 'admin/img/thumb-style/right.svg',
								'text'  => __( 'Right', 'smart-post-show-pro' ),
							),
						),
						'default'    => 'bottom',
						'dependency' => array( 'pcp_layout_preset', '==', 'thumbnails_slider' ),
					),
					array(
						'id'         => 'post_list_orientation',
						'type'       => 'layout_preset',
						'class'      => 'img_custom_width-3 hide-active-sign post_list_orientation',
						'title'      => __( 'List Style', 'smart-post-show-pro' ),
						'options'    => array(
							'left-thumb'  => array(
								'image' => SP_PCP_URL . 'admin/img/list-style/left.svg',
								'text'  => __( 'Left', 'smart-post-show-pro' ),
							),
							'right-thumb' => array(
								'image' => SP_PCP_URL . 'admin/img/list-style/right.svg',
								'text'  => __( 'Right', 'smart-post-show-pro' ),
							),
						),
						'default'    => 'left-thumb',
						'dependency' => array( 'pcp_layout_preset', '==', 'list_layout' ),
					),
					array(
						'id'         => 'pcp_grid_style',
						'type'       => 'layout_preset',
						'class'      => 'img_custom_width-2 hide-active-sign padding_0',
						'title'      => __( 'Isotope Style', 'smart-post-show-pro' ),
						// 'subtitle'   => __( 'Choose a style for the isotope.', 'smart-post-show-pro' ),
						'inline'     => true,
						'options'    => array(
							'even'    => array(
								'image' => SP_PCP_URL . 'admin/img/isotope-style/even.svg',
								'text'  => __( 'Even', 'smart-post-show-pro' ),
							),
							'masonry' => array(
								'image' => SP_PCP_URL . 'admin/img/isotope-style/masonry.svg',
								'text'  => __( 'Masonry', 'smart-post-show-pro' ),
							),
						),
						'default'    => 'even',
						'dependency' => array( 'pcp_layout_preset', '==', 'filter_layout', true ),
					),
					array(
						'id'         => '_one_other_style',
						'type'       => 'layout_preset',
						'class'      => 'img_custom_width-3 hide-active-sign padding_0',
						'title'      => __( 'Hierarchical Style', 'smart-post-show-pro' ),
						// 'subtitle'   => __( 'Choose a large item position for the large with small layout.', 'smart-post-show-pro' ),
						'options'    => array(
							'style_1' => array(
								'image' => SP_PCP_URL . 'admin/img/hierarchial-style/hierarchical_1.svg',
								'text'  => __( 'Hierarchical 1', 'smart-post-show-pro' ),
							),
							'style_2' => array(
								'image' => SP_PCP_URL . 'admin/img/hierarchial-style/hierarchical_2.svg',
								'text'  => __( 'Hierarchical 2', 'smart-post-show-pro' ),
							),
							'style_3' => array(
								'image' => SP_PCP_URL . 'admin/img/hierarchial-style/hierarchical_3.svg',
								'text'  => __( 'Hierarchical 3', 'smart-post-show-pro' ),
							),
							'style_4' => array(
								'image' => SP_PCP_URL . 'admin/img/hierarchial-style/hierarchical_4.svg',
								'text'  => __( 'Hierarchical 4', 'smart-post-show-pro' ),
							),
							'style_5' => array(
								'image' => SP_PCP_URL . 'admin/img/hierarchial-style/hierarchical_5.svg',
								'text'  => __( 'Hierarchical 5', 'smart-post-show-pro' ),
							),
						),
						'default'    => 'style_1',
						'dependency' => array( 'pcp_layout_preset', '==', 'large_with_small', true ),
					),
					array(
						'id'         => 'timeline_other_style',
						'type'       => 'layout_preset',
						'class'      => 'timeline_other_style img_custom_width-3 hide-active-sign padding_0',
						'title'      => __( 'Timeline Style', 'smart-post-show-pro' ),
						// 'subtitle'   => __( 'Choose a large item position for the large with small layout.', 'smart-post-show-pro' ),
						'options'    => array(
							'timeline_style_1' => array(
								'image' => SP_PCP_URL . 'admin/img/timeline-style/style_01.svg',
								'text'  => __( 'Vertical', 'smart-post-show-pro' ),
							),
							'timeline_style_2' => array(
								'image' => SP_PCP_URL . 'admin/img/timeline-style/style_02.svg',
								'text'  => __( 'Horizontal', 'smart-post-show-pro' ),
							),
							'timeline_style_3' => array(
								'image' => SP_PCP_URL . 'admin/img/timeline-style/style_03.svg',
								'text'  => __( 'Right Side', 'smart-post-show-pro' ),
							),
							'timeline_style_4' => array(
								'image' => SP_PCP_URL . 'admin/img/timeline-style/style_04.svg',
								'text'  => __( 'Left Side', 'smart-post-show-pro' ),
							),
						),
						'default'    => 'timeline_style_1',
						'dependency' => array( 'pcp_layout_preset', '==', 'timeline_layout', true ),
					),
				), // End of fields array.
			)
		);
	}
}
