<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

/**
 * Plain Text Template: Withdraw Request Email
 *
 * Sent to the admin when a new withdrawal request is submitted.
 *
 * @var string   $email_heading
 * @var string   $withdrawal_id
 * @var string   $withdrawal_amount
 * @var string   $withdrawal_date
 * @var string   $payment_method
 * @var string   $freelancer_label
 * @var string   $payout_fee
 * @var string   $fee_label
 * @var string   $net_amount
 * @var string   $payout_tax
 * @var string   $payable_amount
 * @var string   $profile_id
 * @var string   $profile_name
 * @var bool     $sent_to_admin
 * @var bool     $plain_text
 * @var WC_Email $email
 */

echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";

/* Greeting */
echo esc_html__( 'Hello,', 'gigneo' );
echo "\n\n";

/* Introduction */
echo esc_html__( 'A new withdrawal request has been submitted and is awaiting your review. The details are outlined below.', 'gigneo' );
echo "\n\n";

/* Section heading */
echo esc_html__( 'Request details', 'gigneo' );
echo "\n----------\n\n";

/* Request ID */
echo esc_html__( 'Request ID:', 'gigneo' ) . ' ' . esc_html( gigneo_format_id( $withdrawal_id, 'withdraw', false ) );
echo "\n";

/* Freelancer name dynamic label */
echo esc_html( $freelancer_label ) . ': ' . esc_html( $profile_name );
echo "\n";

/* Amount requested */
echo esc_html__( 'Amount requested:', 'gigneo' ) . ' ' . esc_html( wp_strip_all_tags( $withdrawal_amount ) );
echo "\n";

/* Fee */
echo esc_html( $fee_label ) . ': ' . esc_html( wp_strip_all_tags( $payout_fee ) );
echo "\n";

/* Subtotal amount */
echo esc_html__( 'Subtotal amount:', 'gigneo' ) . ' ' . esc_html( wp_strip_all_tags( $net_amount ) );
echo "\n";

/* Tax */
echo esc_html__( 'Tax:', 'gigneo' ) . ' ' . esc_html( wp_strip_all_tags( $payout_tax ) );
echo "\n";

/* Payable amount */
echo esc_html__( 'Payable amount:', 'gigneo' ) . ' ' . esc_html( wp_strip_all_tags( $payable_amount ) );
echo "\n";

/* Payout method */
echo esc_html__( 'Payout method:', 'gigneo' ) . ' ' . esc_html( wp_strip_all_tags( $payment_method ) );
echo "\n";

/* Request date */
echo esc_html__( 'Request date:', 'gigneo' ) . ' ' . esc_html( $withdrawal_date );
echo "\n\n";

/* CTA link */
echo esc_html__( 'Review request:', 'gigneo' ) . ' ' . esc_url( admin_url( 'edit.php?post_type=gigneo_withdrawal' ) );
echo "\n\n";

/* Closing note */
echo esc_html__( 'Please log in to your admin dashboard to review and process this withdrawal request.', 'gigneo' );
echo "\n\n";


// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
do_action( 'woocommerce_email_footer', $email );
