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

/**
 * Plain Text Template: Service Publish Request (Admin)
 *
 * Sent to the admin when a freelancer posts a new service that requires approval.
 *
 * @var string   $email_heading
 * @var string   $profile_name
 * @var string   $service_title
 * @var int      $service_id
 * @var string   $service_link
 * @var string   $admin_approval_link
 * @var string   $freelancer_label
 * @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 Admin,', 'gigneo' );
echo "\n\n";

/* Introduction */
printf(
	// translators: %1$s: Freelancer name, %2$s: Freelancer label, %3$s: Service title.
	esc_html__( 'A new service titled "%3$s" has been submitted by %1$s (%2$s) and is currently awaiting your approval.', 'gigneo' ),
	esc_html( $profile_name ),
	esc_html( $freelancer_label ),
	esc_html( $service_title )
);
echo "\n\n";

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

/* Service ID */
echo esc_html__( 'Service ID:', 'gigneo' ) . ' ' . esc_html( gigneo_format_id( $service_id, 'service', false ) );
echo "\n";

/* Service Title */
echo esc_html__( 'Service title:', 'gigneo' ) . ' ' . esc_html( $service_title );
echo "\n";

/* Submitted By */
echo esc_html__( 'Submitted by:', 'gigneo' ) . ' ' . esc_html( $profile_name ) . ' (' . esc_html( $freelancer_label ) . ')';
echo "\n\n";

/* CTA link */
echo esc_html__( 'Review and approve service:', 'gigneo' ) . ' ' . esc_url( $admin_approval_link );
echo "\n\n";

/* Preview link */
echo esc_html__( 'Preview live service:', 'gigneo' ) . ' ' . esc_url( $service_link );
echo "\n\n";

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