<?php
$is_new = \Elementor\Icons_Manager::is_migration_allowed(); ?>
<?php if(isset($settings['item_content']) && !empty($settings['item_content']) && count($settings['item_content'])): ?>
    <div class="pxl-text-marquee pxl-text-marquee1 <?php echo pxl_print_html($settings['style1'])?>">
        <?php foreach ($settings['item_content'] as $key => $value):
            $text = isset($value['text']) ? $value['text'] : '';
            $icon_img = isset($value['icon_img']) ? $value['icon_img'] : '';
            $icon_key = $widget->get_repeater_setting_key( 'pxl_icon', 'icons', $key );
            $widget->add_render_attribute( $icon_key, [
                'class' => $value['pxl_icon'],
                'aria-hidden' => 'true',
            ] ); ?>
            <div class="pxl-text--marquee ">
                <div class="pxl-item--inner <?php echo esc_attr($settings['pxl_animate']); ?>" data-wow-delay="<?php echo esc_attr($settings['pxl_animate_delay']); ?>ms">
                    <?php if ( $value['icon_type'] == 'icon' && !empty($value['pxl_icon']['value']) ) : ?>
                        <div class="pxl-item--icon ">
                            <?php \Elementor\Icons_Manager::render_icon( $value['pxl_icon'], [ 'aria-hidden' => 'true', 'class' => '' ], 'i' ); ?>
                        </div>
                    <?php endif; ?>
                    <?php if ( $value['icon_type'] == 'image' && !empty($value['icon_img']['id']) ) : ?>
                        <div class="pxl-item--icon ">
                            <?php $img_icon  = pxl_get_image_by_size( array(
                                    'attach_id'  => $value['icon_img']['id'],
                                    'thumb_size' => '65x65',
                                ) );
                                $thumbnail_icon    = $img_icon['thumbnail'];
                            echo pxl_print_html($thumbnail_icon); ?>
                        </div>
                    <?php endif; ?>
                    <div class="pxl-item--text pxl-empty"><?php echo esc_html($text); ?></div>
               </div>
            </div>
        <?php endforeach; ?>
    </div>
<?php endif; ?>


