<?php 
    $is_items = (isset($settings['items']) && !empty($settings['items']) && count($settings['items'])) || false;
?>
<?php if($is_items) : ?>
    <div class="pxl-contact-box pxl-contact-box3">
        <div class="pxl-item--container">
            <div class="pxl-item--inner">
                <div class="pxl-image--list">
                    <?php foreach($settings['items'] as $key => $item) : ?>
                        <?php 
                            $image_id = $item['item_image']['id'];
                            $thumbnail_url = solarva_get_thumbnail($image_id, 'full', true); 
                            $active = ($key === 0) ? 'active' : '';
                        ?>
                        <div class="pxl-item--image <?php echo esc_attr($active); ?>" 
                        style="background-image: url('<?php echo esc_attr($thumbnail_url); ?>')" 
                        data-index = "<?php echo esc_attr($key); ?>"></div>
                    <?php endforeach; ?>
                </div>
                <div class="pxl-item--holder">
                    <div class="pxl-item--list">
                        <?php foreach($settings['items'] as $key => $item) : ?>
                            <?php 
                                $image_id = $item['item_image']['id'];
                                $thumbnail_url = solarva_get_thumbnail($image_id, 'full', true, 'full'); 
                                $title = $item['item_title'] ?? '';
                                $info1 = $item['item_info'] ?? '';
                                $info2 = $item['item_info2'] ?? '';
                                $link_info1 = solarva_get_link($item['item_link']);
                                $link_info2 = solarva_get_link($item['item_link2']);
                            ?>
                            <div class="pxl-item--single" data-index = "<?php echo esc_attr($key); ?>">
                                <?php solarva_render_icon($item['item_icon']); ?>
                                <div class="pxl-item--content">
                                    <h3 class="pxl-item--message">
                                        <span class="pxl-message--text">
                                            <?php pxl_print_html($title); ?>
                                        </span>
                                    </h3>
                                    <div class="pxl-list--info">
                                        <?php if(!empty($info1)) : ?>
                                            <a class="pxl-item--info" <?php pxl_print_html($link_info1); ?>>
                                                <?php pxl_print_html($info1); ?>
                                            </a>
                                        <?php endif; ?>
                                        <?php if(!empty($info2)) : ?>
                                            <a class="pxl-item--info" <?php pxl_print_html($link_info2); ?>>
                                                <?php pxl_print_html($info2); ?>
                                            </a>
                                        <?php endif; ?>
                                    </div>
                                </div>
                            </div>
                        <?php endforeach; ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php endif; ?>