{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "control-panel",
  "title": "Control Panel",
  "description": "Mac OS 9 Appearance control panel with Themes, Appearance, Fonts, Desktop, Sound and Options tabs built from group boxes, pop-ups, sliders, checkboxes, radios and little-arrows fields.",
  "registryDependencies": [
    "https://nostalgia-ui.com/r/nostalgia-theme.json",
    "https://nostalgia-ui.com/r/retro-button.json",
    "https://nostalgia-ui.com/r/retro-checkbox.json",
    "https://nostalgia-ui.com/r/retro-group-box.json",
    "https://nostalgia-ui.com/r/retro-label.json",
    "https://nostalgia-ui.com/r/retro-list-box.json",
    "https://nostalgia-ui.com/r/retro-little-arrows.json",
    "https://nostalgia-ui.com/r/retro-radio.json",
    "https://nostalgia-ui.com/r/retro-select.json",
    "https://nostalgia-ui.com/r/retro-slider.json",
    "https://nostalgia-ui.com/r/retro-tabs.json",
    "https://nostalgia-ui.com/r/retro-window.json"
  ],
  "files": [
    {
      "path": "registry/new-york/blocks/control-panel.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { RetroButton } from \"@/registry/new-york/ui/retro-button\"\nimport { RetroCheckbox } from \"@/registry/new-york/ui/retro-checkbox\"\nimport { RetroGroupBox } from \"@/registry/new-york/ui/retro-group-box\"\nimport { RetroLabel } from \"@/registry/new-york/ui/retro-label\"\nimport { RetroNumberField } from \"@/registry/new-york/ui/retro-little-arrows\"\nimport { RetroListBox, RetroListBoxItem } from \"@/registry/new-york/ui/retro-list-box\"\nimport { RetroRadioGroup, RetroRadioGroupItem } from \"@/registry/new-york/ui/retro-radio\"\nimport {\n  RetroSelect,\n  RetroSelectContent,\n  RetroSelectItem,\n  RetroSelectItemIcon,\n  RetroSelectTrigger,\n  RetroSelectValue,\n} from \"@/registry/new-york/ui/retro-select\"\nimport { RetroSlider } from \"@/registry/new-york/ui/retro-slider\"\nimport {\n  RetroTabs,\n  RetroTabsContent,\n  RetroTabsList,\n  RetroTabsTrigger,\n} from \"@/registry/new-york/ui/retro-tabs\"\nimport { RetroWindow } from \"@/registry/new-york/ui/retro-window\"\n\n/* ------------------------------------------------------------------ */\n/*  Data                                                               */\n/* ------------------------------------------------------------------ */\n\ntype ControlPanelTab = \"themes\" | \"appearance\" | \"fonts\" | \"desktop\" | \"sound\" | \"options\"\n\nconst TABS: { value: ControlPanelTab; label: string }[] = [\n  { value: \"themes\", label: \"Themes\" },\n  { value: \"appearance\", label: \"Appearance\" },\n  { value: \"fonts\", label: \"Fonts\" },\n  { value: \"desktop\", label: \"Desktop\" },\n  { value: \"sound\", label: \"Sound\" },\n  { value: \"options\", label: \"Options\" },\n]\n\n/** Highlight colours are user content, so they carry their own values. */\nconst HIGHLIGHT_COLORS = [\n  { id: \"lavender\", name: \"Lavender\", color: \"var(--os9-lavender)\" },\n  { id: \"blue\", name: \"Blue\", color: \"#99ccff\" },\n  { id: \"gold\", name: \"Gold\", color: \"#ffcc66\" },\n  { id: \"graphite\", name: \"Graphite\", color: \"var(--os9-gray-400)\" },\n  { id: \"green\", name: \"Green\", color: \"#99ee99\" },\n  { id: \"purple\", name: \"Purple\", color: \"#cc99ff\" },\n  { id: \"red\", name: \"Red\", color: \"#ff9999\" },\n  { id: \"silver\", name: \"Silver\", color: \"var(--os9-gray-300)\" },\n] as const\n\nconst DESKTOP_PATTERNS = [\n  {\n    id: \"mac-os-default\",\n    name: \"Mac OS Default\",\n    style: {\n      backgroundColor: \"var(--os9-gray-400)\",\n      backgroundImage: \"radial-gradient(var(--os9-gray-700) 0.8px, transparent 0.8px)\",\n      backgroundSize: \"4px 4px\",\n    },\n  },\n  {\n    id: \"azul-dots\",\n    name: \"Azul Dots\",\n    style: {\n      backgroundColor: \"var(--os9-azul)\",\n      backgroundImage: \"radial-gradient(var(--os9-focus) 1px, transparent 1px)\",\n      backgroundSize: \"6px 6px\",\n    },\n  },\n  {\n    id: \"lavender-stripes\",\n    name: \"Lavender Stripes\",\n    style: {\n      backgroundColor: \"var(--os9-lavender)\",\n      backgroundImage:\n        \"repeating-linear-gradient(90deg, transparent 0 3px, var(--os9-white) 3px 4px)\",\n    },\n  },\n  {\n    id: \"platinum-grid\",\n    name: \"Platinum Grid\",\n    style: {\n      backgroundColor: \"var(--os9-gray-300)\",\n      backgroundImage:\n        \"linear-gradient(var(--os9-gray-500) 1px, transparent 1px), linear-gradient(90deg, var(--os9-gray-500) 1px, transparent 1px)\",\n      backgroundSize: \"8px 8px\",\n    },\n  },\n  {\n    id: \"checkerboard\",\n    name: \"Checkerboard\",\n    style: {\n      backgroundColor: \"var(--os9-gray-200)\",\n      backgroundImage:\n        \"conic-gradient(var(--os9-gray-600) 25%, transparent 0 50%, var(--os9-gray-600) 0 75%, transparent 0)\",\n      backgroundSize: \"4px 4px\",\n    },\n  },\n  {\n    id: \"solid-gray\",\n    name: \"Solid Gray\",\n    style: { backgroundColor: \"var(--os9-gray-600)\" },\n  },\n] as const satisfies readonly { id: string; name: string; style: React.CSSProperties }[]\n\nconst THEMES = [\n  { id: \"mac-os-default\", name: \"Mac OS Default\", highlight: \"lavender\", pattern: \"mac-os-default\" },\n  { id: \"hicontrast\", name: \"Mac OS HiContrast\", highlight: \"silver\", pattern: \"solid-gray\" },\n  { id: \"drawing-board\", name: \"Drawing Board\", highlight: \"gold\", pattern: \"platinum-grid\" },\n  { id: \"gizmo\", name: \"Gizmo\", highlight: \"purple\", pattern: \"azul-dots\" },\n  { id: \"sensible\", name: \"Sensible\", highlight: \"green\", pattern: \"lavender-stripes\" },\n  { id: \"cafe\", name: \"Cafe\", highlight: \"red\", pattern: \"checkerboard\" },\n] as const\n\nconst LARGE_FONTS = [\"Charcoal\", \"Chicago\", \"Gadget\", \"Sand\", \"Techno\", \"Textile\"]\nconst SMALL_FONTS = [\"Geneva\", \"Helvetica\", \"Monaco\"]\n\n/* ------------------------------------------------------------------ */\n/*  Settings                                                           */\n/* ------------------------------------------------------------------ */\n\ninterface ControlPanelSettings {\n  theme: string\n  appearance: string\n  highlightColor: string\n  variation: string\n  largeFont: string\n  smallFont: string\n  viewsFont: string\n  viewsFontSize: number\n  smoothFonts: boolean\n  smoothFontsMinSize: number\n  desktopPattern: string\n  soundTrack: string\n  sounds: { menus: boolean; windows: boolean; controls: boolean; finder: boolean }\n  volume: number\n  smartScrolling: boolean\n  collapseOnDoubleClick: boolean\n  scrollArrows: \"together\" | \"both\"\n  menuBlinks: number\n}\n\nconst DEFAULT_SETTINGS: ControlPanelSettings = {\n  theme: \"mac-os-default\",\n  appearance: \"platinum\",\n  highlightColor: \"lavender\",\n  variation: \"blue\",\n  largeFont: \"Charcoal\",\n  smallFont: \"Geneva\",\n  viewsFont: \"Geneva\",\n  viewsFontSize: 10,\n  smoothFonts: true,\n  smoothFontsMinSize: 12,\n  desktopPattern: \"mac-os-default\",\n  soundTrack: \"platinum\",\n  sounds: { menus: true, windows: true, controls: true, finder: false },\n  volume: 60,\n  smartScrolling: true,\n  collapseOnDoubleClick: true,\n  scrollArrows: \"together\",\n  menuBlinks: 1,\n}\n\ninterface ControlPanelBlockProps\n  extends Omit<\n    React.ComponentPropsWithoutRef<typeof RetroWindow>,\n    \"title\" | \"children\" | \"onChange\" | \"defaultValue\"\n  > {\n  /** Initially selected tab. Defaults to \"themes\". */\n  defaultTab?: ControlPanelTab\n  /** Initial settings (merged over the Mac OS defaults). */\n  defaultSettings?: Partial<ControlPanelSettings>\n  /** Fired with the full settings object after every change. */\n  onChange?: (settings: ControlPanelSettings) => void\n  /** Window title. Defaults to \"Appearance\". */\n  title?: string\n}\n\n/* ------------------------------------------------------------------ */\n/*  Small building blocks                                              */\n/* ------------------------------------------------------------------ */\n\nconst TEXT = \"font-[family-name:var(--os9-font-sans)] text-[10px] leading-[1.4] text-os9-black\"\n\n/** Label column + control column; stacks on narrow widths. */\nfunction Row({\n  label,\n  htmlFor,\n  labelId,\n  children,\n}: {\n  label: string\n  htmlFor?: string\n  labelId?: string\n  children: React.ReactNode\n}) {\n  return (\n    <div className=\"grid grid-cols-[140px_minmax(0,1fr)] items-center gap-x-2 max-[480px]:grid-cols-1 max-[480px]:gap-y-1\">\n      <RetroLabel\n        size=\"lg\"\n        htmlFor={htmlFor}\n        id={labelId}\n        className=\"text-right max-[480px]:text-left\"\n      >\n        {label}\n      </RetroLabel>\n      <div className=\"flex min-w-0 items-center gap-2\">{children}</div>\n    </div>\n  )\n}\n\nfunction PopUp({\n  value,\n  onValueChange,\n  labelledBy,\n  className,\n  children,\n}: {\n  value: string\n  onValueChange: (value: string) => void\n  labelledBy: string\n  className?: string\n  children: React.ReactNode\n}) {\n  return (\n    <RetroSelect value={value} onValueChange={onValueChange}>\n      <RetroSelectTrigger aria-labelledby={labelledBy} className={cn(\"w-[200px] max-w-full\", className)}>\n        <RetroSelectValue />\n      </RetroSelectTrigger>\n      <RetroSelectContent>{children}</RetroSelectContent>\n    </RetroSelect>\n  )\n}\n\nfunction CheckRow({\n  id,\n  checked,\n  onCheckedChange,\n  children,\n}: {\n  id: string\n  checked: boolean\n  onCheckedChange: (checked: boolean) => void\n  children: React.ReactNode\n}) {\n  return (\n    <div className=\"flex items-center gap-2\">\n      <RetroCheckbox id={id} checked={checked} onCheckedChange={(c) => onCheckedChange(c === true)} />\n      <RetroLabel htmlFor={id} className=\"text-[10px]\">\n        {children}\n      </RetroLabel>\n    </div>\n  )\n}\n\nfunction Swatch({ color }: { color: string }) {\n  return (\n    <span\n      aria-hidden=\"true\"\n      className=\"inline-block size-[10px] shrink-0 border border-os9-black align-[-1px]\"\n      style={{ background: color }}\n    />\n  )\n}\n\nfunction patternStyle(id: string): React.CSSProperties {\n  return (DESKTOP_PATTERNS.find((p) => p.id === id) ?? DESKTOP_PATTERNS[0]).style\n}\n\nfunction highlightValue(id: string) {\n  return (HIGHLIGHT_COLORS.find((c) => c.id === id) ?? HIGHLIGHT_COLORS[0]).color\n}\n\n/** Tiny desktop-with-window preview used by theme tiles. */\nfunction ThemePreview({ pattern, highlight }: { pattern: string; highlight: string }) {\n  return (\n    <span\n      aria-hidden=\"true\"\n      className=\"relative block h-[48px] w-[72px] border border-os9-black\"\n      style={patternStyle(pattern)}\n    >\n      <span className=\"absolute inset-x-0 top-0 h-[5px] border-b border-os9-black bg-os9-gray-300\" />\n      <span className=\"absolute left-[10px] top-[12px] h-[28px] w-[44px] border border-os9-black bg-os9-white shadow-[1px_1px_0_var(--os9-black)]\">\n        <span className=\"os9-stripes block h-[5px] border-b border-os9-black\" />\n        <span className=\"mx-[4px] mt-[4px] block h-[4px]\" style={{ background: highlightValue(highlight) }} />\n        <span className=\"mx-[4px] mt-[3px] block h-px bg-os9-gray-600\" />\n        <span className=\"mx-[4px] mt-[3px] block h-px w-[20px] bg-os9-gray-600\" />\n      </span>\n    </span>\n  )\n}\n\n/* ------------------------------------------------------------------ */\n/*  ControlPanelBlock                                                  */\n/* ------------------------------------------------------------------ */\n\nconst ControlPanelBlock = React.forwardRef<HTMLDivElement, ControlPanelBlockProps>(\n  function ControlPanelBlock(\n    {\n      defaultTab = \"themes\",\n      defaultSettings,\n      onChange,\n      title = \"Appearance\",\n      className,\n      contentClassName,\n      ...props\n    },\n    ref\n  ) {\n    const id = React.useId()\n    const [tab, setTab] = React.useState<ControlPanelTab>(defaultTab)\n    const [settings, setSettings] = React.useState<ControlPanelSettings>(() => ({\n      ...DEFAULT_SETTINGS,\n      ...defaultSettings,\n    }))\n\n    const update = (patch: Partial<ControlPanelSettings>) => {\n      const next = { ...settings, ...patch }\n      setSettings(next)\n      onChange?.(next)\n    }\n    const s = settings\n\n    return (\n      <RetroWindow\n        ref={ref}\n        title={title}\n        className={cn(\"w-full max-w-[560px]\", className)}\n        contentClassName={cn(\"p-[12px] max-[480px]:p-[6px]\", contentClassName)}\n        {...props}\n      >\n        <RetroTabs value={tab} onValueChange={(v) => setTab(v as ControlPanelTab)}>\n          <RetroTabsList className=\"overflow-x-auto overflow-y-hidden pt-[3px] [scrollbar-width:none]\">\n            {TABS.map((t) => (\n              <RetroTabsTrigger key={t.value} value={t.value} className=\"shrink-0 max-[480px]:px-[8px]\">\n                {t.label}\n              </RetroTabsTrigger>\n            ))}\n          </RetroTabsList>\n\n          {/* ---------------- Themes ---------------- */}\n          <RetroTabsContent value=\"themes\" className=\"flex min-h-[300px] flex-col gap-3\">\n            <p className={TEXT}>\n              Click a theme to change the appearance of your computer. A theme\n              sets the highlight colour, desktop pattern, fonts and sounds.\n            </p>\n            <RetroListBox\n              aria-label=\"Themes\"\n              glide={false}\n              value={s.theme}\n              onValueChange={(v) => {\n                const theme = THEMES.find((t) => t.id === v)\n                if (!theme) return\n                update({ theme: theme.id, highlightColor: theme.highlight, desktopPattern: theme.pattern })\n              }}\n              className=\"grid grid-cols-[repeat(auto-fill,minmax(88px,1fr))] gap-[6px] overflow-y-auto p-[6px] max-h-[220px]\"\n            >\n              {THEMES.map((t) => (\n                <RetroListBoxItem\n                  key={t.id}\n                  value={t.id}\n                  textValue={t.name}\n                  className=\"group/theme h-auto flex-col gap-[4px] whitespace-normal bg-transparent p-[4px] data-[selected]:bg-transparent data-[selected]:text-os9-black\"\n                >\n                  <span className=\"p-[2px] group-data-[selected]/theme:bg-os9-azul\">\n                    <ThemePreview pattern={t.pattern} highlight={t.highlight} />\n                  </span>\n                  <span className=\"px-[2px] text-center leading-[1.3] group-data-[selected]/theme:bg-os9-azul group-data-[selected]/theme:text-os9-white\">\n                    {t.name}\n                  </span>\n                </RetroListBoxItem>\n              ))}\n            </RetroListBox>\n          </RetroTabsContent>\n\n          {/* ---------------- Appearance ---------------- */}\n          <RetroTabsContent value=\"appearance\" className=\"flex min-h-[300px] flex-col gap-3\">\n            <RetroGroupBox title=\"Appearance\" contentClassName=\"flex flex-col gap-2\">\n              <Row label=\"Appearance:\" labelId={`${id}-appearance`}>\n                <PopUp value={s.appearance} onValueChange={(v) => update({ appearance: v })} labelledBy={`${id}-appearance`}>\n                  <RetroSelectItem value=\"platinum\">Apple Platinum</RetroSelectItem>\n                </PopUp>\n              </Row>\n            </RetroGroupBox>\n\n            <RetroGroupBox title=\"Colors\" contentClassName=\"flex flex-col gap-2\">\n              <Row label=\"Highlight Color:\" labelId={`${id}-highlight`}>\n                <RetroSelect value={s.highlightColor} onValueChange={(v) => update({ highlightColor: v })}>\n                  <RetroSelectTrigger aria-labelledby={`${id}-highlight`} className=\"w-[200px] max-w-full\">\n                    <RetroSelectValue />\n                  </RetroSelectTrigger>\n                  <RetroSelectContent>\n                    {HIGHLIGHT_COLORS.map((c) => (\n                      <RetroSelectItem key={c.id} value={c.id}>\n                        <RetroSelectItemIcon>\n                          <Swatch color={c.color} />\n                        </RetroSelectItemIcon>\n                        {c.name}\n                      </RetroSelectItem>\n                    ))}\n                  </RetroSelectContent>\n                </RetroSelect>\n              </Row>\n              <Row label=\"Variation:\" labelId={`${id}-variation`}>\n                <PopUp value={s.variation} onValueChange={(v) => update({ variation: v })} labelledBy={`${id}-variation`}>\n                  <RetroSelectItem value=\"blue\">Blue</RetroSelectItem>\n                  <RetroSelectItem value=\"graphite\">Graphite</RetroSelectItem>\n                </PopUp>\n              </Row>\n              <Row label=\"Sample:\">\n                <p className={cn(TEXT, \"truncate\")}>\n                  Some{\" \"}\n                  <span className=\"px-[1px]\" style={{ background: highlightValue(s.highlightColor) }}>\n                    selected text\n                  </span>{\" \"}\n                  in a document.\n                </p>\n              </Row>\n            </RetroGroupBox>\n          </RetroTabsContent>\n\n          {/* ---------------- Fonts ---------------- */}\n          <RetroTabsContent value=\"fonts\" className=\"flex min-h-[300px] flex-col gap-3\">\n            <RetroGroupBox title=\"System Fonts\" contentClassName=\"flex flex-col gap-2\">\n              <Row label=\"Large System Font:\" labelId={`${id}-large`}>\n                <PopUp value={s.largeFont} onValueChange={(v) => update({ largeFont: v })} labelledBy={`${id}-large`}>\n                  {LARGE_FONTS.map((f) => (\n                    <RetroSelectItem key={f} value={f}>{f}</RetroSelectItem>\n                  ))}\n                </PopUp>\n              </Row>\n              <Row label=\"Small System Font:\" labelId={`${id}-small`}>\n                <PopUp value={s.smallFont} onValueChange={(v) => update({ smallFont: v })} labelledBy={`${id}-small`}>\n                  {SMALL_FONTS.map((f) => (\n                    <RetroSelectItem key={f} value={f}>{f}</RetroSelectItem>\n                  ))}\n                </PopUp>\n              </Row>\n              <Row label=\"Views Font:\" labelId={`${id}-views`}>\n                <PopUp\n                  value={s.viewsFont}\n                  onValueChange={(v) => update({ viewsFont: v })}\n                  labelledBy={`${id}-views`}\n                  className=\"w-[130px]\"\n                >\n                  {SMALL_FONTS.map((f) => (\n                    <RetroSelectItem key={f} value={f}>{f}</RetroSelectItem>\n                  ))}\n                </PopUp>\n                <RetroLabel htmlFor={`${id}-views-size`} className=\"shrink-0\">Size:</RetroLabel>\n                <RetroNumberField\n                  id={`${id}-views-size`}\n                  size=\"sm\"\n                  min={9}\n                  max={24}\n                  value={s.viewsFontSize}\n                  onValueChange={(v) => update({ viewsFontSize: v })}\n                  inputClassName=\"w-[36px]\"\n                />\n              </Row>\n            </RetroGroupBox>\n\n            <RetroGroupBox\n              title={\n                <CheckRow\n                  id={`${id}-smooth`}\n                  checked={s.smoothFonts}\n                  onCheckedChange={(c) => update({ smoothFonts: c })}\n                >\n                  <span className=\"font-[family-name:var(--os9-font-heading)] text-[12px] tracking-[0.42px]\">\n                    Smooth all fonts on screen\n                  </span>\n                </CheckRow>\n              }\n              contentClassName=\"flex flex-col gap-2\"\n            >\n              <div className={cn(\"flex flex-wrap items-center gap-2\", !s.smoothFonts && \"opacity-50\")}>\n                <RetroLabel htmlFor={`${id}-smooth-size`}>Smooth fonts at sizes</RetroLabel>\n                <RetroNumberField\n                  id={`${id}-smooth-size`}\n                  size=\"sm\"\n                  min={9}\n                  max={24}\n                  disabled={!s.smoothFonts}\n                  value={s.smoothFontsMinSize}\n                  onValueChange={(v) => update({ smoothFontsMinSize: v })}\n                  inputClassName=\"w-[36px]\"\n                />\n                <span className={TEXT}>and above</span>\n              </div>\n            </RetroGroupBox>\n          </RetroTabsContent>\n\n          {/* ---------------- Desktop ---------------- */}\n          <RetroTabsContent value=\"desktop\" className=\"flex min-h-[300px] flex-wrap gap-4\">\n            <div className=\"flex flex-col items-center gap-2\">\n              {/* Monitor preview */}\n              <div className=\"border border-os9-black bg-os9-gray-300 p-[6px] pb-[14px] shadow-[var(--os9-shadow-raised)]\">\n                <div\n                  aria-label=\"Desktop preview\"\n                  role=\"img\"\n                  className=\"h-[96px] w-[128px] border border-os9-black\"\n                  style={patternStyle(s.desktopPattern)}\n                />\n              </div>\n              <p className={cn(TEXT, \"text-center\")}>\n                {DESKTOP_PATTERNS.find((p) => p.id === s.desktopPattern)?.name}\n              </p>\n            </div>\n            <div className=\"flex min-w-[180px] flex-1 flex-col gap-2\">\n              <RetroLabel size=\"lg\" id={`${id}-patterns`}>Patterns</RetroLabel>\n              <RetroListBox\n                aria-labelledby={`${id}-patterns`}\n                value={s.desktopPattern}\n                onValueChange={(v) => v && update({ desktopPattern: v })}\n                className=\"h-[140px]\"\n              >\n                {DESKTOP_PATTERNS.map((p) => (\n                  <RetroListBoxItem key={p.id} value={p.id}>\n                    <span aria-hidden=\"true\" className=\"size-[10px] shrink-0 border border-os9-black\" style={p.style} />\n                    {p.name}\n                  </RetroListBoxItem>\n                ))}\n              </RetroListBox>\n              <div className=\"flex flex-wrap gap-2\">\n                <RetroButton size=\"sm\" type=\"button\" disabled>Place Picture…</RetroButton>\n                <RetroButton size=\"sm\" type=\"button\" disabled>Remove Picture</RetroButton>\n              </div>\n            </div>\n          </RetroTabsContent>\n\n          {/* ---------------- Sound ---------------- */}\n          <RetroTabsContent value=\"sound\" className=\"flex min-h-[300px] flex-col gap-3\">\n            <Row label=\"Sound track:\" labelId={`${id}-track`}>\n              <PopUp value={s.soundTrack} onValueChange={(v) => update({ soundTrack: v })} labelledBy={`${id}-track`}>\n                <RetroSelectItem value=\"platinum\">Platinum Sounds</RetroSelectItem>\n                <RetroSelectItem value=\"none\">None</RetroSelectItem>\n              </PopUp>\n            </Row>\n            <RetroGroupBox title=\"Play sounds for:\" contentClassName=\"grid grid-cols-2 gap-2 max-[420px]:grid-cols-1\">\n              {(\n                [\n                  [\"menus\", \"Menus\"],\n                  [\"windows\", \"Windows\"],\n                  [\"controls\", \"Controls\"],\n                  [\"finder\", \"Finder\"],\n                ] as const\n              ).map(([key, label]) => (\n                <CheckRow\n                  key={key}\n                  id={`${id}-sound-${key}`}\n                  checked={s.sounds[key] && s.soundTrack !== \"none\"}\n                  onCheckedChange={(c) => update({ sounds: { ...s.sounds, [key]: c } })}\n                >\n                  {label}\n                </CheckRow>\n              ))}\n            </RetroGroupBox>\n            <RetroGroupBox title=\"Volume\" contentClassName=\"flex items-center gap-3\">\n              <span className={TEXT} aria-hidden=\"true\">Quiet</span>\n              <RetroSlider\n                aria-label=\"Volume\"\n                min={0}\n                max={100}\n                step={1}\n                value={[s.volume]}\n                onValueChange={([v]) => update({ volume: v })}\n                className=\"flex-1\"\n              />\n              <span className={TEXT} aria-hidden=\"true\">Loud</span>\n            </RetroGroupBox>\n          </RetroTabsContent>\n\n          {/* ---------------- Options ---------------- */}\n          <RetroTabsContent value=\"options\" className=\"flex min-h-[300px] flex-col gap-3\">\n            <RetroGroupBox title=\"Scrolling\" contentClassName=\"flex flex-col gap-2\">\n              <CheckRow\n                id={`${id}-smart`}\n                checked={s.smartScrolling}\n                onCheckedChange={(c) => update({ smartScrolling: c })}\n              >\n                Smart Scrolling (proportional scroll boxes)\n              </CheckRow>\n              <p className={cn(TEXT, \"mt-1\")} id={`${id}-arrows`}>Scroll arrows:</p>\n              <RetroRadioGroup\n                aria-labelledby={`${id}-arrows`}\n                value={s.scrollArrows}\n                onValueChange={(v) => update({ scrollArrows: v as ControlPanelSettings[\"scrollArrows\"] })}\n                className=\"gap-1.5 pl-3\"\n              >\n                <div className=\"flex items-center gap-2\">\n                  <RetroRadioGroupItem id={`${id}-arrows-together`} value=\"together\" />\n                  <RetroLabel htmlFor={`${id}-arrows-together`}>Together</RetroLabel>\n                </div>\n                <div className=\"flex items-center gap-2\">\n                  <RetroRadioGroupItem id={`${id}-arrows-both`} value=\"both\" />\n                  <RetroLabel htmlFor={`${id}-arrows-both`}>At top and bottom</RetroLabel>\n                </div>\n              </RetroRadioGroup>\n            </RetroGroupBox>\n            <RetroGroupBox title=\"Windows & Menus\" contentClassName=\"flex flex-col gap-2\">\n              <CheckRow\n                id={`${id}-collapse`}\n                checked={s.collapseOnDoubleClick}\n                onCheckedChange={(c) => update({ collapseOnDoubleClick: c })}\n              >\n                Double-click title bar to collapse windows\n              </CheckRow>\n              <div className=\"flex items-center gap-2\">\n                <RetroLabel htmlFor={`${id}-blinks`}>Menu blinking:</RetroLabel>\n                <RetroNumberField\n                  id={`${id}-blinks`}\n                  size=\"sm\"\n                  min={0}\n                  max={3}\n                  value={s.menuBlinks}\n                  onValueChange={(v) => update({ menuBlinks: v })}\n                  formatValue={(v) => (v === 0 ? \"Off\" : String(v))}\n                  inputClassName=\"w-[36px]\"\n                />\n                <span className={TEXT}>{s.menuBlinks === 1 ? \"time\" : \"times\"}</span>\n              </div>\n            </RetroGroupBox>\n          </RetroTabsContent>\n        </RetroTabs>\n      </RetroWindow>\n    )\n  }\n)\nControlPanelBlock.displayName = \"ControlPanelBlock\"\n\nexport { ControlPanelBlock, DEFAULT_SETTINGS as CONTROL_PANEL_DEFAULT_SETTINGS }\nexport type { ControlPanelBlockProps, ControlPanelSettings, ControlPanelTab }\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:block"
}