import { TakeOff } from "@icon-park/react";
import { Card, CardHeader, CardIcon, CardBody } from "../window/Card";
import { invoke } from "@tauri-apps/api/core"

const FastLaunch = () => {
  return (
    <Card>
      <CardHeader>
        <CardIcon>
          <TakeOff /> 快捷启动
        </CardIcon>
      </CardHeader>
      <CardBody>
        <div className="flex gap-2">
          <button
            onClick={() =>
              invoke("launch_game", {
                // steamPath: steam.dir + "/steam.exe",
                // launchOption: launchOptions.value[launchIndex.value] || "",
                server: "perfectworld",
              })
            }
            className="px-5 font-medium py-1.5 transition bg-red-200 rounded-full"
          >
            启动国服
          </button>
          <button
            onClick={() =>
              invoke("launch_game", {
                // steamPath: steam.dir + "/steam.exe",
                // launchOption: launchOptions.value[launchIndex.value] || "",
                server: "worldwide",
              })
            }
            className="px-5 font-medium py-1.5 transition bg-orange-200 rounded-full"
          >
            启动国际服
          </button>
        </div>
      </CardBody>
    </Card>
  )
};

export default FastLaunch;
