<?php
/**
 * Admin view: the Payments panel of the settings screen.
 *
 * Included by admin/views/settings.php inside that tab's own form, so the
 * closures and the $s array 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( 'Payments', 'bitforgenet-guest-tickets' ); ?></h2></div>
		<div class="bfnet-panel__body">
			<div class="bfnet-field">
				<label for="s-wa"><?php esc_html_e( 'WhatsApp number', 'bitforgenet-guest-tickets' ); ?></label>
				<input type="tel" id="s-wa" name="bfnet_settings[whatsapp_number]" value="<?php echo esc_attr( $s['whatsapp_number'] ); ?>" placeholder="+1 514 000 0000">
				<p class="description"><?php esc_html_e( 'Used for the "pay on WhatsApp" button. Include the country code.', 'bitforgenet-guest-tickets' ); ?></p>
			</div>
			<div class="bfnet-field">
				<label for="s-instr"><?php esc_html_e( 'Payment instructions', 'bitforgenet-guest-tickets' ); ?></label>
				<textarea id="s-instr" name="bfnet_settings[payment_instructions]" rows="4"><?php echo esc_textarea( $s['payment_instructions'] ); ?></textarea>
			</div>
			<?php $bfnet_check( 'auto_issue_on_paid', __( 'Issue and email tickets automatically when an order is marked paid', 'bitforgenet-guest-tickets' ), __( 'Turn off only if you want to send tickets by hand.', 'bitforgenet-guest-tickets' ), $s ); ?>
		</div>
	</div>
