import { jsx as a } from "@emotion/react/jsx-runtime";
import { AreaGridLayout as d } from "../AreaGridLayout/AreaGridLayout.js";
import { useAreasStore as e } from "../../../../../../hooks/useAreas/index.js";
import { LoadingError as n } from "../../../../../../../LoadingError/LoadingError.js";
import { BaseAreaStyled as p } from "../../../../slots/AreasViewerSlots.js";
import { shallow as c } from "zustand/shallow";
const z = (s) => {
  const { areaId: r, size: i } = s, t = e((o) => o.hashAreas[r].status), m = e(
    (o) => r ? o.hashAreas[r]?.maximizedId : void 0,
    c
  );
  return /* @__PURE__ */ a(p, { ownerState: { maximizedId: m }, children: t === "loaded" ? /* @__PURE__ */ a(d, { areaId: r, size: i }) : /* @__PURE__ */ a(n, { status: t, action: () => {
  } }) });
};
export {
  z as BaseArea
};
