<?php
if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly

?>
<div class="current-date">
	<?php if($settings['date_icon']['value'] || $settings['date_title']): ?>
        <div class="title-wrapper">
			<?php if($settings['date_icon']['value']): ?>
                <div class="icon">
					<?php \Elementor\Icons_Manager::render_icon( $settings['date_icon'] ); ?>
                </div>
			<?php endif; ?>
			<?php if($settings['date_title']): ?>
                <div class="title">
					<?php echo esc_html($settings['date_title']); ?>
                </div>
			<?php endif; ?>
        </div>
	<?php endif; ?>
    <div class="date-wrapper style-<?php echo esc_attr($settings['date_style']); ?>">
		<?php if($settings['date_style'] == '1'): ?>
			<?php echo current_time($settings['date_format'], true); ?>
		<?php else: ?>
            <span class="day"><?php echo current_time('d', true); ?></span>
            <span class="month-wrapper">
                <span class="m"><?php echo current_time('M', true); ?></span>
                <span class="y"><?php echo current_time('Y', true); ?></span>
            </span>
		<?php endif; ?>
    </div>
</div>
