import { jsxs as a, jsx as e } from "react/jsx-runtime";
import { alignItemsCenter as d, dFlex as p, mb1 as j } from "./index-general.module.js";
import { classNames as t } from "./index-classNames.js";
import { AnimatedConditional as k } from "./index-AnimatedConditional.js";
import { ComponentContainer as L } from "./index-ComponentContainer.js";
import { Icon as S } from "./index-Icon.js";
import { IconNames as W } from "./index-IconNames.js";
import { TextTypes as w, Text as r, FontWeights as h } from "./index-Text.js";
import "react";
import c from "./index-ListItem.module.scss.js";
const M = (C) => {
  const {
    index: n,
    type: o = "none",
    selected: f,
    children: s,
    iconName: x,
    iconBackgroundColor: u = "n100",
    iconColor: i = "",
    iconHasCircle: g = !1,
    textType: l = w.textCaption,
    isText: I = !1,
    replacements: F,
    classNameListItem: m,
    iconElement: N,
    isComingSoon: y = !1
  } = C, T = (v) => String.fromCharCode(97 + v), b = () => {
    switch (o) {
      case "alphabetical":
        return T(n);
      case "numerical":
        return e(r, {
          type: l,
          fontWeight: h.medium,
          color: i,
          children: `${n + 1}.`
        });
      case "icon":
        return e(S, {
          color: i,
          hasCircle: g,
          children: x ?? W.check
        });
      case "object":
        return N;
      case "none":
      default:
        return null;
    }
  };
  return a(L, {
    children: [y && e("div", {
      className: t(c.listItemCommingSoon),
      children: e(r, {
        fontWeight: h.bold,
        color: "#FFFFFF",
        children: "Comming soon"
      })
    }), a("div", {
      className: t(p, d, j, m && m),
      children: [e(k, {
        condition: o !== "none",
        children: e("div", {
          "data-testid": "iconList",
          className: t(c.listItemIcon, f ? c.selected : ""),
          style: {
            backgroundColor: u,
            color: i,
            width: o === "icon" ? "24px" : "32px",
            height: o === "icon" ? "24px" : "32px"
          },
          children: b()
        })
      }), e("div", {
        className: t(p, d),
        children: I ? e(r, {
          type: l,
          replacements: F,
          children: s
        }) : s
      })]
    }, n)]
  });
};
export {
  M as ListItem
};
