<?php
/**
 * Admin view: the Payment tab of the event editor.
 *
 * Included by admin/views/event-edit.php inside that tab's own form, so the
 * $event row and the $bfnet_dt helper defined there are in scope here.
 *
 * @package BitForgeNet_Guest_Tickets
 */

defined( 'ABSPATH' ) || exit;

// This file is a template: it is included from a method -- never at file
// scope -- so everything declared here belongs to that method's variable
// scope and not to the global one. PHPCS reads each file on its own and has
// no way to see where the include happens, so it reads these as globals.
// Stated once, for the whole file, per this plugin's suppression rule.
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
?>
<div class="bfnet-panel">
	<div class="bfnet-panel__head"><h2><?php esc_html_e( 'Payment instructions', 'bitforgenet-guest-tickets' ); ?></h2></div>
	<div class="bfnet-panel__body">
		<div class="bfnet-field">
			<label for="bfnet-whatsapp"><?php esc_html_e( 'WhatsApp number for this event', 'bitforgenet-guest-tickets' ); ?></label>
			<input type="tel" id="bfnet-whatsapp" name="whatsapp_number" value="<?php echo esc_attr( $event ? $event->whatsapp_number : '' ); ?>" placeholder="+1 514 000 0000">
			<p class="description"><?php esc_html_e( 'Leave empty to use the global number from Settings.', 'bitforgenet-guest-tickets' ); ?></p>
		</div>
		<div class="bfnet-field">
			<label for="bfnet-instructions"><?php esc_html_e( 'What the guest reads after booking', 'bitforgenet-guest-tickets' ); ?></label>
			<textarea id="bfnet-instructions" name="payment_instructions" rows="4"><?php echo esc_textarea( $event ? $event->payment_instructions : '' ); ?></textarea>
		</div>
		<div class="bfnet-field">
			<label for="bfnet-terms"><?php esc_html_e( 'Event terms', 'bitforgenet-guest-tickets' ); ?></label>
			<textarea id="bfnet-terms" name="terms" rows="3"><?php echo esc_textarea( $event ? $event->terms : '' ); ?></textarea>
		</div>
	</div>
</div>
			</div>
