<?php
/**
* Sets settings for general fields
*
* @since  Blogto 1.0.0
* @param  array $settings
* @return array Merged array
*/

function Blogto_Customizer_general_settings( $settings ){

	$general = array(
		'site_title_color' => array(
			'label'     => esc_html__( 'Site Title', 'blogto' ),
			'transport' => 'postMessage',
			'section'   => 'colors',
			'type'      => 'colors',
		),
		'site_tagline_color' => array(
			'label'     => esc_html__( 'Site Tagline', 'blogto' ),
			'transport' => 'postMessage',
			'section'   => 'colors',
			'type'      => 'colors',
		),
		'site_primary_color' => array(
			'label'     => esc_html__( 'Primary', 'blogto' ),
			'section'   => 'colors',
			'type'      => 'colors',
		),

		# Theme Options Section
		# Header
		'enable_alternate_header' => array(
			'label'   => esc_html__( 'Enable Alternate Header', 'blogto' ),
			'type'    => 'checkbox',
			'section' => 'header_options',
		),
		'disable_search_icon' => array(
			'label'   => esc_html__( 'Disable Header search icon', 'blogto' ),
			'type'    => 'checkbox',
			'section' => 'header_options',
		),
		# Layout
		'archive_layout' => array(
			'label'     => esc_html__( 'Archive Layout', 'blogto' ),
			'section'   => 'layout_options',
			'type'      => 'select',
			'choices'   => array(
				'left' => esc_html__( 'Left Sidebar', 'blogto' ),
				'right' => esc_html__( 'Right Sidebar', 'blogto' ),
				'none' => esc_html__( 'No Sidebar', 'blogto' ),
			),
		),
		'archive_post_layout' => array(
			'label'     => esc_html__( 'Archive Post Layout', 'blogto' ),
			'section'   => 'layout_options',
			'type'      => 'select',
			'choices'   => array(
				'grid' => esc_html__( 'Grid', 'blogto' ),
				'simple' => esc_html__( 'Simple', 'blogto' ),
			),
		),
		'archive_post_image' => array(
			'label'     => esc_html__( 'Archive Post Image', 'blogto' ),
			'section'   => 'layout_options',
			'type'      => 'select',
			'choices'   => array(
				'thumbnail' => esc_html__( 'Thumbnail (150x150)', 'blogto' ),
				'medium' => esc_html__( 'Medium (300x300)', 'blogto' ),
				'large' => esc_html__( 'Large (1024x1024)', 'blogto' ),
				'default' => esc_html__( 'Default (1170x960)', 'blogto' ),
			),
		),
		'archive_post_image_alignment' => array(
			'label'     => esc_html__( 'Archive Post Image Alignment', 'blogto' ),
			'section'   => 'layout_options',
			'type'      => 'select',
			'choices'   => array(
				'left' => esc_html__( 'Left', 'blogto' ),
				'right' => esc_html__( 'Right', 'blogto' ),
				'center' => esc_html__( 'Center', 'blogto' ),
			),
		),
		'single_layout' => array(
			'label'     => esc_html__( 'Single Page Layout', 'blogto' ),
			'section'   => 'layout_options',
			'type'      => 'select',
			'choices'   => array(
				'left' => esc_html__( 'Left Sidebar', 'blogto' ),
				'right' => esc_html__( 'Right Sidebar', 'blogto' ),
				'compact' => esc_html__( 'Compact', 'blogto' ),
			),
		),
		# Blog
		'archive_page_title' => array(
			'label'   => esc_html__( 'Blog Page Title', 'blogto' ),
			'section' => 'blog_options',
			'type'    => 'text',
		),
		# Footer
		'enable_instagram' => array(
			'label'   => esc_html__( 'Enable Instagram', 'blogto' ),
			'type'    => 'checkbox',
			'section' => 'footer_options'
		),
		'insta_access_token' =>  array(
			'label'   => esc_html__( 'Instagram Access Token', 'blogto' ),
			'section' => 'footer_options',
			'type'    => 'text',
			'description' => '<a target="_blank" href="https://keonthemes.com/instagram-token-generator/">' . esc_html__( 'Generate Token', 'blogto' ).'</a>'
		),
		'enable_follow_us_button' => array(
			'label'   => esc_html__( 'Enable Follow us button', 'blogto' ),
			'section' => 'footer_options',
			'type'    => 'checkbox',
			'description' => esc_html__( 'This will add a button that will take user to your instagram account.', 'blogto' )
		),
		'insta_count' => array(
			'label'       => esc_html__( 'Total Number of Images', 'blogto' ),
			'section'     => 'footer_options',
			'type'        => 'number',
			'description' => esc_html__( 'Leave 0 to show all images', 'blogto' )
		),
		
		'enable_scroll_top_in_mobile' => array(
			'label'     => esc_html__( 'Enable Scroll top in mobile', 'blogto' ),
			'section'   => 'footer_options',
			'transport' => 'postMessage',
			'type'      => 'checkbox',
		),
		'disable_footer_widget' => array(
			'label'   => esc_html__( 'Disable Footer Widget', 'blogto' ),
			'section' => 'footer_options',
			'type'    => 'checkbox',
		),
		'footer_text' =>  array(
			'label'     => esc_html__( 'Footer Text', 'blogto' ),
			'section'   => 'footer_options',
			'type'      => 'textarea',
		)
	);

	return array_merge( $settings, $general );
}
add_filter( 'Blogto_Customizer_fields', 'Blogto_Customizer_general_settings' );