'use client'; import { AlignInfoFillIcon as IconInfoCustomFill } from '@/components/misc/alignui-icons'; import * as React from 'react'; import * as Button from '@/components/ui/button'; import * as Divider from '@/components/ui/divider'; import * as Drawer from '@/components/ui/drawer'; import * as Label from '@/components/ui/label'; import * as Radio from '@/components/ui/radio'; import * as Select from '@/components/ui/select'; import Image from 'next/image'; export default function GeneralSettingsDrawer({ containerClassName, }: { containerClassName?: string; }) { const [open, setOpen] = React.useState(false); const [language, setLanguage] = React.useState('en'); const [timezone, setTimezone] = React.useState('gmt-4'); const [timeFormat, setTimeFormat] = React.useState('24'); const [dateFormat, setDateFormat] = React.useState('DD/MM/YY'); const [lightMode, setLightMode] = React.useState('light'); const [systemMode, setSystemMode] = React.useState('system'); const languages = [ { value: 'en', label: 'English (US)', flag: 'US' }, { value: 'tr', label: 'Türkçe', flag: 'TR' }, ]; const timezones = [ { value: 'gmt-4', label: 'GMT-4:00 - Atlantic Standard Time' }, { value: 'gmt0', label: 'GMT+0:00 - Greenwich Mean Time' }, ]; const timeFormats = [ { value: '12', label: '12 Hours' }, { value: '24', label: '24 Hours' }, ]; const dateFormats = [ { value: 'DD/MM/YY', label: 'DD/MM/YY' }, { value: 'MM/DD/YY', label: 'MM/DD/YY' }, ]; return (
General Settings
General Settings
Personalize and configure options.
REGIONAL PREFERENCES
Language
lang.value === language)?.flag}.svg`} className='size-5 rounded-sm' alt='' width={20} height={20} /> { languages.find((lang) => lang.value === language) ?.label }
{languages.map((lang) => ( {lang.label} ))}
Timezone {timezones.find((tz) => tz.value === timezone)?.label} {timezones.map((tz) => ( {tz.label} ))}
Time Format{' '} (Optional) { timeFormats.find((tf) => tf.value === timeFormat) ?.label } {timeFormats.map((tf) => ( {tf.label} ))}
Date Format{' '} (Optional) { dateFormats.find((df) => df.value === dateFormat) ?.label } {dateFormats.map((df) => ( {df.label} ))}
THEME OPTIONS
{ if (value === 'system') { setSystemMode('system'); setLightMode('system'); } else { setLightMode(value); setSystemMode('off'); } }} className='space-y-4' >
Light Mode{' '} (Default) Pick a clean and classic light theme.
Dark Mode Select a sleek and modern dark theme.
System Mode Adapts to your device's theme.
setOpen(false)} > Cancel setOpen(false)} > Apply Changes
); }