<?php
if ( ! defined( 'ABSPATH' ) ) exit;
?>
<div class="wrap bingocr-admin-wrap">
	<h1><?php esc_html_e( 'Locations', 'bingocar' ); ?></h1>

	<div class="bingocr-toolbar">
		<button class="button button-primary" id="bingocr-add-location"><?php esc_html_e( '+ Add Location', 'bingocar' ); ?></button>
	</div>

	<div id="bingocr-locations-list"><p><?php esc_html_e( 'Loading…', 'bingocar' ); ?></p></div>

	<div id="bingocr-location-form-wrap" class="bingocr-modal-wrap" style="display:none;">
		<div class="bingocr-modal">
			<h2 id="bingocr-loc-form-title"><?php esc_html_e( 'Add Location', 'bingocar' ); ?></h2>
			<form id="bingocr-location-form" novalidate>
				<input type="hidden" id="loc-id" value="">
				<div class="bingocr-form-row">
					<label><?php esc_html_e( 'Name *', 'bingocar' ); ?><br><input type="text" name="name" required class="regular-text"></label>
				</div>
				<div class="bingocr-form-row bingocr-two-col">
					<label><?php esc_html_e( 'Address', 'bingocar' ); ?><br><textarea name="address" rows="2" class="large-text"></textarea></label>
					<label><?php esc_html_e( 'City', 'bingocar' ); ?><br><input type="text" name="city" class="regular-text"></label>
				</div>
				<div class="bingocr-form-row bingocr-two-col">
					<label><?php esc_html_e( 'Phone', 'bingocar' ); ?><br><input type="text" name="phone" class="regular-text"></label>
					<label><?php esc_html_e( 'Email', 'bingocar' ); ?><br><input type="email" name="email" class="regular-text"></label>
				</div>
				<div class="bingocr-form-row bingocr-two-col">
					<label><?php esc_html_e( 'Opening Hours', 'bingocar' ); ?><br><input type="text" name="opening_hours" placeholder="08:00–20:00" class="regular-text"></label>
					<label><?php esc_html_e( 'Status', 'bingocar' ); ?><br>
						<select name="status">
							<option value="active"><?php esc_html_e( 'Active', 'bingocar' ); ?></option>
							<option value="inactive"><?php esc_html_e( 'Inactive', 'bingocar' ); ?></option>
						</select>
					</label>
				</div>
				<div class="bingocr-form-actions">
					<button type="submit" class="button button-primary"><?php esc_html_e( 'Save Location', 'bingocar' ); ?></button>
					<button type="button" class="button" id="bingocr-cancel-location"><?php esc_html_e( 'Cancel', 'bingocar' ); ?></button>
					<span class="bingocr-form-message"></span>
				</div>
			</form>
		</div>
	</div>
</div>
