'use strict';

var React = require('react');
var CircleIcon = require('./CircleIcon-f0fa68c7.js');
var index$1 = require('./index-5488badc.js');
var icons = require('./icons-857d4be1.js');
var index = require('./index-ba659c28.js');
var coinsGraphic = require('./walletcurrency.webp');
var idsGraphic = require('./walletids.webp');
var learningHistoryGraphic = require('./backpack.png');
var skillsGraphic = require('./walletskills.webp');
var achievementsGraphic = require('./walletTrophy.png');
var socialBadge = require('./social-badge-2.png');
var membershipGraphic = require('./membership-graphic.png');
var apple = require('./apple.png');
var accommodationHands = require('./Accommodation-Hands.png');
var experienceMountain = require('./experience-mountain.png');
var MiniTrophyIcon = require('./minitrophycolored.svg');
var MiniGradIcon = require('./minigradcapcolored.svg');
var MiniPuzzleIcon = require('./minipuzzlecolored.svg');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
var coinsGraphic__default = /*#__PURE__*/_interopDefaultLegacy(coinsGraphic);
var idsGraphic__default = /*#__PURE__*/_interopDefaultLegacy(idsGraphic);
var learningHistoryGraphic__default = /*#__PURE__*/_interopDefaultLegacy(learningHistoryGraphic);
var skillsGraphic__default = /*#__PURE__*/_interopDefaultLegacy(skillsGraphic);
var achievementsGraphic__default = /*#__PURE__*/_interopDefaultLegacy(achievementsGraphic);
var socialBadge__default = /*#__PURE__*/_interopDefaultLegacy(socialBadge);
var membershipGraphic__default = /*#__PURE__*/_interopDefaultLegacy(membershipGraphic);
var apple__default = /*#__PURE__*/_interopDefaultLegacy(apple);
var accommodationHands__default = /*#__PURE__*/_interopDefaultLegacy(accommodationHands);
var experienceMountain__default = /*#__PURE__*/_interopDefaultLegacy(experienceMountain);
var MiniTrophyIcon__default = /*#__PURE__*/_interopDefaultLegacy(MiniTrophyIcon);
var MiniGradIcon__default = /*#__PURE__*/_interopDefaultLegacy(MiniGradIcon);
var MiniPuzzleIcon__default = /*#__PURE__*/_interopDefaultLegacy(MiniPuzzleIcon);

const RoundedSquare = ({
  title = "Currencies",
  description = "Lorem ipsum sit dalor amet",
  iconSrc = icons.ICONS_TO_SOURCE[index$1.Icons.trophyIcon],
  imgSrc,
  type = index$1.WalletCategoryTypes.achievements,
  count = "28",
  onClick = () => {
  },
  bgColor,
  iconCircleClass = "",
  loading,
  containerClass = ""
}) => {
  const imgSource = imgSrc || index.TYPE_TO_IMG_SRC[type];
  const backgroundColor = bgColor != null ? bgColor : `bg-${index.TYPE_TO_WALLET_COLOR[type]}`;
  const circleClass = `flex w-full justify-end icon-display absolute right-[15px] bottom-[10px] max-h-[40px] max-w-[40px] rounded-full`;
  const iconAltDescription = `${title} Icon`;
  return /* @__PURE__ */ React__default["default"].createElement(
    "button",
    {
      onClick,
      className: `flex relative ${backgroundColor} py-[15px] px-[15px] w-[170px] h-[190px] rounded-[40px] rounded-square-card-container ${containerClass}`
    },
    /* @__PURE__ */ React__default["default"].createElement("div", { className: "w-full relative" }, /* @__PURE__ */ React__default["default"].createElement("section", { className: "title-headline-container flex items-center" }, /* @__PURE__ */ React__default["default"].createElement("h3", { className: "line-clamp-2 font-bold text-[13px] text-grayscale-900 ml-[5px]" }, title)), /* @__PURE__ */ React__default["default"].createElement("p", { className: "text-grayscale-900 text-[11px] text-left ml-[5px] font-poppins font-normal leading-[13px]" }, description), /* @__PURE__ */ React__default["default"].createElement("div", { className: "graphic-background relative flex justify-center" }, /* @__PURE__ */ React__default["default"].createElement("img", { alt: iconAltDescription, className: "max-w-[130px]", src: imgSource }))),
    /* @__PURE__ */ React__default["default"].createElement("div", { className: `${circleClass}` }, /* @__PURE__ */ React__default["default"].createElement(
      CircleIcon.CircleIcon,
      {
        iconCircleClass,
        iconSrc,
        count,
        size: "40",
        loading
      }
    ))
  );
};

const TYPE_TO_MINI_ICON = {
  [index$1.LCSubtypes.course]: MiniGradIcon__default["default"],
  [index$1.LCSubtypes.achievement]: MiniTrophyIcon__default["default"],
  [index$1.LCSubtypes.skill]: MiniPuzzleIcon__default["default"]
};
const WALLET_SUBTYPES = {
  ACHIEVEMENTS: "achievements",
  IDS: "ids",
  JOB_HISTORY: "jobHistory",
  CURRENCIES: "currency",
  LEARNING_HISTORY: "learningHistory",
  SKILLS: "skills",
  SOCIAL_BADGES: "socialBadges",
  MEMBERSHIP: "membership",
  ACCOMPLISHMENTS: "accomplishments",
  ACCOMMODATIONS: "accommodations",
  MERIT_BADGES: "meritBadges"
};
const TYPE_TO_IMG_SRC = {
  [WALLET_SUBTYPES.ACHIEVEMENTS]: achievementsGraphic__default["default"],
  [WALLET_SUBTYPES.IDS]: idsGraphic__default["default"],
  [WALLET_SUBTYPES.JOB_HISTORY]: experienceMountain__default["default"],
  [WALLET_SUBTYPES.LEARNING_HISTORY]: apple__default["default"],
  [WALLET_SUBTYPES.CURRENCIES]: coinsGraphic__default["default"],
  [WALLET_SUBTYPES.SKILLS]: skillsGraphic__default["default"],
  [WALLET_SUBTYPES.SOCIAL_BADGES]: socialBadge__default["default"],
  [WALLET_SUBTYPES.MEMBERSHIP]: membershipGraphic__default["default"],
  [WALLET_SUBTYPES.ACCOMPLISHMENTS]: learningHistoryGraphic__default["default"],
  [WALLET_SUBTYPES.ACCOMMODATIONS]: accommodationHands__default["default"]
};
const TYPE_TO_WALLET_COLOR = {
  [WALLET_SUBTYPES.ACHIEVEMENTS]: "spice-300",
  [WALLET_SUBTYPES.IDS]: "yellow-300",
  [WALLET_SUBTYPES.JOB_HISTORY]: "rose-300",
  [WALLET_SUBTYPES.LEARNING_HISTORY]: "emerald-300",
  [WALLET_SUBTYPES.CURRENCIES]: "cyan-200",
  [WALLET_SUBTYPES.SKILLS]: "indigo-300",
  [WALLET_SUBTYPES.SOCIAL_BADGES]: "cyan-200",
  [WALLET_SUBTYPES.MEMBERSHIP]: "teal-300",
  [WALLET_SUBTYPES.ACCOMPLISHMENTS]: "lime-300",
  [WALLET_SUBTYPES.ACCOMMODATIONS]: "amber-300"
};

exports.RoundedSquare = RoundedSquare;
exports.TYPE_TO_IMG_SRC = TYPE_TO_IMG_SRC;
exports.TYPE_TO_MINI_ICON = TYPE_TO_MINI_ICON;
exports.TYPE_TO_WALLET_COLOR = TYPE_TO_WALLET_COLOR;
exports.WALLET_SUBTYPES = WALLET_SUBTYPES;
//# sourceMappingURL=constants-2430d4bc.js.map
