import * as React from 'react';
import { TinyColor } from '@ctrl/tinycolor';
import { Drawer, Form, Input, Button, InputNumber, Checkbox, Space } from 'antd';
import { useIntl } from 'react-intl';
import { BugOutlined, EyeOutlined } from '@ant-design/icons';
import { useState } from 'react';
import { SeedToken } from '../../../../../components/_util/theme';
import defaultSeedToken from '../../../../../components/_util/theme/themes/default';
import { PresetColors } from '../../../../../components/_util/theme/interface';
import Preview from './Preview';
import Diff from './Diff';
export interface ThemeConfigProps {
componentName: string;
defaultToken: SeedToken;
onChangeTheme: (theme: SeedToken) => void;
}
export default ({ onChangeTheme, defaultToken, componentName }: ThemeConfigProps) => {
const { formatMessage } = useIntl();
const [visible, setVisible] = React.useState(false);
const [previewVisible, setPreviewVisible] = React.useState(false);
const [form] = Form.useForm();
const [showDiff, setShowDiff] = useState(false);
const keys = Object.keys(defaultSeedToken);
const onFinish = (nextToken: SeedToken) => {
onChangeTheme(nextToken);
};
return (
<>
{/* FIXME: need to be removed before published */}