import { j as l } from "../../node_modules/react/jsx-runtime.mjs";
import { useState as o, useEffect as i } from "react";
import e from "../../node_modules/screenfull/index.mjs";
import "./index.less.mjs";
import c from "../../node_modules/@ant-design/icons/es/icons/FullscreenExitOutlined.mjs";
import u from "../../node_modules/@ant-design/icons/es/icons/FullscreenOutlined.mjs";
import f from "../../node_modules/antd/es/message/index.mjs";
const g = () => {
  const [s, r] = o(e.isFullscreen);
  i(() => {
    e.on("change", () => (e.isFullscreen ? r(!0) : r(!1), () => e.off("change", () => {
    })));
  }, []);
  const t = () => {
    e.isEnabled || f.warning("当前您的浏览器不支持全屏 ❌"), e.toggle();
  }, n = { fontSize: 22 };
  return l.jsx("div", { className: "fullScreenBlock", onClick: t, children: s ? l.jsx(c, { style: n }) : l.jsx(u, { style: n }) });
};
export {
  g as default
};
