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

/**
 * Plain Text Template: Job Approved Email
 *
 * Sent to the employer when their job is approved.
 *
 * @var string   $email_heading
 * @var string   $recipient_name
 * @var string   $job_title
 * @var int      $job_id
 * @var string   $job_link
 * @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 */
printf(
	// translators: %s: Recipient name.
	esc_html__( 'Hello %s,', 'gigneo' ),
	esc_html( $recipient_name )
);
echo "\n\n";

/* Introduction */
printf(
	// translators: %s: Job title.
	esc_html__( 'Great news! Your job posting for "%s" has been reviewed and approved by our moderation team. It is now live and visible to freelancers on the platform.', 'gigneo' ),
	esc_html( $job_title )
);
echo "\n\n";

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

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

/* Job ID */
echo esc_html__( 'Job ID:', 'gigneo' ) . ' ' . esc_html( gigneo_format_id( $job_id, 'job', false ) );
echo "\n\n";

/* CTA link */
echo esc_html__( 'View your live job:', 'gigneo' ) . ' ' . esc_url( $job_link );
echo "\n\n";

/* Closing note */
echo esc_html__( 'Freelancers can now submit proposals to your job. We recommend reviewing them promptly to find the best fit for your project.', 'gigneo' );
echo "\n\n";

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