import { u as useAtomValue, b7 as selectedSectionAtom, r as reactExports, ck as useSetAtom, cq as setSelectedSectionAtom, j as jsxRuntimeExports, G as Grid, cr as Link, bR as ImgURL, cs as getSectionByID, bV as Typography } from "./index-D15x63tD.js";
const UnderDevelopment = () => {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    Grid,
    {
      container: true,
      direction: "row",
      justifyContent: "center",
      alignItems: "center",
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h4", children: "Функционал находится в разработке." }) }) })
    }
  );
};
const StillDevelopmentPage = () => {
  const selectedSection = useAtomValue(selectedSectionAtom);
  const [sections, setSections] = reactExports.useState([]);
  const setSelectedSection = useSetAtom(setSelectedSectionAtom);
  reactExports.useEffect(() => {
    if (selectedSection.CLSID === void 0) return setSections(selectedSection.Sections || []);
  }, []);
  const onLinkClick = (id) => {
    setSelectedSection(getSectionByID(id));
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { container: true, direction: "column", justifyContent: "flex-start", alignItems: "flex-start", sx: { m: 1 }, spacing: 1, children: sections.length === 0 && selectedSection.CLSID === void 0 ? sections.map((value, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, underline: "hover", style: { cursor: "pointer" }, onClick: () => onLinkClick(value.ID), children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Link, { children: [
    ImgURL(value.Image, {
      height: "20px",
      width: "20px",
      position: "relative",
      top: "4px",
      margin: "0px 4px"
    }),
    value.Name
  ] }) }, index)) : /* @__PURE__ */ jsxRuntimeExports.jsx(UnderDevelopment, {}) });
};
export {
  StillDevelopmentPage as default
};
//# sourceMappingURL=StillDevelopmentPage-tJrt5pvV.js.map
