import { Card, CardBody, CardHeader, CardIcon, CardTool } from "@/components/window/Card"
import { appStore } from "@/store/app"
import { Refresh, VolumeNotice } from "@icon-park/react"
import { ToolButton } from "../window/ToolButton"
import { useSnapshot } from "valtio"

const Notice = () => {
  appStore.start()
  const app = useSnapshot(appStore.state)

  return (
    <Card>
      <CardHeader>
        <CardIcon>
          <VolumeNotice /> 公告
        </CardIcon>
        <CardTool>
          <ToolButton>
            <Refresh />
            刷新
          </ToolButton>
        </CardTool>
      </CardHeader>
      <CardBody>{app.notice || "不会真的有人要更新CSGO工具箱吧，不会吧不会吧 xswl"}</CardBody>
    </Card>
  )
}

export default Notice
