import { a0 as a, ba as s, gt as r, bd as c, bB as d, gE as u, co as b, b9 as C, V as t, gD as m, P as g, bh as n, bk as V } from "./684d2f28.js";
import { C as y } from "./9869e60a.js";
import "react";
import "react-dom";
import "./b1144c16.js";
const k = a("table.columnValueTooltip"), h = {
  text: s,
  onClick: r,
  disabled: c,
  style: d(u)
}, w = b`
  &,
  &:hover {
    cursor: not-allowed;
    color: rgba(0, 0, 0, 0.25) !important;
  }
`, x = C.a`
  ${(e) => e.$disabled && w};
`, v = (e) => /* @__PURE__ */ t(x, {
  $disabled: e.disabled,
  onClick: () => {
    !e.disabled && e.onClick && e.onClick();
  },
  children: e.label
}), i = (e) => e.text, S = function() {
  return new y(h, (e, o) => {
    const l = e.changeValue ?? i(e);
    return /* @__PURE__ */ t(v, {
      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: (o) => {
      const l = o.target.value;
      e.onChange(l);
    },
    onBlur: e.onChangeEnd,
    onPressEnter: e.onChangeEnd
  })).setPropertyViewFn((e) => /* @__PURE__ */ g(n, {
    children: [e.text.propertyView({
      label: a("table.columnValue"),
      tooltip: k
    }), V(e), e.onClick.propertyView({
      label: a("table.action"),
      placement: "table"
    })]
  })).setStylePropertyViewFn((e) => /* @__PURE__ */ t(n, {
    children: e.style.getPropertyView()
  })).build();
}();
export {
  v as ColumnLink,
  k as ColumnValueTooltip,
  S as LinkComp
};
