<?php if ( ! defined( 'FW' ) ) {
	die( 'Forbidden' );
}


// Headings
$headings = array();
for ($i = 1; $i <= 6; $i++) {
	$headings[] = array(
	    'h'.$i.'_size' => array(
			'label' => 'Heading '.$i,
			'type'  => 'short-text',
			'value' => 54 - ($i*6),
			'desc'  => esc_html__( 'Font size in pixels', 'jt-wishbone' )
		),
	);
};

$fontfamily = array(
	'type'    => 'radio',
	'label'   => esc_html__( 'Font Family', 'jt-wishbone' ),
	'inline' => true,
	'choices' => array(
		'primary' 		=> esc_html__( 'Primary', 'jt-wishbone' ),
		'secondary' 	=> esc_html__( 'Secondary', 'jt-wishbone' ),
	)
);

$fontweight = array(
	'type'    => 'short-select',
	'label'   => esc_html__( 'Font Weight', 'jt-wishbone' ),
	'inline' => true,
	'choices' => array(
		'initial' 	=> esc_html__( 'initial', 'jt-wishbone' ),
		'inherit' 	=> esc_html__( 'inherit', 'jt-wishbone' ),
		'100' 	=> esc_html__( '100', 'jt-wishbone' ),
		'200' 	=> esc_html__( '200', 'jt-wishbone' ),
		'300' 	=> esc_html__( '300', 'jt-wishbone' ),
		'400' 	=> esc_html__( '400', 'jt-wishbone' ),
		'500' 	=> esc_html__( '500', 'jt-wishbone' ),
		'600' 	=> esc_html__( '600', 'jt-wishbone' ),
		'700' 	=> esc_html__( '700', 'jt-wishbone' ),
		'800' 	=> esc_html__( '800', 'jt-wishbone' ),
		'900' 	=> esc_html__( '900', 'jt-wishbone' ),
	)
);

$fontstyle = array(
	'type'    => 'checkboxes',
	'label'   => esc_html__( 'Font Style', 'jt-wishbone' ),
	'desc'   => esc_html__( 'Adjoining Normal with bold won\'t work', 'jt-wishbone' ),
	'inline' => true,
	'choices' => array(
		'italic' 	=> esc_html__( 'Italic', 'jt-wishbone' ),
		'underline' => esc_html__( 'Underline', 'jt-wishbone' ),
	)
);

$fontsize = array(
	'type'  => 'slider',
    'value' => 12,
    'properties' => array(
        'min' => 12,
        'max' => 100,
        'step' => 1, // Set slider step. Always > 0. Could be fractional.
    ),
	'label'   => esc_html__( 'Font Size (px)', 'jt-wishbone' ),
);

$lineheight = array(
	'type'  => 'slider',
    'value' => 22,
    'properties' => array(
        'min' => 12,
        'max' => 100,
        'step' => 1, // Set slider step. Always > 0. Could be fractional.
    ),
	'label'   => esc_html__( 'Line Height (px)', 'jt-wishbone' ),
	'desc'   => esc_html__( 'The best formula for line height is: (Fontsize + 11px)', 'jt-wishbone' ),
);

$fontcolor = array(
	'type'    => 'color-picker',
	'label'   => esc_html__( 'Text Color', 'jt-wishbone' ),
);

$options = array(
	'typography' => array(
		'title'   => wishbone_pass_html( 'Font & Typography' ),
		'type'    => 'tab',
		'options' => array(

			// FONT PAIR
			'onoff_typo' => array(
				'title'    => 'Font Pair',
				'type'    => 'tab',
				'options' => array(
					'use_custom_typo' => array(
						'type'         => 'switch',
						'label'        => esc_html__( 'Turn on Custom Font?', 'jt-wishbone' ),
						'desc'        => esc_html__( 'If you disable this, all typography options to the right won\'t be applied. Vice-versa', 'jt-wishbone' ),
					),
					'fontpair' => array(
						'title'    => 'Font Pair',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(

							'font_pair_1'  => array(
								'label' => esc_html__( 'Primary', 'jt-wishbone' ),
								'desc' => esc_html__( 'Primary Font', 'jt-wishbone' ),
								'type'  => 'typography-v2',
								'value'      => array(
									'family'    => 'Open Sans'
								),
								'components' => array(
									'family'         => true,
									'size'           => false,
									'line-height'    => false,
									'letter-spacing' => false,
									'color'          => false
								),
							), // font_pair_1

							'font_pair_2'  => array(
								'label' => esc_html__( 'Secondary', 'jt-wishbone' ),
								'desc' => esc_html__( 'Secondary Font', 'jt-wishbone' ),
								'type'  => 'typography-v2',
								'value'      => array(
									'family'    => 'Merriweather'
								),
								'components' => array(
									'family'         => true,
									'size'           => false,
									'line-height'    => false,
									'letter-spacing' => false,
									'color'          => false
								),
							),
						),
					),
				),
			),

			'fontusage' => array(
				'title'    => 'Font Usage',
				'type'    => 'tab',
				'options' => array(

					'body-fontsettings' => array(
						'title'    => 'Body',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'body-fontfamily' => $fontfamily,
							'body-fontsize' => $fontsize,
							'body-lineheight' => $lineheight,
							'body-color' => $fontcolor,
						),
					),

					'headlines-fontsettings' => array(
						'title'    => 'Headlines (H1 - H6)',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'headlines-fontfamily' => $fontfamily,
							'headlines-fontweight' => $fontweight,
							$headings
						),
					),

					'menu-fontsettings' => array(
						'title'    => 'Menu',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'menu-fontfamily' => $fontfamily,
							'menu-fontsize' => $fontsize,
							'menu-weight' => $fontweight,
							'menu-style' => $fontstyle,
						),
					),

					'hero1-fontsettings' => array(
						'title'    => 'Hero Section 1 Headline',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'hero1-fontfamily' => $fontfamily,
							'hero1-fontsize' => $fontsize,
							'hero1-lineheight' => $lineheight,
							'hero1-weight' => $fontweight,
							'hero1-style' => $fontstyle,
						),
					),

					'hero2-fontsettings' => array(
						'title'    => 'Hero Section 2 Headline',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'hero2-fontfamily' => $fontfamily,
							'hero2-fontsize' => $fontsize,
							'hero2-lineheight' => $lineheight,
							'hero2-weight' => $fontweight,
							'hero2-style' => $fontstyle,
						),
					),

					'hero3-fontsettings' => array(
						'title'    => 'Hero Section 3 Headline',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'hero3-fontfamily' => $fontfamily,
							'hero3-fontsize' => $fontsize,
							'hero3-lineheight' => $lineheight,
							'hero3-weight' => $fontweight,
							'hero3-style' => $fontstyle,
						),
					),

					'hero4-fontsettings' => array(
						'title'    => 'Hero Section 4 Headline',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'hero4-fontfamily' => $fontfamily,
							'hero4-fontsize' => $fontsize,
							'hero4-lineheight' => $lineheight,
							'hero4-weight' => $fontweight,
							'hero4-style' => $fontstyle,
						),
					),

					'standardloop-fontsettings' => array(
						'title'    => 'Standard Post Loop Type\'s Headline',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'standardloop-fontfamily' => $fontfamily,
							'standardloop-fontsize' => $fontsize,
							'standardloop-lineheight' => $lineheight,
							'standardloop-weight' => $fontweight,
							'standardloop-style' => $fontstyle,
						),
					),

					'masonry-fontsettings' => array(
						'title'    => 'Masonry Loop Type\'s Headline',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'masonry-fontfamily' => $fontfamily,
							'masonry-fontsize' => $fontsize,
							'masonry-lineheight' => $lineheight,
							'masonry-weight' => $fontweight,
							'masonry-style' => $fontstyle,
						),
					),

					'simplegrid-fontsettings' => array(
						'title'    => 'Simple Grid Type\'s Headline',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'simplegrid-fontfamily' => $fontfamily,
							'simplegrid-fontsize' => $fontsize,
							'simplegrid-lineheight' => $lineheight,
							'simplegrid-weight' => $fontweight,
							'simplegrid-style' => $fontstyle,
						),
					),

					'classic-fontsettings' => array(
						'title'    => 'Classic Loop Type\'s Headline',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'classic-fontfamily' => $fontfamily,
							'classic-fontsize' => $fontsize,
							'classic-lineheight' => $lineheight,
							'classic-weight' => $fontweight,
							'classic-style' => $fontstyle,
						),
					),

					'simplelist-fontsettings' => array(
						'title'    => 'Simple List Loop Type\'s Headline',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'simplelist-fontfamily' => $fontfamily,
							'simplelist-fontsize' => $fontsize,
							'simplelist-lineheight' => $lineheight,
							'simplelist-weight' => $fontweight,
							'simplelist-style' => $fontstyle,
						),
					),

					'singular-fontsettings' => array(
						'title'    => 'Singular Page/Post Headline',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'singular-fontfamily' => $fontfamily,
							'singular-fontsize' => $fontsize,
							'singular-lineheight' => $lineheight,
							'singular-weight' => $fontweight,
							'singular-style' => $fontstyle,
						),
					),

					'singularparagraph-fontsettings' => array(
						'title'    => 'Singular Page/Post Content',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'singularparagraph-fontfamily' => $fontfamily,
							'singularparagraph-fontsize' => $fontsize,
							'singularparagraph-lineheight' => $lineheight,
						),
					),

					'sidebarwidget-fontsettings' => array(
						'title'    => 'Sidebar Widget Title',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'sidebarwidget-fontfamily' => $fontfamily,
							'sidebarwidget-fontsize' => $fontsize,
							'sidebarwidget-lineheight' => $lineheight,
							'sidebarwidget-weight' => $fontweight,
							'sidebarwidget-style' => $fontstyle,
						),
					),

					'sidebarwidgetcontent-fontsettings' => array(
						'title'    => 'Sidebar Widget Content',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'sidebarwidgetcontent-fontfamily' => $fontfamily,
							'sidebarwidgetcontent-fontsize' => $fontsize,
							'sidebarwidgetcontent-lineheight' => $lineheight,
						),
					),

					'footerwidget-fontsettings' => array(
						'title'    => 'Footer Widget Title',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'footerwidget-fontfamily' => $fontfamily,
							'footerwidget-fontsize' => $fontsize,
							'footerwidget-lineheight' => $lineheight,
							'footerwidget-weight' => $fontweight,
							'footerwidget-style' => $fontstyle,
						),
					),

					'footerwidgetcontent-fontsettings' => array(
						'title'    => 'Footer Widget Content',
						'type'    => 'box',
						'attr' 	=> array('data-zlstate' => 'closed'),
						'options' => array(
							'footerwidgetcontent-fontfamily' => $fontfamily,
							'footerwidgetcontent-fontsize' => $fontsize,
							'footerwidgetcontent-lineheight' => $lineheight,
						),
					),

				),
			),
		)
	)
);
