;
{
  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] = "a9ee0e23-f11a-4191-9ceb-f872cf1e41a1", e._sentryDebugIdIdentifier = "sentry-dbid-a9ee0e23-f11a-4191-9ceb-f872cf1e41a1");
  } catch (e) {
  }
}
;
import { jsx } from "preact/jsx-runtime";
import cx from "classnames";
const card = "adyen-kyc-card";
const cardPrimary = "adyen-kyc-card-primary";
const cardSecondary = "adyen-kyc-card-secondary";
const cardPaddingSmall = "adyen-kyc-card-padding-small";
const cardPaddingMedium = "adyen-kyc-card-padding-medium";
const cardPaddingLarge = "adyen-kyc-card-padding-large";
const cardElevationLow = "adyen-kyc-card-elevation-low";
const cardElevationMedium = "adyen-kyc-card-elevation-medium";
const cardElevationHigh = "adyen-kyc-card-elevation-high";
const cardInteractive = "adyen-kyc-card-interactive";
const cardSelected = "adyen-kyc-card-selected";
const styles = {
  card,
  cardPrimary,
  cardSecondary,
  cardPaddingSmall,
  cardPaddingMedium,
  cardPaddingLarge,
  cardElevationLow,
  cardElevationMedium,
  cardElevationHigh,
  cardInteractive,
  cardSelected
};
const cardVariantStyles = {
  primary: styles.cardPrimary,
  secondary: styles.cardSecondary
};
const cardPaddingStyles = {
  none: null,
  small: styles.cardPaddingSmall,
  medium: styles.cardPaddingMedium,
  large: styles.cardPaddingLarge
};
const cardElevationStyles = {
  none: null,
  low: styles.cardElevationLow,
  medium: styles.cardElevationMedium,
  high: styles.cardElevationHigh
};
const Card = ({
  children,
  selected,
  variant = "primary",
  padding = "medium",
  elevation = "none",
  onClick,
  disabled
}) => {
  const isInteractive = !!onClick;
  const rootClassname = cx(
    styles.card,
    cardVariantStyles[variant],
    cardPaddingStyles[padding],
    cardElevationStyles[elevation],
    {
      [styles.cardSelected]: selected
    }
  );
  if (isInteractive) {
    const handleClick = (e) => {
      e.preventDefault();
      onClick(e);
    };
    return /* @__PURE__ */ jsx(
      "button",
      {
        className: cx(rootClassname, styles.cardInteractive),
        onClick: handleClick,
        disabled,
        children
      }
    );
  }
  return /* @__PURE__ */ jsx("div", { className: rootClassname, role: "region", children });
};
export {
  Card as C
};
