import * as React from 'react' import { Stack, Group, Title, Text, Paper, TextInput, Textarea, Switch, NativeSelect, Button, Box, Anchor } from '@mantine/core' interface SettingField { key: string label: string description?: string type: 'text' | 'number' | 'toggle' | 'select' | 'textarea' value?: unknown options?: Array<{ label: string; value: string }> placeholder?: string } interface SettingSection { id: string title: string description?: string fields: SettingField[] } interface SettingsPageProps { title?: string subtitle?: string sections: SettingSection[] onSave?: (values: Record) => void className?: string } export function settingsPage({ title = 'Settings', subtitle, sections, onSave, }: SettingsPageProps): React.ReactElement { return ( {/* Header */} {title} {subtitle && {subtitle}} {/* Content with sidebar nav */} {sections.map((section) => ( {section.title} ))} {/* Sections */} {sections.map((section) => ( {section.title} {section.description && {section.description}} {section.fields.map((field) => ( {field.label} {field.description && {field.description}} {field.type === 'toggle' ? ( ) : field.type === 'select' ? ( ({ label: o.label, value: o.value })) ?? []} size="xs" /> ) : field.type === 'textarea' ? (