<script lang="ts">
// Everything inside is about one worktree: a tab's content, mounted in the
// scope of the worktree the tab belongs to (see `stores/worktree-scope`).
import type { Snippet } from "svelte";
import type { WorktreeId } from "../../api/scope.svelte.js";
import { provideWorktree } from "../../stores/worktree-scope.svelte.js";
interface Props {
worktree: WorktreeId;
children: Snippet;
}
let { worktree, children }: Props = $props();
// Fixed for the component's life: the host keys it by worktree.
// svelte-ignore state_referenced_locally
provideWorktree(worktree);
</script>
{@render children()}