import MyTableDemo from "./MyTableDemo";
import QueueSelectDemo from "./QueueSelectDemo";
import IconfontDemo from "./IconfontDemo";
import CardTableDemo from "./CardTableDemo";
import RadioGroupOfButtonStyle from "@/components/CommonComponents/RadioGroupOfButtonStyle";
import { useState } from "react";
import styles from "./index.module.css";
import style from "./index.module.scss";

const Demo = () => {
	const radioOptionsArr = [
		{
			value: "cardTable",
			label: "cardTable",
		},
		{
			value: "iconfont",
			label: "iconfont",
		},
		{
			value: "队列选择器",
			label: "队列选择器",
		},
		{
			value: "表格",
			label: "表格",
		},
		{
			value: "box",
			label: "box",
		},
	];
	const handleRadio = (e: string) => {
		setSelectDemo(e);
	};
	const [selectDemo, setSelectDemo] = useState("cardTable");

	return (
		<div className={styles.demoBox}>
			<RadioGroupOfButtonStyle
				value={selectDemo}
				radioOptions={radioOptionsArr}
				handleRadio={handleRadio}
			/>
			<div className={styles.demoContentBox}>
				{selectDemo === "cardTable" && <CardTableDemo></CardTableDemo>}
				{selectDemo === "iconfont" && <IconfontDemo></IconfontDemo>}
				{selectDemo === "队列选择器" && <QueueSelectDemo></QueueSelectDemo>}
				{selectDemo === "表格" && <MyTableDemo></MyTableDemo>}
				{selectDemo === "box" && <div>box</div>}
			</div>
			<div className={style.box}>123</div>
		</div>
	);
};

export default Demo;
