import { jsx as s } from "../../../../../preact@10.29.0/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js";
import { useRef as y } from "../../../../../preact@10.29.0/node_modules/preact/hooks/dist/hooks.module.js";
import b from "../../../../../preact-custom-element@4.6.0_preact@10.29.0/node_modules/preact-custom-element/dist/preact-custom-element.esm.js";
import { s as g, E as h, r as u } from "./resolveEnvironment-C5RkjL5E.js";
import { AcceptTermsOfServiceComponent as v } from "./AcceptTermsOfServiceComponent-Y5aYfW8R.js";
import { e as r } from "./emitEvent-CzZf80Am.js";
try {
  let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, t = new e.Error().stack;
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "488676d0-ef89-40e6-abb8-c4065a5c1662", e._sentryDebugIdIdentifier = "sentry-dbid-488676d0-ef89-40e6-abb8-c4065a5c1662");
} catch {
}
const w = ({
  rootlegalentityid: e,
  fetchToken: t,
  environment: d,
  locale: l,
  settings: a = {},
  experiments: i = {},
  view: m
}) => {
  const n = y(null), c = (o) => {
    r(n, "complete", o);
  }, f = (o) => {
    r(n, "accept", o);
  }, p = () => {
    r(n, "close");
  };
  return /* @__PURE__ */ s("div", { ref: n, style: "width:100%;", children: /* @__PURE__ */ s(
    h,
    {
      componentName: "adyen-terms-of-service-management",
      rootLegalEntityId: e,
      settings: a,
      experiments: i,
      getSdkToken: t,
      locale: l,
      baseUrl: u(d),
      children: /* @__PURE__ */ s(
        v,
        {
          legalEntityId: e,
          onAccept: f,
          onComplete: c,
          modalView: m === "modal",
          onClose: p
        }
      )
    }
  ) });
};
b(
  w,
  "adyen-terms-of-service-management",
  ["rootlegalentityid", "fetchToken", "environment", "locale", "settings", "experiments", "view"],
  { shadow: !0, adoptedStyleSheets: g }
);
export {
  w as AdyenTermsOfService
};
