import { getComponentData as i } from "@owc/aem-component-data-util";
async function m(n) {
  try {
    return { data: await n, error: null };
  } catch (t) {
    return { data: null, error: t };
  }
}
const o = "iam";
async function s(n) {
  const { subscribe: t, unsubscribe: a } = await import("@seamless/one-context");
  return new Promise((e) => {
    const r = (c) => {
      a("PageConnection", {
        tenant: o,
        componentName: n,
        callback: r
      }), e(c);
    };
    t("PageConnection", {
      tenant: o,
      componentName: n,
      callback: r
    });
  });
}
async function g(n) {
  const t = i(), { environmentVariables: a, pageEnvironmentVariables: e } = await s(n);
  return {
    componentData: t,
    environmentVariables: a,
    pageEnvironmentVariables: e
  };
}
export {
  g,
  m as t
};
//# sourceMappingURL=get-environment-data.mjs.map
