import { jsxs as I, jsx as e } from "react/jsx-runtime";
import { classNames as s } from "./index-classNames.js";
import { AnimatedConditional as m } from "./index-AnimatedConditional.js";
import { StatusBadgeIcon as y } from "./index-StatusBadgeIcon.js";
import { Text as p, FontWeights as W, TextTypes as u } from "./index-Text.js";
import "react";
import { getColorsBasedOnStatus as $ } from "./index-status-badge-get-colors-based-on-status.js";
import t from "./index-StatusBadge.module.scss.js";
const G = (R) => {
  const {
    status: a,
    text: x,
    translate: h = !0,
    numberValue: g,
    icon: f,
    className: b,
    variant: S = "small",
    iconVariant: o = "normal",
    hideIcon: i = !1,
    capitalizeStatus: V = !1,
    isBlurred: r,
    fontWeight: k,
    borderRadius: T
  } = R;
  let {
    iconColor: l,
    iconName: c
  } = $(a);
  const {
    reverseColor: j,
    textColor: v,
    bgColor: N,
    borderColor: B
  } = $(a);
  f && (c = f);
  const C = g !== void 0, n = o === "reverse";
  n && (l = N);
  const d = `var(${l}-rgb)`;
  return S === "big" ? I("div", {
    className: s(b, t.statusIcon),
    children: [e("div", {
      className: t.gradient,
      style: {
        boxShadow: `0px -48px 56px rgba(${d}, 0.15), 
                        0px -24px 48px rgba(${d}, 0.18),
                        0px -16px 24px rgba(${d}, 0.2)`
      }
    }), e("div", {
      className: t.mask
    }), e(m, {
      condition: !i,
      animation: "none",
      children: e(y, {
        variant: "big",
        status: a,
        hasIconReverse: n,
        iconVariant: o,
        iconName: c
      })
    }), e("div", {
      className: s(t.mask2),
      children: e(p, {
        isBlurred: r,
        type: u.textIntro,
        fontWeight: W.bold,
        color: n ? j : l,
        translate: h,
        children: x
      })
    })]
  }) : I("div", {
    className: s(b, r ? t.isBlurred : "", i ? t.statusBadgeNoIcon : t.statusBadge, o === "none" ? t.statusBadgeNoneIcon : void 0),
    style: {
      backgroundColor: `var(${N})`,
      border: B ? `1px solid var(${B})` : "",
      borderRadius: T
    },
    children: [e(m, {
      condition: !i,
      animation: "none",
      children: e(y, {
        variant: "small",
        status: a,
        hasIconReverse: n,
        iconVariant: o,
        iconName: c
      })
    }), e(p, {
      type: u.textCaption,
      isBlurred: r,
      fontWeight: k,
      capitalize: V,
      color: v,
      textWrap: "wrap",
      translate: h,
      children: x
    }), e(m, {
      condition: C,
      children: e("div", {
        className: s(C ? t.ml1 : ""),
        children: e(p, {
          isBlurred: r,
          fontWeight: W.bold,
          translate: !1,
          color: v,
          type: u.textCaption,
          children: g
        })
      })
    })]
  });
};
export {
  G as StatusBadge
};
