<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div class="evge-settings-section-wrap evge-registration-type-templates-settings-wrap">
	<div class="evge-single-setting-label">
		<h2 class="evge-main-setting-label evge-flex-center"><?php esc_html_e( 'Registration Type Templates', 'event-genius' ); ?>
			<span class="evge-tooltip-wrap">
				<a href="javascript:void(0);" class="evge-tooltip-link">
					<?php
					// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
					echo \WPEventGenius\Common\Utils\Icon::get( 'tooltip' );
					?>
				</a>
				<div class="evge-tooltip evge-shadow evge-tooltip-right">
					<p><?php esc_html_e( 'Reusable templates for registration types. When you add a registration type on an event, you can start from scratch or choose one of these templates to fill name and description.', 'event-genius' ); ?></p>
				</div>
			</span>
		</h2>
		
	</div>

	<div id="evge-registration-type-templates-list" class="evge-registration-type-templates-list evge-inline-list">
		<p class="evge-templates-loading evge-inline-list-empty-state"><?php esc_html_e( 'Loading…', 'event-genius' ); ?></p>
	</div>

	<button type="button" id="evge-add-registration-type-template" class="evge-admin-secondary-button button evge-left-icon">
		<span class="evge-icon-text">
			<?php
			// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
			echo \WPEventGenius\Common\Utils\Icon::get( 'plus' );
			?>
			<?php esc_html_e( 'Add template', 'event-genius' ); ?>
		</span>
	</button>

	<div id="evge-registration-type-template-form-wrap" class="evge-registration-type-template-form evge-template-form-card evge-bump-down" style="display: none;">
		<h3 class="evge-template-form-title"><?php esc_html_e( 'Add template', 'event-genius' ); ?></h3>
		<div class="evge-field">
			<label for="evge-template-name"><?php esc_html_e( 'Name', 'event-genius' ); ?></label>
			<input type="text" id="evge-template-name" class="regular-text" value="">
		</div>
		<div class="evge-field">
			<label for="evge-template-description"><?php esc_html_e( 'Description', 'event-genius' ); ?></label>
			<textarea id="evge-template-description" rows="2" class="large-text"></textarea>
		</div>
		<p class="evge-template-form-actions">
			<button type="button" id="evge-template-save" class="button button-primary"><?php esc_html_e( 'Save Template', 'event-genius' ); ?></button>
			<button type="button" id="evge-template-cancel" class="button"><?php esc_html_e( 'Cancel', 'event-genius' ); ?></button>
			<input type="hidden" id="evge-template-edit-id" value="">
		</p>
	</div>
</div>
