<?php

defined( 'ABSPATH' ) or exit;

$sections = array(
    array(
        'id' => 'dashboard',
        'title' => __( 'Dashboard', 'pw-loyalty-points-and-rewards-for-woocommerce' ),
    ),
    array(
        'id' => 'members',
        'title' => __( 'Members', 'pw-loyalty-points-and-rewards-for-woocommerce' ),
    ),
    array(
        'id' => 'promos',
        'title' => __( 'Promotions', 'pw-loyalty-points-and-rewards-for-woocommerce' ),
    ),
    array(
        'id' => 'offers',
        'title' => __( 'Offers', 'pw-loyalty-points-and-rewards-for-woocommerce' ),
    ),
    array(
        'id' => 'settings',
        'title' => __( 'Settings', 'pw-loyalty-points-and-rewards-for-woocommerce' ),
    ),
    array(
        'id' => 'help',
        'title' => __( 'Help', 'pw-loyalty-points-and-rewards-for-woocommerce' ),
    ),
);

?>
<div>
    <div style="display: inline-block;">
        <div id="pwlpara-sections" class="pwlpara-container">
            <?php
                foreach ( $sections as $s ) {
                    $image_src = pwlpar_relative_url( '/assets/images/icon-' . $s['id']. '.png' );
                    $active_image_src = pwlpar_relative_url( '/assets/images/icon-' . $s['id'] . '-active.png' );

                    ?>
                    <a href="<?php echo esc_attr( pwlpara_admin_url( $s['id'] ) ); ?>" class="pwlpara-section-header-item <?php pwlpara_section_helper( $s['id'] ); ?>" data-section="<?php echo esc_attr( $s['id'] ); ?>">
                        <img
                            src="<?php echo pwlpara_section_selected( $s['id'] ) ? esc_attr( $active_image_src ) : esc_attr( $image_src ); ?>"
                            class="pwlpara-section-header-item-icon"
                            data-image-src="<?php echo esc_attr( $image_src ); ?>"
                            data-active-image-src="<?php echo esc_attr( $active_image_src ); ?>"
                        />

                        <div class="pwlpara-section-header-item-title"><?php echo esc_html( $s['title'] ); ?></div>
                    </a>
                    <?php
                }
            ?>
        </div>
    </div>
</div>
<?php
