import TemplateContainer from '@/pages/TemplateContainer';
import { useModel } from '@umijs/max';
import { Tabs, TabsProps, theme } from 'antd';
import React from 'react';
import MailSettingOption from './MailSettingOption';


const LaitoolOptions: React.FC = () => {

  const { initialState } = useModel('@@initialState');
  const [activeKeys, setActiveKeys] = React.useState<string[]>([]);

  const items = [{
    label: `邮件设置`,
    key: "mail",
    style: undefined,
    children: <MailSettingOption visible={activeKeys.includes('imageOptions')} />
  }]

  const onChange = (key: string | string[]) => {
    setActiveKeys(Array.isArray(key) ? key : [key]);
  };

  return (
    <TemplateContainer title={false} navTheme={initialState?.settings?.navTheme ?? "realDark"}>
      <Tabs defaultActiveKey="1" destroyInactiveTabPane={true} items={items} onChange={onChange} />
    </TemplateContainer>
  );
};

export default LaitoolOptions;