;
{
  try {
    let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
    n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "0029a942-c6df-428b-b8b2-514ed5ce4795", e._sentryDebugIdIdentifier = "sentry-dbid-0029a942-c6df-428b-b8b2-514ed5ce4795");
  } catch (e) {
  }
}
;
import { jsx } from "preact/jsx-runtime";
import { useRef } from "preact/hooks";
import register from "preact-custom-element";
import { s as stylesheets, E as EmbedShell, r as resolveEnvironment } from "./resolveEnvironment-cyRWc5YB.js";
import { M as ManageTermsOfServiceComponent } from "./ManageTermsOfServiceComponent-C-NMP1xI.js";
import { e as emitAdyenSdkEvent } from "./emitEvent-CzZf80Am.js";
const AdyenManageTermsOfService = ({
  rootlegalentityid,
  fetchToken,
  environment,
  locale,
  settings = {},
  experiments = {}
}) => {
  const eventEmitterRef = useRef(null);
  const handleOnClick = () => {
    emitAdyenSdkEvent(eventEmitterRef, "click");
  };
  return /* @__PURE__ */ jsx("div", { ref: eventEmitterRef, style: "width:100%;", children: /* @__PURE__ */ jsx(
    EmbedShell,
    {
      componentName: "adyen-terms-of-service-status",
      rootLegalEntityId: rootlegalentityid,
      settings,
      experiments,
      getSdkToken: fetchToken,
      locale,
      baseUrl: resolveEnvironment(environment),
      children: /* @__PURE__ */ jsx(ManageTermsOfServiceComponent, { legalEntityId: rootlegalentityid, onClick: handleOnClick })
    }
  ) });
};
register(
  AdyenManageTermsOfService,
  "adyen-terms-of-service-status",
  ["rootlegalentityid", "fetchToken", "environment", "locale", "settings", "experiments"],
  { shadow: true, adoptedStyleSheets: stylesheets }
);
