<?php
$default_settings = [
    'banner_image' => '',
    'img_size' => '',
    'ct_animate' => '',
    'ct_animate_delay' => '',
];
$settings = array_merge($default_settings, $settings);
$size = 'full';
if(!empty($img_size)) {
    $size = $img_size;
} else {
    $size = 'full';
}
extract($settings);
$widget->add_inline_editing_attributes( 'title_text', 'none' );
if(!empty($banner_image['id'])) : 

	$img = ct_get_image_by_size( array(
		'attach_id'  => $banner_image['id'],
		'thumb_size' => '500x500',
        'class' => 'no-lazyload img-main'
	));
	$thumbnail = $img['thumbnail'];

	?>
	<div class="ct-banner layout2 <?php echo esc_attr($ct_animate); ?>" data-wow-delay="<?php echo esc_attr($ct_animate_delay); ?>ms">
		<div class="ct-banner-inner">
			<div class="ct-banner-image">
				<?php echo wp_kses_post($thumbnail); ?>
			</div>
            <h4 class="item--title">
                <?php echo ct_print_html($settings['title_text']); ?>
            </h4>
            <div class="bg-bottom"></div>
		</div>
	</div>
<?php endif; ?>