import { jsx as o } from "@emotion/react/jsx-runtime";
import { useEnvironment as u, FlagsProvider as L, ModuleDictionaryProvider as _, ModuleSkeletonProvider as d, CommonFlags as T } from "@m4l/core";
import { useLocales as f, useThemeSettingsStore as p } from "@m4l/graphics";
import { SETTINGS_LAYOUT_DEFAULT_MODULE_ID as D, SETTINGS_LAYOUT_DEFAULT_WIDTH as S } from "./constants.js";
import { useMemo as g } from "react";
import { SettingsLayoutBase as h } from "./subcomponents/SettingsLayoutBase/SettingsLayoutBase.js";
const U = (t) => {
  const {
    width: e = S,
    moduleId: r = D
  } = t, n = f().currentLocale?.localeString, { host_static_assets: s, environment_assets: i } = u(), { open: c } = p((l) => l), m = `${s}/${i}`, a = g(() => [], []);
  return c ? /* @__PURE__ */ o(L, { children: /* @__PURE__ */ o(
    _,
    {
      isAuth: !1,
      moduleId: r,
      componentsDictionary: a,
      currentLang: n,
      children: /* @__PURE__ */ o(d, { flags: [T.FLAG_DICTIONARY_LOADED], children: /* @__PURE__ */ o(h, { prefixPathIcon: m, width: e }) })
    }
  ) }) : null;
};
export {
  U as SettingsLayout
};
