<script lang="ts">
// This workshop: the sessions run on it, by where they ran, and the workshops
// it carries its worktrees with.
import { Panel, Segmented } from "@wsb/uikit/components";
import PlacedSessions from "../levels/PlacedSessions.svelte";
import PeersPanel from "../peers/PeersPanel.svelte";
import { workbench } from "../../stores/workbench.svelte.js";
const SECTIONS = [
{ value: "sessions", label: "Sessions" },
{ value: "peers", label: "Peers" },
];
</script>
<Panel title="This workshop" handle="workshop.this">
<Segmented
handle="workshop.this.section"
ariaLabel="What of this workshop to show"
items={SECTIONS}
selected={workbench.thisWorkshopSection}
onselect={(value) => { workbench.thisWorkshopSection = value === "peers" ? "peers" : "sessions"; }}
/>
{#if workbench.thisWorkshopSection === "peers"}
<PeersPanel />
{:else}
<PlacedSessions />
{/if}
</Panel>