<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<?php
/**
 * (Phase 39 / 1.5.0) WP admin-notice anchor.
 *
 * `wp-admin/js/common.js` (line ~1090) relocates `.notice` elements into the
 * page wrapper via `insertAfter($('.wp-header-end'))`. The Payment Forms list /
 * add / edit templates previously emitted their `<hr class="wp-header-end">`
 * AFTER this PP nav header AND the WP `<h1>` + `Add New` button, which pushed
 * stacked plugin notices (China Payments opt-in, Speed in China activation,
 * Split Pay recovery / config-incomplete, etc.) below all that chrome — a
 * confusing layout for merchants.
 *
 * Emitting the anchor at the TOP of the PP header (and removing the late
 * duplicates from list / add / edit) makes notices land where merchants expect
 * them: directly under the `.wrap` div, ABOVE PP's own UI. jQuery's
 * `insertAfter` clones onto every matched anchor, so removing the duplicates
 * is required to prevent the notice block from rendering twice.
 */
?>
<hr class="wp-header-end" data-payment-page-admin-anchor="notices">
<div data-payment-page-admin-section="header">
  <div data-payment-page-admin-section="logo-container">
    <img src="<?php echo esc_url( plugin_dir_url( PAYMENT_PAGE_BASE_FILE_PATH ) . 'interface/app/component/admin-dashboard/img/logo.png' ); ?>"/>
  </div>

  <div data-payment-page-admin-section="navigation">
    <div data-payment-page-admin-section="menu_container">
      <a href="<?php echo esc_url( admin_url( 'edit.php?post_type=' . PAYMENT_PAGE_POST_TYPE_PAYMENT_FORM ) ); ?>"
         data-payment-page-interaction-state="active"><?php echo esc_html__('Payment Forms', 'payment-page'); ?></a>

      <a href="<?php echo esc_url( admin_url( 'admin.php?page=payment-page' ) ); ?>#payment-gateways"
         data-payment-page-admin-trigger="hashtag_navigation"
         data-payment-page-interaction-state="inactive"
      ><?php echo esc_html__('Payment Gateways', 'payment-page'); ?></a>
    </div>
  </div>
</div>