import {
  ThemeProvider
} from "./chunk-BVNXAZ4W.js";
import {
  Heading
} from "./chunk-HK224ADT.js";
import {
  Grid
} from "./chunk-EGEQY3KT.js";
import {
  Badge
} from "./chunk-EWD4AO5N.js";
import {
  Box
} from "./chunk-4Y5BEXVN.js";
import {
  Typo
} from "./chunk-52MVZ6AN.js";
import {
  Flex
} from "./chunk-25HMMI7R.js";
import {
  Button
} from "./chunk-U7JPP7WJ.js";
import {
  AspectRatio
} from "./chunk-EAXUQEO5.js";
import {
  __spreadProps,
  __spreadValues
} from "./chunk-N552FDTV.js";

// src/molecules/learning-post.tsx
import { jsx, jsxs } from "react/jsx-runtime";
function LearningPost(props) {
  const {
    defaultThemeProps,
    html,
    tags,
    title,
    metaDescription,
    imageComp,
    onPageBack,
    children
  } = props;
  return /* @__PURE__ */ jsx(
    ThemeProvider,
    __spreadProps(__spreadValues({}, defaultThemeProps), {
      accentColor: "iris",
      scaling: "110%",
      style: {},
      children: html ? /* @__PURE__ */ jsxs(
        Grid,
        {
          columns: { initial: "1", md: "130px 1fr 130px" },
          gap: { initial: "2", md: "5" },
          height: "100%",
          justify: "center",
          pb: "160px",
          position: "relative",
          px: "4",
          width: "100%",
          children: [
            /* @__PURE__ */ jsx("div", {}),
            /* @__PURE__ */ jsxs(
              Flex,
              {
                align: "center",
                direction: "column",
                maxWidth: "880px",
                mt: { initial: "3", md: "8" },
                overflow: "hidden",
                width: "100%",
                children: [
                  /* @__PURE__ */ jsxs(Grid, { align: "start", columns: { initial: "1", sm: "2" }, gap: "2", children: [
                    /* @__PURE__ */ jsxs(
                      Grid,
                      {
                        gap: "3",
                        mb: { initial: "4", sm: "0" },
                        style: { alignSelf: "flex-start" },
                        children: [
                          /* @__PURE__ */ jsx(
                            Heading,
                            {
                              style: {
                                fontSize: "2.4rem",
                                lineHeight: 1.25,
                                wordBreak: "keep-all"
                              },
                              variant: "heading1",
                              children: title
                            }
                          ),
                          /* @__PURE__ */ jsx(Typo, { children: metaDescription }),
                          /* @__PURE__ */ jsx(Flex, { gap: "1", wrap: "wrap", children: tags == null ? void 0 : tags.map((el) => {
                            var _a;
                            if ((_a = el.name) == null ? void 0 : _a.startsWith("filter"))
                              return;
                            return /* @__PURE__ */ jsx(Badge, { size: "large", variant: "solid", children: el.name }, el.id);
                          }) })
                        ]
                      }
                    ),
                    /* @__PURE__ */ jsx(
                      AspectRatio,
                      {
                        ratio: 5 / 3,
                        style: {
                          overflow: "hidden",
                          borderRadius: "var(--radius-4)",
                          objectFit: "cover"
                        },
                        children: imageComp
                      }
                    )
                  ] }),
                  /* @__PURE__ */ jsx(Box, { mt: "5", width: "100%", children: /* @__PURE__ */ jsx(
                    "div",
                    {
                      className: "gh-content",
                      dangerouslySetInnerHTML: { __html: html }
                    }
                  ) })
                ]
              }
            ),
            children
          ]
        }
      ) : /* @__PURE__ */ jsxs(
        Flex,
        {
          align: "center",
          direction: "column",
          gap: "6",
          height: "100%",
          justify: "center",
          width: "100%",
          children: [
            /* @__PURE__ */ jsx(Heading, { variant: "heading1", children: "\uCF58\uD150\uCE20\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." }),
            /* @__PURE__ */ jsx(
              Heading,
              {
                align: "center",
                color: "gray",
                variant: "heading4",
                weight: "regular",
                children: `\uC694\uCCAD\uD558\uC2E0 \uCF58\uD150\uCE20\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
        \uC7A0\uC2DC \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694.`
              }
            ),
            /* @__PURE__ */ jsx(Button, { onClick: onPageBack, size: "large", children: "\uB4A4\uB85C\uAC00\uAE30" })
          ]
        }
      )
    })
  );
}

export {
  LearningPost
};
//# sourceMappingURL=chunk-ZPWMX6MX.js.map