<?php
/**
 * Elementor Business Hour Widget.
 *
 * Elementor widget that inserts an embbedable content into the page, from any given URL.
 *
 * @since 1.0.5
 */
class Elementor_Business_Hour_Widget extends \Elementor\Widget_Base {

	/**
	 * Get widget name.
	 *
	 * Retrieve Business Hour widget name.
	 *
	 * @since 1.0.5
	 * @access public
	 *
	 * @return string Widget name.
	 */
	public function get_name() {
		return 'business-hour';
	}

	/**
	 * Get widget title.
	 *
	 * Retrieve Business Hour widget title.
	 *
	 * @since 1.0.5
	 * @access public
	 *
	 * @return string Widget title.
	 */
	public function get_title() {
		return __( 'Business Hours', 'endless-addons' );
	}

	/**
	 * Get widget icon.
	 *
	 * Retrieve Business Hour widget icon.
	 *
	 * @since 1.0.5
	 * @access public
	 *
	 * @return string Widget icon.
	 */
	public function get_icon() {
		return 'fa fa-clock-o';
	}

	/**
	 * Get widget categories.
	 *
	 * Retrieve the list of categories the Business Hour widget belongs to.
	 *
	 * @since 1.0.5
	 * @access public
	 *
	 * @return array Widget categories.
	 */
	public function get_categories() {
		return [ 'endless-elements' ];
	}

	/**
	 * Register Business Hour widget controls.
	 *
	 * Adds different input fields to allow the user to change and customize the widget settings.
	 *
	 * @since 1.0.5
	 * @access protected
	 */
	protected function register_controls() {

		$this->start_controls_section(
			'default_section',
			[    
				'label' => __( 'Settings', 'endless-addons' ),
				'tab' => \Elementor\Controls_Manager::TAB_CONTENT
			]
		);

		$this->add_control(
			'show_business_hour',
			[
				'label' => __( 'Show/Hide Business Hour Section', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::CHOOSE,
				'options' => [
					'show' => [
						'title' => __( 'Show', 'endless-addons' ),
						'icon' => 'fa fa-check'
					],
					'hide' => [
						'title' => __( 'Hide', 'endless-addons' ),
						'icon' => 'fa fa-close'
					]
				],
				'default' => 'show',
				'toggle' => true
			]
		);

		$this->add_control(
			'select_business_hour_style',
			[
				'label' => __( 'Select Business Hour Style', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::SELECT,
				'input_type' => 'SELECT',
				'options' => [
					'style-01' => __( 'Style 01', 'endless-addons' ),
					'style-02' => __( 'Style 02', 'endless-addons' ),
					'style-03' => __( 'Style 03', 'endless-addons' ),
					'style-04' => __( 'Style 04', 'endless-addons' ),
					'style-05' => __( 'Style 05', 'endless-addons' ),
					'style-06' => __( 'Style 06', 'endless-addons' ),
				],
				'default' => 'style-01'
			]
		);

		$this->end_controls_section();

		$this->start_controls_section(
			'business_hour_section',
			[
				'label' => __( 'Business Hour Section', 'endless-addons' ),
				'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
			]
		);

		$this->add_control(
			'section_title',
			[
				'label' => __( 'Section Title', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::TEXT,
				'input_type' => 'text',
				'placeholder' => __( 'Title', 'endless-addons' ),
				'default'  => __( 'Design 01', 'endless-addons' )
			]
		);

		$this->add_control(
			'section_desc',
			[
				'label' => __( 'Section Description', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::WYSIWYG,
				'input_type' => 'WYSIWYG',
				'placeholder' => __( 'Description', 'endless-addons' ),
				'default' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt dolore magna aliqua. Quis ipsum suspendisse ultrices gravida.', 'endless-addons'),
				'condition' => [
                    'select_business_hour_style' => array('style-01', 'style-04', 'style-05', 'style-06')
                ]
			]
		);

		$this->add_group_control(
			\Elementor\Group_Control_Background::get_type(),
			[
				'name' => 'section_background',
				'label' => __( 'Background', 'plugin-domain' ),
				'types' => [ 'classic', 'gradient', 'video' ],
				'selector' => '{{WRAPPER}} .ea-business-hours-area',
			]
		);

		$this->end_controls_section();

		$this->start_controls_section(
			'business_hour_content',
			[
				'label' => __( 'Business Hour Content', 'endless-addons' ),
				'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
			]
		);

		$this->add_control(
			'business_hour_featured_img',
			[
				'label' => __( 'Featured Image', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::MEDIA,
				'show_label' => true,
				'condition' => [
                    'select_business_hour_style' => array('style-01', 'style-02', 'style-04', 'style-05', 'style-06')
                ],
                'default' => [
					'url' => plugin_dir_url( dirname( __FILE__ ) ) . '../public/img/business/business-hours-img-1.png'
				],
			]
		);

		$this->add_group_control(
			\Elementor\Group_Control_Image_Size::get_type(),
			[
				'name' => 'thumbnail',
				'default' => 'full',
				'separator' => 'none',
				'exclude' => [
					'full',
					'custom',
					'large',
					'shop_catalog',
					'shop_single',
					'shop_thumbnail'
				],
				'condition' => [
					'select_business_hour_style' => array('style-01', 'style-02', 'style-04', 'style-05', 'style-06')
				]
			]
		);

		$this->add_control(
			'business_hour_shape_img',
			[
				'label' => __( 'Shape Image', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::MEDIA,
				'show_label' => true,
				'condition' => [
                    'select_business_hour_style' => array('style-01', 'style-03', 'style-06')
                ]
			]
		);

		$this->add_control(
			'business_hour_shape_img1',
			[
				'label' => __( 'Shape Image 1', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::MEDIA,
				'show_label' => true,
				'condition' => [
                    'select_business_hour_style' => 'style-03'
                ]
			]
		);

		$this->add_control(
			'business_hour_shape_img2',
			[
				'label' => __( 'Shape Image 2', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::MEDIA,
				'show_label' => true,
				'condition' => [
                    'select_business_hour_style' => 'style-03'
                ]
			]
		);

		$this->add_control(
			'business_hour_title', [
				'label' => __( 'Title', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::TEXT,
				'input_type' => 'text',
				'placeholder' => __( 'Title', 'endless-addons' ),
				'default'  => __( 'Open Hours', 'endless-addons' )
			]
		);

		$repeater = new \Elementor\Repeater();

		$repeater->add_control(
			'single_business_hour_day', [
				'label' => __( 'Day', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::TEXT,
				'input_type' => 'text',
				'placeholder' => __( 'Day', 'endless-addons' ),
				'default'  => __( 'Saturday', 'endless-addons' )
			]
		);

		$repeater->add_control(
			'single_business_hour_time', [
				'label' => __( 'Time', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::TEXT,
				'input_type' => 'text',
				'placeholder' => __( 'Time', 'endless-addons' ),
				'default'  => __( '12am - 10pm', 'endless-addons' )
			]
		);

		$repeater->add_control(
            'is_day_time_closed',
            [
                'label' => __( 'Is Closed?', 'endless-addons' ),
                'type' => \Elementor\Controls_Manager::SWITCHER,
                'label_on' => __( 'Yes', 'endless-addons' ),
                'label_off' => __( 'No', 'endless-addons' ),
                'return_value' => 'yes',
                'default' => 'no'
            ]
        );

		$this->add_control(
			'single_business_hour',
			[
				'label' => __( 'Single Business Hour', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::REPEATER,
				'fields' => $repeater->get_controls(),
				'default' => [
					[
						'list_title' => __( 'Single Business Hour #1', 'endless-addons' ),
						'list_content' => __( 'Single Business Hour Content', 'endless-addons' ),
					],
				
				],
			]
		);

		$this->end_controls_section();

		$this->start_controls_section(
			'section_style',
			[
				'label' => __( 'Section Style', 'endless-addons' ),
				'tab' => \Elementor\Controls_Manager::TAB_STYLE
			]
		);

		$this->add_control(
			'section_title_color',
			[
				'label' => __( 'Section Title Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-business-hours-area .section-title h2, .ea-business-hours-area .ea-left-section-title h2' => 'color: {{VALUE}}'
                ]
			]
		);

		$this->add_group_control(
            \Elementor\Group_Control_Typography::get_type(),
            [
                'name' => 'section_title_typography',
                'label' => __( 'Section Title Typography', 'endless-addons' ),
                'scheme' => \Elementor\Core\Schemes\Typography::TYPOGRAPHY_1,
                'selector' => '{{WRAPPER}} .ea-business-hours-area .section-title h2, .ea-business-hours-area .ea-left-section-title h2'
            ]
        );

        $this->add_control(
			'section_desc_color',
			[
				'label' => __( 'Section Description Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-business-hours-area .section-title p' => 'color: {{VALUE}}'
                ],
                'condition' => [
                    'select_business_hour_style' => array('style-01', 'style-04', 'style-05', 'style-06')
                ]
			]
		);

        $this->add_group_control(
            \Elementor\Group_Control_Typography::get_type(),
            [
                'name' => 'section_desc_typography',
                'label' => __( 'Section Description Typography', 'endless-addons' ),
                'scheme' => \Elementor\Core\Schemes\Typography::TYPOGRAPHY_1,
                'selector' => '{{WRAPPER}} .ea-business-hours-area .section-title p',
                'condition' => [
                    'select_business_hour_style' => array('style-01', 'style-04', 'style-05', 'style-06')
                ]
            ]
        );

		$this->end_controls_section();

		$this->start_controls_section(
			'business_hour_style',
			[
				'label' => __( 'Business Hour Style', 'endless-addons' ),
				'tab' => \Elementor\Controls_Manager::TAB_STYLE
			]
		);

        $this->add_control(
			'business_hour_title_color',
			[
				'label' => __( 'Title Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-business-hours-area .ea-business-hours-content h3, .ea-business-hours-area .ea-business-hours-content p' => 'color: {{VALUE}}'
                ]
			]
		);

		$this->add_control(
			'business_hour_title_bg_color',
			[
				'label' => __( 'Title Background Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-business-hours-area .ea-business-hours-content p' => 'background-color: {{VALUE}}'
                ],
                'condition' => [
		            'select_business_hour_style' => array('style-02', 'style-03', 'style-04', 'style-05', 'style-06')
		        ],
			]
		);

        $this->add_group_control(
            \Elementor\Group_Control_Typography::get_type(),
            [
                'name' => 'business_hour_title_typography',
                'label' => __( 'Title Typography', 'endless-addons' ),
                'scheme' => \Elementor\Core\Schemes\Typography::TYPOGRAPHY_1,
                'selector' => '{{WRAPPER}} .ea-business-hours-area .ea-business-hours-content h3, .ea-business-hours-area .ea-business-hours-content p'
            ]
        );

        $this->add_control(
			'business_hour_data_color',
			[
				'label' => __( 'Data Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-business-hours-content .ea-businss-hours-list-content li' => 'color: {{VALUE}}'
                ]
			]
		);

		$this->add_control(
			'business_hour_data_bg_color',
			[
				'label' => __( 'Data Background Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-business-hours-content .ea-businss-hours-list-content' => 'background-color: {{VALUE}}'
                ],
                'condition' => [
                    'select_business_hour_style' => 'style-03'
                ]
			]
		);

        $this->add_group_control(
            \Elementor\Group_Control_Typography::get_type(),
            [
                'name' => 'business_hour_data_typography',
                'label' => __( 'Data Typography', 'endless-addons' ),
                'scheme' => \Elementor\Core\Schemes\Typography::TYPOGRAPHY_1,
                'selector' => '{{WRAPPER}} .ea-business-hours-content .ea-businss-hours-list-content li'
            ]
        );

		$this->end_controls_section();

		$this->start_controls_section(
			'_section_overlay_style',
			[
				'label' => __('Background Overlay', 'endless-addons'),
				'tab' => \Elementor\Controls_Manager::TAB_STYLE
			]
		);

		$this->start_controls_tabs('_tabs_overlay_style');

		$this->start_controls_tab(
			'_tab_overlay_normal',
			[
				'label' => __('Normal', 'endless-addons'),
			]
		);

		$this->add_group_control(
			\Elementor\Group_Control_Background::get_type(),
			[
				'name'     => 'hover_overlay_normal',
				'label' => __('Background', 'endless-addons'),
				'show_label' => true,
				'types' => ['classic', 'gradient'],
				'exclude' => [
					'classic' => 'image'
				],
				'selector' => '{{WRAPPER}} .ea-business-hours-area, .ea-business-hours-area.ea-bg-images::before',
			]
		);

		$this->end_controls_tab();

		$this->start_controls_tab(
			'_tab_overlay_hover',
			[
				'label' => __('Hover', 'endless-addons'),
			]
		);


		$this->add_group_control(
			\Elementor\Group_Control_Background::get_type(),
			[
				'name'     => 'hover_overlay_hover',
				'label' => __('Background', 'endless-addons'),
				'show_label' => true,
				'types' => ['classic', 'gradient'],
				'exclude' => [
					'classic' => 'image'
				],
				'selector' => '{{WRAPPER}} .ea-business-hours-area:hover, .ea-business-hours-area.ea-bg-images:hover::before',
			]
		);

		$this->end_controls_tab();

		$this->end_controls_tabs();

		$this->end_controls_section();

		require plugin_dir_path( dirname( __FILE__ ) ) . 'floating/ea-business-floating.php';

	}

	/**
	 * Render Business Hour widget output on the frontend.
	 *
	 * Written in PHP and used to generate the final HTML.
	 *
	 * @since 1.0.5
	 * @access protected
	 */
	protected function render() {

		$settings = $this->get_settings_for_display();

		if( $settings['show_business_hour'] == 'show' ) :

			if( $settings['select_business_hour_style'] == 'style-01' ) : ?>
				<!-- Start EA Business Hours Design One Area -->
		        <section class="ea-business-hours-area pb-100">
		            <div class="container">
		                <div class="section-title">
		                    <h2><?php echo esc_html($settings['section_title']); ?></h2>
			                <p><?php echo wp_kses_post($settings['section_desc']); ?></p>
		                </div>
		                <div class="row align-items-center">
		                    <div class="col-lg-6">
		                        <div class="business-hours-img-1 ea-elementor-floating">       
			                        <?php if( ! $settings['business_hour_featured_img']['url'] == '' ) : 
			                        	echo \Elementor\Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'business_hour_featured_img' ); ?>
	                                <?php endif; ?>
                                </div>
		                    </div>
		                    <div class="col-lg-6">
		                        <div class="ea-business-hours-content ml-50">
		                            <h3><?php echo esc_html($settings['business_hour_title']); ?></h3>
		                            <ul class="ea-businss-hours-list-content">
		                            	<?php foreach ( $settings['single_business_hour'] as $item ) :
			                                if( $item['is_day_time_closed'] == 'no') : ?>
		                            			<li>
		                            		<?php else: ?>
			                                    <li class="close-color">
			                                <?php endif; ?>
			                                    <?php echo esc_html($item['single_business_hour_day']); ?>
			                                    <span><?php echo esc_html($item['single_business_hour_time']); ?></span>
			                                </li>
		                                <?php endforeach; ?>
		                            </ul>
		                            <div class="business-shape-1">
		                                <?php if( ! $settings['business_hour_shape_img']['url'] == '' ) : ?>
			                                <img src="<?php echo esc_url( $settings['business_hour_shape_img']['url'] ); ?>" alt="image">
		                                <?php endif; ?>
		                            </div>
		                       </div>
		                    </div>
		                </div>
		            </div>
		        </section>
		        <!-- End EA Business Hours One Area -->
		    <?php elseif( $settings['select_business_hour_style'] == 'style-02' ) : ?>
		    	<!-- Start Business Hour Design Two Area -->
		        <section class="ea-business-hours-area pb-100">
		            <div class="container">
		            	<div class="row align-items-end">
		                	<div class="col-lg-6">
		                    	<div class="ea-business-hours-content ea-business-hours-content-style-two mr-50">
			                        <div class="ea-left-section-title">
			                            <h2><?php echo esc_html($settings['section_title']); ?></h2>
			                        </div>
			                        <p><?php echo esc_html($settings['business_hour_title']); ?></p>
		                            <ul class="ea-businss-hours-list-content">
		                            	<?php foreach ( $settings['single_business_hour'] as $item ) :
		                            		if( $item['is_day_time_closed'] == 'no') : ?>
		                            			<li>
		                            		<?php else: ?>
			                                    <li class="close-color">
			                                <?php endif; ?> 
			                                    <?php echo esc_html($item['single_business_hour_day']); ?>
			                                    <span><?php echo esc_html($item['single_business_hour_time']); ?></span>
			                                </li>
		                                <?php endforeach; ?>
		                            </ul>
			                   </div>
		                    </div>
		                    <div class="col-lg-6">
		                        <div class="business-hours-img-2 ea-elementor-floating">       
			                        <?php if( ! $settings['business_hour_featured_img']['url'] == '' ) : 
			                        	echo \Elementor\Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'business_hour_featured_img' ); ?>
	                                <?php endif; ?>
                                </div>
		                    </div>
		                </div>
		            </div>
		        </section>
		        <!-- End Business Hour Design Two Area -->
		    <?php elseif( $settings['select_business_hour_style'] == 'style-03' ) : ?>
		    	<!-- Start Business Hour Design Three Area -->
		        <section class="ea-business-hours-area ea-bg-images ptb-100">
		            <div class="container">
		            	<div class="row justify-content-end">
		                	<div class="col-lg-6">
		                    	<div class="ea-business-hours-content ea-business-hours-content-style-three mr-50">
			                        <div class="ea-left-section-title">
			                            <h2><?php echo esc_html($settings['section_title']); ?></h2>
			                        </div>
			                        <p><?php echo esc_html($settings['business_hour_title']); ?></p>
		                            <ul class="ea-businss-hours-list-content">
		                            	<?php foreach ( $settings['single_business_hour'] as $item ) :
			                                if( $item['is_day_time_closed'] == 'no') : ?>
		                            			<li>
		                            		<?php else: ?>
			                                    <li class="close-color">
			                                <?php endif; ?>
			                                    <?php echo esc_html($item['single_business_hour_day']); ?>
			                                    <span><?php echo esc_html($item['single_business_hour_time']); ?></span>
			                                </li>
		                                <?php endforeach; ?>
		                            </ul>
		                            <div class="ea-shape-2">
		                                <?php if( ! $settings['business_hour_shape_img1']['url'] == '' ) : ?>
					                        <img src="<?php echo esc_url( $settings['business_hour_shape_img1']['url'] ); ?>" alt="image">
					                    <?php endif; ?>
		                            </div>
		                            <div class="ea-shape-3">
		                                <?php if( ! $settings['business_hour_shape_img2']['url'] == '' ) : ?>
					                        <img src="<?php echo esc_url( $settings['business_hour_shape_img2']['url'] ); ?>" alt="image">
					                    <?php endif; ?>
		                            </div>
			                   </div>
		                    </div>
		                </div>
		            </div>
		            <?php if( ! $settings['business_hour_shape_img']['url'] == '' ) : ?>
		            	<div class="ea-business-hours-bg-shape-1 ea-elementor-floating">
	                        <img src="<?php echo esc_url( $settings['business_hour_shape_img']['url'] ); ?>" alt="image">
	                    </div>
                    <?php endif; ?>
		        </section>
		        <!-- End Business Hour Design Three Area -->
		    <?php elseif( $settings['select_business_hour_style'] == 'style-04' ) : ?>
		    	<!-- Start Business Hour Design Four Area -->
		    	<section class="ea-business-hours-area ptb-100">
		            <div class="container">
		                <div class="section-title">
		                    <h2><?php echo esc_html($settings['section_title']); ?></h2>
			                <p><?php echo wp_kses_post($settings['section_desc']); ?></p>
		                </div>
		                <div class="row align-items-center">
		                    <div class="col-lg-6">
		                        <div class="business-hours-img-6 ea-elementor-floating">       
			                        <?php if( ! $settings['business_hour_featured_img']['url'] == '' ) : 
			                        	echo \Elementor\Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'business_hour_featured_img' ); ?>
	                                <?php endif; ?>
                                </div>
		                    </div>
		                    <div class="col-lg-6">
		                        <div class="ea-business-hours-content ea-business-hours-content-style-four ml-50">
		                            <p><?php echo esc_html($settings['business_hour_title']); ?></p>
		                            <ul class="ea-businss-hours-list-content">
		                            	<?php foreach ( $settings['single_business_hour'] as $item ) :
			                                if( $item['is_day_time_closed'] == 'no') : ?>
		                            			<li>
		                            		<?php else: ?>
			                                    <li class="close-color">
			                                <?php endif; ?>
			                                    <?php echo esc_html($item['single_business_hour_day']); ?>
			                                    <span><?php echo esc_html($item['single_business_hour_time']); ?></span>
			                                </li>
		                                <?php endforeach; ?>
		                            </ul>
		                       </div>
		                    </div>
		                </div>
		            </div>
		        </section>
		        <!-- End Business Hour Design Four Area -->
		    <?php elseif( $settings['select_business_hour_style'] == 'style-05' ) : ?>
		    	<!-- Start Business Hour Design Five Area -->
		        <section class="ea-business-hours-area bg-color-fff8f3 ptb-100">
		            <div class="container">
		                <div class="section-title">
		                    <h2><?php echo esc_html($settings['section_title']); ?></h2>
			                <p><?php echo wp_kses_post($settings['section_desc']); ?></p>
		                </div>
		                <div class="row align-items-center">
		                    <div class="col-lg-6">
		                        <div class="ea-business-hours-content ea-business-hours-content-style-five mr-50">
		                            <p><?php echo esc_html($settings['business_hour_title']); ?></p>
		                            <ul class="ea-businss-hours-list-content">
		                            	<?php foreach ( $settings['single_business_hour'] as $item ) :
			                                if( $item['is_day_time_closed'] == 'no') : ?>
		                            			<li>
		                            		<?php else: ?>
			                                    <li class="close-color">
			                                <?php endif; ?>
			                                    <?php echo esc_html($item['single_business_hour_day']); ?>
			                                    <span><?php echo esc_html($item['single_business_hour_time']); ?></span>
			                                </li>
		                                <?php endforeach; ?>
		                            </ul>
		                       </div>
		                    </div>
		                    <div class="col-lg-6">
		                        <div class="business-hours-img-7 ea-elementor-floating">       
			                        <?php if( ! $settings['business_hour_featured_img']['url'] == '' ) : 
			                        	echo \Elementor\Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'business_hour_featured_img' ); ?>
	                                <?php endif; ?>
                                </div>
		                    </div>
		                </div>
		            </div>
		        </section>
		        <!-- End Business Hour Design Five Area -->
		    <?php elseif( $settings['select_business_hour_style'] == 'style-06' ) : ?>
		    	<!-- Start Business Hour Design Six Area -->
		        <section class="ea-business-hours-area bg-shape bg-color-fff8f3 pb-100">
		            <div class="container">
		                <div class="section-title">
		                    <h2><?php echo esc_html($settings['section_title']); ?></h2>
			                <p><?php echo wp_kses_post($settings['section_desc']); ?></p>
		                </div>
		                <div class="ea-business-hours-shape-wrap">
			                <div class="row justify-content-center">
			                    <div class="col-lg-6">
			                        <div class="ea-business-hours-content ea-business-hours-content-style-six">
			                            <p><?php echo esc_html($settings['business_hour_title']); ?></p>
			                            <ul class="ea-businss-hours-list-content">
			                            	<?php foreach ( $settings['single_business_hour'] as $item ) :
				                                if( $item['is_day_time_closed'] == 'no') : ?>
			                            			<li>
			                            		<?php else: ?>
				                                    <li class="close-color">
				                                <?php endif; ?>
				                                    <?php echo esc_html($item['single_business_hour_day']); ?>
				                                    <span><?php echo esc_html($item['single_business_hour_time']); ?></span>
				                                </li>
			                                <?php endforeach; ?>
			                            </ul>
			                       </div>
			                    </div>
			                </div>
			                <div class="business-hours-img-8 ea-elementor-floating">       
		                        <?php if( ! $settings['business_hour_featured_img']['url'] == '' ) : 
			                        	echo \Elementor\Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'business_hour_featured_img' ); ?>
	                                <?php endif; ?>
                            </div>
			            </div>
		            </div>
		            <div class="business-shape-4">
			            <?php if( ! $settings['business_hour_shape_img']['url'] == '' ) : ?>
	                        <img src="<?php echo esc_url( $settings['business_hour_shape_img']['url'] ); ?>" alt="image">
	                    <?php endif; ?>
                    </div>
		        </section>
		        <!-- End Business Hour Design Six Area -->
            <?php endif;

        endif;

    }

}
