<script lang="ts">
  import type { PageData } from "./$types";

  import HideDelete from "$lib/components/form/HideDelete.svelte";
  import RoomForm from "$lib/components/form/RoomForm.svelte";

  export let data: PageData;
</script>

<svelte:head>
  <title>Zimmer: {data.room.name}</title>
</svelte:head>

<RoomForm formData={data.form} room={data.room}>
  <HideDelete hasEntries={data.room.n_patients > 0} hidden={data.room.hidden} />
</RoomForm>
