<?php
/**
 * Receipt template editor section partial (edit mode only).
 *
 * Included by templates/admin/account-form.php when $is_edit is true.
 *
 * Variables in scope:
 *
 * @var string $receipt_current  Current saved template value.
 *
 * @since   1.0.0
 * @package DonationRouter
 */

declare( strict_types=1 );

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

?>
<hr />
<h3><?php esc_html_e( 'Receipt Template', 'alamin-donation-router' ); ?></h3>

<div class="notice notice-warning inline" style="margin: 0 0 1em;">
	<p>
		<?php echo ador_icon( 'alert-triangle' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
		<strong><?php esc_html_e( 'Legal Review Required:', 'alamin-donation-router' ); ?></strong>
		<?php esc_html_e( 'The template below is a starting point only. Before going live, have it reviewed by qualified accountants in the relevant jurisdiction(s).', 'alamin-donation-router' ); ?>
	</p>
</div>

<p class="description">
	<?php
	esc_html_e(
		'Customise the tax-deductibility statement included in donation receipts for this account. Leave blank to use the country-specific default. Available email tags: {paypal_account_entity_name}, {paypal_account_entity_tax_id}, {paypal_account_entity_address}, {paypal_account_receipt_number}.',
		'alamin-donation-router'
	);
	?>
</p>

<table class="ador-form-table" role="presentation">
	<tr>
		<th scope="row">
			<label for="ador_receipt_template">
				<?php esc_html_e( 'Tax-Deductibility Statement', 'alamin-donation-router' ); ?>
			</label>
		</th>
		<td>
			<textarea
				id="ador_receipt_template"
				name="ador_receipt_template"
				rows="5"
				class="large-text"
			><?php echo esc_textarea( $receipt_current ); ?></textarea>
		</td>
	</tr>
</table>
