<script lang="ts">
  import Header from '$lib/components/Header.svelte';
  import Footer from '$lib/components/Footer.svelte';
  import SeoHead from '$lib/components/SeoHead.svelte';
  import LocationPage from '$lib/components/LocationPage.svelte';
  import { buildLocationSeo } from '$lib/seo';
  import type { PageData } from './$types';

  export let data: PageData;

  $: location = data.location;
  $: seo = buildLocationSeo(location);
</script>

<SeoHead
  title={seo.title}
  description={seo.description}
  canonicalPath={seo.canonicalPath}
  image={seo.image}
  imageAlt={seo.imageAlt}
  structuredData={seo.structuredData}
/>

<Header navigation={data.content.navigation} />
<LocationPage {location} testimonials={data.content.testimonials} />
<Footer footer={data.content.footer} />
