<?php
/**
 * Force button text block.
 *
 * @package EventimUSEventListings
 */

defined( 'ABSPATH' ) || exit;
?>
<div class="dashboard-module">
	<div class="module-header">
		<h1><?php esc_html_e( 'Force Button Text', 'eventim-us-event-listings' ); ?></h1>
	</div>
	<div class="module-content">
		<div
			style="display:flex; direction:row; align-items:center; justify-content:space-between; gap: 20px; padding: 0 20px;">
			<div class="setting-row" style="flex: 1; max-width: 300px;">
				<div class="setting-control">
					<label class="switch">
						<input type="checkbox" id="force-button-toggle"
							name="evusel_settings[button_status_override_enabled]"
							<?php echo ! empty( $evuselConfig->get( 'button_status_override' ) ) ? 'checked' : ''; ?>>
						<span class="slider round"></span>
					</label>
				</div>
				<div class="setting-label">
					<label><?php esc_html_e( 'Force button text', 'eventim-us-event-listings' ); ?></label>
				</div>
			</div>

			<div class="dispevli-custom-label-group" style="flex: 1; max-width: 35vw;">
				<div style="display: flex; flex-direction: column; width: 100%;">
					<input type="text" autocomplete="off" id="force-button-input"
						name="evusel_settings[button_status_override]"
						value="<?php echo esc_attr( $evuselConfig->get( 'button_status_override' ) ); ?>" 
						placeholder="<?php esc_attr_e( 'Buy tickets', 'eventim-us-event-listings' ); ?>"
						style="width: 100%; box-sizing: border-box; flex: 1;">
					<span id="helper-text"
						style="color: #CC1818; font-size: 12px; font-weight: 400; margin-top: 4px; display: none;">
						<?php esc_html_e( 'Text must be filled out for feature to work.', 'eventim-us-event-listings' ); ?>
					</span>
				</div>
			</div>
		</div>
	</div>
</div>

