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

$options = array(
	'id'    => array( 'type' => 'unique' ),
	'book_image' => array(
		'type'  => 'upload',
		'images_only' => true,
		'value' => '',
		'label' => esc_html__('Book Image', 'odrin'),
	),
	'above_title_text' => array(
		'type'  => 'text',
		'value' => esc_html__('Coming Soon', 'odrin'),
		'label' => esc_html__('Above Title Text', 'odrin'),
	),
	'book_title' => array(
		'type'  => 'text',
		'value' => '',
		'label' => esc_html__('Book Title', 'odrin'),
	),
	'book_short_description' => array(
		'type'  => 'wp-editor',
		'editor_height' => 400,
		'wpautop' => true,
		'value' => '',
		'shortcodes' => true,
		'label' => esc_html__('Book Short Description', 'odrin'),
	),

	'show_countdown' => array(
		'type'  => 'multi-picker',
		'label' => false,
		'desc'  => false,
		'value' => array(
			'show_countdown' => 'true',
		),
		'picker' => array(
			'show_countdown' => array(
				'label' => esc_html__('Show Countdown', 'odrin'),
				'desc' => esc_html__('Display a Countdown or text for the book release.', 'odrin'),
				'type'  => 'switch',
				'left-choice' => array(
					'value' => 'true',
					'label' => esc_html__('Yes', 'odrin'),
				),
				'right-choice' => array(
					'value' => 'false',
					'label' => esc_html__('No', 'odrin'),
				),
			)
		),
		'choices' => array(
			'true' => array(
				'release_datetime' => array(
					'type'  => 'datetime-picker',
					'value' => '',
					'label' => esc_html__('Release Date', 'odrin'),
					'desc' => esc_html__('Enter the Release Date of the book.', 'odrin'),
					'datetime-picker' => array(
						'format'      => 'd-m-Y H:i',
						'maxDate'     => false,
						'minDate'     => true,
						'timepicker'  => true,
						'datepicker'  => true,
						'defaultTime' => '12:00'
					),
				),
				'expired_text' => array(
					'type'  => 'text',
					'value' => esc_html__('OUT NOW', 'odrin'),
					'label' => esc_html__('Expired Text', 'odrin'),
					'desc' => esc_html__('Enter the text that will be displayed when the timer expires.', 'odrin'),
				),
			),
			'false' => array(
				'release_text' => array(
					'type'  => 'text',
					'value' => '',
					'label' => esc_html__('Release Date Text', 'odrin'),
					'desc' => esc_html__('Enter text for the Release Date of the book.', 'odrin'),
				),
			),
		)
	),
	'hide_on_desktop' => array(
		'type'  => 'switch',
		'value' => 'false',
		'label' => esc_html__('Hide on Desktop', 'odrin'),
		'desc' => esc_html__('Hide the shortcode when the display width is higher or equal to 991px', 'odrin'),
		'left-choice' => array(
			'value' => 'true',
			'label' => esc_html__('Yes', 'odrin'),
		),
		'right-choice' => array(
			'value' => 'false',
			'label' => esc_html__('No', 'odrin'),
		),
	),
	'hide_on_mobile' => array(
		'type'  => 'switch',
		'value' => 'false',
		'label' => esc_html__('Hide on Mobile', 'odrin'),
		'desc' => esc_html__('Hide the shortcode when the display width is lower than 991px', 'odrin'),
		'left-choice' => array(
			'value' => 'true',
			'label' => esc_html__('Yes', 'odrin'),
		),
		'right-choice' => array(
			'value' => 'false',
			'label' => esc_html__('No', 'odrin'),
		),
	),
	'animation_on_scroll' => array(
		'type'  => 'multi-picker',
		'label' => false,
		'value' => array(
			'animation_enable' => 'no',
			'yes' => array(
				'animation_type' => 'fadeIn'
				)
			),
		'picker' => array(
			'animation_enable' => array(
				'type'  => 'switch',
				'value' => 'yes',
				'label' => esc_html__('Animation on Scroll', 'odrin'),
				'desc'  => esc_html__('Animate element when it is scrolled in view.'),
				'left-choice' => array(
					'value' => 'yes',
					'label' => esc_html__('Yes', 'odrin'),
					),
				'right-choice' => array(
					'value' => 'no',
					'label' => esc_html__('No', 'odrin'),
					),
				)
			),
		'choices' => array(
			'yes' => array(
				'animation_type' => array(
					'type'  => 'select',
					'value' => 'fadeIn',
					'label' => esc_html__('Animation Type', 'odrin'),
					'choices' => array(
						'fadeIn' => esc_html__('fadeIn', 'odrin'),
						'fadeInUp' => esc_html__('fadeInUp', 'odrin'),
						'fadeInLeft' => esc_html__('fadeInLeft', 'odrin'),
						'fadeInRight' => esc_html__('fadeInRight', 'odrin'),
						'fadeInDown' => esc_html__('fadeInDown', 'odrin'),
						'flipInX' => esc_html__('flipInX', 'odrin'),
						'flipInY' => esc_html__('flipInY', 'odrin'),
						'zoomIn' => esc_html__('zoomIn', 'odrin')
					)
				),
				'animation_delay' => array(
					'type'  => 'text',
					'value' => 0,
					'label' => esc_html__('Delay (in miliseconds)', 'odrin'),
				)
			)
		),
		'show_borders' => false,
	),
);
