<?php
$html_id = pxl_get_element_id($settings);
?>
<div class="pxl-table pxl-table1 <?php echo esc_attr($settings['pxl_animate']); ?>" data-wow-delay="<?php echo esc_attr($settings['pxl_animate_delay']); ?>ms">
    <div class="pxl-table-inner">
        <div class="pxl-table-title">
            <?php echo esc_attr($settings['title_heading']); ?>
        </div>
        <table class="pxl-spotify-table pxl-songs-table">
            <thead class="pxl-item-thead">
              <tr class="pxl-item-tr">
                <?php if(!empty($settings['title_name'])) : ?>
                    <th class="pxl-title-name"><?php echo esc_html($settings['title_name']); ?></th>
                <?php endif; ?>
                <?php if(!empty($settings['title_quantity'])) : ?>
                    <th class="pxl-title-quantity"><?php echo esc_html($settings['title_quantity']); ?></th>
                <?php endif; ?>
                <?php if(!empty($settings['title_place'])) : ?>
                    <th class="pxl-title-place"><?php echo esc_html($settings['title_place']); ?></th>
                <?php endif; ?>
                <?php if(!empty($settings['title_brand'])) : ?>
                    <th class="pxl-title-brand"><?php echo esc_html($settings['title_brand']); ?></th>
                <?php endif; ?>
                <?php if(!empty($settings['title_tool'])) : ?>
                    <th class="pxl-title-tool"><?php echo esc_html($settings['title_tool']); ?></th>
                <?php endif; ?>
              </tr>
            </thead>

            <?php if(isset($settings['lists']) && !empty($settings['lists']) && count($settings['lists'])): 
                $is_new = \Elementor\Icons_Manager::is_migration_allowed(); ?>
                <tbody class="pxl-list">
                    <?php foreach ($settings['lists'] as $key => $value): ?>
                        <tr class="pxl--item">
                            <?php if(!empty($value['list_name'])) : ?>
                                <td class="pxl-text-name" data-label="<?php echo esc_attr($settings['title_name']); ?>">
                                    <?php echo pxl_print_html($value['list_name'])?>
                                </td>
                            <?php endif; ?>
                            <?php if(!empty($value['list_quantity'])) : ?>
                                <td class="pxl-text-quantity" data-label="<?php echo esc_attr($settings['title_quantity']); ?>">
                                    <?php echo pxl_print_html($value['list_quantity'])?>
                                </td>
                            <?php endif; ?>
                            <?php if(!empty($value['list_place'])) : ?>
                                <td class="pxl-text-place" data-label="<?php echo esc_attr($settings['title_place']); ?>">
                                    <?php echo pxl_print_html($value['list_place'])?>
                                </td>
                            <?php endif; ?>
                            <?php if(!empty($value['list_brand'])) : ?>
                                <td class="pxl-text-brand" data-label="<?php echo esc_attr($settings['title_brand']); ?>">
                                    <?php echo pxl_print_html($value['list_brand'])?>
                                </td>
                            <?php endif; ?>
                            <?php if(!empty($value['list_tool'])) : ?>
                                <td class="pxl-text-tool" data-label="<?php echo esc_attr($settings['title_tool']); ?>">
                                    <?php echo pxl_print_html($value['list_tool'])?>
                                </td>
                            <?php endif; ?>
                        </tr>
                    <?php endforeach; ?>
                </tbody>
            <?php endif; ?>
        </table>
        <div class="pxl-table-btn">
            <a href="#" class="pxl-load-more" id="pxl-songs-load">
                <?php echo esc_attr($settings['title_button']); ?>
            </a>
        </div>
    </div>
</div>