<?php 
    $is_items = isset($settings['items']) && !empty($settings['items']) && count($settings['items']) || false;
    $post_id = get_the_ID();
?>

<?php if($is_items) : ?>
    <div class="pxl-project-info pxl-project-info1">
        <div class="pxl-item--container">
            <div class="pxl-item--inner">
                <h3 class="pxl-item--heading">
                    <span class="pxl-heading--text"><?php echo esc_html($settings['heading']); ?></span>
                </h3>
                <div class="pxl-list-info">
                    <?php foreach($settings['items'] as $item) : ?>
                        <?php 
                            $title = $item['title'] ?? '';
                            $info = $item['info'] ?? '';
                            $icon = $item['pxl_icon']['value'] || false;
                        ?>
                        <div class="pxl-item--single">
                            <?php if($icon) : ?>
                                <div class="pxl-item--icon">
                                    <?php \Elementor\Icons_Manager::render_icon( $item['pxl_icon'], [ 'aria-hidden' => 'true', 'class' => '' ], 'i' ) ?>
                                </div>
                            <?php endif; ?>
                            <div class="pxl-item--content">
                                <div class="pxl-item--title">
                                    <?php echo esc_attr($title); ?>
                                </div>
                                <h5 class="pxl-item--info">
                                    <?php 
                                        if($info === 'get_category') 
                                            the_terms( $post_id, 'portfolio-category', '', ', ' );
                                        else 
                                            echo esc_attr($info);
                                    ?>
                                </h5>
                            </div>
                        </div>
                    <?php endforeach; ?>
                </div>
            </div>
        </div>
    </div>
<?php endif; ?>