import { View, Text } from 'react-native'
import { Settings } from '@my/ui'
import type { SettingsItemProps } from '@my/ui'

export function SettingsScreen() {
  const appName = 'flexlark'
  const version = 'dev 0.0.0'
  const items: SettingsItemProps[] = [
    {
      id: 'notification',
      label: '通知',
      description: '通知内有关于通知的相关设置',
      type: 'group',
      options: {
        children: [
          {
            id: 'enableNotification',
            label: '是否通知',
            description: '开启后将收到系统通知',
            type: 'switch',
            options: {},
          },
          {
            id: 'notificationContent',
            label: '通知内容',
            description: '设置通知的内容',
            type: 'input',
            options: {},
          },
        ],
      },
    },
    {
      id: 'about',
      type: 'group',
      label: '关于',
      options: {
        children: [
          {
            id: 'about-flexlark',
            label: `关于灵动云雀`,
            description: `我们是什么？`,
            type: 'link',
            options: {
              url: 'https://flexlark.org/',
            },
          },
          {
            id: 'about-app',
            label: `关于${appName}`,
            description: `当前应用正在激烈开发中`,
            type: 'alert',
            options: {
              message: `版本号：${version}`,
            },
          },
        ],
      },
    },
  ]

  return (
    <View>
      <Settings items={items} />
    </View>
  )
}
