'use strict';

var React = require('react');
var CourseCardPlaceholder = require('./lhplaceholder.png');
var trophylight = require('./minitrophy.svg');
var MiniJobIcon = require('./minijob.svg');
var puzzlelight = require('./minipuzzle.svg');

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

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
var CourseCardPlaceholder__default = /*#__PURE__*/_interopDefaultLegacy(CourseCardPlaceholder);
var trophylight__default = /*#__PURE__*/_interopDefaultLegacy(trophylight);
var MiniJobIcon__default = /*#__PURE__*/_interopDefaultLegacy(MiniJobIcon);
var puzzlelight__default = /*#__PURE__*/_interopDefaultLegacy(puzzlelight);

const TYPE_TO_COURSE_MINI_ICON = {
  ["job"]: MiniJobIcon__default["default"],
  ["achievement"]: trophylight__default["default"],
  ["skill"]: puzzlelight__default["default"]
};
const TYPE_TO_COLOR = {
  ["job"]: "bg-emerald-700",
  ["achievement"]: "bg-spice-500",
  ["skill"]: "bg-indigo-500"
};
const CourseCardStatBubble = ({
  count = 0,
  type = "job",
  className
}) => {
  const imgSrc = TYPE_TO_COURSE_MINI_ICON[type];
  const bgColor = TYPE_TO_COLOR[type];
  return /* @__PURE__ */ React__default["default"].createElement(
    "div",
    {
      className: `course-card-stat-bubble px-[10px] rounded-[30px] flex ${bgColor} min-w-[48px] max-w-[80px] h-[30px] items-center ${className}`
    },
    /* @__PURE__ */ React__default["default"].createElement("img", { src: imgSrc, className: "pr-[5px]" }),
    /* @__PURE__ */ React__default["default"].createElement("span", { className: "flex items-center text-sm text-white" }, count)
  );
};
const CourseCard = ({
  status = "Enrolled",
  title = "MECH 1340 Digital Fundamentals and Programmable Logic Controllers",
  semester = "Fall 2022",
  jobCount = 1,
  achievementCount = 4,
  thumbSrc,
  hideHeader = false,
  skillCount = 9,
  className,
  onClick = () => {
  }
}) => {
  return /* @__PURE__ */ React__default["default"].createElement(
    "div",
    {
      onClick,
      className: `flex shadow-[0_0_8px_0px_rgba(0,0,0,0.2)] relative $ py-[10px] px-[15px] max-w-[400px] h-[130px] rounded-[20px] ${className}`
    },
    /* @__PURE__ */ React__default["default"].createElement(
      "img",
      {
        src: CourseCardPlaceholder__default["default"],
        className: "course-card-img w-[100px] h-[111px] mr-[10px]"
      }
    ),
    /* @__PURE__ */ React__default["default"].createElement("div", { className: "course-card-detail-info flex flex-col justify-between" }, !hideHeader && /* @__PURE__ */ React__default["default"].createElement("div", { className: "text-sm" }, /* @__PURE__ */ React__default["default"].createElement("span", { className: "text-emerald-700 font-semibold" }, status), /* @__PURE__ */ React__default["default"].createElement("span", { className: "spacer-dot mx-[3px]" }, "\u2022"), /* @__PURE__ */ React__default["default"].createElement("span", { className: "text-grayscale-500" }, semester)), /* @__PURE__ */ React__default["default"].createElement("p", { className: "course-card-title text-sm font-semibold line-clamp-2" }, title), /* @__PURE__ */ React__default["default"].createElement("div", { className: "course-card-counts-container flex items-center mt-[5px]" }, /* @__PURE__ */ React__default["default"].createElement(CourseCardStatBubble, { type: "job", count: jobCount, className: "mr-[5px]" }), /* @__PURE__ */ React__default["default"].createElement(
      CourseCardStatBubble,
      {
        type: "achievement",
        count: achievementCount,
        className: "mr-[5px]"
      }
    ), /* @__PURE__ */ React__default["default"].createElement(
      CourseCardStatBubble,
      {
        type: "skill",
        count: skillCount,
        className: "mr-[0px]"
      }
    )))
  );
};

exports.CourseCard = CourseCard;
//# sourceMappingURL=CourseCard-bc699307.js.map
