"use strict";
var import_Glossary = require("../Glossary.css");
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const jsxRuntime = require("react/jsx-runtime");
const kit_Theme_UI = require("./Theme/UI.cjs");
require("./Theme/themeUtils.cjs");
require("./Theme/themes.cjs");
const kit_Typography = require("../Typography-g8d4JFSj.cjs");
const kit_internal_functions = require("./internal/functions.cjs");
const base = "Glossary_base_1e14a";
const row = "Glossary_row_1e14a";
const label = "Glossary_label_1e14a";
const valueList = "Glossary_valueList_1e14a";
const value = "Glossary_value_1e14a";
const componentWrapper = "Glossary_componentWrapper_1e14a";
const css = {
  base,
  row,
  label,
  valueList,
  value,
  componentWrapper,
  "align-left": "Glossary_align-left_1e14a",
  "align-right": "Glossary_align-right_1e14a"
};
const Row = ({ label: label2, value: value2 }) => {
  const valueArray = kit_internal_functions.ensureArray(value2);
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: css.row, children: [
    /* @__PURE__ */ jsxRuntime.jsx("dt", { className: css.label, children: /* @__PURE__ */ jsxRuntime.jsx(kit_Typography.Label, { size: "default", children: label2 }) }),
    /* @__PURE__ */ jsxRuntime.jsx("div", { className: css.valueList, children: valueArray.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsx("dd", { className: css.value, children: kit_internal_functions.isString(item) ? item : /* @__PURE__ */ jsxRuntime.jsx("div", { className: css.componentWrapper, children: item }) }, idx)) })
  ] });
};
const Glossary = ({ content = [], alignValues = "left" }) => {
  const {
    themeSettings: { className: themeClass }
  } = kit_Theme_UI.useTheme();
  const classes = [css.base, themeClass, css[`align-${alignValues}`]];
  return /* @__PURE__ */ jsxRuntime.jsx("dl", { className: classes.join(" "), children: content.map((row2, idx) => /* @__PURE__ */ jsxRuntime.jsx(Row, { label: row2.label, value: row2.value }, row2.label + idx)) });
};
exports.Row = Row;
exports.default = Glossary;
