<script lang="ts">
  import { page } from '$app/state';
  import AdminShell from '$lib/components/AdminShell.svelte';
  import ClientShell from '$lib/components/ClientShell.svelte';

  let { children } = $props();

  const isAdminRoute = $derived(page.url.pathname === '/admin' || page.url.pathname.startsWith('/admin/'));
</script>

{#if isAdminRoute}
  <AdminShell>
    {@render children()}
  </AdminShell>
{:else}
  <ClientShell>
    {@render children()}
  </ClientShell>
{/if}
