import { jsxs as o, Fragment as f, jsx as i } from "@emotion/react/jsx-runtime";
import { Helmet as p } from "react-helmet-async";
import { useLocales as u } from "@m4l/graphics";
import { useModuleSkeleton as d } from "@m4l/core";
function h({
  title: e,
  subtitle: r,
  titlePrefix: l
}) {
  return [l, e, r].filter(
    (t) => typeof t == "string" && t.trim().length > 0
  );
}
const S = (e) => {
  const { children: r, title: l, meta: t, subtitle: n, titlePrefix: s, titleSeparator: c = " | " } = e, m = u().currentLocale?.localeString, a = d(), g = h({ title: l, subtitle: n, titlePrefix: s }).join(c);
  return /* @__PURE__ */ o(f, { children: [
    !a && /* @__PURE__ */ o(p, { children: [
      /* @__PURE__ */ i("title", { children: g }),
      /* @__PURE__ */ i("html", { lang: m }),
      t
    ] }),
    r
  ] });
};
S.displayName = "Page";
export {
  S as HelmetPage
};
