;
{
  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] = "2269d6e1-ec0b-465d-8c59-df3ce541932e", e._sentryDebugIdIdentifier = "sentry-dbid-2269d6e1-ec0b-465d-8c59-df3ce541932e");
  } catch (e) {
  }
}
;
import { jsxs, jsx } from "preact/jsx-runtime";
import cx from "classnames";
import { L as Loader } from "./StoreProvider-CqQrndhS.js";
const loaderWrapperLoader = "adyen-kyc-loader-wrapper-loader";
const loaderWrapperLoaderActive = "adyen-kyc-loader-wrapper-loader-active";
const styles = {
  loaderWrapperLoader,
  loaderWrapperLoaderActive
};
const LoaderWrapper = ({
  children,
  status,
  formOpacityWhenLoading = 0,
  loaderSize = "medium",
  showSpinner = true,
  className
}) => {
  const opacitySyle = status === "loading" ? {
    opacity: formOpacityWhenLoading
  } : { opacity: 1 };
  const showLoader = status === "loading" && showSpinner;
  const loaderWrapperClass = cx(styles.loaderWrapperLoader, {
    [styles.loaderWrapperLoaderActive]: showLoader
  });
  const overlayClass = cx(styles.loaderWrapper, className);
  return /* @__PURE__ */ jsxs("div", { className: overlayClass, style: { position: "relative" }, children: [
    showLoader && /* @__PURE__ */ jsx("div", { className: loaderWrapperClass, children: /* @__PURE__ */ jsx(Loader, { size: loaderSize }) }),
    /* @__PURE__ */ jsx("div", { className: styles.loaderWrapperForm, style: opacitySyle, children })
  ] });
};
export {
  LoaderWrapper as L
};
