import { Plus, SettingConfig, Switch } from "@icon-park/react";
import { Card, CardHeader, CardIcon, CardTool, CardBody } from "../window/Card";
import { useState } from "react";
import { ToolButton } from "../window/ToolButton";

const LaunchOption = () => {
  const [LaunchOption, setLaunchOption] = useState<string>(
    "-high -refresh 120 -novid -nojoy -tickrate 128 +cl_cmdrate 128 +cl_updaterate 128 +exec auto.cfg +test"
  );

  return (
    <Card>
      <CardHeader>
        <CardIcon>
          <SettingConfig /> 启动选项
        </CardIcon>
        <CardTool>
          <ToolButton>1</ToolButton>
          <ToolButton>2</ToolButton>
          <ToolButton>3</ToolButton>
          <ToolButton>
            <Plus />
            添加
          </ToolButton>
          <ToolButton>
            <Switch />
            切换模式
          </ToolButton>
        </CardTool>
      </CardHeader>
      <CardBody>
        <textarea
          placeholder="请输入启动选项"
          value={LaunchOption}
          onChange={(e) => setLaunchOption(e.target.value)}
          className="w-full font-mono text-base bg-transparent outline-none resize-none min-h-20"
        />
      </CardBody>
    </Card>
  );
};

export default LaunchOption;
