<?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-box--list pxl-box--list2">
	<div class="pxl-box-inner">
		<?php if(!empty($settings['image']['id'])) : 
            $image_size = !empty($settings['img_size']) ? $settings['img_size'] : '521x639'; 
            $img = pxl_get_image_by_size( array(
                'attach_id'  => $settings['image']['id'],
                'thumb_size' => $image_size,
            ));
            $thumbnail = $img['thumbnail'];
            ?>
            <div class="pxl-image">
                <?php echo pxl_print_html($thumbnail); ?>
            </div>
        <?php endif; ?>

        <div class="pxl-item-box-list <?php echo esc_attr($settings['pxl_animate']); ?>" data-wow-delay="<?php echo esc_attr($settings['pxl_animate_delay']); ?>ms">
			<?php if(isset($settings['box_list_lv2']) && !empty($settings['box_list_lv2']) && count($settings['box_list_lv2'])):
			$is_new = \Elementor\Icons_Manager::is_migration_allowed(); ?>
				<div class="pxl-list-item">
					<?php foreach ($settings['box_list_lv2'] as $key => $value):
					 	?>
				        <div class="pxl-item">
				            <div class="pxl-item-icon">
			            		<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"></path></svg>
			            	</div>
			            	<div class="pxl-item--title">
			                    <?php echo pxl_print_html($value['title_lv2'])?>
			                </div>
				        </div>
				    <?php endforeach; ?>
				</div>
			    <div class="pxl-box-button">
			        <a class="pxl-button-link" <?php pxl_print_html($widget->get_render_attribute_string( 'link_text' )); ?>>
			            <span class="pxl--btn-text">
			                <?php echo esc_attr($settings['btn_text']); ?>
			            </span>
			        </a>
			    </div>
			<?php endif; ?>
		</div>
	</div>
</div>