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

/**
 * Plain Text Template: Job Approval Required (Admin Notification)
 *
 * Sent to the admin when an employer posts a job that requires approval.
 *
 * @var string   $email_heading
 * @var string   $profile_name
 * @var string   $job_title
 * @var int      $job_id
 * @var string   $job_link
 * @var string   $admin_approval_link
 * @var string   $employer_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' ) . "\n\n";

/* Introduction */
printf(
	// translators: %s: Employer name.
	esc_html__( 'A new job has been posted by %s and is currently awaiting your approval before it can be published on the platform.', 'gigneo' ),
	esc_html( $profile_name )
);
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";

/* Posted by */
echo esc_html__( 'Posted by:', 'gigneo' ) . ' ' . esc_html( $profile_name ) . ' (' . esc_html( $employer_label ) . ')';
echo "\n\n";

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

/* Secondary link */
echo esc_html__( 'View job on site:', 'gigneo' ) . ' ' . esc_url( $job_link );
echo "\n\n";


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