;
{
  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] = "2508b81e-6fe6-4efb-90bb-530eeb318d42", e._sentryDebugIdIdentifier = "sentry-dbid-2508b81e-6fe6-4efb-90bb-530eeb318d42");
  } 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 { V as ViewVerificationStatusComponent } from "./ViewVerificationStatusComponent-Dt_B8b0x.js";
import { e as emitAdyenSdkEvent } from "./emitEvent-CzZf80Am.js";
const AdyenVerificationStatus = ({
  rootlegalentityid,
  fetchToken,
  environment,
  locale,
  settings = {},
  experiments = {},
  hideexplanation,
  returnurl,
  redirecttarget,
  themeid
}) => {
  const eventEmitterRef = useRef(null);
  const handleOnChange = (data) => {
    emitAdyenSdkEvent(eventEmitterRef, "change", data);
  };
  const handleOnError = (data) => {
    emitAdyenSdkEvent(eventEmitterRef, "error", data);
  };
  const handleOnRedirect = (data) => {
    emitAdyenSdkEvent(eventEmitterRef, "redirect", data);
  };
  return /* @__PURE__ */ jsx("div", { ref: eventEmitterRef, style: "width:100%;", children: /* @__PURE__ */ jsx(
    EmbedShell,
    {
      componentName: "adyen-verification-status",
      rootLegalEntityId: rootlegalentityid,
      settings,
      experiments,
      getSdkToken: fetchToken,
      locale,
      baseUrl: resolveEnvironment(environment),
      children: /* @__PURE__ */ jsx(
        ViewVerificationStatusComponent,
        {
          legalEntityId: rootlegalentityid,
          hideExplanation: hideexplanation,
          returnUrl: returnurl,
          redirectTarget: redirecttarget,
          themeId: themeid,
          onStatusChange: handleOnChange,
          onError: handleOnError,
          onRedirect: handleOnRedirect
        }
      )
    }
  ) });
};
register(
  AdyenVerificationStatus,
  "adyen-verification-status",
  [
    "rootlegalentityid",
    "fetchToken",
    "environment",
    "locale",
    "settings",
    "experiments",
    "hideexplanation",
    "returnurl",
    "redirecttarget",
    "themeid"
  ],
  { shadow: true, adoptedStyleSheets: stylesheets }
);
export {
  AdyenVerificationStatus
};
