<?php
if (!defined('ABSPATH')) {
    exit;
}
/**
 * Printable invoice — full order detail (standalone window).
 *
 * @var WC_Order $order
 */
if (!isset($order) || !is_a($order, 'WC_Order')) {
    exit;
}
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?> dir="rtl">
<head>
    <meta charset="<?php bloginfo('charset'); ?>" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title><?php
        /* translators: %s: order ID */
        echo esc_html(sprintf(__('Invoice for order %s', 'zerti'), $order->get_id()));
    ?></title>
    <?php wp_head(); ?>
</head>
<body>
    <p class="no-print zerti-print-toolbar">
        <button type="button" class="btn btn-primary"><?php esc_html_e('Print / save PDF', 'zerti'); ?></button>
    </p>
    <div id="zertiAdmin" data-bs-theme="light">
        <?php
        $zerti_shop_order_invoice_view = true;
        require __DIR__ . '/shop-order-detail.php';
        ?>
    </div>
    <?php wp_footer(); ?>
</body>
</html>
