import { useId } from "react"; import { Btn, Chip } from "../../components/living/primitives"; import { useCopy, type Copy } from "../../ui/copy"; import type { RoomLayout } from "../../lib/room-preferences"; import "./channel-interface-control.css"; const interfaceOptions = (t: Copy["t"]) => [ { value: "full", label: t("channel.interfaceControl.full"), description: t("channel.interfaceControl.fullDescription") }, { value: "minimal", label: t("channel.interfaceControl.minimal"), description: t("channel.interfaceControl.minimalDescription") }, ] as const; /** Presentation only; the caller owns whether this choice is saved or previewed. */ export function ChannelInterfaceControl({ value, onChange }: { value: RoomLayout; onChange(value: RoomLayout): void; }) { const { t } = useCopy(); const labelId = useId(); return
{t("channel.interfaceControl.interface")}
{interfaceOptions(t).map(option => )}
; } /** An optional first-use choice; creation and personal preference stay with the page. */ export function ChannelInterfaceSuggestion({ value, onChange, onDismiss }: { value: RoomLayout; onChange(value: RoomLayout): void; onDismiss(): void; }) { const { t } = useCopy(); const headingId = useId(); return

{t("channel.interfaceControl.chooseYourView")}

{interfaceOptions(t).map(option => onChange(option.value)}> {option.label}{option.value === "full" && {t("channel.interfaceControl.default")}} {option.description} )}
; }