import React from 'react';
import { a as CircleIcon } from './CircleIcon-abd5ff06.js';
import { I as Icons, W as WalletCategoryTypes, L as LCSubtypes } from './index-28917993.js';
import { I as ICONS_TO_SOURCE } from './icons-fdd35170.js';
import { a as TYPE_TO_IMG_SRC$1, c as TYPE_TO_WALLET_COLOR$1 } from './index-cbe3a76a.js';
import coinsGraphic from './walletcurrency.webp';
import idsGraphic from './walletids.webp';
import learningHistoryGraphic from './backpack.png';
import skillsGraphic from './walletskills.webp';
import achievementsGraphic from './walletTrophy.png';
import socialBadge from './social-badge-2.png';
import membershipGraphic from './membership-graphic.png';
import apple from './apple.png';
import accommodationHands from './Accommodation-Hands.png';
import experienceMountain from './experience-mountain.png';
import MiniTrophyIcon from './minitrophycolored.svg';
import MiniGradIcon from './minigradcapcolored.svg';
import MiniPuzzleIcon from './minipuzzlecolored.svg';

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

const TYPE_TO_MINI_ICON = {
  [LCSubtypes.course]: MiniGradIcon,
  [LCSubtypes.achievement]: MiniTrophyIcon,
  [LCSubtypes.skill]: MiniPuzzleIcon
};
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,
  [WALLET_SUBTYPES.IDS]: idsGraphic,
  [WALLET_SUBTYPES.JOB_HISTORY]: experienceMountain,
  [WALLET_SUBTYPES.LEARNING_HISTORY]: apple,
  [WALLET_SUBTYPES.CURRENCIES]: coinsGraphic,
  [WALLET_SUBTYPES.SKILLS]: skillsGraphic,
  [WALLET_SUBTYPES.SOCIAL_BADGES]: socialBadge,
  [WALLET_SUBTYPES.MEMBERSHIP]: membershipGraphic,
  [WALLET_SUBTYPES.ACCOMPLISHMENTS]: learningHistoryGraphic,
  [WALLET_SUBTYPES.ACCOMMODATIONS]: accommodationHands
};
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"
};

export { RoundedSquare as R, TYPE_TO_MINI_ICON as T, WALLET_SUBTYPES as W, TYPE_TO_IMG_SRC as a, TYPE_TO_WALLET_COLOR as b };
//# sourceMappingURL=constants-f1ed610c.js.map
