import { X as i, F as r, G as l, Y as s, ad as d, cO as u } from "./603b75d9.js";
import { C as c } from "./4963ac97.js";
import { ColumnValueTooltip as p } from "./62f393ec.js";
import "react";
import "react-dom";
import "./ffcffc16.js";
import "./26dac75c.js";
const n = i(u)`
  display: inline-flex;
  align-items: center;
  width: 100%;
  overflow-x: auto;
  overflow-x: overlay;
  color: #ffd400;
  display: block;
  .ant-rate-star > div {
    height: 18px;
    width: 18px;
  }
  .ant-rate-star-half .ant-rate-star-first,
  .ant-rate-star-full .ant-rate-star-second {
    color: #ffd400;
    position: absolute;
  }
  .ant-rate-star-first {
    width: 100%;
  }
  .ant-rate-star-first,
  .ant-rate-star-second {
    display: inline-flex;
    align-items: center;
    color: #d7d9e0;
    max-height: 20px;
    bottom: 0;
  }
  svg {
    height: 18px;
    width: 18px;
  }
`, m = i.div`
  background: transparent !important;
  padding: 0 8px;
`, f = {
  text: d
}, o = (t) => t.text, v = function() {
  return new c(f, (t, e) => {
    const a = t.changeValue ?? o(t);
    return /* @__PURE__ */ r(n, {
      disabled: !0,
      value: a
    });
  }, (t) => t.text.value, o).setEditViewFn((t) => /* @__PURE__ */ r(m, {
    onBlur: (e) => {
      var a;
      (a = e.currentTarget) != null && a.contains(e.relatedTarget) || t.onChangeEnd();
    },
    children: /* @__PURE__ */ r(n, {
      autoFocus: !0,
      isEdit: !0,
      defaultValue: t.value,
      onChange: (e) => t.onChange(e),
      onKeyDown: (e) => {
        e.key === "Enter" && t.onChangeEnd();
      }
    })
  })).setPropertyViewFn((t) => /* @__PURE__ */ r(l, {
    children: t.text.propertyView({
      label: s("table.columnValue"),
      tooltip: p
    })
  })).build();
}();
export {
  v as RatingComp
};
