<?php
/**
 * PW Rewards Header
 *
 * Shows the rewards program header.
 *
 * This template can be overridden by copying it to yourtheme/pw-rewards/header.php.
 *
 * HOWEVER, on occasion Pimwick will need to update template files and you
 * (the theme developer) will need to copy the new files to your theme to
 * maintain compatibility. We try to do this as little as possible, but it does
 * happen. When this occurs the version of the template file will be bumped and
 * the readme will list any important changes.
 *
 * @see https://woocommerce.com/document/template-structure/
 */

defined( 'ABSPATH' ) || exit;

do_action( 'pwlpar_before_header' );

?>
<div id="pwlpar-header">
    <div id="pwlpar-header-logo-container">
        <img id="pwlpar-header-logo" src="<?php echo esc_attr( $logo_url ); ?>" alt="<?php echo esc_attr( $program_name ); ?>">
        <div id="pwlpar-header-program-name">
            <?php echo esc_html( $program_name ); ?>
        </div>
    </div>
    <div id="pwlpar-header-text-container">
        <?php if ( $is_rewards_member ) : ?>
            <div id="pwlpar-header-text-title"><?php echo esc_html( $point_balance ); ?></div>
            <div id="pwlpar-header-text-subtitle"><?php esc_html_e( 'Points', 'pw-loyalty-points-and-rewards-for-woocommerce' ); ?></div>
            <?php if ( $show_history_button ) : ?>
                <a href="<?php echo esc_attr( $history_url ); ?>" id="pwlpar-header-points-history-button" class="pwlpar-button"><?php esc_html_e( 'View Points History', 'pw-loyalty-points-and-rewards-for-woocommerce' ); ?></a>
            <?php endif; ?>
        <?php endif; ?>
    </div>
</div>
<?php

do_action( 'pwlpar_after_header' );
