import { Y as a, S as s, g1 as r, bI as c, Z as d, gB as u, av as C, X as b, F as t, gA as m, a6 as g, G as o, bJ as y } from "./603b75d9.js";
import { C as V } from "./4963ac97.js";
import "react";
import "react-dom";
import "./ffcffc16.js";
const k = a("table.columnValueTooltip"), h = {
  text: s,
  onClick: r,
  disabled: c,
  style: d(u)
}, w = C`
  &,
  &:hover {
    cursor: not-allowed;
    color: rgba(0, 0, 0, 0.25) !important;
  }
`, v = b.a`
  ${(e) => e.$disabled && w};
`, x = (e) => /* @__PURE__ */ t(v, {
  $disabled: e.disabled,
  onClick: () => {
    !e.disabled && e.onClick && e.onClick();
  },
  children: e.label
}), i = (e) => e.text, f = function() {
  return new V(h, (e, n) => {
    const l = e.changeValue ?? i(e);
    return /* @__PURE__ */ t(x, {
      disabled: e.disabled,
      label: l,
      onClick: e.onClick
    });
  }, (e) => e.text.value, i).setEditViewFn((e) => /* @__PURE__ */ t(m, {
    defaultValue: e.value,
    autoFocus: !0,
    variant: "borderless",
    onChange: (n) => {
      const l = n.target.value;
      e.onChange(l);
    },
    onBlur: e.onChangeEnd,
    onPressEnter: e.onChangeEnd
  })).setPropertyViewFn((e) => /* @__PURE__ */ g(o, {
    children: [e.text.propertyView({
      label: a("table.columnValue"),
      tooltip: k
    }), y(e), e.onClick.propertyView({
      label: a("table.action"),
      placement: "table"
    })]
  })).setStylePropertyViewFn((e) => /* @__PURE__ */ t(o, {
    children: e.style.getPropertyView()
  })).build();
}();
export {
  x as ColumnLink,
  k as ColumnValueTooltip,
  f as LinkComp
};
