<?php
$html_id = pxl_get_element_id($settings);
if ( ! empty( $settings['link']['url'] ) ) {
    $widget->add_render_attribute( 'link_text', 'href', $settings['link']['url'] );

    if ( $settings['link']['is_external'] ) {
        $widget->add_render_attribute( 'link_text', 'target', '_blank' );
    }

    if ( $settings['link']['nofollow'] ) {
        $widget->add_render_attribute( 'link_text', 'rel', 'nofollow' );
    }
}
?>
<div class="pxl-banner-box pxl-banner-box7 <?php echo esc_attr($settings['pxl_animate']); ?>" data-wow-delay="<?php echo esc_attr($settings['pxl_animate_delay']); ?>ms">
    <div class="pxl-banner-inner">
        <div class="pxl-item-top">
            <?php if(!empty($settings['image']['id'])) : 
                $image_size = !empty($settings['img_size']) ? $settings['img_size'] : '55x56'; 
                $img = pxl_get_image_by_size( array(
                    'attach_id'  => $settings['image']['id'],
                    'thumb_size' => $image_size,
                ));
                $thumbnail = $img['thumbnail'];
                ?>
                <div class="pxl-item--img">
                    <div class="pxl-image">
                        <?php echo pxl_print_html($thumbnail); ?>
                    </div>
                </div>
            <?php endif; ?>
            <div class="pxl-item-title">
                <?php echo esc_attr($settings['title_lv2']); ?>
            </div>
            <div class="pxl-item-text">
                <?php echo esc_attr($settings['text']); ?>
            </div>
            <?php if(isset($settings['lists']) && !empty($settings['lists']) && count($settings['lists'])): ?>
                <div class="pxl-list">
                    <?php foreach ($settings['lists'] as $key => $value): ?>
                        <div class="pxl--item">
                            <div class="pxl-item-title-list">
                                <?php echo pxl_print_html($value['title'])?>
                            </div>
                        </div>
                    <?php endforeach; ?>
                </div>
            <?php endif; ?>
        </div>
        <div class="pxl-content-section">
            <?php if(!empty($settings['image2']['id'])) : 
                $image_size2 = !empty($settings['img_size2']) ? $settings['img_size2'] : '1000x502'; 
                $img_2 = pxl_get_image_by_size( array(
                    'attach_id'  => $settings['image2']['id'],
                    'thumb_size' => $image_size2,
                ));
                $thumbnail_2 = $img_2['thumbnail']; ?>
                <div class="pxl-image2">
                    <?php echo pxl_print_html($thumbnail_2); ?>
                </div>
            <?php endif; ?>
            <div class="pxl-banner-button">
                <a class="pxl-button-link" <?php pxl_print_html($widget->get_render_attribute_string( 'link_text' )); ?>>
                    <?php echo esc_attr($settings['btn_text']); ?>
                </a>
            </div>
        </div>
    </div>
</div>