import { jsxs as F, jsx as s } from "react/jsx-runtime";
import { mt0_5 as v, alignItemsStart as A, alignItemsCenter as H } from "./index-general.module.js";
import { classNames as l } from "./index-classNames.js";
import { ComponentContainer as R } from "./index-ComponentContainer.js";
import { IconSize as c, Icon as _ } from "./index-Icon.js";
import { Text as b } from "./index-Text.js";
import "react";
import a from "./index-TextIcon.module.scss.js";
const K = (m) => {
  const {
    testId: p,
    children: e,
    icon: f,
    iconColor: t,
    verticalAlign: i = "center",
    iconSize: o = c.large,
    iconHasCircle: d,
    iconFillColor: C,
    iconRotating: g,
    iconCircleSize: h,
    iconForceSize: x,
    translate: u,
    fontWeight: I,
    textType: S,
    textTight: z,
    textColor: r,
    replacements: y,
    className: N,
    ellipsis: T,
    maxWidth: n
  } = m;
  function W() {
    return i === "start" ? A : H;
  }
  function j() {
    if (i === "start" && o === c.small)
      return v;
  }
  return F(R, {
    testId: p,
    className: l(a.container, W()),
    style: n ? {
      maxWidth: n
    } : {},
    children: [s(_, {
      hasCircle: d,
      circleSize: h,
      forceSize: x,
      testId: "icon",
      type: o,
      spin: g,
      fillColor: C,
      color: t || "--n400",
      className: l(a.icon, j()),
      children: f
    }), s(b, {
      textTight: z,
      fontWeight: I,
      replacements: y,
      type: S,
      color: r || void 0,
      translate: u,
      className: N,
      ellipsis: T,
      children: e == "" || !e ? "&#8212;" : e
    })]
  }, e);
};
export {
  K as TextIcon
};
