import { jsx as t } from "react/jsx-runtime";
import { useDynamicImport as d } from "./index-use-dynamic-import.js";
import { ComponentContainer as h } from "./index-ComponentContainer.js";
import "react";
import p from "./index-esm5.js";
var r;
(function(e) {
  e.Visa = "visa", e.MasterCard = "masterCard", e.AmericanExpress = "americanExpress", e.Discover = "discover", e.CarteBleue = "carteBleue", e.Placeholder = "placeholder";
})(r || (r = {}));
const k = (e) => {
  const {
    type: o,
    disabled: c,
    small: s,
    testId: i
  } = e;
  let a = "Placeholder";
  switch (o) {
    case r.Visa:
      a = "Visa";
      break;
    case r.MasterCard:
      a = "MasterCard";
      break;
    case r.AmericanExpress:
      a = "AmericanExpress";
      break;
    case r.Discover:
      a = "Discover";
      break;
    case r.CarteBleue:
      a = "CarteBleue";
      break;
  }
  const n = s ? 40 : 74, l = s ? 24 : 48, {
    SvgIcon: m,
    loading: b,
    error: v
  } = d(`creditCard/${s ? "small" : "large"}/${c ? "disabled" : "enabled"}/CreditCard${a}.svg`);
  return t(h, {
    testId: i,
    children: t(p, {
      src: m,
      width: n,
      height: l
    })
  });
};
export {
  k as CreditCard,
  r as CreditCardType
};
