import { TooltipIcon as h } from "../TooltipIcon/TooltipIcon.es.es.js";
import { IconSize as b } from "../../foundation/Icon/IconSize.es.es.js";
import { merge as a } from "../../utilities/merge.es.es.js";
import t from "react";
const g = ({
  children: l,
  htmlFor: o,
  required: i = !1,
  disabled: r = !1,
  clickable: w = !1,
  tooltip: e = [],
  bold: n
}) => {
  const c = Array.isArray(e) ? e : [e];
  return /* @__PURE__ */ t.createElement("div", {
    className: a([
      "tw-inline-flex tw-items-center tw-gap-1 tw-font-sans tw-text-s tw-max-w-full tw-min-w-0 tw-flex-initial",
      r ? "tw-text-black-40 hover:tw-text-black-40 dark:tw-text-black-60 dark:hover:tw-text-black-60" : "tw-text-black-90 dark:tw-text-white"
    ]),
    "data-test-id": "input-label-container"
  }, /* @__PURE__ */ t.createElement("div", {
    className: "tw-flex-1 tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap"
  }, /* @__PURE__ */ t.createElement("label", {
    htmlFor: o,
    className: a([
      "tw-select-none",
      n && "tw-font-medium",
      r || !w ? "hover:tw-cursor-not-allowed tw-pointer-events-none" : "hover:tw-cursor-pointer hover:tw-text-black dark:hover:tw-text-white group-hover:tw-text-black dark:group-hover:tw-text-white"
    ]),
    "data-test-id": "input-label"
  }, l)), i && /* @__PURE__ */ t.createElement("span", {
    "data-test-id": "input-label-required",
    className: "tw-h-4 tw-text-m tw-text-red-60 dark:tw-text-red-50"
  }, "*"), c.map(({ triggerIcon: s, triggerStyle: d, hoverDelay: m = 100, ...p }, x) => /* @__PURE__ */ t.createElement(h, {
    tooltip: { ...p, hoverDelay: m },
    key: x,
    iconSize: b.Size16,
    triggerIcon: s,
    triggerStyle: d
  })));
};
export {
  g as InputLabel
};
//# sourceMappingURL=InputLabel.es.es.js.map
