<script>
	import Alert from '$lib/components/ui/Alert.svelte';
	import Button from '$lib/components/ui/Button.svelte';
	import Modal from '$lib/components/ui/Modal/Modal.svelte';
	import ModalTitle from '$lib/components/ui/Modal/ModalTitle.svelte';
	import ModalContent from '$lib/components/ui/Modal/ModalContent.svelte';
	import ModalFooter from '$lib/components/ui/Modal/ModalFooter.svelte';
	import Exclamation from '$lib/icons/Exclamation.svelte';

	export let form;
</script>

<div class="mx-auto max-w-2xl">
	<div class="flex flex-col items-center justify-center w-full">
		<h1 class="text-xl">Vorgang ansehen</h1>
	</div>

	<form method="POST">
		<div class="space-y-12">
			<div class="border-b border-gray-900/10 pb-12">
				<!-- <h2 class="text-base font-semibold leading-7 text-gray-900">Profile</h2> -->
				<p class="mt-8 text-sm leading-6 text-gray-600">
					Anhand der Vorgangsnummer werden Sie zu den Dateien des Vorgangs weitergeleitet und können
					sich den Vorgang dann ansehen.
				</p>

				<div class="mt-10 grid grid-cols-1 gap-x-6 gap-y-8">
					<div>
						<label for="caseNumber" class="block text-sm font-medium leading-6 text-gray-900"
							><span class="flex"
								>{#if form?.error?.caseNumber}
									<span class="inline-block mr-1"><Exclamation /></span>
								{/if} Vorgangs-Nr.</span
							></label
						>
						<div class="mt-2 w-full">
							<div
								class="flex w-full rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-inset focus-within:ring-indigo-600"
							>
								<input
									value={form?.caseNumber ?? ''}
									type="text"
									name="caseNumber"
									id="caseNumber"
									class="block w-full flex-1 border-0 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm sm:leading-6"
								/>
							</div>
						</div>
						{#if form?.error?.caseNumber}
							<p class="block text-sm leading-6 text-red-900 mt-2">{form.error.caseNumber}</p>
						{/if}
					</div>

					<div>
						<label for="token" class="block text-sm font-medium leading-6 text-gray-900"
							><span class="flex"> Zugangscode</span></label
						>
						<div class="mt-2 w-full">
							<div
								class="flex w-full rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-inset focus-within:ring-indigo-600"
							>
								<input
									value={false || ''}
									placeholder="optional"
									type="text"
									name="token"
									id="token"
									class="block w-full flex-1 border-0 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm sm:leading-6"
								/>
							</div>
						</div>
						{#if form?.error?.token}
							<p class="block text-sm leading-6 text-red-900 mt-2">{form.error.token}</p>
						{/if}
					</div>
				</div>
			</div>
			<div class="mt-6 flex items-center justify-end gap-x-6">
				<Button
					type="submit"
					class="rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
					>Weiter</Button
				>
			</div>
		</div>
	</form>
</div>
