import { Component, createMemo, type JSX } from "solid-js" import { Select } from "@opencode-ai/ui/select" import { Switch } from "@opencode-ai/ui/switch" import { useTheme, type ColorScheme } from "@opencode-ai/ui/theme" import { useSettings } from "@/context/settings" import { playSound, SOUND_OPTIONS } from "@/utils/sound" export const SettingsGeneral: Component = () => { const theme = useTheme() const settings = useSettings() const themeOptions = createMemo(() => Object.entries(theme.themes()).map(([id, def]) => ({ id, name: def.name ?? id })), ) const colorSchemeOptions: { value: ColorScheme; label: string }[] = [ { value: "system", label: "System setting" }, { value: "light", label: "Light" }, { value: "dark", label: "Dark" }, ] const fontOptions = [ { value: "ibm-plex-mono", label: "IBM Plex Mono" }, { value: "cascadia-code", label: "Cascadia Code" }, { value: "fira-code", label: "Fira Code" }, { value: "hack", label: "Hack" }, { value: "inconsolata", label: "Inconsolata" }, { value: "intel-one-mono", label: "Intel One Mono" }, { value: "jetbrains-mono", label: "JetBrains Mono" }, { value: "meslo-lgs", label: "Meslo LGS" }, { value: "roboto-mono", label: "Roboto Mono" }, { value: "source-code-pro", label: "Source Code Pro" }, { value: "ubuntu-mono", label: "Ubuntu Mono" }, ] const soundOptions = [...SOUND_OPTIONS] return (
) } interface SettingsRowProps { title: string description: string | JSX.Element children: JSX.Element } const SettingsRow: Component