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

const ForceQuit = () => {
  return (
    <Card>
      <CardHeader>
        <CardIcon>
          <Power /> 强制退出
        </CardIcon>
      </CardHeader>
      <CardBody>
        <div className="flex gap-2">
          <button onClick={() => invoke("kill_steam")} className="px-5 font-medium py-1.5 transition bg-blue-200 rounded-full">关闭Steam</button>
          <button onClick={() => invoke("kill_game")} className="px-5 font-medium py-1.5 transition bg-orange-200 rounded-full">关闭CS2</button>
        </div>
      </CardBody>
    </Card>
  );
};

export default ForceQuit;
