import {
  useCurriculumContext
} from "./chunk-IYQJIEVM.js";
import {
  Flex
} from "./chunk-25HMMI7R.js";
import {
  Button
} from "./chunk-ZVDAEY5Q.js";
import {
  ResetIcon
} from "./chunk-V5XKNSCK.js";
import {
  Typo
} from "./chunk-PMJIFLDT.js";

// src/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.tsx
import { useMemo } from "react";
import { jsx, jsxs } from "react/jsx-runtime";
function CurriculumAiTraning({
  item
}) {
  const { title, description, buttonTitle } = item;
  const { curriculumCompleteMap, onActionButtonClick } = useCurriculumContext();
  const done = useMemo(() => {
    return Boolean(curriculumCompleteMap[item.uuid]);
  }, [curriculumCompleteMap, item.uuid]);
  const bgColor = done ? "var(--color-panel-solid)" : void 0;
  return /* @__PURE__ */ jsxs(
    Flex,
    {
      align: "center",
      direction: "column",
      height: "100%",
      justify: "center",
      style: {
        backgroundImage: `url(https://tipp-coaching-live.s3.ap-northeast-2.amazonaws.com/images/curriculum_ai_bg.png)`,
        backgroundPosition: "center",
        backgroundSize: "cover",
        backgroundRepeat: "no-repeat"
      },
      width: "100%",
      children: [
        /* @__PURE__ */ jsx(Typo, { color: "gray", weight: "bold", children: title }),
        /* @__PURE__ */ jsx(Typo, { align: "center", as: "p", color: "gray", children: description }),
        /* @__PURE__ */ jsxs(
          Button,
          {
            mt: "3",
            onClick: () => {
              onActionButtonClick(item);
            },
            style: { minWidth: 232, backgroundColor: bgColor },
            variant: done ? "outline" : "solid",
            children: [
              done ? "\uB2E4\uC2DC \uC5F0\uC2B5\uD558\uAE30" : buttonTitle || "\uC2DC\uC791\uD558\uAE30",
              done ? /* @__PURE__ */ jsx(ResetIcon, {}) : null
            ]
          }
        )
      ]
    }
  );
}
var curriculum_ai_traning_default = CurriculumAiTraning;

export {
  curriculum_ai_traning_default
};
//# sourceMappingURL=chunk-I6IULM44.js.map