import { jsxs as d, jsx as t } from "react/jsx-runtime";
import { mt1 as f, mb1 as L } from "./index-general.module.js";
import { classNames as r } from "./index-classNames.js";
import { ComponentContainer as B } from "./index-ComponentContainer.js";
import { ListShowMore as v } from "./index-ListShowMore.js";
import { ListItem as H } from "./index-ListItem.js";
import { TextTypes as i, Text as m, FontWeights as x } from "./index-Text.js";
import "react";
import N from "./index-List.module.scss.js";
const q = (a) => {
  const {
    listElements: h = [],
    headerNote: s,
    title: n,
    type: y,
    footerNote: c,
    flexBasis: C,
    replacements: l,
    limit: p,
    numberOfColumns: g,
    columnsGap: u,
    isText: T = !1,
    textType: I = i.textCaption,
    classNameListItem: b
  } = a;
  return d(B, {
    className: C ? N.flexBasis : "",
    children: [typeof s == "string" ? t(m, {
      className: r(f),
      testId: "headerNote",
      color: "var(--n500)",
      type: i.textHelp,
      fontWeight: x.bold,
      children: s
    }) : s, typeof n == "string" ? t(m, {
      className: r(L),
      testId: "title",
      type: i.text,
      fontWeight: x.bold,
      children: n
    }) : n, d("div", {
      style: {
        columns: g,
        gap: u
      },
      className: r(N.list),
      children: [h.filter((e, o) => p ? o < p : !0).map((e, o) => t(H, {
        selected: e.selected,
        type: y,
        index: o,
        iconColor: e.iconColor ?? "--brand-color",
        iconHasCircle: e.iconHasCircle,
        iconName: e.iconName,
        iconElement: e.iconElement,
        iconBackgroundColor: e.iconBackgroundColor,
        isText: T,
        textType: I,
        replacements: l,
        classNameListItem: b,
        isComingSoon: e.isComingSoon,
        children: e.content
      }, o)), t(v, {
        ...a
      })]
    }), typeof c == "string" ? t("i", {
      children: t(m, {
        className: r(f),
        testId: "footerNote",
        color: "var(--n500)",
        type: i.textCaption,
        replacements: l,
        children: c
      })
    }) : c]
  });
};
export {
  q as List
};
