import { jsxs as $, jsx as a } from "react/jsx-runtime";
import "react";
import { Grid as j } from "semantic-ui-react";
function E(t) {
  if (typeof t == "boolean") return t;
  if (typeof t != "string") return !!t;
  switch (t.trim().toLowerCase()) {
    case "true":
    case "yes":
    case "1":
    case "on":
      return !0;
    case "false":
    case "no":
    case "0":
    case "off":
      return !1;
    default:
      return !1;
  }
}
const q = (t) => {
  const {
    isDisabled: n,
    // 1. ADDED: New prop to check if we are locked
    child: r,
    selectedKey: u,
    appliedFilters: p,
    dimension1: I,
    dimension2: d,
    app: v,
    group: A,
    parent: O,
    blockName: G,
    hasParentFilters: K,
    onSetFilter: P,
    onUnSetFilter: R,
    intl: g,
    numberFontSize: b,
    labelFontSize: f,
    backgroundColor: h,
    numberColor: y,
    labelColor: x,
    unselectedBackgroundColor: C,
    unselectedNumberColor: F,
    unselectedLabelColor: S,
    formatObject: i,
    decode: o,
    getLabel: m,
    idx: N
  } = t, l = p.indexOf(r.value) > -1, k = r[u], w = () => {
    n || t.handleClick && t.handleClick();
  }, D = (e) => ({
    cursor: n ? "not-allowed" : "pointer",
    // 3. UPDATED: Change cursor
    color: o(e ? y : F),
    fontSize: b + "px",
    textAlign: "center",
    paddingTop: "3%",
    paddingLeft: "1%",
    paddingRight: "1%",
    paddingBottom: "0px",
    margin: "0px"
  }), z = (e) => ({
    cursor: n ? "not-allowed" : "pointer",
    // 3. UPDATED: Change cursor
    color: o(e ? x : S),
    fontSize: f + "px",
    textAlign: "center",
    padding: "0px",
    margin: "0px"
  }), B = (e) => ({
    border: "1px solid #EEE",
    backgroundColor: o(e ? h : C),
    opacity: n ? 0.4 : 1,
    // 4. ADDED: Dim the card to 40% if disabled
    cursor: n ? "not-allowed" : "pointer"
    // 4. ADDED: Change cursor on the whole cell
  }), L = (e) => {
    const s = {
      style: i.style === "compacted" ? "decimal" : i.style,
      notation: i.style === "compacted" ? "compact" : "standard",
      currency: i.currency,
      minimumFractionDigits: parseInt(i.minimumFractionDigits),
      maximumFractionDigits: parseInt(i.maximumFractionDigits)
    };
    return g.formatNumber(e, { ...s });
  };
  let c = !1;
  return d !== "none" && (c = r && r.children ? r.children.map((e) => E(e.value)).reduce((e, s) => e && s, !0) : !1), /* @__PURE__ */ $(
    j.Column,
    {
      className: `big filter item ${l ? "selected" : "unselected"} ${c ? `highlighted ${d}` : ""} ${n ? "disabled" : ""}`,
      onClick: w,
      style: B(l),
      children: [
        /* @__PURE__ */ a("p", { style: D(l), className: "big-number", children: L(k) }),
        c && /* @__PURE__ */ a("p", { children: /* @__PURE__ */ a("div", { className: "highlighted-pill", children: "Zoonotic" }) }),
        /* @__PURE__ */ a("p", { style: z(l), className: "big-number-label", children: m ? m(r.value) : r.label || r.value })
      ]
    },
    N
  );
};
export {
  q as BigNumberItem
};
