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

let { data, children } = $props();

const isAtListRoot = $derived(page.url.pathname === '/admin/tags');
</script>

<div class="{isAtListRoot ? 'flex' : 'hidden'} flex-shrink-0 md:flex">
	<TagsListPanel tree={data.tree} />
</div>

<div class="{isAtListRoot ? 'hidden' : 'flex'} min-w-0 flex-1 flex-col overflow-hidden md:flex">
	{@render children()}
</div>
