"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
  for (var prop in b || (b = {}))
    if (__hasOwnProp.call(b, prop))
      __defNormalProp(a, prop, b[prop]);
  if (__getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(b)) {
      if (__propIsEnum.call(b, prop))
        __defNormalProp(a, prop, b[prop]);
    }
  return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __objRest = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-header.tsx
var review_question_header_exports = {};
__export(review_question_header_exports, {
  default: () => review_question_header_default
});
module.exports = __toCommonJS(review_question_header_exports);

// src/atoms/box.tsx
var import_themes = require("@radix-ui/themes");

// src/atoms/flex.tsx
var import_themes2 = require("@radix-ui/themes");

// src/atoms/grid.tsx
var import_themes3 = require("@radix-ui/themes");

// src/atoms/heading.tsx
var import_themes4 = require("@radix-ui/themes");
var import_react = require("react");

// src/utils/map-with-responsive.ts
var mapWithResponsive = (args) => {
  const { value, mapFn } = args;
  if (typeof value === "string") {
    return mapFn(value);
  }
  ;
  if (typeof value === "object") {
    const newObj = {};
    let key;
    for (key in value) {
      newObj[key] = mapFn(value[key]);
    }
    return newObj;
  }
  return value;
};

// src/atoms/heading.tsx
var import_themes5 = require("@radix-ui/themes");
var import_jsx_runtime = require("react/jsx-runtime");
var mapVariant = (variant) => {
  switch (variant) {
    case "heading1":
      return "7";
    case "heading2":
      return "6";
    case "heading3":
      return "5";
    case "heading4":
      return "4";
    case "heading5":
      return "3";
    default:
      return void 0;
  }
};
function Heading2(props) {
  const _a = props, { size, children, variant } = _a, rest = __objRest(_a, ["size", "children", "variant"]);
  const radixSize = (0, import_react.useMemo)(() => {
    return variant ? mapWithResponsive({
      value: variant,
      mapFn: mapVariant
    }) : size;
  }, [size, variant]);
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_themes4.Heading, __spreadProps(__spreadValues({}, rest), { size: radixSize, children }));
}

// src/atoms/progress.tsx
var import_themes6 = require("@radix-ui/themes");

// src/atoms/typo.tsx
var import_themes7 = require("@radix-ui/themes");
var import_react2 = require("react");
var import_jsx_runtime2 = require("react/jsx-runtime");
var Typo = (0, import_react2.forwardRef)(
  (props, ref) => {
    const _a = props, { size, variant, children } = _a, rest = __objRest(_a, ["size", "variant", "children"]);
    const radixSize = (0, import_react2.useMemo)(() => {
      if (size !== void 0) return size;
      if (variant === void 0) return "2";
      return mapWithResponsive({
        value: variant,
        mapFn: (variantValue) => {
          switch (variantValue) {
            case "caption":
              return "1";
            case "subtitle":
              return "3";
            case "body":
            default:
              return "2";
          }
        }
      });
    }, [size, variant]);
    return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_themes7.Text, __spreadProps(__spreadValues({}, rest), { ref, size: radixSize, children }));
  }
);
Typo.displayName = "Typo";

// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/curriculum-review-context.tsx
var import_react3 = require("react");
var import_formik = require("formik");
var import_lodash_es = require("lodash-es");
var Yup = __toESM(require("yup"), 1);
var import_jsx_runtime3 = require("react/jsx-runtime");
var CurriculumReviewContext = (0, import_react3.createContext)(void 0);
function useCurriculumReviewContext() {
  const context = (0, import_react3.useContext)(CurriculumReviewContext);
  if (!context) {
    throw new Error(
      "useCurriculumReviewContext must be used within a CurriculumReviewProvider"
    );
  }
  return context;
}

// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-header.tsx
var import_jsx_runtime4 = require("react/jsx-runtime");
function ReviewQuestionHeader({
  index,
  total
}) {
  const { reviewContents } = useCurriculumReviewContext();
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_themes.Box, { height: "100%", width: "100%", children: [
    /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_themes3.Grid, { columns: "1fr 40px", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
      Heading2,
      {
        mb: "3",
        truncate: true,
        variant: { initial: "heading5", md: "heading3" },
        children: reviewContents.title
      }
    ) }),
    /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_themes2.Flex, { justify: "between", mb: "2", width: "100%", children: [
      /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Typo, { color: "gray", size: { initial: "1", md: "2" }, children: "\uC9C4\uD589 \uC0C1\uD669" }),
      /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Typo, { color: "gray", size: { initial: "1", md: "2" }, children: [
        index + 1,
        " / ",
        total,
        " \uC644\uB8CC"
      ] })
    ] }),
    /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_themes6.Progress, { color: "iris", max: total, value: index + 1 })
  ] });
}
var review_question_header_default = ReviewQuestionHeader;
//# sourceMappingURL=review-question-header.cjs.map