import type { CSSProperties, ReactNode, Ref } from 'react' import { IconCircleCheckFilled } from '@tabler/icons-react' import { AgentBlobatar } from '@/client/components/shared/agent-blobatar' import { useWorkspaceLayoutCtx } from '@/client/features/workspace/workspace-layout-context' import { BottomPanel } from '@/client/components/shared/bottom-panel' import { cn } from '@/client/lib/cn' import { getWorkspaceThemeStyle, usePreloadWorkspaceFonts } from '@/client/runtime/workspace-theme' import { AGENT_THEMES, type AgentThemeConfig, COLOR_THEMES, type ColorThemeConfig, FONT_THEMES, RADIUS_THEMES, type RadiusThemeConfig, resolveWorkspaceTheme } from '@/lib/themes' import type { AgentTheme, ColorTheme, FontTheme, RadiusTheme, WorkspaceTheme } from '@/lib/types' const FONT_OPTIONS = Object.entries(FONT_THEMES) as [FontTheme, (typeof FONT_THEMES)[FontTheme]][] const COLOR_OPTIONS = Object.entries(COLOR_THEMES) as [ColorTheme, ColorThemeConfig][] const RADIUS_OPTIONS = Object.entries(RADIUS_THEMES) as [RadiusTheme, RadiusThemeConfig][] const AGENT_OPTIONS = Object.entries(AGENT_THEMES) as [AgentTheme, AgentThemeConfig][] const THEME_OPTION_CLASS = 'relative w-full rounded-lg text-left ring-1 ring-border transition-opacity outline-none focus-visible:ring-3 focus-visible:ring-ring/50' type ThemeOptionGroupProps = { children: ReactNode className?: string gridClassName?: string label: string } function ThemeOptionGroup({ children, className, gridClassName, label }: ThemeOptionGroupProps) { return (
{label}