import { BugOutlined, EyeOutlined } from '@ant-design/icons';
import { TinyColor } from '@ctrl/tinycolor';
import { Button, Select, Checkbox, Drawer, Form, Input, InputNumber, Space } from 'antd';
import * as React from 'react';
import { useState } from 'react';
import { useIntl } from 'react-intl';
import type { SeedToken } from '../../../../../components/theme';
import { PresetColors } from '../../../../../components/theme/interface';
import defaultSeedToken from '../../../../../components/theme/themes/seed';
import Diff from './Diff';
import Preview from './Preview';
export interface ThemeConfigProps {
componentName: string;
defaultToken: SeedToken;
onChangeTheme: (theme: SeedToken) => void;
}
export default function DynamicTheme({
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 */}