<?php
/**
 * General Blog.
 *
 * @package     leatherhouse
 */

defined( 'ABSPATH' ) || exit;

if ( ! class_exists( 'leatherhouse_Customize_Blog_General_Option' ) ) :

	/**
	 * General Blog..
	 */
	class leatherhouse_Customize_Blog_General_Option extends leatherhouse_Customize_Base_Option {

		public function elements() {

			return array(

				'leatherhouse_general_arcive_single_blog_heading' => array(
					'setting' => array(),
					'control' => array(
						'type'     => 'parent_heading',
						'priority' => 1,
						'label'    => esc_html__( 'Blog/Archive Page Settings', 'leather-house' ),
						'section'  => 'leatherhouse_blog_general',
					),
				),

				'leatherhouse_blog_content_ordering'              => array(
					'setting' => array(
						'default'           => array(
							'meta-one',
							'title',
							'meta-two',
							'content',
						),
						'sanitize_callback' => array( 'leatherhouse_Customizer_Sanitize', 'sanitize_sortable' ),
					),
					'control' => array(
						'type'        => 'sortable',
						'priority'    => 5,
						'label'       => esc_html__( 'Elements Positioning', 'leather-house' ),
						'description' => esc_html__( 'Drag & Drop Post Meta to re-arrange the Order. + You can also hide Blog Meta by click on Eye icon.', 'leather-house' ),
						'section'     => 'leatherhouse_blog_general',
						'choices'     => array(
							'meta-one' => esc_attr__( 'Meta One', 'leather-house' ),
							'title'    => esc_attr__( 'Title', 'leather-house' ),
							'meta-two' => esc_attr__( 'Meta Two', 'leather-house' ),
							'content'  => esc_attr__( 'Content', 'leather-house' ),
						),
					),
				),

				'leatherhouse_archive_blog_heading'               => array(
					'setting' => array(),
					'control' => array(
						'type'     => 'heading',
						'priority' => 15,
						'label'    => esc_html__( 'Archive Blog/Post Sidebar', 'leather-house' ),
						'section'  => 'leatherhouse_blog_general',
					),
				),
				'leatherhouse_archive_blog_pages_layout'          => array(
					'setting' => array(
						'default'           => 'leatherhouse_right_sidebar',
						'sanitize_callback' => array( 'leatherhouse_Customizer_Sanitize', 'sanitize_radio' ),
					),
					'control' => array(
						'type'     => 'radio_image',
						'priority' => 20,
						'label'    => esc_html__( 'Layout', 'leather-house' ),
						'section'  => 'leatherhouse_blog_general',
						'choices'  => array(
							'leatherhouse_no_sidebar'    => LEATHERHOUSE_PARENT_URI . '/assets/images/icons/fullwidth.png',
							'leatherhouse_left_sidebar'  => LEATHERHOUSE_PARENT_URI . '/assets/images/icons/left-sidebar.png',
							'leatherhouse_right_sidebar' => LEATHERHOUSE_PARENT_URI . '/assets/images/icons/right-sidebar.png',
						),
					),
				),

				'leatherhouse_single_blog_heading'                => array(
					'setting' => array(),
					'control' => array(
						'type'     => 'heading',
						'priority' => 30,
						'label'    => esc_html__( 'Single Blog/Post Sidebar', 'leather-house' ),
						'section'  => 'leatherhouse_blog_general',
					),
				),

				'leatherhouse_single_blog_pages_layout'           => array(
					'setting' => array(
						'default'           => 'leatherhouse_right_sidebar',
						'sanitize_callback' => array( 'leatherhouse_Customizer_Sanitize', 'sanitize_radio' ),
					),
					'control' => array(
						'type'     => 'radio_image',
						'priority' => 35,
						'label'    => esc_html__( 'Layout', 'leather-house' ),
						'section'  => 'leatherhouse_blog_general',
						'choices'  => array(
							'leatherhouse_no_sidebar'    => LEATHERHOUSE_PARENT_URI . '/assets/images/icons/fullwidth.png',
							'leatherhouse_left_sidebar'  => LEATHERHOUSE_PARENT_URI . '/assets/images/icons/left-sidebar.png',
							'leatherhouse_right_sidebar' => LEATHERHOUSE_PARENT_URI . '/assets/images/icons/right-sidebar.png',
						),
					),
				),
			);
		}
	}

	new leatherhouse_Customize_Blog_General_Option();
endif;
