@universe-platform/ui 0.1.0-beta.33 → 0.1.0-beta.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -8263,12 +8263,13 @@ function TableBlock(props) {
8263
8263
  }
8264
8264
 
8265
8265
  // src/components/PlacementBlock/PlacementBlock.tsx
8266
- import { useState as useState15, useEffect as useEffect13, useRef as useRef13, useCallback as useCallback13, useMemo as useMemo8 } from "react";
8266
+ import { useState as useState15, useEffect as useEffect13, useRef as useRef13, useCallback as useCallback13, useMemo as useMemo9 } from "react";
8267
8267
  import { AgGridReact } from "ag-grid-react";
8268
8268
  import {
8269
8269
  ModuleRegistry,
8270
8270
  AllCommunityModule
8271
8271
  } from "ag-grid-community";
8272
+ import { Filter as Filter2 } from "lucide-react";
8272
8273
 
8273
8274
  // src/components/PlacementBlock/PlacementSettings.tsx
8274
8275
  import React14 from "react";
@@ -8663,8 +8664,107 @@ var PlacementSettings = ({ config, onChange, tables }) => {
8663
8664
  ] });
8664
8665
  };
8665
8666
 
8666
- // src/components/PlacementBlock/PlacementBlock.tsx
8667
+ // src/components/PlacementBlock/PlacementRelationButtons.tsx
8668
+ import { useMemo as useMemo8 } from "react";
8667
8669
  import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
8670
+ var GROUP_COLORS = [
8671
+ { title: "bg-blue-600 text-white", active: "bg-blue-600 border-blue-600 text-white hover:bg-blue-700", count: "text-blue-700" },
8672
+ { title: "bg-violet-600 text-white", active: "bg-violet-600 border-violet-600 text-white hover:bg-violet-700", count: "text-violet-700" },
8673
+ { title: "bg-emerald-600 text-white", active: "bg-emerald-600 border-emerald-600 text-white hover:bg-emerald-700", count: "text-emerald-700" },
8674
+ { title: "bg-amber-500 text-white", active: "bg-amber-500 border-amber-500 text-white hover:bg-amber-600", count: "text-amber-700" },
8675
+ { title: "bg-rose-600 text-white", active: "bg-rose-600 border-rose-600 text-white hover:bg-rose-700", count: "text-rose-700" }
8676
+ ];
8677
+ var isRawObjectId2 = (s) => /^[0-9a-fA-F]{24}$/.test(s);
8678
+ function rowMatchesRelationFilter(row, colName, id) {
8679
+ var _a;
8680
+ return normalizeRelationValue((_a = row.data) == null ? void 0 : _a[colName]).includes(id);
8681
+ }
8682
+ var PlacementRelationButtons = ({
8683
+ columnNames,
8684
+ rows,
8685
+ filters,
8686
+ onFilterChange,
8687
+ relationOptions,
8688
+ className = ""
8689
+ }) => {
8690
+ const groups = useMemo8(() => {
8691
+ const activeEntries = Object.entries(filters).filter(([, v]) => v !== void 0 && v !== null && v !== "");
8692
+ return (columnNames || []).map((colName) => {
8693
+ var _a, _b, _c, _d;
8694
+ const otherEntries = activeEntries.filter(([name]) => name !== colName);
8695
+ const base = otherEntries.length === 0 ? rows : rows.filter((r) => otherEntries.every(([name, val]) => rowMatchesRelationFilter(r, name, val)));
8696
+ const counts = /* @__PURE__ */ new Map();
8697
+ for (const r of base) {
8698
+ new Set(normalizeRelationValue((_a = r.data) == null ? void 0 : _a[colName])).forEach((id) => counts.set(id, (counts.get(id) || 0) + 1));
8699
+ }
8700
+ const activeId = filters[colName] ? String(filters[colName]) : null;
8701
+ const labelById = /* @__PURE__ */ new Map();
8702
+ for (const opt of relationOptions[colName] || []) {
8703
+ const id = String((_c = (_b = opt == null ? void 0 : opt.id) != null ? _b : opt == null ? void 0 : opt._id) != null ? _c : "");
8704
+ const label = String((_d = opt == null ? void 0 : opt.label) != null ? _d : "").trim();
8705
+ if (id && label && !isRawObjectId2(label)) labelById.set(id, label);
8706
+ }
8707
+ const options = [];
8708
+ const ids = /* @__PURE__ */ new Set([...counts.keys(), ...activeId ? [activeId] : []]);
8709
+ ids.forEach((id) => {
8710
+ const label = labelById.get(id);
8711
+ if (!label) return;
8712
+ options.push({ id, label, count: counts.get(id) || 0 });
8713
+ });
8714
+ options.sort((a, b) => a.label.localeCompare(b.label, "he"));
8715
+ return { key: colName, title: colName, options, activeId };
8716
+ });
8717
+ }, [columnNames, rows, filters, relationOptions]);
8718
+ if (!columnNames || columnNames.length === 0) return null;
8719
+ return /* @__PURE__ */ jsx18(
8720
+ "div",
8721
+ {
8722
+ className: `border-t border-slate-100 pt-3 ${className}`,
8723
+ "data-testid": "placement-relation-buttons",
8724
+ children: groups.every((g) => g.options.length === 0) ? /* @__PURE__ */ jsx18("div", { className: "py-2 text-xs text-slate-400", children: "\u05D0\u05D9\u05DF \u05E2\u05E8\u05DB\u05D9\u05DD \u05DC\u05D4\u05E6\u05D2\u05D4 \u05D1\u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05E9\u05E0\u05D1\u05D7\u05E8\u05D5" }) : (
8725
+ // כל עמודה במתחם נפרד: בשורה הראשונה הכותרת (תגית צבעונית), ומהשורה שמתחת הכפתורים
8726
+ /* @__PURE__ */ jsx18("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-2.5", children: groups.map((group, gi) => {
8727
+ if (group.options.length === 0) return null;
8728
+ const color = GROUP_COLORS[gi % GROUP_COLORS.length];
8729
+ return /* @__PURE__ */ jsxs15("div", { className: "bg-white border border-slate-200 rounded-xl p-3 flex flex-col gap-2.5 shadow-2xs", children: [
8730
+ /* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between gap-2 pb-2 border-b border-slate-100", children: [
8731
+ /* @__PURE__ */ jsx18("span", { className: `px-2.5 py-0.5 rounded-md text-xs font-bold truncate ${color.title}`, title: group.title, children: group.title }),
8732
+ group.activeId && /* @__PURE__ */ jsx18(
8733
+ "button",
8734
+ {
8735
+ type: "button",
8736
+ onClick: () => onFilterChange(group.key, ""),
8737
+ className: "text-[11px] font-semibold text-rose-600 hover:text-rose-700 hover:underline cursor-pointer shrink-0",
8738
+ children: "\u05E0\u05E7\u05D4 \u05E1\u05D9\u05E0\u05D5\u05DF"
8739
+ }
8740
+ )
8741
+ ] }),
8742
+ /* @__PURE__ */ jsx18("div", { className: "flex flex-wrap items-end gap-x-2 gap-y-2.5", children: group.options.map((opt) => {
8743
+ const active = group.activeId === opt.id;
8744
+ return /* @__PURE__ */ jsxs15("div", { className: "flex flex-col items-center gap-0.5", children: [
8745
+ /* @__PURE__ */ jsx18("span", { className: `text-[11px] font-bold leading-none ${active ? color.count : "text-slate-500"}`, children: opt.count }),
8746
+ /* @__PURE__ */ jsx18(
8747
+ "button",
8748
+ {
8749
+ type: "button",
8750
+ onClick: () => onFilterChange(group.key, active ? "" : opt.id),
8751
+ title: active ? "\u05DC\u05D7\u05E5 \u05DC\u05D1\u05D9\u05D8\u05D5\u05DC \u05D4\u05E1\u05D9\u05E0\u05D5\u05DF" : `\u05E1\u05E0\u05DF \u05DC\u05E4\u05D9: ${opt.label}`,
8752
+ "aria-pressed": active,
8753
+ className: `px-3 h-8 rounded-md border text-xs font-semibold whitespace-nowrap shadow-2xs transition-colors cursor-pointer ${active ? color.active : "bg-white border-slate-300 text-slate-700 hover:bg-slate-50 hover:border-slate-400"}`,
8754
+ children: opt.label
8755
+ }
8756
+ )
8757
+ ] }, opt.id);
8758
+ }) })
8759
+ ] }, group.key);
8760
+ }) })
8761
+ )
8762
+ }
8763
+ );
8764
+ };
8765
+
8766
+ // src/components/PlacementBlock/PlacementBlock.tsx
8767
+ import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
8668
8768
  ModuleRegistry.registerModules([AllCommunityModule]);
8669
8769
  var FETCH_LIMIT = 1e3;
8670
8770
  function normalizeRows(records) {
@@ -8701,7 +8801,7 @@ var ColorDotRenderer = (props) => {
8701
8801
  const { statuses, defaultStatusId } = props;
8702
8802
  const status = statuses.find((c) => c.id === item.statusId) || statuses.find((c) => c.id === defaultStatusId) || statuses[0];
8703
8803
  if (!status) return null;
8704
- return /* @__PURE__ */ jsx18("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ jsx18(
8804
+ return /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ jsx19(
8705
8805
  "button",
8706
8806
  {
8707
8807
  type: "button",
@@ -8715,7 +8815,7 @@ var ColorDotRenderer = (props) => {
8715
8815
  };
8716
8816
  var CheckCellRenderer = (props) => {
8717
8817
  if (!props.data) return null;
8718
- return /* @__PURE__ */ jsx18("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ jsx18(
8818
+ return /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ jsx19(
8719
8819
  "input",
8720
8820
  {
8721
8821
  type: "checkbox",
@@ -8726,7 +8826,7 @@ var CheckCellRenderer = (props) => {
8726
8826
  }
8727
8827
  ) });
8728
8828
  };
8729
- var CheckHeader = (props) => /* @__PURE__ */ jsx18("div", { className: "flex items-center justify-center w-full", children: /* @__PURE__ */ jsx18(
8829
+ var CheckHeader = (props) => /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-center w-full", children: /* @__PURE__ */ jsx19(
8730
8830
  "input",
8731
8831
  {
8732
8832
  type: "checkbox",
@@ -8739,23 +8839,48 @@ var CheckHeader = (props) => /* @__PURE__ */ jsx18("div", { className: "flex ite
8739
8839
  "aria-label": "\u05D1\u05D7\u05D9\u05E8\u05EA \u05DB\u05DC \u05D4\u05DE\u05D5\u05E2\u05DE\u05D3\u05D9\u05DD"
8740
8840
  }
8741
8841
  ) });
8842
+ var RelationFilterHeader = (props) => {
8843
+ const btnRef = useRef13(null);
8844
+ return /* @__PURE__ */ jsxs16("div", { className: "flex flex-col items-center justify-center w-full min-w-0 leading-tight select-none", title: props.displayName, children: [
8845
+ /* @__PURE__ */ jsx19(
8846
+ "button",
8847
+ {
8848
+ ref: btnRef,
8849
+ type: "button",
8850
+ onMouseDown: (e) => e.stopPropagation(),
8851
+ onClick: (e) => {
8852
+ var _a;
8853
+ e.stopPropagation();
8854
+ e.preventDefault();
8855
+ const rect = (_a = btnRef.current) == null ? void 0 : _a.getBoundingClientRect();
8856
+ if (rect) props.onOpen(props.colName, rect);
8857
+ },
8858
+ className: `p-0.5 rounded transition-colors cursor-pointer mb-0.5 shrink-0 ${props.active ? "text-blue-600 bg-blue-100 hover:bg-blue-200" : "text-slate-400 hover:text-slate-600 hover:bg-slate-200/60"}`,
8859
+ title: props.active ? "\u05E1\u05D9\u05E0\u05D5\u05DF \u05E4\u05E2\u05D9\u05DC - \u05DC\u05D7\u05E5 \u05DC\u05E9\u05D9\u05E0\u05D5\u05D9" : "\u05E1\u05D9\u05E0\u05D5\u05DF \u05DC\u05E4\u05D9 \u05E2\u05DE\u05D5\u05D3\u05D4",
8860
+ "aria-label": `\u05E1\u05D9\u05E0\u05D5\u05DF \u05DC\u05E4\u05D9 ${props.displayName}`,
8861
+ children: /* @__PURE__ */ jsx19(Filter2, { className: "w-3 h-3" })
8862
+ }
8863
+ ),
8864
+ /* @__PURE__ */ jsx19("span", { className: "truncate w-full text-center", children: props.displayName })
8865
+ ] });
8866
+ };
8742
8867
  var PlacementBlock = (props) => {
8743
8868
  var _a, _b;
8744
8869
  const { executeAction, fetchSourceData, fetchTargetData, updateAssignment, className = "" } = props;
8745
- const config = useMemo8(() => {
8870
+ const config = useMemo9(() => {
8746
8871
  var _a2, _b2, _c;
8747
8872
  const raw = (_a2 = props.config) != null ? _a2 : props.settings;
8748
8873
  if (!raw) return void 0;
8749
8874
  return ((_b2 = raw.config) == null ? void 0 : _b2.sourceTableId) || ((_c = raw.config) == null ? void 0 : _c.targetTableId) ? raw.config : raw;
8750
8875
  }, [props.config, props.settings]);
8751
- const statuses = useMemo8(
8876
+ const statuses = useMemo9(
8752
8877
  () => {
8753
8878
  var _a2;
8754
8879
  return ((_a2 = config == null ? void 0 : config.statusColors) == null ? void 0 : _a2.length) ? config.statusColors : DEFAULT_PLACEMENT_STATUS_COLORS;
8755
8880
  },
8756
8881
  [config == null ? void 0 : config.statusColors]
8757
8882
  );
8758
- const defaultStatusId = useMemo8(
8883
+ const defaultStatusId = useMemo9(
8759
8884
  () => resolveDefaultStatusId(statuses, config == null ? void 0 : config.defaultReturnStatusId),
8760
8885
  [statuses, config == null ? void 0 : config.defaultReturnStatusId]
8761
8886
  );
@@ -8769,6 +8894,8 @@ var PlacementBlock = (props) => {
8769
8894
  legacyRef.current = { fetchSourceData, fetchTargetData, updateAssignment };
8770
8895
  const [sourceRows, setSourceRows] = useState15([]);
8771
8896
  const [sourceColumns, setSourceColumns] = useState15([]);
8897
+ const [sourceRelOptions, setSourceRelOptions] = useState15({});
8898
+ const [sourceRelFilters, setSourceRelFilters] = useState15({});
8772
8899
  const [targetRows, setTargetRows] = useState15([]);
8773
8900
  const [targetColumns, setTargetColumns] = useState15([]);
8774
8901
  const [targetRelOptions, setTargetRelOptions] = useState15({});
@@ -8782,6 +8909,8 @@ var PlacementBlock = (props) => {
8782
8909
  const [isLoading, setIsLoading] = useState15(false);
8783
8910
  const [loadError, setLoadError] = useState15(null);
8784
8911
  const [saveError, setSaveError] = useState15(null);
8912
+ const [colFilters, setColFilters] = useState15({ source: {}, cand: {} });
8913
+ const [filterPopover, setFilterPopover] = useState15(null);
8785
8914
  const [targetFilters, setTargetFilters] = useState15({});
8786
8915
  const loadTable = useCallback13(async (tableId, kind) => {
8787
8916
  const exec = executeActionRef.current;
@@ -8810,6 +8939,7 @@ var PlacementBlock = (props) => {
8810
8939
  if (cancelled) return;
8811
8940
  setSourceRows(src.rows);
8812
8941
  setSourceColumns(src.columns);
8942
+ setSourceRelOptions(src.relationOptions || {});
8813
8943
  setTargetRows(tgt.rows);
8814
8944
  setTargetColumns(tgt.columns);
8815
8945
  setTargetRelOptions(tgt.relationOptions || {});
@@ -8843,7 +8973,50 @@ var PlacementBlock = (props) => {
8843
8973
  }
8844
8974
  return text2;
8845
8975
  }, [targetRelOptions, targetRows, sourceRows]);
8846
- const filterColumns = useMemo8(() => {
8976
+ const relationLabelMaps = useMemo9(() => {
8977
+ const maps = {};
8978
+ Object.entries(sourceRelOptions || {}).forEach(([colName, opts]) => {
8979
+ const m = /* @__PURE__ */ new Map();
8980
+ (opts || []).forEach((o) => {
8981
+ var _a2, _b2, _c;
8982
+ const label = cellText((_b2 = (_a2 = o == null ? void 0 : o.label) != null ? _a2 : o == null ? void 0 : o.title) != null ? _b2 : o == null ? void 0 : o.name);
8983
+ if (label) m.set(String((_c = o.id) != null ? _c : o._id), label);
8984
+ });
8985
+ maps[colName] = m;
8986
+ });
8987
+ return maps;
8988
+ }, [sourceRelOptions]);
8989
+ const relationLabelsOf = useCallback13((row, colName) => {
8990
+ var _a2;
8991
+ const map = relationLabelMaps[colName];
8992
+ const ids = normalizeRelationValue((_a2 = row.data) == null ? void 0 : _a2[colName]);
8993
+ const labels = map ? ids.map((id) => map.get(String(id))).filter((l) => !!l) : [];
8994
+ if (labels.length) return labels;
8995
+ const txt = cellText(readColumnValue(row.data, colName));
8996
+ return txt && !/^[a-fA-F0-9]{24}$/.test(txt) ? txt.split(", ").filter(Boolean) : [];
8997
+ }, [relationLabelMaps]);
8998
+ const rowPassesColFilters = useCallback13((row, filters) => {
8999
+ return Object.entries(filters).every(([colName, f]) => {
9000
+ if (!f) return true;
9001
+ const labels = relationLabelsOf(row, colName);
9002
+ if (Array.isArray(f)) return f.length === 0 || labels.some((l) => f.includes(l));
9003
+ if (f.operator === "notIn") return !labels.some((l) => f.values.includes(l));
9004
+ return true;
9005
+ });
9006
+ }, [relationLabelsOf]);
9007
+ const setColFilter = useCallback13((grid, colName, payload) => {
9008
+ setColFilters((prev) => {
9009
+ const next = __spreadValues({}, prev[grid]);
9010
+ if (payload === void 0) delete next[colName];
9011
+ else next[colName] = payload;
9012
+ return __spreadProps(__spreadValues({}, prev), { [grid]: next });
9013
+ });
9014
+ }, []);
9015
+ const openColFilter = useCallback13((grid, colName, rect) => {
9016
+ setFilterPopover((cur) => cur && cur.grid === grid && cur.colName === colName ? null : { grid, colName, rect });
9017
+ }, []);
9018
+ const closeColFilter = useCallback13(() => setFilterPopover(null), []);
9019
+ const filterColumns = useMemo9(() => {
8847
9020
  const definedFilters = (config == null ? void 0 : config.filterFields) || [];
8848
9021
  const legacyFilters = [config == null ? void 0 : config.targetFilterField1Id, config == null ? void 0 : config.targetFilterField2Id].filter(Boolean);
8849
9022
  const fieldsToUse = definedFilters.length > 0 ? definedFilters : legacyFilters;
@@ -8869,7 +9042,7 @@ var PlacementBlock = (props) => {
8869
9042
  return targetColumns.filter((c) => isUserColumn(c) && c.name !== assignmentField && !["id", "_id", "id_", "statusId"].includes(c.name)).slice(0, 3);
8870
9043
  }, [targetColumns, assignmentField, config]);
8871
9044
  const rawSelectorField = (config == null ? void 0 : config.targetSelectorFieldId) || (config == null ? void 0 : config.targetDisplayFieldId) || ((_a = filterColumns[0]) == null ? void 0 : _a.name) || "";
8872
- const selectorField = useMemo8(() => {
9045
+ const selectorField = useMemo9(() => {
8873
9046
  const { relationColumn } = parseColumnRef(rawSelectorField);
8874
9047
  if (relationColumn && !targetColumns.some((c) => c.name === rawSelectorField) && targetColumns.some((c) => {
8875
9048
  var _a2;
@@ -8879,7 +9052,7 @@ var PlacementBlock = (props) => {
8879
9052
  }
8880
9053
  return rawSelectorField;
8881
9054
  }, [rawSelectorField, targetColumns]);
8882
- const filteredTargetRows = useMemo8(() => {
9055
+ const filteredTargetRows = useMemo9(() => {
8883
9056
  return targetRows.filter((r) => {
8884
9057
  return filterColumns.every((col) => {
8885
9058
  const filterVal = targetFilters[col.name];
@@ -8897,11 +9070,11 @@ var PlacementBlock = (props) => {
8897
9070
  setSelectedTargetId("");
8898
9071
  }
8899
9072
  }, [filteredTargetRows, selectedTargetId]);
8900
- const assignmentColumn = useMemo8(() => targetColumns.find((c) => c.name === assignmentField), [targetColumns, assignmentField]);
9073
+ const assignmentColumn = useMemo9(() => targetColumns.find((c) => c.name === assignmentField), [targetColumns, assignmentField]);
8901
9074
  const isRelationField = ((_b = assignmentColumn == null ? void 0 : assignmentColumn.type) == null ? void 0 : _b.toUpperCase()) === "RELATION";
8902
9075
  const assignmentLabel = (assignmentColumn == null ? void 0 : assignmentColumn.label) || (assignmentColumn == null ? void 0 : assignmentColumn.name) || assignmentField || "";
8903
9076
  const nameOf = useCallback13((row) => cellText(readColumnValue(row.data, displayField)) || "\u05DC\u05DC\u05D0 \u05E9\u05DD", [displayField]);
8904
- const assignedIds = useMemo8(() => {
9077
+ const assignedIds = useMemo9(() => {
8905
9078
  var _a2;
8906
9079
  const target = targetRows.find((r) => r.id === selectedTargetId);
8907
9080
  if (!target || !assignmentField) return [];
@@ -8922,14 +9095,28 @@ var PlacementBlock = (props) => {
8922
9095
  setCheckedIds(assignedIdsRef.current);
8923
9096
  }, [selectedTargetId, sourceRows]);
8924
9097
  const toGridRow = useCallback13((r, checked = false) => __spreadProps(__spreadValues({}, r.data), { id: r.id, __label: nameOf(r), __checked: checked, statusId: statusMap[r.id] || defaultStatusId }), [nameOf, statusMap, defaultStatusId]);
8925
- const candidateGridData = useMemo8(() => {
9098
+ const candidateRows = useMemo9(() => candidateIds.map((id) => sourceRows.find((r) => r.id === id)).filter((r) => !!r), [candidateIds, sourceRows]);
9099
+ const candidateGridData = useMemo9(() => {
8926
9100
  const checked = new Set(checkedIds);
8927
- return candidateIds.map((id) => sourceRows.find((r) => r.id === id)).filter((r) => !!r).map((r) => toGridRow(r, checked.has(r.id)));
8928
- }, [candidateIds, checkedIds, sourceRows, toGridRow]);
8929
- const availableGridData = useMemo8(() => {
9101
+ return candidateRows.filter((r) => rowPassesColFilters(r, colFilters.cand)).map((r) => toGridRow(r, checked.has(r.id)));
9102
+ }, [candidateRows, checkedIds, toGridRow, rowPassesColFilters, colFilters.cand]);
9103
+ const availableRows = useMemo9(() => {
8930
9104
  const set = new Set(candidateIds);
8931
- return sourceRows.filter((r) => !set.has(r.id)).map((r) => toGridRow(r));
8932
- }, [candidateIds, sourceRows, toGridRow]);
9105
+ return sourceRows.filter((r) => !set.has(r.id));
9106
+ }, [candidateIds, sourceRows]);
9107
+ const relationButtonColumns = useMemo9(() => {
9108
+ const wanted = Array.isArray(config == null ? void 0 : config.relationButtonColumns) ? config.relationButtonColumns : [];
9109
+ return wanted.filter((name) => sourceColumns.some((c) => (c == null ? void 0 : c.name) === name && String(c == null ? void 0 : c.type).toUpperCase() === "RELATION"));
9110
+ }, [config, sourceColumns]);
9111
+ const hasRelationButtons = relationButtonColumns.length > 0;
9112
+ const handleRelationFilterChange = useCallback13((colName, id) => {
9113
+ setSourceRelFilters((prev) => __spreadProps(__spreadValues({}, prev), { [colName]: id }));
9114
+ }, []);
9115
+ const availableGridData = useMemo9(() => {
9116
+ const active = Object.entries(sourceRelFilters).filter(([name, v]) => !!v && relationButtonColumns.includes(name));
9117
+ const byButtons = active.length === 0 ? availableRows : availableRows.filter((r) => active.every(([name, v]) => rowMatchesRelationFilter(r, name, v)));
9118
+ return byButtons.filter((r) => rowPassesColFilters(r, colFilters.source)).map((r) => toGridRow(r));
9119
+ }, [availableRows, sourceRelFilters, relationButtonColumns, toGridRow, rowPassesColFilters, colFilters.source]);
8933
9120
  const persistAssignment = useCallback13(async (nextIds) => {
8934
9121
  const exec = executeActionRef.current;
8935
9122
  if (exec && targetTableId && assignmentField && selectedTargetId) {
@@ -8966,7 +9153,7 @@ var PlacementBlock = (props) => {
8966
9153
  setCandidateIds([]);
8967
9154
  setCheckedIds([]);
8968
9155
  }, []);
8969
- const checkedCandidates = useMemo8(() => candidateIds.filter((id) => checkedIds.includes(id)), [candidateIds, checkedIds]);
9156
+ const checkedCandidates = useMemo9(() => candidateIds.filter((id) => checkedIds.includes(id)), [candidateIds, checkedIds]);
8970
9157
  const isDirty = checkedCandidates.length !== assignedIds.length || checkedCandidates.some((id) => !assignedIds.includes(id));
8971
9158
  const submitAssignment = useCallback13(async () => {
8972
9159
  if (!selectedTargetId) {
@@ -9007,7 +9194,8 @@ var PlacementBlock = (props) => {
9007
9194
  setIsSaving(false);
9008
9195
  }
9009
9196
  }, [selectedTargetId, assignedIds, assignmentLabel, persistAssignment]);
9010
- const makeColDefs = useCallback13((columns, fallbackName, withCheckbox = false) => {
9197
+ const makeColDefs = useCallback13((columns, fallbackName, grid, withCheckbox = false) => {
9198
+ const gridFilters = colFilters[grid];
9011
9199
  const defs = [];
9012
9200
  if (withCheckbox) {
9013
9201
  defs.push({
@@ -9037,15 +9225,44 @@ var PlacementBlock = (props) => {
9037
9225
  var _a2;
9038
9226
  return (_a2 = p.data) == null ? void 0 : _a2[displayField];
9039
9227
  }, valueFormatter: (p) => cellText(p.value), getQuickFilterText: (p) => cellText(p.value), rowDrag: true, flex: 1, minWidth: 120 });
9040
- ordered.forEach((c, i) => defs.push({ colId: c.name, field: c.name, headerName: c.label || c.name, valueGetter: (p) => readColumnValue(p.data, c.name), valueFormatter: (p) => displayValue(c, p.value), getQuickFilterText: (p) => cellText(displayValue(c, p.value)), rowDrag: !displayIsRelated && i === 0, flex: 1, minWidth: 120 }));
9228
+ ordered.forEach((c, i) => {
9229
+ const def = { colId: c.name, field: c.name, headerName: c.label || c.name, valueGetter: (p) => readColumnValue(p.data, c.name), valueFormatter: (p) => displayValue(c, p.value), getQuickFilterText: (p) => cellText(displayValue(c, p.value)), rowDrag: !displayIsRelated && i === 0, flex: 1, minWidth: 120 };
9230
+ if (String(c.type).toUpperCase() === "RELATION") {
9231
+ def.headerComponent = RelationFilterHeader;
9232
+ def.headerComponentParams = { colName: c.name, active: !!gridFilters[c.name], onOpen: (name, rect) => openColFilter(grid, name, rect) };
9233
+ }
9234
+ defs.push(def);
9235
+ });
9041
9236
  } else {
9042
9237
  defs.push({ field: "__label", headerName: fallbackName, rowDrag: true, flex: 1 });
9043
9238
  }
9044
9239
  return defs;
9045
- }, [cycleStatus, statuses, defaultStatusId, displayField, displayValue, toggleChecked, toggleAll, allChecked, someChecked]);
9240
+ }, [cycleStatus, statuses, defaultStatusId, displayField, displayValue, toggleChecked, toggleAll, allChecked, someChecked, colFilters, openColFilter]);
9046
9241
  const sourceHeader = displayField === "name" ? "\u05E9\u05DD" : columnRefLabel(displayField);
9047
- const sourceColDefs = useMemo8(() => makeColDefs(sourceColumns, sourceHeader), [makeColDefs, sourceColumns, sourceHeader]);
9048
- const candidateColDefs = useMemo8(() => makeColDefs(sourceColumns, sourceHeader, true), [makeColDefs, sourceColumns, sourceHeader]);
9242
+ const sourceColDefs = useMemo9(() => makeColDefs(sourceColumns, sourceHeader, "source"), [makeColDefs, sourceColumns, sourceHeader]);
9243
+ const candidateColDefs = useMemo9(() => makeColDefs(sourceColumns, sourceHeader, "cand", true), [makeColDefs, sourceColumns, sourceHeader]);
9244
+ const defaultColDef = useMemo9(() => ({ resizable: true }), []);
9245
+ const scrollableColIds = (defs) => defs.filter((d) => !d.pinned).map((d) => {
9246
+ var _a2;
9247
+ return (_a2 = d.colId) != null ? _a2 : d.field;
9248
+ }).filter(Boolean);
9249
+ const expandColumns = useCallback13((api) => {
9250
+ api == null ? void 0 : api.sizeColumnsToFit();
9251
+ }, []);
9252
+ const shrinkColumns = useCallback13((api, defs) => {
9253
+ api == null ? void 0 : api.autoSizeColumns(scrollableColIds(defs));
9254
+ }, []);
9255
+ const popoverOptions = useMemo9(() => {
9256
+ if (!filterPopover) return [];
9257
+ const rows = filterPopover.grid === "source" ? availableRows : candidateRows;
9258
+ const set = /* @__PURE__ */ new Set();
9259
+ rows.forEach((r) => relationLabelsOf(r, filterPopover.colName).forEach((l) => set.add(l)));
9260
+ return Array.from(set).sort((a, b) => a.localeCompare(b, "he")).map((label) => ({ id: label, label }));
9261
+ }, [filterPopover, availableRows, candidateRows, relationLabelsOf]);
9262
+ const popoverColumn = useMemo9(
9263
+ () => filterPopover ? sourceColumns.find((c) => c.name === filterPopover.colName) : void 0,
9264
+ [filterPopover, sourceColumns]
9265
+ );
9049
9266
  const getRowId = useCallback13((p) => p.data.id, []);
9050
9267
  const sourceContainerRef = useRef13(null);
9051
9268
  const assignedContainerRef = useRef13(null);
@@ -9074,11 +9291,11 @@ var PlacementBlock = (props) => {
9074
9291
  }
9075
9292
  };
9076
9293
  }, [sourceApi, assignedApi]);
9077
- const selectorLabel = useMemo8(() => {
9294
+ const selectorLabel = useMemo9(() => {
9078
9295
  const col = targetColumns.find((c) => c.name === selectorField || c.id === selectorField);
9079
9296
  return (col == null ? void 0 : col.label) || columnRefLabel(selectorField) || "\u05D1\u05D7\u05D9\u05E8\u05EA \u05E8\u05E9\u05D5\u05DE\u05D4 \u05DC\u05E9\u05D9\u05D1\u05D5\u05E5";
9080
9297
  }, [targetColumns, selectorField]);
9081
- const assignedText = useMemo8(
9298
+ const assignedText = useMemo9(
9082
9299
  () => assignedIds.map((id) => sourceRows.find((r) => r.id === id)).filter((r) => !!r).map(nameOf).join(", "),
9083
9300
  [assignedIds, sourceRows, nameOf]
9084
9301
  );
@@ -9087,48 +9304,48 @@ var PlacementBlock = (props) => {
9087
9304
  const col = targetColumns.find((c) => c.name === selectorField || c.id === selectorField);
9088
9305
  return displayValue(col || { name: selectorField }, readColumnValue(r.data, selectorField)) || "\u05DC\u05DC\u05D0 \u05E9\u05DD";
9089
9306
  }, [selectorField, targetColumns, displayValue]);
9090
- const previewColumns = useMemo8(() => targetColumns.filter((c) => isUserColumn(c) && c.name !== assignmentField && !["id", "_id", "id_", "statusId"].includes(c.name)), [targetColumns, assignmentField]);
9307
+ const previewColumns = useMemo9(() => targetColumns.filter((c) => isUserColumn(c) && c.name !== assignmentField && !["id", "_id", "id_", "statusId"].includes(c.name)), [targetColumns, assignmentField]);
9091
9308
  if (!config || !sourceTableId || !targetTableId) {
9092
- return /* @__PURE__ */ jsx18("div", { className: "p-4 text-xs text-slate-500 border border-dashed border-slate-300 rounded-xl", dir: "rtl", children: "\u05E8\u05DB\u05D9\u05D1 \u05D4\u05E9\u05D9\u05D1\u05D5\u05E5 \u05DC\u05D0 \u05D4\u05D5\u05D2\u05D3\u05E8 (\u05D7\u05E1\u05E8\u05D5\u05EA \u05D8\u05D1\u05DC\u05EA \u05DE\u05E7\u05D5\u05E8 / \u05D8\u05D1\u05DC\u05EA \u05D9\u05E2\u05D3)." });
9309
+ return /* @__PURE__ */ jsx19("div", { className: "p-4 text-xs text-slate-500 border border-dashed border-slate-300 rounded-xl", dir: "rtl", children: "\u05E8\u05DB\u05D9\u05D1 \u05D4\u05E9\u05D9\u05D1\u05D5\u05E5 \u05DC\u05D0 \u05D4\u05D5\u05D2\u05D3\u05E8 (\u05D7\u05E1\u05E8\u05D5\u05EA \u05D8\u05D1\u05DC\u05EA \u05DE\u05E7\u05D5\u05E8 / \u05D8\u05D1\u05DC\u05EA \u05D9\u05E2\u05D3)." });
9093
9310
  }
9094
9311
  const selectClass = "w-full p-2 border border-slate-300 rounded-lg text-xs font-medium text-slate-700 bg-slate-50 outline-none focus:border-brand";
9095
9312
  const labelClass = "block text-[11px] font-semibold text-slate-500 mb-1";
9096
- return /* @__PURE__ */ jsxs15("div", { className: `w-full flex flex-col gap-4 p-4 bg-slate-50 min-h-[850px] rounded-xl border border-slate-200 ${className}`, dir: "rtl", children: [
9097
- (loadError || saveError) && /* @__PURE__ */ jsx18("div", { className: "p-3 text-xs rounded-lg bg-rose-50 border border-rose-200 text-rose-700", children: loadError || saveError }),
9098
- /* @__PURE__ */ jsxs15("div", { className: "flex flex-col lg:flex-row gap-4", children: [
9099
- /* @__PURE__ */ jsxs15("div", { className: "w-full lg:w-1/3 bg-teal-50/40 p-4 rounded-xl border border-teal-100 shadow-xs flex flex-col", children: [
9100
- /* @__PURE__ */ jsxs15("h4", { className: "font-bold text-teal-900 border-b border-teal-200 pb-2 mb-3 text-sm flex items-center gap-2", children: [
9101
- /* @__PURE__ */ jsx18("span", { children: "\u{1F4CC}" }),
9313
+ return /* @__PURE__ */ jsxs16("div", { className: `w-full flex flex-col gap-4 p-4 bg-slate-50 min-h-[850px] rounded-xl border border-slate-200 ${className}`, dir: "rtl", children: [
9314
+ (loadError || saveError) && /* @__PURE__ */ jsx19("div", { className: "p-3 text-xs rounded-lg bg-rose-50 border border-rose-200 text-rose-700", children: loadError || saveError }),
9315
+ /* @__PURE__ */ jsxs16("div", { className: "flex flex-col lg:flex-row gap-4", children: [
9316
+ /* @__PURE__ */ jsxs16("div", { className: "w-full lg:w-1/2 bg-teal-50/40 p-4 rounded-xl border border-teal-100 shadow-xs flex flex-col", children: [
9317
+ /* @__PURE__ */ jsxs16("h4", { className: "font-bold text-teal-900 border-b border-teal-200 pb-2 mb-3 text-base flex items-center gap-2", children: [
9318
+ /* @__PURE__ */ jsx19("span", { children: "\u{1F4CC}" }),
9102
9319
  " \u05E4\u05E8\u05D8\u05D9 \u05D4\u05D9\u05E2\u05D3 \u05DC\u05E9\u05D9\u05D1\u05D5\u05E5"
9103
9320
  ] }),
9104
- activeTarget ? /* @__PURE__ */ jsxs15("div", { className: "space-y-2 text-xs text-slate-700 overflow-y-auto pr-1 max-h-32", children: [
9105
- /* @__PURE__ */ jsx18("div", { className: "font-bold text-slate-900 text-sm mb-1", children: targetLabel(activeTarget) }),
9321
+ activeTarget ? /* @__PURE__ */ jsxs16("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-3 content-start text-base text-slate-700 flex-1", children: [
9322
+ /* @__PURE__ */ jsx19("div", { className: "col-span-full font-bold text-slate-900 text-lg mb-1", children: targetLabel(activeTarget) }),
9106
9323
  previewColumns.map((col) => ({ col, text: displayValue(col, readColumnValue(activeTarget.data, col.name)) })).filter(({ col, text: text2 }) => {
9107
9324
  var _a2;
9108
9325
  return text2 && (col.type === "RELATION" || typeof ((_a2 = activeTarget.data) == null ? void 0 : _a2[col.name]) !== "object");
9109
- }).map(({ col, text: text2 }) => /* @__PURE__ */ jsxs15("div", { className: "flex gap-2 items-start", children: [
9110
- /* @__PURE__ */ jsxs15("span", { className: "font-semibold shrink-0", children: [
9326
+ }).map(({ col, text: text2 }) => /* @__PURE__ */ jsxs16("div", { className: `flex gap-2 items-start ${(col.label || col.name) === "\u05E4\u05E8\u05D8\u05D9\u05DD \u05E0\u05D5\u05E1\u05E4\u05D9\u05DD" ? "sm:col-span-2" : ""}`, children: [
9327
+ /* @__PURE__ */ jsxs16("span", { className: "font-semibold shrink-0", children: [
9111
9328
  col.label || col.name,
9112
9329
  ":"
9113
9330
  ] }),
9114
- /* @__PURE__ */ jsx18("span", { className: "break-words line-clamp-2", children: text2 })
9331
+ /* @__PURE__ */ jsx19("span", { className: "break-words", children: text2 })
9115
9332
  ] }, col.name)),
9116
- assignmentField && assignedText && /* @__PURE__ */ jsxs15("div", { className: "flex gap-2 items-start", children: [
9117
- /* @__PURE__ */ jsxs15("span", { className: "font-semibold shrink-0", children: [
9333
+ assignmentField && assignedText && /* @__PURE__ */ jsxs16("div", { className: "flex gap-2 items-start", children: [
9334
+ /* @__PURE__ */ jsxs16("span", { className: "font-semibold shrink-0", children: [
9118
9335
  assignmentLabel,
9119
9336
  ":"
9120
9337
  ] }),
9121
- /* @__PURE__ */ jsx18("span", { className: "break-words line-clamp-2", title: assignedText, children: assignedText })
9338
+ /* @__PURE__ */ jsx19("span", { className: "break-words", title: assignedText, children: assignedText })
9122
9339
  ] }),
9123
- /* @__PURE__ */ jsxs15("div", { className: "mt-3 pt-3 border-t border-teal-200/60 text-teal-800 font-bold", children: [
9340
+ /* @__PURE__ */ jsxs16("div", { className: "col-span-full self-end mt-1 pt-1.5 border-t border-teal-200/60 text-teal-800 font-bold text-xs leading-none whitespace-nowrap overflow-hidden text-ellipsis", children: [
9124
9341
  "\u05DE\u05E9\u05D5\u05D1\u05E6\u05D9\u05DD \u05DB\u05E8\u05D2\u05E2: ",
9125
9342
  assignedIds.length
9126
9343
  ] })
9127
- ] }) : /* @__PURE__ */ jsx18("div", { className: "text-slate-500 text-xs text-center py-6", children: isLoading ? "\u05D8\u05D5\u05E2\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD..." : "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05E8\u05E9\u05D5\u05DE\u05EA \u05D9\u05E2\u05D3." })
9344
+ ] }) : /* @__PURE__ */ jsx19("div", { className: "text-slate-500 text-xs text-center py-6", children: isLoading ? "\u05D8\u05D5\u05E2\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD..." : "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05E8\u05E9\u05D5\u05DE\u05EA \u05D9\u05E2\u05D3." })
9128
9345
  ] }),
9129
- /* @__PURE__ */ jsx18("div", { className: "w-full lg:w-2/3 bg-white p-4 rounded-xl border border-slate-200 shadow-xs flex flex-col", children: /* @__PURE__ */ jsxs15("div", { children: [
9130
- /* @__PURE__ */ jsx18("h4", { className: "font-bold text-slate-800 mb-3 text-sm", children: "\u05E1\u05D9\u05E0\u05D5\u05DF \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05D4\u05D9\u05E2\u05D3" }),
9131
- /* @__PURE__ */ jsxs15("div", { className: "flex flex-col sm:flex-row gap-3", children: [
9346
+ /* @__PURE__ */ jsx19("div", { className: "w-full lg:w-1/2 bg-white p-4 rounded-xl border border-slate-200 shadow-xs flex flex-col", children: /* @__PURE__ */ jsxs16("div", { children: [
9347
+ /* @__PURE__ */ jsx19("h4", { className: "font-bold text-slate-800 mb-3 text-sm", children: "\u05E1\u05D9\u05E0\u05D5\u05DF \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05D4\u05D9\u05E2\u05D3" }),
9348
+ /* @__PURE__ */ jsxs16("div", { className: "flex flex-col sm:flex-row gap-3", children: [
9132
9349
  filterColumns.map((col, index) => {
9133
9350
  const previousColumns = filterColumns.slice(0, index);
9134
9351
  const validRowsForThisFilter = targetRows.filter((r) => {
@@ -9141,9 +9358,9 @@ var PlacementBlock = (props) => {
9141
9358
  const uniqueValues = Array.from(new Set(
9142
9359
  validRowsForThisFilter.map((r) => displayValue(col, readColumnValue(r.data, col.name)))
9143
9360
  )).filter(Boolean).sort((a, b) => a.localeCompare(b, "he"));
9144
- return /* @__PURE__ */ jsxs15("div", { className: "flex-1 basis-0 min-w-0", children: [
9145
- /* @__PURE__ */ jsx18("label", { className: labelClass, children: col.label || columnRefLabel(col.name) }),
9146
- /* @__PURE__ */ jsxs15(
9361
+ return /* @__PURE__ */ jsxs16("div", { className: "flex-1 basis-0 min-w-0", children: [
9362
+ /* @__PURE__ */ jsx19("label", { className: labelClass, children: col.label || columnRefLabel(col.name) }),
9363
+ /* @__PURE__ */ jsxs16(
9147
9364
  "select",
9148
9365
  {
9149
9366
  className: selectClass,
@@ -9159,64 +9376,93 @@ var PlacementBlock = (props) => {
9159
9376
  });
9160
9377
  },
9161
9378
  children: [
9162
- /* @__PURE__ */ jsx18("option", { value: "", children: "\u05D4\u05DB\u05DC" }),
9163
- uniqueValues.map((v) => /* @__PURE__ */ jsx18("option", { value: v, children: v }, v))
9379
+ /* @__PURE__ */ jsx19("option", { value: "", children: "\u05D4\u05DB\u05DC" }),
9380
+ uniqueValues.map((v) => /* @__PURE__ */ jsx19("option", { value: v, children: v }, v))
9164
9381
  ]
9165
9382
  }
9166
9383
  )
9167
9384
  ] }, col.name);
9168
9385
  }),
9169
- /* @__PURE__ */ jsxs15("div", { className: "flex-1 basis-0 min-w-0", children: [
9170
- /* @__PURE__ */ jsx18("label", { className: labelClass, children: selectorLabel }),
9171
- /* @__PURE__ */ jsxs15("select", { className: selectClass, value: selectedTargetId, onChange: (e) => setSelectedTargetId(e.target.value), children: [
9172
- /* @__PURE__ */ jsxs15("option", { value: "", children: [
9386
+ /* @__PURE__ */ jsxs16("div", { className: "flex-1 basis-0 min-w-0", children: [
9387
+ /* @__PURE__ */ jsx19("label", { className: labelClass, children: selectorLabel }),
9388
+ /* @__PURE__ */ jsxs16("select", { className: selectClass, value: selectedTargetId, onChange: (e) => setSelectedTargetId(e.target.value), children: [
9389
+ /* @__PURE__ */ jsxs16("option", { value: "", children: [
9173
9390
  "-- \u05D1\u05D7\u05E8 \u05DE\u05EA\u05D5\u05DA ",
9174
9391
  filteredTargetRows.length,
9175
9392
  " \u05EA\u05D5\u05E6\u05D0\u05D5\u05EA --"
9176
9393
  ] }),
9177
- filteredTargetRows.map((r) => /* @__PURE__ */ jsx18("option", { value: r.id, children: targetLabel(r) }, r.id))
9394
+ filteredTargetRows.map((r) => /* @__PURE__ */ jsx19("option", { value: r.id, children: targetLabel(r) }, r.id))
9178
9395
  ] })
9179
9396
  ] })
9180
- ] })
9397
+ ] }),
9398
+ hasRelationButtons && /* @__PURE__ */ jsx19(
9399
+ PlacementRelationButtons,
9400
+ {
9401
+ className: "mt-4 pb-24",
9402
+ columnNames: relationButtonColumns,
9403
+ rows: availableRows,
9404
+ filters: sourceRelFilters,
9405
+ onFilterChange: handleRelationFilterChange,
9406
+ relationOptions: sourceRelOptions
9407
+ }
9408
+ )
9181
9409
  ] }) })
9182
9410
  ] }),
9183
- /* @__PURE__ */ jsxs15("div", { className: "flex flex-col lg:flex-row w-full gap-4 h-[550px]", children: [
9184
- /* @__PURE__ */ jsxs15("div", { className: "w-full lg:w-1/2 flex flex-col border border-slate-200 rounded-xl shadow-xs bg-white overflow-hidden", children: [
9185
- /* @__PURE__ */ jsxs15("div", { className: "bg-slate-100 p-3 border-b border-slate-200 flex flex-col gap-2", children: [
9186
- /* @__PURE__ */ jsxs15("div", { className: "flex justify-between items-center font-bold text-slate-800 text-sm", children: [
9187
- /* @__PURE__ */ jsxs15("span", { children: [
9411
+ /* @__PURE__ */ jsxs16("div", { className: "flex flex-col lg:flex-row w-full gap-4 h-[550px]", children: [
9412
+ /* @__PURE__ */ jsxs16("div", { className: `w-full ${hasRelationButtons ? "lg:flex-1 lg:min-w-0" : "lg:w-1/2"} flex flex-col border border-slate-200 rounded-xl shadow-xs bg-white overflow-hidden`, children: [
9413
+ /* @__PURE__ */ jsxs16("div", { className: "bg-slate-100 p-3 border-b border-slate-200 flex flex-col gap-2", children: [
9414
+ /* @__PURE__ */ jsxs16("div", { className: "flex justify-between items-center font-bold text-slate-800 text-sm", children: [
9415
+ /* @__PURE__ */ jsxs16("span", { children: [
9188
9416
  "\u05E8\u05E9\u05D9\u05DE\u05EA \u05DE\u05E7\u05D5\u05E8 (",
9189
9417
  availableGridData.length,
9190
9418
  ")"
9191
9419
  ] }),
9192
- /* @__PURE__ */ jsx18("span", { className: "text-[11px] font-normal text-slate-500 bg-white px-2 py-0.5 rounded-full shadow-sm border border-slate-200", children: "\u05D2\u05E8\u05D5\u05E8 \u05E9\u05DE\u05D0\u05DC\u05D4 \u05DC\u05E9\u05D9\u05D1\u05D5\u05E5 \u2190" })
9420
+ /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
9421
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: () => shrinkColumns(sourceApi, sourceColDefs), title: "\u05E6\u05DE\u05E6\u05DD \u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05DC\u05E4\u05D9 \u05D4\u05EA\u05D5\u05DB\u05DF", className: "px-2 py-0.5 rounded-md text-[11px] font-medium bg-white border border-slate-200 text-slate-600 hover:bg-slate-50 cursor-pointer", children: "\u2192\u2190 \u05E6\u05DE\u05E6\u05DD" }),
9422
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: () => expandColumns(sourceApi), title: "\u05D4\u05E8\u05D7\u05D1 \u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05DC\u05E8\u05D5\u05D7\u05D1 \u05D4\u05D8\u05D1\u05DC\u05D4", className: "px-2 py-0.5 rounded-md text-[11px] font-medium bg-white border border-slate-200 text-slate-600 hover:bg-slate-50 cursor-pointer", children: "\u2190\u2192 \u05D4\u05E8\u05D7\u05D1" }),
9423
+ /* @__PURE__ */ jsx19("span", { className: "text-[11px] font-normal text-slate-500 bg-white px-2 py-0.5 rounded-full shadow-sm border border-slate-200", children: "\u05D2\u05E8\u05D5\u05E8 \u05E9\u05DE\u05D0\u05DC\u05D4 \u05DC\u05E9\u05D9\u05D1\u05D5\u05E5 \u2190" })
9424
+ ] })
9193
9425
  ] }),
9194
- /* @__PURE__ */ jsx18("input", { type: "search", value: sourceSearch, onChange: (e) => setSourceSearch(e.target.value), placeholder: "\u05E1\u05D9\u05E0\u05D5\u05DF...", className: "w-full p-2 border border-slate-300 rounded-lg text-xs bg-white outline-none focus:border-brand" })
9426
+ /* @__PURE__ */ jsx19("input", { type: "search", value: sourceSearch, onChange: (e) => setSourceSearch(e.target.value), placeholder: "\u05E1\u05D9\u05E0\u05D5\u05DF...", className: "w-full p-2 border border-slate-300 rounded-lg text-xs bg-white outline-none focus:border-brand" })
9195
9427
  ] }),
9196
- /* @__PURE__ */ jsx18("div", { ref: sourceContainerRef, className: "ag-theme-quartz flex-1 w-full h-full", children: /* @__PURE__ */ jsx18(AgGridReact, { rowData: availableGridData, columnDefs: sourceColDefs, getRowId, enableRtl: true, rowDragManaged: false, quickFilterText: sourceSearch, onGridReady: (e) => setSourceApi(e.api), loading: isLoading }) })
9428
+ /* @__PURE__ */ jsx19("div", { ref: sourceContainerRef, className: "ag-theme-quartz flex-1 w-full h-full", children: /* @__PURE__ */ jsx19(AgGridReact, { rowData: availableGridData, columnDefs: sourceColDefs, defaultColDef, headerHeight: 56, getRowId, enableRtl: true, rowDragManaged: false, quickFilterText: sourceSearch, onGridReady: (e) => setSourceApi(e.api), loading: isLoading }) })
9197
9429
  ] }),
9198
- /* @__PURE__ */ jsxs15("div", { className: "w-full lg:w-1/2 flex flex-col border border-blue-200 rounded-xl shadow-xs bg-white overflow-hidden ring-1 ring-blue-100", children: [
9199
- /* @__PURE__ */ jsxs15("div", { className: "bg-blue-50/80 p-3 border-b border-blue-100 flex flex-col gap-2", children: [
9200
- /* @__PURE__ */ jsxs15("div", { className: "flex flex-wrap justify-between items-center gap-2", children: [
9201
- /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2 font-bold text-blue-900 text-sm", children: [
9202
- /* @__PURE__ */ jsxs15("span", { children: [
9430
+ /* @__PURE__ */ jsxs16("div", { className: `w-full ${hasRelationButtons ? "lg:flex-1 lg:min-w-0" : "lg:w-1/2"} flex flex-col border border-blue-200 rounded-xl shadow-xs bg-white overflow-hidden ring-1 ring-blue-100`, children: [
9431
+ /* @__PURE__ */ jsxs16("div", { className: "bg-blue-50/80 p-3 border-b border-blue-100 flex flex-col gap-2", children: [
9432
+ /* @__PURE__ */ jsxs16("div", { className: "flex flex-wrap justify-between items-center gap-2", children: [
9433
+ /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2 font-bold text-blue-900 text-sm", children: [
9434
+ /* @__PURE__ */ jsxs16("span", { children: [
9203
9435
  "\u05DE\u05D5\u05E2\u05DE\u05D3\u05D9\u05DD \u05DC\u05E9\u05D9\u05D1\u05D5\u05E5 (",
9204
9436
  candidateGridData.length,
9205
9437
  ")"
9206
9438
  ] }),
9207
- /* @__PURE__ */ jsx18("span", { className: "text-[11px] font-normal text-blue-700 bg-white px-2 py-0.5 rounded-full shadow-sm border border-blue-100", children: "\u2192 \u05D2\u05E8\u05D5\u05E8 \u05D9\u05DE\u05D9\u05E0\u05D4 \u05DC\u05D4\u05D7\u05D6\u05E8\u05D4" })
9439
+ /* @__PURE__ */ jsx19("span", { className: "text-[11px] font-normal text-blue-700 bg-white px-2 py-0.5 rounded-full shadow-sm border border-blue-100", children: "\u2192 \u05D2\u05E8\u05D5\u05E8 \u05D9\u05DE\u05D9\u05E0\u05D4 \u05DC\u05D4\u05D7\u05D6\u05E8\u05D4" }),
9440
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: () => shrinkColumns(assignedApi, candidateColDefs), title: "\u05E6\u05DE\u05E6\u05DD \u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05DC\u05E4\u05D9 \u05D4\u05EA\u05D5\u05DB\u05DF", className: "px-2 py-0.5 rounded-md text-[11px] font-medium bg-white border border-blue-100 text-slate-600 hover:bg-blue-50 cursor-pointer", children: "\u2192\u2190 \u05E6\u05DE\u05E6\u05DD" }),
9441
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: () => expandColumns(assignedApi), title: "\u05D4\u05E8\u05D7\u05D1 \u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05DC\u05E8\u05D5\u05D7\u05D1 \u05D4\u05D8\u05D1\u05DC\u05D4", className: "px-2 py-0.5 rounded-md text-[11px] font-medium bg-white border border-blue-100 text-slate-600 hover:bg-blue-50 cursor-pointer", children: "\u2190\u2192 \u05D4\u05E8\u05D7\u05D1" })
9208
9442
  ] }),
9209
- /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2", children: [
9210
- /* @__PURE__ */ jsx18("button", { type: "button", onClick: returnAll, disabled: candidateIds.length === 0, className: "px-3 py-1.5 rounded-lg text-xs font-bold bg-amber-400 hover:bg-amber-500 text-slate-900 disabled:opacity-40 disabled:cursor-not-allowed transition-colors", children: "\u21BA \u05D4\u05D7\u05D6\u05E8 \u05D4\u05DB\u05DC" }),
9211
- /* @__PURE__ */ jsx18("button", { type: "button", onClick: submitAssignment, disabled: !selectedTargetId || !isDirty || isSaving, className: "px-4 py-1.5 rounded-lg text-xs font-bold bg-blue-600 hover:bg-blue-700 text-white disabled:opacity-40 disabled:cursor-not-allowed transition-colors", children: isSaving ? "\u05E9\u05D5\u05DE\u05E8..." : "\u05E9\u05D1\u05E5" }),
9212
- /* @__PURE__ */ jsx18("button", { type: "button", onClick: cancelAssignment, disabled: !selectedTargetId || assignedIds.length === 0 || isSaving, className: "px-3 py-1.5 rounded-lg text-xs font-bold bg-white hover:bg-rose-50 text-rose-600 border border-rose-300 disabled:opacity-40 disabled:cursor-not-allowed transition-colors", children: "\u05D1\u05D9\u05D8\u05D5\u05DC \u05E9\u05D9\u05D1\u05D5\u05E5" })
9443
+ /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
9444
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: returnAll, disabled: candidateIds.length === 0, className: "px-3 py-1.5 rounded-lg text-xs font-bold bg-amber-400 hover:bg-amber-500 text-slate-900 disabled:opacity-40 disabled:cursor-not-allowed transition-colors", children: "\u21BA \u05D4\u05D7\u05D6\u05E8 \u05D4\u05DB\u05DC" }),
9445
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: submitAssignment, disabled: !selectedTargetId || !isDirty || isSaving, className: "px-4 py-1.5 rounded-lg text-xs font-bold bg-blue-600 hover:bg-blue-700 text-white disabled:opacity-40 disabled:cursor-not-allowed transition-colors", children: isSaving ? "\u05E9\u05D5\u05DE\u05E8..." : "\u05E9\u05D1\u05E5" }),
9446
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: cancelAssignment, disabled: !selectedTargetId || assignedIds.length === 0 || isSaving, className: "px-3 py-1.5 rounded-lg text-xs font-bold bg-white hover:bg-rose-50 text-rose-600 border border-rose-300 disabled:opacity-40 disabled:cursor-not-allowed transition-colors", children: "\u05D1\u05D9\u05D8\u05D5\u05DC \u05E9\u05D9\u05D1\u05D5\u05E5" })
9213
9447
  ] })
9214
9448
  ] }),
9215
- /* @__PURE__ */ jsx18("input", { type: "search", value: candidateSearch, onChange: (e) => setCandidateSearch(e.target.value), placeholder: "\u05E1\u05D9\u05E0\u05D5\u05DF...", className: "w-full p-2 border border-slate-300 rounded-lg text-xs bg-white outline-none focus:border-brand" })
9449
+ /* @__PURE__ */ jsx19("input", { type: "search", value: candidateSearch, onChange: (e) => setCandidateSearch(e.target.value), placeholder: "\u05E1\u05D9\u05E0\u05D5\u05DF...", className: "w-full p-2 border border-slate-300 rounded-lg text-xs bg-white outline-none focus:border-brand" })
9216
9450
  ] }),
9217
- /* @__PURE__ */ jsx18("div", { ref: assignedContainerRef, className: "ag-theme-quartz flex-1 w-full h-full", children: /* @__PURE__ */ jsx18(AgGridReact, { rowData: candidateGridData, columnDefs: candidateColDefs, getRowId, enableRtl: true, rowDragManaged: false, quickFilterText: candidateSearch, onGridReady: (e) => setAssignedApi(e.api), loading: isLoading }) })
9451
+ /* @__PURE__ */ jsx19("div", { ref: assignedContainerRef, className: "ag-theme-quartz flex-1 w-full h-full", children: /* @__PURE__ */ jsx19(AgGridReact, { rowData: candidateGridData, columnDefs: candidateColDefs, defaultColDef, headerHeight: 56, getRowId, enableRtl: true, rowDragManaged: false, quickFilterText: candidateSearch, onGridReady: (e) => setAssignedApi(e.api), loading: isLoading }) })
9218
9452
  ] })
9219
- ] })
9453
+ ] }),
9454
+ filterPopover && popoverColumn && /* @__PURE__ */ jsx19(
9455
+ RelationFilterPopover,
9456
+ {
9457
+ isOpen: true,
9458
+ onClose: closeColFilter,
9459
+ column: popoverColumn,
9460
+ triggerRect: filterPopover.rect,
9461
+ options: popoverOptions,
9462
+ filterValue: colFilters[filterPopover.grid][filterPopover.colName],
9463
+ onSelectionChange: (payload) => setColFilter(filterPopover.grid, filterPopover.colName, payload)
9464
+ }
9465
+ )
9220
9466
  ] });
9221
9467
  };
9222
9468
 
@@ -9225,7 +9471,7 @@ import React20 from "react";
9225
9471
  import { CheckCircle2 as CheckCircle24, AlertCircle as AlertCircle5, X as X12, Loader2 as Loader28, Phone as Phone4, Send as Send3, Image as ImageIcon3, FileText as FileText4, Video as Video3 } from "lucide-react";
9226
9472
 
9227
9473
  // src/components/WhatsAppComponent/CreateTemplateModal.tsx
9228
- import { useState as useState16, useEffect as useEffect14, useRef as useRef14, useMemo as useMemo9 } from "react";
9474
+ import { useState as useState16, useEffect as useEffect14, useRef as useRef14, useMemo as useMemo10 } from "react";
9229
9475
  import {
9230
9476
  X as X9,
9231
9477
  Plus,
@@ -9368,7 +9614,7 @@ function readFileAsBase64(file) {
9368
9614
  }
9369
9615
 
9370
9616
  // src/components/WhatsAppComponent/CreateTemplateModal.tsx
9371
- import { Fragment as Fragment4, jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
9617
+ import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
9372
9618
  function CreateTemplateModal({
9373
9619
  isOpen,
9374
9620
  onClose,
@@ -9440,7 +9686,7 @@ function CreateTemplateModal({
9440
9686
  setIsEmojiPickerOpen(false);
9441
9687
  }
9442
9688
  }, [isOpen]);
9443
- const uniqueVariables = useMemo9(() => {
9689
+ const uniqueVariables = useMemo10(() => {
9444
9690
  return extractUniqueVariableIndices(bodyText);
9445
9691
  }, [bodyText]);
9446
9692
  useEffect14(() => {
@@ -9454,7 +9700,7 @@ function CreateTemplateModal({
9454
9700
  }, [uniqueVariables]);
9455
9701
  const isNameEmpty = templateName.trim().length === 0;
9456
9702
  const isNamePatternValid = isValidTemplateName(templateName);
9457
- const isNameDuplicate = useMemo9(() => {
9703
+ const isNameDuplicate = useMemo10(() => {
9458
9704
  const trimmedName = templateName.trim().toLowerCase();
9459
9705
  if (!trimmedName) return false;
9460
9706
  if (existingTemplates && existingTemplates.length > 0) {
@@ -9464,9 +9710,9 @@ function CreateTemplateModal({
9464
9710
  }
9465
9711
  return isDuplicateTemplateName(trimmedName, existingTemplateNames, language);
9466
9712
  }, [templateName, language, existingTemplates, existingTemplateNames]);
9467
- const ratioInfo = useMemo9(() => validateWordToVariableRatio(bodyText), [bodyText]);
9468
- const seqInfo = useMemo9(() => validateSequentialVariables(bodyText), [bodyText]);
9469
- const validationResult = useMemo9(() => {
9713
+ const ratioInfo = useMemo10(() => validateWordToVariableRatio(bodyText), [bodyText]);
9714
+ const seqInfo = useMemo10(() => validateSequentialVariables(bodyText), [bodyText]);
9715
+ const validationResult = useMemo10(() => {
9470
9716
  return validateWhatsAppTemplate({
9471
9717
  name: templateName,
9472
9718
  language,
@@ -9720,12 +9966,12 @@ function CreateTemplateModal({
9720
9966
  }
9721
9967
  };
9722
9968
  if (!isOpen) return null;
9723
- return /* @__PURE__ */ jsx19(
9969
+ return /* @__PURE__ */ jsx20(
9724
9970
  "div",
9725
9971
  {
9726
9972
  className: "fixed inset-0 bg-slate-900/60 backdrop-blur-xs z-50 flex items-center justify-center p-4 overflow-y-auto animate-in fade-in duration-200",
9727
9973
  dir: "rtl",
9728
- children: /* @__PURE__ */ jsxs16(
9974
+ children: /* @__PURE__ */ jsxs17(
9729
9975
  "div",
9730
9976
  {
9731
9977
  className: "bg-white rounded-2xl border border-slate-200 shadow-2xl w-full max-w-2xl max-h-[92vh] flex flex-col overflow-hidden animate-in zoom-in-95 duration-150",
@@ -9733,43 +9979,43 @@ function CreateTemplateModal({
9733
9979
  "aria-modal": "true",
9734
9980
  "aria-labelledby": "modal-title",
9735
9981
  children: [
9736
- /* @__PURE__ */ jsxs16("div", { className: "px-6 py-4 border-b border-slate-100 flex items-center justify-between bg-slate-50/70", children: [
9737
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2.5", children: [
9738
- /* @__PURE__ */ jsx19("div", { className: "w-8 h-8 rounded-lg bg-emerald-100 text-emerald-700 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx19(Plus, { className: "w-4 h-4" }) }),
9739
- /* @__PURE__ */ jsxs16("div", { children: [
9740
- /* @__PURE__ */ jsx19("h3", { id: "modal-title", className: "text-sm font-bold text-slate-900", children: "\u05D9\u05E6\u05D9\u05E8\u05EA \u05EA\u05D1\u05E0\u05D9\u05EA \u05D7\u05D3\u05E9\u05D4" }),
9741
- /* @__PURE__ */ jsx19("p", { className: "text-xs text-slate-500", children: "\u05D4\u05D2\u05D3\u05E8\u05EA \u05EA\u05D5\u05DB\u05DF \u05D4\u05D5\u05D3\u05E2\u05D4 \u05D5\u05DE\u05E9\u05EA\u05E0\u05D9\u05DD \u05DC\u05D0\u05D9\u05E9\u05D5\u05E8 Meta Cloud API" })
9982
+ /* @__PURE__ */ jsxs17("div", { className: "px-6 py-4 border-b border-slate-100 flex items-center justify-between bg-slate-50/70", children: [
9983
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2.5", children: [
9984
+ /* @__PURE__ */ jsx20("div", { className: "w-8 h-8 rounded-lg bg-emerald-100 text-emerald-700 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx20(Plus, { className: "w-4 h-4" }) }),
9985
+ /* @__PURE__ */ jsxs17("div", { children: [
9986
+ /* @__PURE__ */ jsx20("h3", { id: "modal-title", className: "text-sm font-bold text-slate-900", children: "\u05D9\u05E6\u05D9\u05E8\u05EA \u05EA\u05D1\u05E0\u05D9\u05EA \u05D7\u05D3\u05E9\u05D4" }),
9987
+ /* @__PURE__ */ jsx20("p", { className: "text-xs text-slate-500", children: "\u05D4\u05D2\u05D3\u05E8\u05EA \u05EA\u05D5\u05DB\u05DF \u05D4\u05D5\u05D3\u05E2\u05D4 \u05D5\u05DE\u05E9\u05EA\u05E0\u05D9\u05DD \u05DC\u05D0\u05D9\u05E9\u05D5\u05E8 Meta Cloud API" })
9742
9988
  ] })
9743
9989
  ] }),
9744
- /* @__PURE__ */ jsx19(
9990
+ /* @__PURE__ */ jsx20(
9745
9991
  "button",
9746
9992
  {
9747
9993
  type: "button",
9748
9994
  onClick: onClose,
9749
9995
  className: "p-1.5 text-slate-400 hover:text-slate-700 hover:bg-slate-200/60 rounded-lg transition-colors cursor-pointer",
9750
9996
  "aria-label": "\u05E1\u05D2\u05D5\u05E8",
9751
- children: /* @__PURE__ */ jsx19(X9, { className: "w-5 h-5" })
9997
+ children: /* @__PURE__ */ jsx20(X9, { className: "w-5 h-5" })
9752
9998
  }
9753
9999
  )
9754
10000
  ] }),
9755
- /* @__PURE__ */ jsxs16("form", { onSubmit: handleSubmit, className: "flex flex-col overflow-hidden flex-1", children: [
9756
- /* @__PURE__ */ jsxs16("div", { className: "p-6 overflow-y-auto space-y-5 flex-1", children: [
9757
- submitError && /* @__PURE__ */ jsxs16("div", { className: "p-3 bg-rose-50 border border-rose-200 rounded-xl text-xs text-rose-800 flex items-center gap-2", children: [
9758
- /* @__PURE__ */ jsx19(AlertCircle2, { className: "w-4 h-4 text-rose-600 shrink-0" }),
9759
- /* @__PURE__ */ jsx19("span", { children: submitError })
10001
+ /* @__PURE__ */ jsxs17("form", { onSubmit: handleSubmit, className: "flex flex-col overflow-hidden flex-1", children: [
10002
+ /* @__PURE__ */ jsxs17("div", { className: "p-6 overflow-y-auto space-y-5 flex-1", children: [
10003
+ submitError && /* @__PURE__ */ jsxs17("div", { className: "p-3 bg-rose-50 border border-rose-200 rounded-xl text-xs text-rose-800 flex items-center gap-2", children: [
10004
+ /* @__PURE__ */ jsx20(AlertCircle2, { className: "w-4 h-4 text-rose-600 shrink-0" }),
10005
+ /* @__PURE__ */ jsx20("span", { children: submitError })
9760
10006
  ] }),
9761
- /* @__PURE__ */ jsxs16("div", { className: "space-y-1.5", children: [
9762
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between", children: [
9763
- /* @__PURE__ */ jsxs16("label", { className: "block text-xs font-bold text-slate-800", children: [
10007
+ /* @__PURE__ */ jsxs17("div", { className: "space-y-1.5", children: [
10008
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between", children: [
10009
+ /* @__PURE__ */ jsxs17("label", { className: "block text-xs font-bold text-slate-800", children: [
9764
10010
  "\u05E9\u05DD \u05EA\u05D1\u05E0\u05D9\u05EA \u05D7\u05D3\u05E9\u05D4 ",
9765
- /* @__PURE__ */ jsx19("span", { className: "text-rose-500", children: "*" })
10011
+ /* @__PURE__ */ jsx20("span", { className: "text-rose-500", children: "*" })
9766
10012
  ] }),
9767
- templateName && isNamePatternValid && !isNameDuplicate && /* @__PURE__ */ jsxs16("span", { className: "text-[11px] text-emerald-600 font-semibold flex items-center gap-1", children: [
9768
- /* @__PURE__ */ jsx19(CheckCircle22, { className: "w-3.5 h-3.5" }),
10013
+ templateName && isNamePatternValid && !isNameDuplicate && /* @__PURE__ */ jsxs17("span", { className: "text-[11px] text-emerald-600 font-semibold flex items-center gap-1", children: [
10014
+ /* @__PURE__ */ jsx20(CheckCircle22, { className: "w-3.5 h-3.5" }),
9769
10015
  " \u05E9\u05DD \u05EA\u05E7\u05D9\u05DF"
9770
10016
  ] })
9771
10017
  ] }),
9772
- /* @__PURE__ */ jsx19(
10018
+ /* @__PURE__ */ jsx20(
9773
10019
  "input",
9774
10020
  {
9775
10021
  type: "text",
@@ -9781,47 +10027,47 @@ function CreateTemplateModal({
9781
10027
  required: true
9782
10028
  }
9783
10029
  ),
9784
- /* @__PURE__ */ jsx19("p", { className: "text-[10px] text-slate-400 mt-1", children: "\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA \u05E7\u05D8\u05E0\u05D5\u05EA \u05D1\u05D0\u05E0\u05D2\u05DC\u05D9\u05EA, \u05DE\u05E1\u05E4\u05E8\u05D9\u05DD \u05D5\u05E7\u05D5\u05D5\u05D9\u05DD \u05EA\u05D7\u05EA\u05D5\u05E0\u05D9\u05DD \u05D1\u05DC\u05D1\u05D3." }),
9785
- !isNameEmpty && isNameDuplicate && /* @__PURE__ */ jsxs16("p", { className: "text-[11px] text-rose-600 font-semibold flex items-center gap-1 mt-1", children: [
9786
- /* @__PURE__ */ jsx19(AlertCircle2, { className: "w-3.5 h-3.5 shrink-0" }),
10030
+ /* @__PURE__ */ jsx20("p", { className: "text-[10px] text-slate-400 mt-1", children: "\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA \u05E7\u05D8\u05E0\u05D5\u05EA \u05D1\u05D0\u05E0\u05D2\u05DC\u05D9\u05EA, \u05DE\u05E1\u05E4\u05E8\u05D9\u05DD \u05D5\u05E7\u05D5\u05D5\u05D9\u05DD \u05EA\u05D7\u05EA\u05D5\u05E0\u05D9\u05DD \u05D1\u05DC\u05D1\u05D3." }),
10031
+ !isNameEmpty && isNameDuplicate && /* @__PURE__ */ jsxs17("p", { className: "text-[11px] text-rose-600 font-semibold flex items-center gap-1 mt-1", children: [
10032
+ /* @__PURE__ */ jsx20(AlertCircle2, { className: "w-3.5 h-3.5 shrink-0" }),
9787
10033
  "\u05E9\u05DD \u05D4\u05EA\u05D1\u05E0\u05D9\u05EA \u05DB\u05D1\u05E8 \u05E7\u05D9\u05D9\u05DD \u05D1\u05D7\u05E9\u05D1\u05D5\u05DF \u05E2\u05D1\u05D5\u05E8 \u05E9\u05E4\u05D4 \u05D6\u05D5 (",
9788
10034
  language,
9789
10035
  "). \u05D0\u05E0\u05D0 \u05D1\u05D7\u05E8 \u05E9\u05DD \u05D9\u05D9\u05D7\u05D5\u05D3\u05D9 \u05D0\u05D5 \u05E9\u05E4\u05D4 \u05D0\u05D7\u05E8\u05EA."
9790
10036
  ] })
9791
10037
  ] }),
9792
- /* @__PURE__ */ jsxs16("div", { className: "grid grid-cols-2 gap-4", children: [
9793
- /* @__PURE__ */ jsxs16("div", { className: "space-y-1.5", children: [
9794
- /* @__PURE__ */ jsx19("label", { className: "block text-xs font-semibold text-slate-700", children: "\u05E9\u05E4\u05D4" }),
9795
- /* @__PURE__ */ jsx19(
10038
+ /* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-2 gap-4", children: [
10039
+ /* @__PURE__ */ jsxs17("div", { className: "space-y-1.5", children: [
10040
+ /* @__PURE__ */ jsx20("label", { className: "block text-xs font-semibold text-slate-700", children: "\u05E9\u05E4\u05D4" }),
10041
+ /* @__PURE__ */ jsx20(
9796
10042
  "select",
9797
10043
  {
9798
10044
  value: language,
9799
10045
  onChange: (e) => setLanguage(e.target.value),
9800
10046
  className: "w-full px-3 py-2 text-xs bg-slate-50 border border-slate-200 rounded-xl text-slate-800 outline-hidden",
9801
- children: LANGUAGE_OPTIONS.map((opt) => /* @__PURE__ */ jsx19("option", { value: opt.value, children: opt.label }, opt.value))
10047
+ children: LANGUAGE_OPTIONS.map((opt) => /* @__PURE__ */ jsx20("option", { value: opt.value, children: opt.label }, opt.value))
9802
10048
  }
9803
10049
  )
9804
10050
  ] }),
9805
- /* @__PURE__ */ jsxs16("div", { className: "space-y-1.5", children: [
9806
- /* @__PURE__ */ jsx19("label", { className: "block text-xs font-semibold text-slate-700", children: "\u05E7\u05D8\u05D2\u05D5\u05E8\u05D9\u05D4" }),
9807
- /* @__PURE__ */ jsx19(
10051
+ /* @__PURE__ */ jsxs17("div", { className: "space-y-1.5", children: [
10052
+ /* @__PURE__ */ jsx20("label", { className: "block text-xs font-semibold text-slate-700", children: "\u05E7\u05D8\u05D2\u05D5\u05E8\u05D9\u05D4" }),
10053
+ /* @__PURE__ */ jsx20(
9808
10054
  "select",
9809
10055
  {
9810
10056
  value: category,
9811
10057
  onChange: (e) => setCategory(e.target.value),
9812
10058
  className: "w-full px-3 py-2 text-xs bg-slate-50 border border-slate-200 rounded-xl text-slate-800 outline-hidden",
9813
- children: CATEGORY_OPTIONS.map((opt) => /* @__PURE__ */ jsx19("option", { value: opt.value, children: opt.label }, opt.value))
10059
+ children: CATEGORY_OPTIONS.map((opt) => /* @__PURE__ */ jsx20("option", { value: opt.value, children: opt.label }, opt.value))
9814
10060
  }
9815
10061
  )
9816
10062
  ] })
9817
10063
  ] }),
9818
- /* @__PURE__ */ jsxs16("div", { className: "space-y-2", children: [
9819
- /* @__PURE__ */ jsxs16("label", { className: "block text-xs font-bold text-slate-800", children: [
10064
+ /* @__PURE__ */ jsxs17("div", { className: "space-y-2", children: [
10065
+ /* @__PURE__ */ jsxs17("label", { className: "block text-xs font-bold text-slate-800", children: [
9820
10066
  "\u05EA\u05D5\u05DB\u05DF \u05D2\u05D5\u05E3 \u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 ",
9821
- /* @__PURE__ */ jsx19("span", { className: "text-rose-500", children: "*" })
10067
+ /* @__PURE__ */ jsx20("span", { className: "text-rose-500", children: "*" })
9822
10068
  ] }),
9823
- /* @__PURE__ */ jsxs16("div", { className: "border border-slate-200 focus-within:border-emerald-500 focus-within:ring-1 focus-within:ring-emerald-500 rounded-xl overflow-visible bg-white transition-all shadow-xs relative", children: [
9824
- /* @__PURE__ */ jsx19(
10069
+ /* @__PURE__ */ jsxs17("div", { className: "border border-slate-200 focus-within:border-emerald-500 focus-within:ring-1 focus-within:ring-emerald-500 rounded-xl overflow-visible bg-white transition-all shadow-xs relative", children: [
10070
+ /* @__PURE__ */ jsx20(
9825
10071
  "textarea",
9826
10072
  {
9827
10073
  ref: textareaRef,
@@ -9836,14 +10082,14 @@ function CreateTemplateModal({
9836
10082
  required: true
9837
10083
  }
9838
10084
  ),
9839
- /* @__PURE__ */ jsxs16(
10085
+ /* @__PURE__ */ jsxs17(
9840
10086
  "div",
9841
10087
  {
9842
10088
  className: "bg-slate-50/90 border-t border-slate-100 px-3 py-1.5 flex items-center justify-between gap-2 select-none relative",
9843
10089
  dir: language === "en_US" ? "ltr" : "rtl",
9844
10090
  children: [
9845
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-1", children: [
9846
- /* @__PURE__ */ jsx19(
10091
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-1", children: [
10092
+ /* @__PURE__ */ jsx20(
9847
10093
  "button",
9848
10094
  {
9849
10095
  type: "button",
@@ -9851,10 +10097,10 @@ function CreateTemplateModal({
9851
10097
  onClick: () => handleApplyFormatting("*"),
9852
10098
  title: "\u05DE\u05D5\u05D3\u05D2\u05E9 (Bold) *\u05D8\u05E7\u05E1\u05D8*",
9853
10099
  className: "w-7 h-7 rounded-lg text-slate-600 hover:text-slate-900 hover:bg-slate-200/70 active:bg-slate-300/80 flex items-center justify-center font-bold text-xs transition-colors cursor-pointer",
9854
- children: /* @__PURE__ */ jsx19(Bold, { className: "w-3.5 h-3.5" })
10100
+ children: /* @__PURE__ */ jsx20(Bold, { className: "w-3.5 h-3.5" })
9855
10101
  }
9856
10102
  ),
9857
- /* @__PURE__ */ jsx19(
10103
+ /* @__PURE__ */ jsx20(
9858
10104
  "button",
9859
10105
  {
9860
10106
  type: "button",
@@ -9862,10 +10108,10 @@ function CreateTemplateModal({
9862
10108
  onClick: () => handleApplyFormatting("_"),
9863
10109
  title: "\u05E0\u05D8\u05D5\u05D9 (Italic) _\u05D8\u05E7\u05E1\u05D8_",
9864
10110
  className: "w-7 h-7 rounded-lg text-slate-600 hover:text-slate-900 hover:bg-slate-200/70 active:bg-slate-300/80 flex items-center justify-center italic text-xs transition-colors cursor-pointer",
9865
- children: /* @__PURE__ */ jsx19(Italic, { className: "w-3.5 h-3.5" })
10111
+ children: /* @__PURE__ */ jsx20(Italic, { className: "w-3.5 h-3.5" })
9866
10112
  }
9867
10113
  ),
9868
- /* @__PURE__ */ jsx19(
10114
+ /* @__PURE__ */ jsx20(
9869
10115
  "button",
9870
10116
  {
9871
10117
  type: "button",
@@ -9873,12 +10119,12 @@ function CreateTemplateModal({
9873
10119
  onClick: () => handleApplyFormatting("~"),
9874
10120
  title: "\u05E7\u05D5 \u05D7\u05D5\u05E6\u05D4 (Strikethrough) ~\u05D8\u05E7\u05E1\u05D8~",
9875
10121
  className: "w-7 h-7 rounded-lg text-slate-600 hover:text-slate-900 hover:bg-slate-200/70 active:bg-slate-300/80 flex items-center justify-center text-xs transition-colors cursor-pointer",
9876
- children: /* @__PURE__ */ jsx19(Strikethrough, { className: "w-3.5 h-3.5" })
10122
+ children: /* @__PURE__ */ jsx20(Strikethrough, { className: "w-3.5 h-3.5" })
9877
10123
  }
9878
10124
  ),
9879
- /* @__PURE__ */ jsx19("div", { className: "h-4 w-px bg-slate-200 mx-1" }),
9880
- /* @__PURE__ */ jsxs16("div", { className: "relative inline-block", ref: emojiPickerRef, children: [
9881
- /* @__PURE__ */ jsx19(
10125
+ /* @__PURE__ */ jsx20("div", { className: "h-4 w-px bg-slate-200 mx-1" }),
10126
+ /* @__PURE__ */ jsxs17("div", { className: "relative inline-block", ref: emojiPickerRef, children: [
10127
+ /* @__PURE__ */ jsx20(
9882
10128
  "button",
9883
10129
  {
9884
10130
  type: "button",
@@ -9886,16 +10132,16 @@ function CreateTemplateModal({
9886
10132
  onClick: () => setIsEmojiPickerOpen(!isEmojiPickerOpen),
9887
10133
  title: "\u05D4\u05D5\u05E1\u05E3 \u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9 (Emoji)",
9888
10134
  className: `w-7 h-7 rounded-lg flex items-center justify-center transition-colors cursor-pointer ${isEmojiPickerOpen ? "bg-emerald-100 text-emerald-700" : "text-slate-600 hover:text-slate-900 hover:bg-slate-200/70 active:bg-slate-300/80"}`,
9889
- children: /* @__PURE__ */ jsx19(Smile, { className: "w-4 h-4" })
10135
+ children: /* @__PURE__ */ jsx20(Smile, { className: "w-4 h-4" })
9890
10136
  }
9891
10137
  ),
9892
- isEmojiPickerOpen && /* @__PURE__ */ jsx19(
10138
+ isEmojiPickerOpen && /* @__PURE__ */ jsx20(
9893
10139
  "div",
9894
10140
  {
9895
10141
  className: `absolute bottom-full mb-2 ${language === "en_US" ? "left-0" : "right-0"} z-50 shadow-2xl rounded-2xl overflow-hidden border border-slate-200 animate-in fade-in zoom-in-95 duration-100`,
9896
10142
  dir: "ltr",
9897
10143
  onMouseDown: (e) => e.stopPropagation(),
9898
- children: /* @__PURE__ */ jsx19(
10144
+ children: /* @__PURE__ */ jsx20(
9899
10145
  EmojiPicker,
9900
10146
  {
9901
10147
  onEmojiClick: (emojiData) => {
@@ -9912,8 +10158,8 @@ function CreateTemplateModal({
9912
10158
  }
9913
10159
  )
9914
10160
  ] }),
9915
- /* @__PURE__ */ jsx19("div", { className: "h-4 w-px bg-slate-200 mx-1" }),
9916
- /* @__PURE__ */ jsxs16(
10161
+ /* @__PURE__ */ jsx20("div", { className: "h-4 w-px bg-slate-200 mx-1" }),
10162
+ /* @__PURE__ */ jsxs17(
9917
10163
  "button",
9918
10164
  {
9919
10165
  type: "button",
@@ -9923,28 +10169,28 @@ function CreateTemplateModal({
9923
10169
  "aria-label": language === "en_US" ? "Add variable" : "\u05DE\u05E9\u05EA\u05E0\u05D4",
9924
10170
  className: "h-7 px-2 rounded-lg text-slate-600 hover:text-slate-900 hover:bg-slate-200/70 active:bg-slate-300/80 flex items-center gap-1 text-xs font-medium transition-colors cursor-pointer",
9925
10171
  children: [
9926
- /* @__PURE__ */ jsx19(Plus, { className: "w-3.5 h-3.5" }),
9927
- /* @__PURE__ */ jsx19("span", { children: language === "en_US" ? "Add variable" : "\u05DE\u05E9\u05EA\u05E0\u05D4" })
10172
+ /* @__PURE__ */ jsx20(Plus, { className: "w-3.5 h-3.5" }),
10173
+ /* @__PURE__ */ jsx20("span", { children: language === "en_US" ? "Add variable" : "\u05DE\u05E9\u05EA\u05E0\u05D4" })
9928
10174
  ]
9929
10175
  }
9930
10176
  )
9931
10177
  ] }),
9932
- /* @__PURE__ */ jsxs16(
10178
+ /* @__PURE__ */ jsxs17(
9933
10179
  "div",
9934
10180
  {
9935
10181
  className: "flex items-center gap-1 font-mono text-[11px]",
9936
10182
  dir: "ltr",
9937
10183
  title: "\u05DE\u05D2\u05D1\u05DC\u05EA \u05EA\u05D5\u05D5\u05D9\u05DD (1024 \u05EA\u05D5\u05D5\u05D9\u05DD \u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8)",
9938
10184
  children: [
9939
- /* @__PURE__ */ jsx19(
10185
+ /* @__PURE__ */ jsx20(
9940
10186
  "span",
9941
10187
  {
9942
10188
  className: `font-semibold transition-colors ${bodyText.length >= 1024 ? "text-rose-600" : bodyText.length >= 950 ? "text-amber-600" : "text-slate-500"}`,
9943
10189
  children: bodyText.length
9944
10190
  }
9945
10191
  ),
9946
- /* @__PURE__ */ jsx19("span", { className: "text-slate-300", children: "/" }),
9947
- /* @__PURE__ */ jsx19("span", { className: "text-slate-400", children: "1024" })
10192
+ /* @__PURE__ */ jsx20("span", { className: "text-slate-300", children: "/" }),
10193
+ /* @__PURE__ */ jsx20("span", { className: "text-slate-400", children: "1024" })
9948
10194
  ]
9949
10195
  }
9950
10196
  )
@@ -9952,30 +10198,30 @@ function CreateTemplateModal({
9952
10198
  }
9953
10199
  )
9954
10200
  ] }),
9955
- /* @__PURE__ */ jsx19("div", { className: "flex flex-wrap items-center justify-between text-[11px] text-slate-400 px-1 gap-2", children: /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-3", children: [
9956
- /* @__PURE__ */ jsxs16("span", { children: [
10201
+ /* @__PURE__ */ jsx20("div", { className: "flex flex-wrap items-center justify-between text-[11px] text-slate-400 px-1 gap-2", children: /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-3", children: [
10202
+ /* @__PURE__ */ jsxs17("span", { children: [
9957
10203
  ratioInfo.staticWordsCount,
9958
10204
  " \u05DE\u05D9\u05DC\u05D9\u05DD"
9959
10205
  ] }),
9960
- /* @__PURE__ */ jsxs16("span", { children: [
10206
+ /* @__PURE__ */ jsxs17("span", { children: [
9961
10207
  ratioInfo.variableCount,
9962
10208
  " \u05DE\u05E9\u05EA\u05E0\u05D9\u05DD"
9963
10209
  ] })
9964
10210
  ] }) }),
9965
- uniqueVariables.length > 0 && /* @__PURE__ */ jsxs16("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3", children: [
9966
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-1.5 text-xs font-bold text-slate-800", children: [
9967
- /* @__PURE__ */ jsx19(Info2, { className: "w-4 h-4 text-emerald-600" }),
9968
- /* @__PURE__ */ jsx19("span", { children: "\u05E2\u05E8\u05DB\u05D9\u05DD \u05DC\u05D3\u05D5\u05D2\u05DE\u05D4 \u05DC\u05DE\u05E9\u05EA\u05E0\u05D9\u05DD (\u05D7\u05D5\u05D1\u05D4 \u05DC\u05D0\u05D9\u05E9\u05D5\u05E8 Meta)" })
10211
+ uniqueVariables.length > 0 && /* @__PURE__ */ jsxs17("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3", children: [
10212
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-1.5 text-xs font-bold text-slate-800", children: [
10213
+ /* @__PURE__ */ jsx20(Info2, { className: "w-4 h-4 text-emerald-600" }),
10214
+ /* @__PURE__ */ jsx20("span", { children: "\u05E2\u05E8\u05DB\u05D9\u05DD \u05DC\u05D3\u05D5\u05D2\u05DE\u05D4 \u05DC\u05DE\u05E9\u05EA\u05E0\u05D9\u05DD (\u05D7\u05D5\u05D1\u05D4 \u05DC\u05D0\u05D9\u05E9\u05D5\u05E8 Meta)" })
9969
10215
  ] }),
9970
- /* @__PURE__ */ jsx19("p", { className: "text-[11px] text-slate-500 leading-relaxed", children: "Meta \u05D3\u05D5\u05E8\u05E9\u05EA \u05D3\u05D5\u05D2\u05DE\u05D4 \u05E2\u05D1\u05D5\u05E8 \u05DB\u05DC \u05DE\u05E9\u05EA\u05E0\u05D4 \u05D9\u05D9\u05D7\u05D5\u05D3\u05D9 \u05DB\u05D3\u05D9 \u05DC\u05D5\u05D5\u05D3\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D5\u05EA \u05EA\u05D5\u05DB\u05DF." }),
9971
- /* @__PURE__ */ jsx19("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 pt-1", children: uniqueVariables.map((idx) => /* @__PURE__ */ jsxs16("div", { className: "space-y-1", children: [
9972
- /* @__PURE__ */ jsxs16("label", { className: "block text-[11px] font-semibold text-slate-700 font-mono", children: [
10216
+ /* @__PURE__ */ jsx20("p", { className: "text-[11px] text-slate-500 leading-relaxed", children: "Meta \u05D3\u05D5\u05E8\u05E9\u05EA \u05D3\u05D5\u05D2\u05DE\u05D4 \u05E2\u05D1\u05D5\u05E8 \u05DB\u05DC \u05DE\u05E9\u05EA\u05E0\u05D4 \u05D9\u05D9\u05D7\u05D5\u05D3\u05D9 \u05DB\u05D3\u05D9 \u05DC\u05D5\u05D5\u05D3\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D5\u05EA \u05EA\u05D5\u05DB\u05DF." }),
10217
+ /* @__PURE__ */ jsx20("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 pt-1", children: uniqueVariables.map((idx) => /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
10218
+ /* @__PURE__ */ jsxs17("label", { className: "block text-[11px] font-semibold text-slate-700 font-mono", children: [
9973
10219
  "\u05D3\u05D5\u05D2\u05DE\u05D4 \u05E2\u05D1\u05D5\u05E8 ",
9974
10220
  `{{${idx}}}`,
9975
10221
  " ",
9976
- /* @__PURE__ */ jsx19("span", { className: "text-rose-500", children: "*" })
10222
+ /* @__PURE__ */ jsx20("span", { className: "text-rose-500", children: "*" })
9977
10223
  ] }),
9978
- /* @__PURE__ */ jsx19(
10224
+ /* @__PURE__ */ jsx20(
9979
10225
  "input",
9980
10226
  {
9981
10227
  type: "text",
@@ -9990,21 +10236,21 @@ function CreateTemplateModal({
9990
10236
  )
9991
10237
  ] }, idx)) })
9992
10238
  ] }),
9993
- bodyText.trim().length > 0 && validationResult.errors.length > 0 && /* @__PURE__ */ jsxs16("div", { className: "p-3.5 bg-amber-50 border border-amber-200 rounded-xl space-y-1.5 text-xs text-amber-900", children: [
9994
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-1.5 font-bold", children: [
9995
- /* @__PURE__ */ jsx19(AlertCircle2, { className: "w-4 h-4 text-amber-600 shrink-0" }),
9996
- /* @__PURE__ */ jsx19("span", { children: "\u05D3\u05E8\u05D9\u05E9\u05D5\u05EA \u05EA\u05E7\u05D9\u05E0\u05D5\u05EA Meta \u05DC\u05D7\u05E1\u05D9\u05DE\u05EA \u05E9\u05D2\u05D9\u05D0\u05D5\u05EA:" })
10239
+ bodyText.trim().length > 0 && validationResult.errors.length > 0 && /* @__PURE__ */ jsxs17("div", { className: "p-3.5 bg-amber-50 border border-amber-200 rounded-xl space-y-1.5 text-xs text-amber-900", children: [
10240
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-1.5 font-bold", children: [
10241
+ /* @__PURE__ */ jsx20(AlertCircle2, { className: "w-4 h-4 text-amber-600 shrink-0" }),
10242
+ /* @__PURE__ */ jsx20("span", { children: "\u05D3\u05E8\u05D9\u05E9\u05D5\u05EA \u05EA\u05E7\u05D9\u05E0\u05D5\u05EA Meta \u05DC\u05D7\u05E1\u05D9\u05DE\u05EA \u05E9\u05D2\u05D9\u05D0\u05D5\u05EA:" })
9997
10243
  ] }),
9998
- /* @__PURE__ */ jsx19("ul", { className: "list-disc list-inside space-y-1 text-[11px] pr-2 leading-relaxed", children: validationResult.errors.map((err, i) => /* @__PURE__ */ jsx19("li", { children: err }, i)) })
10244
+ /* @__PURE__ */ jsx20("ul", { className: "list-disc list-inside space-y-1 text-[11px] pr-2 leading-relaxed", children: validationResult.errors.map((err, i) => /* @__PURE__ */ jsx20("li", { children: err }, i)) })
9999
10245
  ] })
10000
10246
  ] }),
10001
- /* @__PURE__ */ jsxs16("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3", children: [
10002
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between", children: [
10003
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
10004
- /* @__PURE__ */ jsx19(Paperclip, { className: "w-4 h-4 text-slate-600" }),
10005
- /* @__PURE__ */ jsx19("label", { htmlFor: "modalHeaderFileCheckbox", className: "text-xs font-bold text-slate-800 cursor-pointer", children: "\u05E7\u05D5\u05D1\u05E5 \u05DB\u05D5\u05EA\u05E8\u05EA \u05DE\u05E6\u05D5\u05E8\u05E3 (\u05D0\u05D5\u05E4\u05E6\u05D9\u05D5\u05E0\u05DC\u05D9)" })
10247
+ /* @__PURE__ */ jsxs17("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3", children: [
10248
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between", children: [
10249
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
10250
+ /* @__PURE__ */ jsx20(Paperclip, { className: "w-4 h-4 text-slate-600" }),
10251
+ /* @__PURE__ */ jsx20("label", { htmlFor: "modalHeaderFileCheckbox", className: "text-xs font-bold text-slate-800 cursor-pointer", children: "\u05E7\u05D5\u05D1\u05E5 \u05DB\u05D5\u05EA\u05E8\u05EA \u05DE\u05E6\u05D5\u05E8\u05E3 (\u05D0\u05D5\u05E4\u05E6\u05D9\u05D5\u05E0\u05DC\u05D9)" })
10006
10252
  ] }),
10007
- /* @__PURE__ */ jsx19(
10253
+ /* @__PURE__ */ jsx20(
10008
10254
  "input",
10009
10255
  {
10010
10256
  type: "checkbox",
@@ -10020,12 +10266,12 @@ function CreateTemplateModal({
10020
10266
  }
10021
10267
  )
10022
10268
  ] }),
10023
- hasFileHeader && /* @__PURE__ */ jsxs16("div", { className: "space-y-3 pt-1", children: [
10024
- fileError && /* @__PURE__ */ jsxs16("div", { className: "p-3 bg-rose-50 border border-rose-200 rounded-xl flex items-center gap-2 text-xs text-rose-700 font-semibold animate-in fade-in duration-150", children: [
10025
- /* @__PURE__ */ jsx19(AlertCircle2, { className: "w-4 h-4 text-rose-600 shrink-0" }),
10026
- /* @__PURE__ */ jsx19("span", { children: fileError })
10269
+ hasFileHeader && /* @__PURE__ */ jsxs17("div", { className: "space-y-3 pt-1", children: [
10270
+ fileError && /* @__PURE__ */ jsxs17("div", { className: "p-3 bg-rose-50 border border-rose-200 rounded-xl flex items-center gap-2 text-xs text-rose-700 font-semibold animate-in fade-in duration-150", children: [
10271
+ /* @__PURE__ */ jsx20(AlertCircle2, { className: "w-4 h-4 text-rose-600 shrink-0" }),
10272
+ /* @__PURE__ */ jsx20("span", { children: fileError })
10027
10273
  ] }),
10028
- /* @__PURE__ */ jsx19(
10274
+ /* @__PURE__ */ jsx20(
10029
10275
  "input",
10030
10276
  {
10031
10277
  ref: fileInputRef,
@@ -10035,7 +10281,7 @@ function CreateTemplateModal({
10035
10281
  className: "hidden"
10036
10282
  }
10037
10283
  ),
10038
- !selectedFile && /* @__PURE__ */ jsxs16(
10284
+ !selectedFile && /* @__PURE__ */ jsxs17(
10039
10285
  "button",
10040
10286
  {
10041
10287
  type: "button",
@@ -10045,49 +10291,49 @@ function CreateTemplateModal({
10045
10291
  },
10046
10292
  className: "w-full p-4 border-2 border-dashed border-slate-300 hover:border-emerald-500 rounded-xl flex flex-col items-center justify-center gap-2 bg-white hover:bg-emerald-50/30 transition-all cursor-pointer",
10047
10293
  children: [
10048
- /* @__PURE__ */ jsx19("div", { className: "w-9 h-9 rounded-full bg-slate-100 text-slate-500 flex items-center justify-center", children: /* @__PURE__ */ jsx19(Upload2, { className: "w-4 h-4" }) }),
10049
- /* @__PURE__ */ jsxs16("div", { className: "text-center", children: [
10050
- /* @__PURE__ */ jsx19("span", { className: "text-xs font-bold text-emerald-700 block", children: "\u05DC\u05D7\u05E5 \u05DC\u05D1\u05D7\u05D9\u05E8\u05EA \u05E7\u05D5\u05D1\u05E5" }),
10051
- /* @__PURE__ */ jsx19("span", { className: "text-[10px] text-slate-400", children: "PDF, JPG, PNG, MP4 \u05E2\u05D3 5MB" })
10294
+ /* @__PURE__ */ jsx20("div", { className: "w-9 h-9 rounded-full bg-slate-100 text-slate-500 flex items-center justify-center", children: /* @__PURE__ */ jsx20(Upload2, { className: "w-4 h-4" }) }),
10295
+ /* @__PURE__ */ jsxs17("div", { className: "text-center", children: [
10296
+ /* @__PURE__ */ jsx20("span", { className: "text-xs font-bold text-emerald-700 block", children: "\u05DC\u05D7\u05E5 \u05DC\u05D1\u05D7\u05D9\u05E8\u05EA \u05E7\u05D5\u05D1\u05E5" }),
10297
+ /* @__PURE__ */ jsx20("span", { className: "text-[10px] text-slate-400", children: "PDF, JPG, PNG, MP4 \u05E2\u05D3 5MB" })
10052
10298
  ] })
10053
10299
  ]
10054
10300
  }
10055
10301
  ),
10056
- selectedFile && /* @__PURE__ */ jsxs16("div", { className: "p-3 bg-white border border-emerald-200 rounded-xl flex items-center justify-between gap-3 shadow-2xs", children: [
10057
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2.5 overflow-hidden", children: [
10058
- /* @__PURE__ */ jsx19("div", { className: "w-8 h-8 rounded-lg bg-emerald-50 text-emerald-600 flex items-center justify-center shrink-0", children: selectedFile.type.includes("pdf") || selectedFile.name.toLowerCase().endsWith(".pdf") ? /* @__PURE__ */ jsx19(FileText2, { className: "w-4 h-4" }) : selectedFile.type.includes("video") || selectedFile.name.toLowerCase().match(/\.(mp4|mov|avi|webm)$/) ? /* @__PURE__ */ jsx19(Video, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx19(ImageIcon, { className: "w-4 h-4" }) }),
10059
- /* @__PURE__ */ jsxs16("div", { className: "overflow-hidden", children: [
10060
- /* @__PURE__ */ jsx19("p", { className: "text-xs font-bold text-slate-800 truncate", title: selectedFile.name, children: /* @__PURE__ */ jsx19("span", { dir: "ltr", className: "inline-block truncate max-w-full", children: selectedFile.name }) }),
10061
- /* @__PURE__ */ jsx19("p", { className: "text-[10px] text-slate-400", children: /* @__PURE__ */ jsxs16("span", { dir: "ltr", className: "inline-block", children: [
10302
+ selectedFile && /* @__PURE__ */ jsxs17("div", { className: "p-3 bg-white border border-emerald-200 rounded-xl flex items-center justify-between gap-3 shadow-2xs", children: [
10303
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2.5 overflow-hidden", children: [
10304
+ /* @__PURE__ */ jsx20("div", { className: "w-8 h-8 rounded-lg bg-emerald-50 text-emerald-600 flex items-center justify-center shrink-0", children: selectedFile.type.includes("pdf") || selectedFile.name.toLowerCase().endsWith(".pdf") ? /* @__PURE__ */ jsx20(FileText2, { className: "w-4 h-4" }) : selectedFile.type.includes("video") || selectedFile.name.toLowerCase().match(/\.(mp4|mov|avi|webm)$/) ? /* @__PURE__ */ jsx20(Video, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx20(ImageIcon, { className: "w-4 h-4" }) }),
10305
+ /* @__PURE__ */ jsxs17("div", { className: "overflow-hidden", children: [
10306
+ /* @__PURE__ */ jsx20("p", { className: "text-xs font-bold text-slate-800 truncate", title: selectedFile.name, children: /* @__PURE__ */ jsx20("span", { dir: "ltr", className: "inline-block truncate max-w-full", children: selectedFile.name }) }),
10307
+ /* @__PURE__ */ jsx20("p", { className: "text-[10px] text-slate-400", children: /* @__PURE__ */ jsxs17("span", { dir: "ltr", className: "inline-block", children: [
10062
10308
  formatFileSize(selectedFile.size),
10063
10309
  selectedFile.type ? ` \u2022 ${selectedFile.type}` : ""
10064
10310
  ] }) })
10065
10311
  ] })
10066
10312
  ] }),
10067
- /* @__PURE__ */ jsx19(
10313
+ /* @__PURE__ */ jsx20(
10068
10314
  "button",
10069
10315
  {
10070
10316
  type: "button",
10071
10317
  onClick: handleRemoveFile,
10072
10318
  className: "p-1 text-slate-400 hover:text-rose-600 rounded-md transition-colors cursor-pointer",
10073
10319
  title: "\u05D4\u05E1\u05E8 \u05E7\u05D5\u05D1\u05E5",
10074
- children: /* @__PURE__ */ jsx19(Trash22, { className: "w-4 h-4" })
10320
+ children: /* @__PURE__ */ jsx20(Trash22, { className: "w-4 h-4" })
10075
10321
  }
10076
10322
  )
10077
10323
  ] })
10078
10324
  ] })
10079
10325
  ] }),
10080
- /* @__PURE__ */ jsxs16("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3.5", children: [
10081
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between", children: [
10082
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
10083
- /* @__PURE__ */ jsx19(MousePointerClick, { className: "w-4 h-4 text-slate-600" }),
10084
- /* @__PURE__ */ jsxs16("div", { children: [
10085
- /* @__PURE__ */ jsx19("span", { className: "text-xs font-bold text-slate-800 block", children: "\u05DB\u05E4\u05EA\u05D5\u05E8\u05D9\u05DD \u05D0\u05D9\u05E0\u05D8\u05E8\u05D0\u05E7\u05D8\u05D9\u05D1\u05D9\u05D9\u05DD (\u05D0\u05D5\u05E4\u05E6\u05D9\u05D5\u05E0\u05DC\u05D9)" }),
10086
- /* @__PURE__ */ jsx19("span", { className: "text-[10px] text-slate-400 block", children: "\u05D4\u05D5\u05E1\u05E4\u05EA \u05DB\u05E4\u05EA\u05D5\u05E8\u05D9 \u05E7\u05E8\u05D9\u05D0\u05D4 \u05DC\u05E4\u05E2\u05D5\u05DC\u05D4 (CTA) \u05D5\u05EA\u05D2\u05D5\u05D1\u05D4 \u05DE\u05D4\u05D9\u05E8\u05D4 (\u05E2\u05D3 10 \u05DB\u05E4\u05EA\u05D5\u05E8\u05D9\u05DD)" })
10326
+ /* @__PURE__ */ jsxs17("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3.5", children: [
10327
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between", children: [
10328
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
10329
+ /* @__PURE__ */ jsx20(MousePointerClick, { className: "w-4 h-4 text-slate-600" }),
10330
+ /* @__PURE__ */ jsxs17("div", { children: [
10331
+ /* @__PURE__ */ jsx20("span", { className: "text-xs font-bold text-slate-800 block", children: "\u05DB\u05E4\u05EA\u05D5\u05E8\u05D9\u05DD \u05D0\u05D9\u05E0\u05D8\u05E8\u05D0\u05E7\u05D8\u05D9\u05D1\u05D9\u05D9\u05DD (\u05D0\u05D5\u05E4\u05E6\u05D9\u05D5\u05E0\u05DC\u05D9)" }),
10332
+ /* @__PURE__ */ jsx20("span", { className: "text-[10px] text-slate-400 block", children: "\u05D4\u05D5\u05E1\u05E4\u05EA \u05DB\u05E4\u05EA\u05D5\u05E8\u05D9 \u05E7\u05E8\u05D9\u05D0\u05D4 \u05DC\u05E4\u05E2\u05D5\u05DC\u05D4 (CTA) \u05D5\u05EA\u05D2\u05D5\u05D1\u05D4 \u05DE\u05D4\u05D9\u05E8\u05D4 (\u05E2\u05D3 10 \u05DB\u05E4\u05EA\u05D5\u05E8\u05D9\u05DD)" })
10087
10333
  ] })
10088
10334
  ] }),
10089
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
10090
- /* @__PURE__ */ jsxs16(
10335
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
10336
+ /* @__PURE__ */ jsxs17(
10091
10337
  "span",
10092
10338
  {
10093
10339
  className: `text-[10px] font-mono px-2 py-0.5 rounded-full border ${buttons.length >= 10 ? "bg-amber-50 text-amber-700 border-amber-200 font-bold" : "bg-white text-slate-500 border-slate-200"}`,
@@ -10097,8 +10343,8 @@ function CreateTemplateModal({
10097
10343
  ]
10098
10344
  }
10099
10345
  ),
10100
- /* @__PURE__ */ jsxs16("div", { className: "relative", ref: addButtonDropdownRef, children: [
10101
- /* @__PURE__ */ jsxs16(
10346
+ /* @__PURE__ */ jsxs17("div", { className: "relative", ref: addButtonDropdownRef, children: [
10347
+ /* @__PURE__ */ jsxs17(
10102
10348
  "button",
10103
10349
  {
10104
10350
  type: "button",
@@ -10107,9 +10353,9 @@ function CreateTemplateModal({
10107
10353
  className: `inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-semibold rounded-xl border transition-all ${buttons.length >= 10 ? "bg-slate-100 text-slate-400 border-slate-200 cursor-not-allowed opacity-60" : "bg-white text-emerald-700 border-emerald-200 hover:bg-emerald-50/80 active:scale-[0.98] shadow-2xs cursor-pointer"}`,
10108
10354
  title: buttons.length >= 10 ? "\u05D4\u05D2\u05E2\u05EA \u05DC\u05DE\u05D2\u05D1\u05DC\u05D4 \u05D4\u05DE\u05E8\u05D1\u05D9\u05EA \u05E9\u05DC 10 \u05DB\u05E4\u05EA\u05D5\u05E8\u05D9\u05DD" : "\u05D4\u05D5\u05E1\u05E3 \u05DB\u05E4\u05EA\u05D5\u05E8 \u05D7\u05D3\u05E9",
10109
10355
  children: [
10110
- /* @__PURE__ */ jsx19(Plus, { className: "w-3.5 h-3.5" }),
10111
- /* @__PURE__ */ jsx19("span", { children: "\u05D4\u05D5\u05E1\u05E3 \u05DB\u05E4\u05EA\u05D5\u05E8" }),
10112
- /* @__PURE__ */ jsx19(
10356
+ /* @__PURE__ */ jsx20(Plus, { className: "w-3.5 h-3.5" }),
10357
+ /* @__PURE__ */ jsx20("span", { children: "\u05D4\u05D5\u05E1\u05E3 \u05DB\u05E4\u05EA\u05D5\u05E8" }),
10358
+ /* @__PURE__ */ jsx20(
10113
10359
  ChevronDown2,
10114
10360
  {
10115
10361
  className: `w-3.5 h-3.5 transition-transform ${isAddButtonOpen ? "rotate-180" : ""}`
@@ -10118,63 +10364,63 @@ function CreateTemplateModal({
10118
10364
  ]
10119
10365
  }
10120
10366
  ),
10121
- isAddButtonOpen && /* @__PURE__ */ jsxs16("div", { className: "absolute top-full left-0 mt-1.5 w-64 bg-white border border-slate-200 rounded-xl shadow-xl z-30 p-1.5 space-y-1 animate-in fade-in-50 zoom-in-95 duration-100 divide-y divide-slate-100", children: [
10122
- /* @__PURE__ */ jsxs16(
10367
+ isAddButtonOpen && /* @__PURE__ */ jsxs17("div", { className: "absolute top-full left-0 mt-1.5 w-64 bg-white border border-slate-200 rounded-xl shadow-xl z-30 p-1.5 space-y-1 animate-in fade-in-50 zoom-in-95 duration-100 divide-y divide-slate-100", children: [
10368
+ /* @__PURE__ */ jsxs17(
10123
10369
  "button",
10124
10370
  {
10125
10371
  type: "button",
10126
10372
  onClick: () => handleAddButton("QUICK_REPLY"),
10127
10373
  className: "w-full p-2 text-right rounded-lg hover:bg-slate-50 flex items-start gap-2.5 transition-colors cursor-pointer group",
10128
10374
  children: [
10129
- /* @__PURE__ */ jsx19("div", { className: "w-7 h-7 rounded-md bg-emerald-50 text-emerald-600 flex items-center justify-center shrink-0 mt-0.5 group-hover:bg-emerald-100", children: /* @__PURE__ */ jsx19(MessageSquare, { className: "w-3.5 h-3.5" }) }),
10130
- /* @__PURE__ */ jsxs16("div", { children: [
10131
- /* @__PURE__ */ jsx19("p", { className: "text-xs font-semibold text-slate-800", children: "Custom (\u05EA\u05D2\u05D5\u05D1\u05D4 \u05DE\u05D4\u05D9\u05E8\u05D4)" }),
10132
- /* @__PURE__ */ jsx19("p", { className: "text-[10px] text-slate-400 leading-tight", children: "\u05DE\u05E2\u05E0\u05D4 \u05DE\u05D4\u05D9\u05E8 \u05D1\u05DC\u05D7\u05D9\u05E6\u05D4 \u05D0\u05D7\u05EA" })
10375
+ /* @__PURE__ */ jsx20("div", { className: "w-7 h-7 rounded-md bg-emerald-50 text-emerald-600 flex items-center justify-center shrink-0 mt-0.5 group-hover:bg-emerald-100", children: /* @__PURE__ */ jsx20(MessageSquare, { className: "w-3.5 h-3.5" }) }),
10376
+ /* @__PURE__ */ jsxs17("div", { children: [
10377
+ /* @__PURE__ */ jsx20("p", { className: "text-xs font-semibold text-slate-800", children: "Custom (\u05EA\u05D2\u05D5\u05D1\u05D4 \u05DE\u05D4\u05D9\u05E8\u05D4)" }),
10378
+ /* @__PURE__ */ jsx20("p", { className: "text-[10px] text-slate-400 leading-tight", children: "\u05DE\u05E2\u05E0\u05D4 \u05DE\u05D4\u05D9\u05E8 \u05D1\u05DC\u05D7\u05D9\u05E6\u05D4 \u05D0\u05D7\u05EA" })
10133
10379
  ] })
10134
10380
  ]
10135
10381
  }
10136
10382
  ),
10137
- /* @__PURE__ */ jsxs16(
10383
+ /* @__PURE__ */ jsxs17(
10138
10384
  "button",
10139
10385
  {
10140
10386
  type: "button",
10141
10387
  onClick: () => handleAddButton("URL"),
10142
10388
  className: "w-full p-2 text-right rounded-lg hover:bg-slate-50 flex items-start gap-2.5 transition-colors cursor-pointer group pt-2",
10143
10389
  children: [
10144
- /* @__PURE__ */ jsx19("div", { className: "w-7 h-7 rounded-md bg-sky-50 text-sky-600 flex items-center justify-center shrink-0 mt-0.5 group-hover:bg-sky-100", children: /* @__PURE__ */ jsx19(ExternalLink3, { className: "w-3.5 h-3.5" }) }),
10145
- /* @__PURE__ */ jsxs16("div", { children: [
10146
- /* @__PURE__ */ jsx19("p", { className: "text-xs font-semibold text-slate-800", children: "Visit website (\u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC\u05D0\u05EA\u05E8)" }),
10147
- /* @__PURE__ */ jsx19("p", { className: "text-[10px] text-slate-400 leading-tight", children: "\u05E7\u05D9\u05E9\u05D5\u05E8 \u05D0\u05D9\u05E0\u05D8\u05E8\u05E0\u05D8 \u05E1\u05D8\u05D8\u05D9" })
10390
+ /* @__PURE__ */ jsx20("div", { className: "w-7 h-7 rounded-md bg-sky-50 text-sky-600 flex items-center justify-center shrink-0 mt-0.5 group-hover:bg-sky-100", children: /* @__PURE__ */ jsx20(ExternalLink3, { className: "w-3.5 h-3.5" }) }),
10391
+ /* @__PURE__ */ jsxs17("div", { children: [
10392
+ /* @__PURE__ */ jsx20("p", { className: "text-xs font-semibold text-slate-800", children: "Visit website (\u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC\u05D0\u05EA\u05E8)" }),
10393
+ /* @__PURE__ */ jsx20("p", { className: "text-[10px] text-slate-400 leading-tight", children: "\u05E7\u05D9\u05E9\u05D5\u05E8 \u05D0\u05D9\u05E0\u05D8\u05E8\u05E0\u05D8 \u05E1\u05D8\u05D8\u05D9" })
10148
10394
  ] })
10149
10395
  ]
10150
10396
  }
10151
10397
  ),
10152
- /* @__PURE__ */ jsxs16(
10398
+ /* @__PURE__ */ jsxs17(
10153
10399
  "button",
10154
10400
  {
10155
10401
  type: "button",
10156
10402
  onClick: () => handleAddButton("PHONE_NUMBER"),
10157
10403
  className: "w-full p-2 text-right rounded-lg hover:bg-slate-50 flex items-start gap-2.5 transition-colors cursor-pointer group pt-2",
10158
10404
  children: [
10159
- /* @__PURE__ */ jsx19("div", { className: "w-7 h-7 rounded-md bg-violet-50 text-violet-600 flex items-center justify-center shrink-0 mt-0.5 group-hover:bg-violet-100", children: /* @__PURE__ */ jsx19(Phone, { className: "w-3.5 h-3.5" }) }),
10160
- /* @__PURE__ */ jsxs16("div", { children: [
10161
- /* @__PURE__ */ jsx19("p", { className: "text-xs font-semibold text-slate-800", children: "Call phone number (\u05D7\u05D9\u05D5\u05D2 \u05DC\u05DE\u05E1\u05E4\u05E8)" }),
10162
- /* @__PURE__ */ jsx19("p", { className: "text-[10px] text-slate-400 leading-tight", children: "\u05D7\u05D9\u05D5\u05D2 \u05D9\u05E9\u05D9\u05E8 \u05DC\u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF" })
10405
+ /* @__PURE__ */ jsx20("div", { className: "w-7 h-7 rounded-md bg-violet-50 text-violet-600 flex items-center justify-center shrink-0 mt-0.5 group-hover:bg-violet-100", children: /* @__PURE__ */ jsx20(Phone, { className: "w-3.5 h-3.5" }) }),
10406
+ /* @__PURE__ */ jsxs17("div", { children: [
10407
+ /* @__PURE__ */ jsx20("p", { className: "text-xs font-semibold text-slate-800", children: "Call phone number (\u05D7\u05D9\u05D5\u05D2 \u05DC\u05DE\u05E1\u05E4\u05E8)" }),
10408
+ /* @__PURE__ */ jsx20("p", { className: "text-[10px] text-slate-400 leading-tight", children: "\u05D7\u05D9\u05D5\u05D2 \u05D9\u05E9\u05D9\u05E8 \u05DC\u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF" })
10163
10409
  ] })
10164
10410
  ]
10165
10411
  }
10166
10412
  ),
10167
- /* @__PURE__ */ jsxs16(
10413
+ /* @__PURE__ */ jsxs17(
10168
10414
  "button",
10169
10415
  {
10170
10416
  type: "button",
10171
10417
  onClick: () => handleAddButton("COPY_CODE"),
10172
10418
  className: "w-full p-2 text-right rounded-lg hover:bg-slate-50 flex items-start gap-2.5 transition-colors cursor-pointer group pt-2",
10173
10419
  children: [
10174
- /* @__PURE__ */ jsx19("div", { className: "w-7 h-7 rounded-md bg-amber-50 text-amber-600 flex items-center justify-center shrink-0 mt-0.5 group-hover:bg-amber-100", children: /* @__PURE__ */ jsx19(Copy3, { className: "w-3.5 h-3.5" }) }),
10175
- /* @__PURE__ */ jsxs16("div", { children: [
10176
- /* @__PURE__ */ jsx19("p", { className: "text-xs font-semibold text-slate-800", children: "Copy offer code (\u05D4\u05E2\u05EA\u05E7\u05EA \u05E7\u05D5\u05D3)" }),
10177
- /* @__PURE__ */ jsx19("p", { className: "text-[10px] text-slate-400 leading-tight", children: "\u05D4\u05E2\u05EA\u05E7\u05EA \u05E7\u05D5\u05D3 \u05E7\u05D5\u05E4\u05D5\u05DF \u05DC\u05DC\u05D5\u05D7" })
10420
+ /* @__PURE__ */ jsx20("div", { className: "w-7 h-7 rounded-md bg-amber-50 text-amber-600 flex items-center justify-center shrink-0 mt-0.5 group-hover:bg-amber-100", children: /* @__PURE__ */ jsx20(Copy3, { className: "w-3.5 h-3.5" }) }),
10421
+ /* @__PURE__ */ jsxs17("div", { children: [
10422
+ /* @__PURE__ */ jsx20("p", { className: "text-xs font-semibold text-slate-800", children: "Copy offer code (\u05D4\u05E2\u05EA\u05E7\u05EA \u05E7\u05D5\u05D3)" }),
10423
+ /* @__PURE__ */ jsx20("p", { className: "text-[10px] text-slate-400 leading-tight", children: "\u05D4\u05E2\u05EA\u05E7\u05EA \u05E7\u05D5\u05D3 \u05E7\u05D5\u05E4\u05D5\u05DF \u05DC\u05DC\u05D5\u05D7" })
10178
10424
  ] })
10179
10425
  ]
10180
10426
  }
@@ -10183,55 +10429,55 @@ function CreateTemplateModal({
10183
10429
  ] })
10184
10430
  ] })
10185
10431
  ] }),
10186
- buttons.length === 0 && /* @__PURE__ */ jsx19("div", { className: "p-3 text-center border border-dashed border-slate-200 rounded-lg text-slate-400 text-xs bg-white/60", children: '\u05DC\u05D0 \u05D4\u05D5\u05D2\u05D3\u05E8\u05D5 \u05DB\u05E4\u05EA\u05D5\u05E8\u05D9\u05DD. \u05DC\u05D7\u05E5 \u05E2\u05DC "+ \u05D4\u05D5\u05E1\u05E3 \u05DB\u05E4\u05EA\u05D5\u05E8" \u05DB\u05D3\u05D9 \u05DC\u05D4\u05D5\u05E1\u05D9\u05E3 \u05DB\u05E4\u05EA\u05D5\u05E8 \u05E8\u05D0\u05E9\u05D5\u05DF \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA.' }),
10187
- buttons.length > 0 && /* @__PURE__ */ jsx19("div", { className: "space-y-2.5", children: buttons.map((btn, index) => {
10432
+ buttons.length === 0 && /* @__PURE__ */ jsx20("div", { className: "p-3 text-center border border-dashed border-slate-200 rounded-lg text-slate-400 text-xs bg-white/60", children: '\u05DC\u05D0 \u05D4\u05D5\u05D2\u05D3\u05E8\u05D5 \u05DB\u05E4\u05EA\u05D5\u05E8\u05D9\u05DD. \u05DC\u05D7\u05E5 \u05E2\u05DC "+ \u05D4\u05D5\u05E1\u05E3 \u05DB\u05E4\u05EA\u05D5\u05E8" \u05DB\u05D3\u05D9 \u05DC\u05D4\u05D5\u05E1\u05D9\u05E3 \u05DB\u05E4\u05EA\u05D5\u05E8 \u05E8\u05D0\u05E9\u05D5\u05DF \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA.' }),
10433
+ buttons.length > 0 && /* @__PURE__ */ jsx20("div", { className: "space-y-2.5", children: buttons.map((btn, index) => {
10188
10434
  const btnNum = index + 1;
10189
- return /* @__PURE__ */ jsxs16(
10435
+ return /* @__PURE__ */ jsxs17(
10190
10436
  "div",
10191
10437
  {
10192
10438
  className: "p-3 bg-white border border-slate-200 rounded-xl space-y-2.5 shadow-2xs transition-all hover:border-slate-300",
10193
10439
  children: [
10194
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between", children: [
10195
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
10196
- /* @__PURE__ */ jsxs16("span", { className: "text-[11px] font-bold text-slate-400 font-mono", children: [
10440
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between", children: [
10441
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
10442
+ /* @__PURE__ */ jsxs17("span", { className: "text-[11px] font-bold text-slate-400 font-mono", children: [
10197
10443
  "#",
10198
10444
  btnNum
10199
10445
  ] }),
10200
- btn.type === "QUICK_REPLY" && /* @__PURE__ */ jsxs16("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-lg bg-emerald-50 text-emerald-700 border border-emerald-200 text-[10px] font-semibold", children: [
10201
- /* @__PURE__ */ jsx19(MessageSquare, { className: "w-3 h-3" }),
10202
- /* @__PURE__ */ jsx19("span", { children: "Custom (\u05EA\u05D2\u05D5\u05D1\u05D4 \u05DE\u05D4\u05D9\u05E8\u05D4)" })
10446
+ btn.type === "QUICK_REPLY" && /* @__PURE__ */ jsxs17("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-lg bg-emerald-50 text-emerald-700 border border-emerald-200 text-[10px] font-semibold", children: [
10447
+ /* @__PURE__ */ jsx20(MessageSquare, { className: "w-3 h-3" }),
10448
+ /* @__PURE__ */ jsx20("span", { children: "Custom (\u05EA\u05D2\u05D5\u05D1\u05D4 \u05DE\u05D4\u05D9\u05E8\u05D4)" })
10203
10449
  ] }),
10204
- btn.type === "URL" && /* @__PURE__ */ jsxs16("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-lg bg-sky-50 text-sky-700 border border-sky-200 text-[10px] font-semibold", children: [
10205
- /* @__PURE__ */ jsx19(ExternalLink3, { className: "w-3 h-3" }),
10206
- /* @__PURE__ */ jsx19("span", { children: "Visit website (\u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC\u05D0\u05EA\u05E8)" })
10450
+ btn.type === "URL" && /* @__PURE__ */ jsxs17("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-lg bg-sky-50 text-sky-700 border border-sky-200 text-[10px] font-semibold", children: [
10451
+ /* @__PURE__ */ jsx20(ExternalLink3, { className: "w-3 h-3" }),
10452
+ /* @__PURE__ */ jsx20("span", { children: "Visit website (\u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC\u05D0\u05EA\u05E8)" })
10207
10453
  ] }),
10208
- btn.type === "PHONE_NUMBER" && /* @__PURE__ */ jsxs16("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-lg bg-violet-50 text-violet-700 border border-violet-200 text-[10px] font-semibold", children: [
10209
- /* @__PURE__ */ jsx19(Phone, { className: "w-3 h-3" }),
10210
- /* @__PURE__ */ jsx19("span", { children: "Call phone number (\u05D7\u05D9\u05D5\u05D2 \u05DC\u05DE\u05E1\u05E4\u05E8)" })
10454
+ btn.type === "PHONE_NUMBER" && /* @__PURE__ */ jsxs17("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-lg bg-violet-50 text-violet-700 border border-violet-200 text-[10px] font-semibold", children: [
10455
+ /* @__PURE__ */ jsx20(Phone, { className: "w-3 h-3" }),
10456
+ /* @__PURE__ */ jsx20("span", { children: "Call phone number (\u05D7\u05D9\u05D5\u05D2 \u05DC\u05DE\u05E1\u05E4\u05E8)" })
10211
10457
  ] }),
10212
- btn.type === "COPY_CODE" && /* @__PURE__ */ jsxs16("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-lg bg-amber-50 text-amber-700 border border-amber-200 text-[10px] font-semibold", children: [
10213
- /* @__PURE__ */ jsx19(Copy3, { className: "w-3 h-3" }),
10214
- /* @__PURE__ */ jsx19("span", { children: "Copy offer code (\u05D4\u05E2\u05EA\u05E7\u05EA \u05E7\u05D5\u05D3)" })
10458
+ btn.type === "COPY_CODE" && /* @__PURE__ */ jsxs17("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-lg bg-amber-50 text-amber-700 border border-amber-200 text-[10px] font-semibold", children: [
10459
+ /* @__PURE__ */ jsx20(Copy3, { className: "w-3 h-3" }),
10460
+ /* @__PURE__ */ jsx20("span", { children: "Copy offer code (\u05D4\u05E2\u05EA\u05E7\u05EA \u05E7\u05D5\u05D3)" })
10215
10461
  ] })
10216
10462
  ] }),
10217
- /* @__PURE__ */ jsx19(
10463
+ /* @__PURE__ */ jsx20(
10218
10464
  "button",
10219
10465
  {
10220
10466
  type: "button",
10221
10467
  onClick: () => handleRemoveButton(index),
10222
10468
  className: "p-1 text-slate-400 hover:text-rose-600 hover:bg-rose-50 rounded-lg transition-colors cursor-pointer",
10223
10469
  title: "\u05D4\u05E1\u05E8 \u05DB\u05E4\u05EA\u05D5\u05E8",
10224
- children: /* @__PURE__ */ jsx19(Trash22, { className: "w-3.5 h-3.5" })
10470
+ children: /* @__PURE__ */ jsx20(Trash22, { className: "w-3.5 h-3.5" })
10225
10471
  }
10226
10472
  )
10227
10473
  ] }),
10228
- btn.type === "QUICK_REPLY" && /* @__PURE__ */ jsxs16("div", { className: "space-y-1", children: [
10229
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between text-[11px]", children: [
10230
- /* @__PURE__ */ jsxs16("label", { className: "font-semibold text-slate-700", children: [
10474
+ btn.type === "QUICK_REPLY" && /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
10475
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between text-[11px]", children: [
10476
+ /* @__PURE__ */ jsxs17("label", { className: "font-semibold text-slate-700", children: [
10231
10477
  "\u05D8\u05E7\u05E1\u05D8 \u05D4\u05DB\u05E4\u05EA\u05D5\u05E8 ",
10232
- /* @__PURE__ */ jsx19("span", { className: "text-rose-500", children: "*" })
10478
+ /* @__PURE__ */ jsx20("span", { className: "text-rose-500", children: "*" })
10233
10479
  ] }),
10234
- /* @__PURE__ */ jsxs16(
10480
+ /* @__PURE__ */ jsxs17(
10235
10481
  "span",
10236
10482
  {
10237
10483
  className: `font-mono text-[10px] ${(btn.text || "").length >= 25 ? "text-amber-600 font-bold" : "text-slate-400"}`,
@@ -10242,7 +10488,7 @@ function CreateTemplateModal({
10242
10488
  }
10243
10489
  )
10244
10490
  ] }),
10245
- /* @__PURE__ */ jsx19(
10491
+ /* @__PURE__ */ jsx20(
10246
10492
  "input",
10247
10493
  {
10248
10494
  type: "text",
@@ -10254,14 +10500,14 @@ function CreateTemplateModal({
10254
10500
  }
10255
10501
  )
10256
10502
  ] }),
10257
- btn.type === "URL" && /* @__PURE__ */ jsxs16("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: [
10258
- /* @__PURE__ */ jsxs16("div", { className: "space-y-1", children: [
10259
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between text-[11px]", children: [
10260
- /* @__PURE__ */ jsxs16("label", { className: "font-semibold text-slate-700", children: [
10503
+ btn.type === "URL" && /* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: [
10504
+ /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
10505
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between text-[11px]", children: [
10506
+ /* @__PURE__ */ jsxs17("label", { className: "font-semibold text-slate-700", children: [
10261
10507
  "\u05D8\u05E7\u05E1\u05D8 \u05D4\u05DB\u05E4\u05EA\u05D5\u05E8 ",
10262
- /* @__PURE__ */ jsx19("span", { className: "text-rose-500", children: "*" })
10508
+ /* @__PURE__ */ jsx20("span", { className: "text-rose-500", children: "*" })
10263
10509
  ] }),
10264
- /* @__PURE__ */ jsxs16(
10510
+ /* @__PURE__ */ jsxs17(
10265
10511
  "span",
10266
10512
  {
10267
10513
  className: `font-mono text-[10px] ${(btn.text || "").length >= 25 ? "text-amber-600 font-bold" : "text-slate-400"}`,
@@ -10272,7 +10518,7 @@ function CreateTemplateModal({
10272
10518
  }
10273
10519
  )
10274
10520
  ] }),
10275
- /* @__PURE__ */ jsx19(
10521
+ /* @__PURE__ */ jsx20(
10276
10522
  "input",
10277
10523
  {
10278
10524
  type: "text",
@@ -10284,18 +10530,18 @@ function CreateTemplateModal({
10284
10530
  }
10285
10531
  )
10286
10532
  ] }),
10287
- /* @__PURE__ */ jsxs16("div", { className: "space-y-1", children: [
10288
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between text-[11px]", children: [
10289
- /* @__PURE__ */ jsxs16("label", { className: "font-semibold text-slate-700", children: [
10533
+ /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
10534
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between text-[11px]", children: [
10535
+ /* @__PURE__ */ jsxs17("label", { className: "font-semibold text-slate-700", children: [
10290
10536
  "\u05DB\u05EA\u05D5\u05D1\u05EA URL \u05E1\u05D8\u05D8\u05D9\u05EA ",
10291
- /* @__PURE__ */ jsx19("span", { className: "text-rose-500", children: "*" })
10537
+ /* @__PURE__ */ jsx20("span", { className: "text-rose-500", children: "*" })
10292
10538
  ] }),
10293
- /* @__PURE__ */ jsxs16("span", { className: "font-mono text-[10px] text-slate-400", children: [
10539
+ /* @__PURE__ */ jsxs17("span", { className: "font-mono text-[10px] text-slate-400", children: [
10294
10540
  (btn.url || "").length,
10295
10541
  "/2000"
10296
10542
  ] })
10297
10543
  ] }),
10298
- /* @__PURE__ */ jsx19(
10544
+ /* @__PURE__ */ jsx20(
10299
10545
  "input",
10300
10546
  {
10301
10547
  type: "url",
@@ -10309,14 +10555,14 @@ function CreateTemplateModal({
10309
10555
  )
10310
10556
  ] })
10311
10557
  ] }),
10312
- btn.type === "PHONE_NUMBER" && /* @__PURE__ */ jsxs16("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: [
10313
- /* @__PURE__ */ jsxs16("div", { className: "space-y-1", children: [
10314
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between text-[11px]", children: [
10315
- /* @__PURE__ */ jsxs16("label", { className: "font-semibold text-slate-700", children: [
10558
+ btn.type === "PHONE_NUMBER" && /* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: [
10559
+ /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
10560
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between text-[11px]", children: [
10561
+ /* @__PURE__ */ jsxs17("label", { className: "font-semibold text-slate-700", children: [
10316
10562
  "\u05D8\u05E7\u05E1\u05D8 \u05D4\u05DB\u05E4\u05EA\u05D5\u05E8 ",
10317
- /* @__PURE__ */ jsx19("span", { className: "text-rose-500", children: "*" })
10563
+ /* @__PURE__ */ jsx20("span", { className: "text-rose-500", children: "*" })
10318
10564
  ] }),
10319
- /* @__PURE__ */ jsxs16(
10565
+ /* @__PURE__ */ jsxs17(
10320
10566
  "span",
10321
10567
  {
10322
10568
  className: `font-mono text-[10px] ${(btn.text || "").length >= 25 ? "text-amber-600 font-bold" : "text-slate-400"}`,
@@ -10327,7 +10573,7 @@ function CreateTemplateModal({
10327
10573
  }
10328
10574
  )
10329
10575
  ] }),
10330
- /* @__PURE__ */ jsx19(
10576
+ /* @__PURE__ */ jsx20(
10331
10577
  "input",
10332
10578
  {
10333
10579
  type: "text",
@@ -10339,18 +10585,18 @@ function CreateTemplateModal({
10339
10585
  }
10340
10586
  )
10341
10587
  ] }),
10342
- /* @__PURE__ */ jsxs16("div", { className: "space-y-1", children: [
10343
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between text-[11px]", children: [
10344
- /* @__PURE__ */ jsxs16("label", { className: "font-semibold text-slate-700", children: [
10588
+ /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
10589
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between text-[11px]", children: [
10590
+ /* @__PURE__ */ jsxs17("label", { className: "font-semibold text-slate-700", children: [
10345
10591
  "\u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF (\u05E4\u05D5\u05E8\u05DE\u05D8: +[\u05E7\u05D9\u05D3\u05D5\u05DE\u05EA][\u05DE\u05E1\u05E4\u05E8]) ",
10346
- /* @__PURE__ */ jsx19("span", { className: "text-rose-500", children: "*" })
10592
+ /* @__PURE__ */ jsx20("span", { className: "text-rose-500", children: "*" })
10347
10593
  ] }),
10348
- /* @__PURE__ */ jsxs16("span", { className: "font-mono text-[10px] text-slate-400", children: [
10594
+ /* @__PURE__ */ jsxs17("span", { className: "font-mono text-[10px] text-slate-400", children: [
10349
10595
  (btn.phone_number || "").length,
10350
10596
  "/20"
10351
10597
  ] })
10352
10598
  ] }),
10353
- /* @__PURE__ */ jsx19(
10599
+ /* @__PURE__ */ jsx20(
10354
10600
  "input",
10355
10601
  {
10356
10602
  type: "tel",
@@ -10364,14 +10610,14 @@ function CreateTemplateModal({
10364
10610
  )
10365
10611
  ] })
10366
10612
  ] }),
10367
- btn.type === "COPY_CODE" && /* @__PURE__ */ jsxs16("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: [
10368
- /* @__PURE__ */ jsxs16("div", { className: "space-y-1", children: [
10369
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between text-[11px]", children: [
10370
- /* @__PURE__ */ jsxs16("label", { className: "font-semibold text-slate-700", children: [
10613
+ btn.type === "COPY_CODE" && /* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: [
10614
+ /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
10615
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between text-[11px]", children: [
10616
+ /* @__PURE__ */ jsxs17("label", { className: "font-semibold text-slate-700", children: [
10371
10617
  "\u05E7\u05D5\u05D3 \u05D4\u05E6\u05E2\u05D4 / \u05E7\u05D5\u05E4\u05D5\u05DF ",
10372
- /* @__PURE__ */ jsx19("span", { className: "text-rose-500", children: "*" })
10618
+ /* @__PURE__ */ jsx20("span", { className: "text-rose-500", children: "*" })
10373
10619
  ] }),
10374
- /* @__PURE__ */ jsxs16(
10620
+ /* @__PURE__ */ jsxs17(
10375
10621
  "span",
10376
10622
  {
10377
10623
  className: `font-mono text-[10px] ${(btn.example || "").length >= 15 ? "text-amber-600 font-bold" : "text-slate-400"}`,
@@ -10382,7 +10628,7 @@ function CreateTemplateModal({
10382
10628
  }
10383
10629
  )
10384
10630
  ] }),
10385
- /* @__PURE__ */ jsx19(
10631
+ /* @__PURE__ */ jsx20(
10386
10632
  "input",
10387
10633
  {
10388
10634
  type: "text",
@@ -10395,15 +10641,15 @@ function CreateTemplateModal({
10395
10641
  }
10396
10642
  )
10397
10643
  ] }),
10398
- /* @__PURE__ */ jsxs16("div", { className: "space-y-1", children: [
10399
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between text-[11px]", children: [
10400
- /* @__PURE__ */ jsx19("label", { className: "font-semibold text-slate-700", children: "\u05D8\u05E7\u05E1\u05D8 \u05D4\u05DB\u05E4\u05EA\u05D5\u05E8 (\u05D1\u05E8\u05D9\u05E8\u05EA \u05DE\u05D7\u05D3\u05DC: \u05D4\u05E2\u05EA\u05E7 \u05E7\u05D5\u05D3)" }),
10401
- /* @__PURE__ */ jsxs16("span", { className: "font-mono text-[10px] text-slate-400", children: [
10644
+ /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
10645
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between text-[11px]", children: [
10646
+ /* @__PURE__ */ jsx20("label", { className: "font-semibold text-slate-700", children: "\u05D8\u05E7\u05E1\u05D8 \u05D4\u05DB\u05E4\u05EA\u05D5\u05E8 (\u05D1\u05E8\u05D9\u05E8\u05EA \u05DE\u05D7\u05D3\u05DC: \u05D4\u05E2\u05EA\u05E7 \u05E7\u05D5\u05D3)" }),
10647
+ /* @__PURE__ */ jsxs17("span", { className: "font-mono text-[10px] text-slate-400", children: [
10402
10648
  (btn.text || "").length,
10403
10649
  "/25"
10404
10650
  ] })
10405
10651
  ] }),
10406
- /* @__PURE__ */ jsx19(
10652
+ /* @__PURE__ */ jsx20(
10407
10653
  "input",
10408
10654
  {
10409
10655
  type: "text",
@@ -10423,8 +10669,8 @@ function CreateTemplateModal({
10423
10669
  }) })
10424
10670
  ] })
10425
10671
  ] }),
10426
- /* @__PURE__ */ jsxs16("div", { className: "px-6 py-4 border-t border-slate-100 flex items-center justify-end gap-3 bg-slate-50/50", children: [
10427
- /* @__PURE__ */ jsx19(
10672
+ /* @__PURE__ */ jsxs17("div", { className: "px-6 py-4 border-t border-slate-100 flex items-center justify-end gap-3 bg-slate-50/50", children: [
10673
+ /* @__PURE__ */ jsx20(
10428
10674
  "button",
10429
10675
  {
10430
10676
  type: "button",
@@ -10434,19 +10680,19 @@ function CreateTemplateModal({
10434
10680
  children: "\u05D1\u05D9\u05D8\u05D5\u05DC"
10435
10681
  }
10436
10682
  ),
10437
- /* @__PURE__ */ jsx19(
10683
+ /* @__PURE__ */ jsx20(
10438
10684
  "button",
10439
10685
  {
10440
10686
  type: "submit",
10441
10687
  disabled: !canSubmit,
10442
10688
  className: `inline-flex items-center gap-2 px-5 py-2 text-xs font-semibold text-white rounded-xl shadow-xs transition-all cursor-pointer active:scale-[0.98] ${canSubmit ? "bg-emerald-600 hover:bg-emerald-700" : "bg-slate-300 text-slate-500 cursor-not-allowed opacity-60"}`,
10443
10689
  title: !canSubmit ? fileError || validationResult.errors[0] || "\u05D9\u05E9 \u05DC\u05D4\u05E9\u05DC\u05D9\u05DD \u05D0\u05EA \u05DB\u05DC \u05E9\u05D3\u05D5\u05EA \u05D4\u05D7\u05D5\u05D1\u05D4 \u05D1\u05D0\u05D5\u05E4\u05DF \u05EA\u05E7\u05D9\u05DF" : "\u05E9\u05DC\u05D7 \u05EA\u05D1\u05E0\u05D9\u05EA \u05DC\u05D0\u05D9\u05E9\u05D5\u05E8 Meta",
10444
- children: isSubmitting ? /* @__PURE__ */ jsxs16(Fragment4, { children: [
10445
- /* @__PURE__ */ jsx19(Loader24, { className: "w-4 h-4 animate-spin" }),
10446
- /* @__PURE__ */ jsx19("span", { children: submittingStep || "\u05D9\u05D5\u05E6\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA..." })
10447
- ] }) : /* @__PURE__ */ jsxs16(Fragment4, { children: [
10448
- /* @__PURE__ */ jsx19(CheckCircle22, { className: "w-4 h-4" }),
10449
- /* @__PURE__ */ jsx19("span", { children: "\u05E9\u05DC\u05D7 \u05DC\u05D1\u05D3\u05D9\u05E7\u05D4" })
10690
+ children: isSubmitting ? /* @__PURE__ */ jsxs17(Fragment4, { children: [
10691
+ /* @__PURE__ */ jsx20(Loader24, { className: "w-4 h-4 animate-spin" }),
10692
+ /* @__PURE__ */ jsx20("span", { children: submittingStep || "\u05D9\u05D5\u05E6\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA..." })
10693
+ ] }) : /* @__PURE__ */ jsxs17(Fragment4, { children: [
10694
+ /* @__PURE__ */ jsx20(CheckCircle22, { className: "w-4 h-4" }),
10695
+ /* @__PURE__ */ jsx20("span", { children: "\u05E9\u05DC\u05D7 \u05DC\u05D1\u05D3\u05D9\u05E7\u05D4" })
10450
10696
  ] })
10451
10697
  }
10452
10698
  )
@@ -10460,11 +10706,11 @@ function CreateTemplateModal({
10460
10706
  }
10461
10707
 
10462
10708
  // src/components/WhatsAppComponent/hooks/useWhatsAppState.ts
10463
- import { useState as useState17, useEffect as useEffect15, useRef as useRef15, useMemo as useMemo10, useCallback as useCallback14 } from "react";
10709
+ import { useState as useState17, useEffect as useEffect15, useRef as useRef15, useMemo as useMemo11, useCallback as useCallback14 } from "react";
10464
10710
 
10465
10711
  // src/components/WhatsAppComponent/utils/recipientEngine.ts
10466
10712
  var STORAGE_KEY_TEST_PHONE = "whatsapp_test_phone";
10467
- function isRawObjectId2(str) {
10713
+ function isRawObjectId3(str) {
10468
10714
  if (typeof str !== "string") return false;
10469
10715
  const trimmed = str.trim();
10470
10716
  return /^[0-9a-fA-F]{24}$/.test(trimmed) || trimmed.startsWith("temp_");
@@ -10474,14 +10720,14 @@ function getRelationOptionLabel(opt, colDef, allRelationOptions) {
10474
10720
  if (!opt) return "";
10475
10721
  if (typeof opt === "string") {
10476
10722
  const trimmed = opt.trim();
10477
- if (!isRawObjectId2(trimmed)) return trimmed;
10723
+ if (!isRawObjectId3(trimmed)) return trimmed;
10478
10724
  if (allRelationOptions) {
10479
10725
  for (const list of Object.values(allRelationOptions)) {
10480
10726
  if (Array.isArray(list)) {
10481
10727
  const match = list.find((item) => ((item == null ? void 0 : item.id) || (item == null ? void 0 : item._id)) === trimmed);
10482
10728
  if (match) {
10483
10729
  const resolved = getRelationOptionLabel(match, colDef);
10484
- if (resolved && !isRawObjectId2(resolved)) {
10730
+ if (resolved && !isRawObjectId3(resolved)) {
10485
10731
  return resolved;
10486
10732
  }
10487
10733
  }
@@ -10494,11 +10740,11 @@ function getRelationOptionLabel(opt, colDef, allRelationOptions) {
10494
10740
  const displayField = (_a = colDef == null ? void 0 : colDef.config) == null ? void 0 : _a.displayField;
10495
10741
  if (displayField && opt.data && opt.data[displayField] !== void 0 && opt.data[displayField] !== null) {
10496
10742
  const val = String(opt.data[displayField]).trim();
10497
- if (val && !isRawObjectId2(val) && val !== rawId) return val;
10743
+ if (val && !isRawObjectId3(val) && val !== rawId) return val;
10498
10744
  }
10499
10745
  if (opt.label && typeof opt.label === "string") {
10500
10746
  const trimmed = opt.label.trim();
10501
- if (trimmed && !isRawObjectId2(trimmed) && trimmed !== rawId) {
10747
+ if (trimmed && !isRawObjectId3(trimmed) && trimmed !== rawId) {
10502
10748
  return trimmed;
10503
10749
  }
10504
10750
  }
@@ -10521,14 +10767,14 @@ function getRelationOptionLabel(opt, colDef, allRelationOptions) {
10521
10767
  const val = opt.data[key];
10522
10768
  if (val !== void 0 && val !== null) {
10523
10769
  const str = String(val).trim();
10524
- if (str && !isRawObjectId2(str) && str !== rawId) return str;
10770
+ if (str && !isRawObjectId3(str) && str !== rawId) return str;
10525
10771
  }
10526
10772
  }
10527
10773
  for (const [k, v] of Object.entries(opt.data)) {
10528
10774
  if (k.startsWith("_") || k.toLowerCase().endsWith("id") || k.toLowerCase() === "id") continue;
10529
10775
  if (v !== void 0 && v !== null) {
10530
10776
  const str = String(v).trim();
10531
- if (str && !isRawObjectId2(str) && str !== rawId) return str;
10777
+ if (str && !isRawObjectId3(str) && str !== rawId) return str;
10532
10778
  }
10533
10779
  }
10534
10780
  }
@@ -10537,7 +10783,7 @@ function getRelationOptionLabel(opt, colDef, allRelationOptions) {
10537
10783
  const val = opt[key];
10538
10784
  if (val !== void 0 && val !== null) {
10539
10785
  const str = String(val).trim();
10540
- if (str && !isRawObjectId2(str) && str !== rawId) return str;
10786
+ if (str && !isRawObjectId3(str) && str !== rawId) return str;
10541
10787
  }
10542
10788
  }
10543
10789
  if (opt.label && typeof opt.label === "string" && opt.label.trim()) {
@@ -11857,7 +12103,7 @@ function useWhatsAppState(props) {
11857
12103
  useEffect15(() => {
11858
12104
  loadTableData();
11859
12105
  }, [loadTableData]);
11860
- const filterableColumns = useMemo10(() => {
12106
+ const filterableColumns = useMemo11(() => {
11861
12107
  return (tableColumns2 || []).filter((col) => {
11862
12108
  var _a2;
11863
12109
  if (!col || col.name === "_id" || col.id === "_id") return false;
@@ -11866,7 +12112,7 @@ function useWhatsAppState(props) {
11866
12112
  });
11867
12113
  }, [tableColumns2]);
11868
12114
  const [referencedTableSchemas, setReferencedTableSchemas] = useState17({});
11869
- const subtableCols = useMemo10(() => {
12115
+ const subtableCols = useMemo11(() => {
11870
12116
  return (tableColumns2 || []).filter((col) => {
11871
12117
  var _a2;
11872
12118
  const type = (_a2 = col.type) == null ? void 0 : _a2.toUpperCase();
@@ -11919,11 +12165,11 @@ function useWhatsAppState(props) {
11919
12165
  const isScanningPhoneColumns = Boolean(
11920
12166
  isLoadingTableData || activeSubtableScans > 0 || tableColumns2.length === 0 && Boolean(settings == null ? void 0 : settings.tableMetaId)
11921
12167
  );
11922
- const targetPhoneOptions = useMemo10(() => {
12168
+ const targetPhoneOptions = useMemo11(() => {
11923
12169
  const cols = tableColumns2 && tableColumns2.length > 0 ? tableColumns2 : Array.isArray(settings == null ? void 0 : settings.columns) ? settings.columns : [];
11924
12170
  return scanTargetPhoneOptions(cols, referencedTableSchemas);
11925
12171
  }, [tableColumns2, settings == null ? void 0 : settings.columns, referencedTableSchemas]);
11926
- const phoneColumns = useMemo10(() => {
12172
+ const phoneColumns = useMemo11(() => {
11927
12173
  return targetPhoneOptions.map((opt) => ({ name: opt.label, id: opt.id, type: "PHONE" }));
11928
12174
  }, [targetPhoneOptions]);
11929
12175
  const [phoneColumnId, setPhoneColumnId] = useState17("");
@@ -11944,13 +12190,13 @@ function useWhatsAppState(props) {
11944
12190
  setPhoneColumnId("");
11945
12191
  }
11946
12192
  }, [targetPhoneOptions, phoneColumnId]);
11947
- const selectedPhoneOption = useMemo10(() => {
12193
+ const selectedPhoneOption = useMemo11(() => {
11948
12194
  if (!phoneColumnId) return targetPhoneOptions[0] || null;
11949
12195
  return targetPhoneOptions.find(
11950
12196
  (opt) => opt.id === phoneColumnId || opt.columnName === phoneColumnId
11951
12197
  ) || targetPhoneOptions[0] || null;
11952
12198
  }, [targetPhoneOptions, phoneColumnId]);
11953
- const subtableFilterableColumns = useMemo10(() => {
12199
+ const subtableFilterableColumns = useMemo11(() => {
11954
12200
  var _a2, _b2, _c;
11955
12201
  if (!selectedPhoneOption || selectedPhoneOption.type !== "SUBTABLE") {
11956
12202
  return [];
@@ -11969,14 +12215,14 @@ function useWhatsAppState(props) {
11969
12215
  return type === "BOOLEAN" || type === "RELATION";
11970
12216
  });
11971
12217
  }, [selectedPhoneOption, referencedTableSchemas, tableColumns2]);
11972
- const selectedSubtableFilterCol = useMemo10(() => {
12218
+ const selectedSubtableFilterCol = useMemo11(() => {
11973
12219
  return subtableFilterableColumns.find((c) => c.name === subtableFilterColumn);
11974
12220
  }, [subtableFilterableColumns, subtableFilterColumn]);
11975
12221
  const [enablePostSendAction, setEnablePostSendAction] = useState17(false);
11976
12222
  const [postSendActionColumn, setPostSendActionColumn] = useState17("");
11977
12223
  const [postSendActionValue, setPostSendActionValue] = useState17("");
11978
12224
  const [postSendActionTargetType, setPostSendActionTargetType] = useState17("MAIN");
11979
- const postSendActionTargetOptions = useMemo10(() => {
12225
+ const postSendActionTargetOptions = useMemo11(() => {
11980
12226
  var _a2, _b2, _c;
11981
12227
  const options = [];
11982
12228
  (tableColumns2 || []).forEach((col) => {
@@ -12021,7 +12267,7 @@ function useWhatsAppState(props) {
12021
12267
  }
12022
12268
  return options;
12023
12269
  }, [tableColumns2, selectedPhoneOption, referencedTableSchemas]);
12024
- const selectedPostSendOption = useMemo10(() => {
12270
+ const selectedPostSendOption = useMemo11(() => {
12025
12271
  return postSendActionTargetOptions.find(
12026
12272
  (opt) => opt.id === postSendActionColumn || opt.columnName === postSendActionColumn
12027
12273
  );
@@ -12305,7 +12551,7 @@ function useWhatsAppState(props) {
12305
12551
  }
12306
12552
  })();
12307
12553
  }, [selectedPostSendOption, executeAction, orgId]);
12308
- const filteredRecords = useMemo10(() => {
12554
+ const filteredRecords = useMemo11(() => {
12309
12555
  const activeEntries = Object.entries(filters).filter(
12310
12556
  ([_, val]) => val !== void 0 && val !== null && val !== ""
12311
12557
  );
@@ -12398,7 +12644,7 @@ function useWhatsAppState(props) {
12398
12644
  const handleClearFilters = () => {
12399
12645
  setFilters({});
12400
12646
  };
12401
- const activeFiltersCount = useMemo10(() => {
12647
+ const activeFiltersCount = useMemo11(() => {
12402
12648
  return Object.values(filters).filter((v) => v !== "").length;
12403
12649
  }, [filters]);
12404
12650
  const handleSelectionChange = useCallback14((selectedIds) => {
@@ -12500,10 +12746,10 @@ function useWhatsAppState(props) {
12500
12746
  useEffect15(() => {
12501
12747
  loadTemplates();
12502
12748
  }, [loadTemplates]);
12503
- const selectedTemplate = useMemo10(() => {
12749
+ const selectedTemplate = useMemo11(() => {
12504
12750
  return templates.find((t) => t.id === selectedTemplateId) || null;
12505
12751
  }, [templates, selectedTemplateId]);
12506
- const templateBodyText = useMemo10(() => {
12752
+ const templateBodyText = useMemo11(() => {
12507
12753
  if (!(selectedTemplate == null ? void 0 : selectedTemplate.components)) return "";
12508
12754
  const bodyComp = selectedTemplate.components.find(
12509
12755
  (c) => {
@@ -12513,7 +12759,7 @@ function useWhatsAppState(props) {
12513
12759
  );
12514
12760
  return (bodyComp == null ? void 0 : bodyComp.text) || "";
12515
12761
  }, [selectedTemplate]);
12516
- const templateHeaderComp = useMemo10(() => {
12762
+ const templateHeaderComp = useMemo11(() => {
12517
12763
  if (!(selectedTemplate == null ? void 0 : selectedTemplate.components)) return null;
12518
12764
  return selectedTemplate.components.find(
12519
12765
  (c) => {
@@ -12615,14 +12861,14 @@ function useWhatsAppState(props) {
12615
12861
  },
12616
12862
  [selectedTemplate == null ? void 0 : selectedTemplate.name]
12617
12863
  );
12618
- const templateVariables = useMemo10(() => {
12864
+ const templateVariables = useMemo11(() => {
12619
12865
  return extractTemplateVariables(selectedTemplate);
12620
12866
  }, [selectedTemplate]);
12621
12867
  const [variableMapping, setVariableMapping] = useState17({});
12622
12868
  useEffect15(() => {
12623
12869
  setVariableMapping({});
12624
12870
  }, [selectedTemplateId]);
12625
- const textableColumnOptions = useMemo10(() => {
12871
+ const textableColumnOptions = useMemo11(() => {
12626
12872
  return getTextableColumnOptions({
12627
12873
  tableColumns: tableColumns2,
12628
12874
  selectedPhoneOption,
@@ -12648,7 +12894,7 @@ function useWhatsAppState(props) {
12648
12894
  });
12649
12895
  });
12650
12896
  };
12651
- const existingTemplateNames = useMemo10(() => {
12897
+ const existingTemplateNames = useMemo11(() => {
12652
12898
  return templates.map((t) => t.name);
12653
12899
  }, [templates]);
12654
12900
  const handleDeleteTemplate = async () => {
@@ -12695,14 +12941,14 @@ function useWhatsAppState(props) {
12695
12941
  postSendActionColumn,
12696
12942
  postSendActionValue
12697
12943
  );
12698
- const isStaticVariableMissing = useMemo10(() => {
12944
+ const isStaticVariableMissing = useMemo11(() => {
12699
12945
  return isStaticVariableIncomplete(templateVariables, variableMapping);
12700
12946
  }, [templateVariables, variableMapping]);
12701
- const currentRecords = useMemo10(() => {
12947
+ const currentRecords = useMemo11(() => {
12702
12948
  var _a2;
12703
12949
  return rawRecords && rawRecords.length > 0 ? rawRecords : Array.isArray(props.data) ? props.data : Array.isArray((_a2 = props.data) == null ? void 0 : _a2.records) ? props.data.records : [];
12704
12950
  }, [rawRecords, props.data]);
12705
- const preparedRecipients = useMemo10(() => {
12951
+ const preparedRecipients = useMemo11(() => {
12706
12952
  return prepareRecipients({
12707
12953
  selectedIds: selectedRowIds,
12708
12954
  records: currentRecords,
@@ -12722,7 +12968,7 @@ function useWhatsAppState(props) {
12722
12968
  selectedSubtableFilterCol
12723
12969
  ]);
12724
12970
  const finalRecipientCount = preparedRecipients.length;
12725
- const validMainRowsCount = useMemo10(() => {
12971
+ const validMainRowsCount = useMemo11(() => {
12726
12972
  const rowIdSet = new Set(
12727
12973
  preparedRecipients.map((r) => r.mainRowId).filter(Boolean)
12728
12974
  );
@@ -13154,7 +13400,7 @@ import {
13154
13400
  CheckCircle2 as CheckCircle23,
13155
13401
  AlertCircle as AlertCircle3
13156
13402
  } from "lucide-react";
13157
- import { Fragment as Fragment5, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
13403
+ import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
13158
13404
  function TemplateSelectionBlock({
13159
13405
  selectedTemplate,
13160
13406
  selectedTemplateId,
@@ -13181,15 +13427,15 @@ function TemplateSelectionBlock({
13181
13427
  handleFileUpload
13182
13428
  }) {
13183
13429
  const fileInputRef = useRef16(null);
13184
- return /* @__PURE__ */ jsxs17("div", { className: "col-span-12 lg:col-span-5 min-h-[26rem] h-full flex flex-col bg-slate-50/70 border border-slate-200 rounded-2xl p-3.5 relative", children: [
13185
- /* @__PURE__ */ jsxs17("div", { className: "space-y-1.5 shrink-0", children: [
13186
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between pb-1.5 border-b border-slate-200/70 shrink-0 gap-2", children: [
13187
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-1.5 min-w-0", children: [
13188
- /* @__PURE__ */ jsx20(FileText3, { className: "w-4 h-4 text-emerald-600 shrink-0" }),
13189
- /* @__PURE__ */ jsx20("span", { className: "text-xs font-bold text-slate-800 truncate", children: "\u05EA\u05D1\u05E0\u05D9\u05EA \u05D5\u05EA\u05D5\u05DB\u05DF \u05D4\u05D5\u05D3\u05E2\u05D4" })
13430
+ return /* @__PURE__ */ jsxs18("div", { className: "col-span-12 lg:col-span-5 min-h-[26rem] h-full flex flex-col bg-slate-50/70 border border-slate-200 rounded-2xl p-3.5 relative", children: [
13431
+ /* @__PURE__ */ jsxs18("div", { className: "space-y-1.5 shrink-0", children: [
13432
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between pb-1.5 border-b border-slate-200/70 shrink-0 gap-2", children: [
13433
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1.5 min-w-0", children: [
13434
+ /* @__PURE__ */ jsx21(FileText3, { className: "w-4 h-4 text-emerald-600 shrink-0" }),
13435
+ /* @__PURE__ */ jsx21("span", { className: "text-xs font-bold text-slate-800 truncate", children: "\u05EA\u05D1\u05E0\u05D9\u05EA \u05D5\u05EA\u05D5\u05DB\u05DF \u05D4\u05D5\u05D3\u05E2\u05D4" })
13190
13436
  ] }),
13191
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-1.5 shrink-0", children: [
13192
- /* @__PURE__ */ jsxs17(
13437
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1.5 shrink-0", children: [
13438
+ /* @__PURE__ */ jsxs18(
13193
13439
  "button",
13194
13440
  {
13195
13441
  type: "button",
@@ -13198,12 +13444,12 @@ function TemplateSelectionBlock({
13198
13444
  className: `h-7 px-2 text-[11px] font-semibold rounded-lg border transition-all flex items-center gap-1 ${selectedTemplate && !isDeleting ? "bg-white text-rose-600 hover:bg-rose-50 border-rose-200 active:scale-[0.98] shadow-2xs cursor-pointer" : "bg-slate-100 text-slate-400 border-slate-200 cursor-not-allowed opacity-60"}`,
13199
13445
  title: !selectedTemplate ? "\u05D1\u05D7\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA \u05DB\u05D3\u05D9 \u05DC\u05DE\u05D7\u05D5\u05E7 \u05D0\u05D5\u05EA\u05D4" : `\u05DE\u05D7\u05E7 \u05D0\u05EA \u05D4\u05EA\u05D1\u05E0\u05D9\u05EA "${selectedTemplate.name}"`,
13200
13446
  children: [
13201
- isDeleting ? /* @__PURE__ */ jsx20(Loader25, { className: "w-3.5 h-3.5 animate-spin text-rose-500" }) : /* @__PURE__ */ jsx20(Trash23, { className: "w-3.5 h-3.5 text-rose-500" }),
13202
- /* @__PURE__ */ jsx20("span", { children: "\u05DE\u05D7\u05D9\u05E7\u05D4" })
13447
+ isDeleting ? /* @__PURE__ */ jsx21(Loader25, { className: "w-3.5 h-3.5 animate-spin text-rose-500" }) : /* @__PURE__ */ jsx21(Trash23, { className: "w-3.5 h-3.5 text-rose-500" }),
13448
+ /* @__PURE__ */ jsx21("span", { children: "\u05DE\u05D7\u05D9\u05E7\u05D4" })
13203
13449
  ]
13204
13450
  }
13205
13451
  ),
13206
- /* @__PURE__ */ jsxs17(
13452
+ /* @__PURE__ */ jsxs18(
13207
13453
  "button",
13208
13454
  {
13209
13455
  type: "button",
@@ -13211,40 +13457,40 @@ function TemplateSelectionBlock({
13211
13457
  className: "h-7 px-2.5 text-[11px] font-semibold text-white bg-emerald-600 hover:bg-emerald-700 active:scale-[0.98] rounded-lg shadow-2xs transition-all flex items-center gap-1 cursor-pointer",
13212
13458
  title: "\u05E6\u05D5\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA \u05D7\u05D3\u05E9\u05D4",
13213
13459
  children: [
13214
- /* @__PURE__ */ jsx20(Plus2, { className: "w-3.5 h-3.5" }),
13215
- /* @__PURE__ */ jsx20("span", { children: "\u05D7\u05D3\u05E9" })
13460
+ /* @__PURE__ */ jsx21(Plus2, { className: "w-3.5 h-3.5" }),
13461
+ /* @__PURE__ */ jsx21("span", { children: "\u05D7\u05D3\u05E9" })
13216
13462
  ]
13217
13463
  }
13218
13464
  )
13219
13465
  ] })
13220
13466
  ] }),
13221
- /* @__PURE__ */ jsxs17("div", { className: "relative", children: [
13222
- /* @__PURE__ */ jsxs17(
13467
+ /* @__PURE__ */ jsxs18("div", { className: "relative", children: [
13468
+ /* @__PURE__ */ jsxs18(
13223
13469
  "button",
13224
13470
  {
13225
13471
  type: "button",
13226
13472
  onClick: () => setIsDropdownOpen((prev) => !prev),
13227
13473
  className: "w-full h-8.5 px-3 bg-white hover:bg-slate-100/70 border border-slate-200 rounded-xl text-right flex items-center justify-between transition-colors cursor-pointer text-xs",
13228
13474
  children: [
13229
- selectedTemplate ? /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2 overflow-hidden", children: [
13230
- /* @__PURE__ */ jsx20(
13475
+ selectedTemplate ? /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2 overflow-hidden", children: [
13476
+ /* @__PURE__ */ jsx21(
13231
13477
  "span",
13232
13478
  {
13233
13479
  className: `w-2 h-2 rounded-full shrink-0 ${getStatusConfig(selectedTemplate.status).dotColor}`
13234
13480
  }
13235
13481
  ),
13236
- /* @__PURE__ */ jsx20("span", { className: "text-xs font-semibold text-slate-900 truncate", children: selectedTemplate.name }),
13237
- /* @__PURE__ */ jsxs17("span", { className: "text-[10px] text-slate-400 shrink-0", children: [
13482
+ /* @__PURE__ */ jsx21("span", { className: "text-xs font-semibold text-slate-900 truncate", children: selectedTemplate.name }),
13483
+ /* @__PURE__ */ jsxs18("span", { className: "text-[10px] text-slate-400 shrink-0", children: [
13238
13484
  "(",
13239
13485
  selectedTemplate.category,
13240
13486
  " \u2022 ",
13241
13487
  selectedTemplate.language,
13242
13488
  ")"
13243
13489
  ] })
13244
- ] }) : /* @__PURE__ */ jsx20("span", { className: "text-xs text-slate-400", children: "\u05D1\u05D7\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA \u05E7\u05D9\u05D9\u05DE\u05EA \u05DE\u05D4\u05E8\u05E9\u05D9\u05DE\u05D4..." }),
13245
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-1.5 shrink-0 mr-1", children: [
13246
- isLoadingTemplates && /* @__PURE__ */ jsx20(Loader25, { className: "w-3.5 h-3.5 text-emerald-600 animate-spin" }),
13247
- /* @__PURE__ */ jsx20(
13490
+ ] }) : /* @__PURE__ */ jsx21("span", { className: "text-xs text-slate-400", children: "\u05D1\u05D7\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA \u05E7\u05D9\u05D9\u05DE\u05EA \u05DE\u05D4\u05E8\u05E9\u05D9\u05DE\u05D4..." }),
13491
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1.5 shrink-0 mr-1", children: [
13492
+ isLoadingTemplates && /* @__PURE__ */ jsx21(Loader25, { className: "w-3.5 h-3.5 text-emerald-600 animate-spin" }),
13493
+ /* @__PURE__ */ jsx21(
13248
13494
  ChevronDown3,
13249
13495
  {
13250
13496
  className: `w-3.5 h-3.5 text-slate-400 transition-transform ${isDropdownOpen ? "rotate-180" : ""}`
@@ -13254,21 +13500,21 @@ function TemplateSelectionBlock({
13254
13500
  ]
13255
13501
  }
13256
13502
  ),
13257
- isDropdownOpen && /* @__PURE__ */ jsxs17(Fragment5, { children: [
13258
- /* @__PURE__ */ jsx20(
13503
+ isDropdownOpen && /* @__PURE__ */ jsxs18(Fragment5, { children: [
13504
+ /* @__PURE__ */ jsx21(
13259
13505
  "div",
13260
13506
  {
13261
13507
  className: "fixed inset-0 z-40",
13262
13508
  onClick: () => setIsDropdownOpen(false)
13263
13509
  }
13264
13510
  ),
13265
- /* @__PURE__ */ jsxs17("div", { className: "absolute top-full left-0 right-0 mt-1 bg-white border border-slate-200 rounded-xl shadow-xl z-50 max-h-52 overflow-y-auto divide-y divide-slate-100 animate-in fade-in-50 zoom-in-95 duration-100", children: [
13266
- templates.length === 0 && !isLoadingTemplates && /* @__PURE__ */ jsx20("div", { className: "p-3 text-center text-xs text-slate-400", children: '\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05EA\u05D1\u05E0\u05D9\u05D5\u05EA. \u05DC\u05D7\u05E5 \u05E2\u05DC "+ \u05E6\u05D5\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA \u05D7\u05D3\u05E9\u05D4".' }),
13511
+ /* @__PURE__ */ jsxs18("div", { className: "absolute top-full left-0 right-0 mt-1 bg-white border border-slate-200 rounded-xl shadow-xl z-50 max-h-52 overflow-y-auto divide-y divide-slate-100 animate-in fade-in-50 zoom-in-95 duration-100", children: [
13512
+ templates.length === 0 && !isLoadingTemplates && /* @__PURE__ */ jsx21("div", { className: "p-3 text-center text-xs text-slate-400", children: '\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05EA\u05D1\u05E0\u05D9\u05D5\u05EA. \u05DC\u05D7\u05E5 \u05E2\u05DC "+ \u05E6\u05D5\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA \u05D7\u05D3\u05E9\u05D4".' }),
13267
13513
  templates.map((tpl) => {
13268
13514
  const statusConfig = getStatusConfig(tpl.status);
13269
13515
  const isSelected = tpl.id === selectedTemplateId;
13270
13516
  const canSelect = statusConfig.isSelectable;
13271
- return /* @__PURE__ */ jsxs17(
13517
+ return /* @__PURE__ */ jsxs18(
13272
13518
  "div",
13273
13519
  {
13274
13520
  onClick: () => {
@@ -13281,29 +13527,29 @@ function TemplateSelectionBlock({
13281
13527
  className: `p-2.5 flex items-center justify-between gap-2.5 transition-colors ${canSelect ? "hover:bg-slate-50 cursor-pointer" : "opacity-60 bg-slate-50/60 cursor-not-allowed"} ${isSelected ? "bg-emerald-50/50" : ""}`,
13282
13528
  title: !canSelect ? `\u05E1\u05D8\u05D8\u05D5\u05E1 \u05EA\u05D1\u05E0\u05D9\u05EA: ${tpl.status}. \u05E8\u05E7 \u05EA\u05D1\u05E0\u05D9\u05D5\u05EA \u05D1\u05DE\u05E6\u05D1 \u05DE\u05D0\u05D5\u05E9\u05E8 \u05D0\u05D5 \u05E4\u05E2\u05D9\u05DC \u05E0\u05D9\u05EA\u05E0\u05D5\u05EA \u05DC\u05D1\u05D7\u05D9\u05E8\u05D4.` : void 0,
13283
13529
  children: [
13284
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2 overflow-hidden", children: [
13285
- /* @__PURE__ */ jsx20(
13530
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2 overflow-hidden", children: [
13531
+ /* @__PURE__ */ jsx21(
13286
13532
  "span",
13287
13533
  {
13288
13534
  className: `w-2 h-2 rounded-full shrink-0 ${statusConfig.dotColor}`
13289
13535
  }
13290
13536
  ),
13291
- /* @__PURE__ */ jsxs17("div", { className: "overflow-hidden", children: [
13292
- /* @__PURE__ */ jsx20(
13537
+ /* @__PURE__ */ jsxs18("div", { className: "overflow-hidden", children: [
13538
+ /* @__PURE__ */ jsx21(
13293
13539
  "p",
13294
13540
  {
13295
13541
  className: `text-xs font-semibold truncate ${isSelected ? "text-emerald-700" : canSelect ? "text-slate-800" : "text-slate-500"}`,
13296
13542
  children: tpl.name
13297
13543
  }
13298
13544
  ),
13299
- /* @__PURE__ */ jsxs17("p", { className: "text-[10px] text-slate-400", children: [
13545
+ /* @__PURE__ */ jsxs18("p", { className: "text-[10px] text-slate-400", children: [
13300
13546
  tpl.category,
13301
13547
  " \u2022 ",
13302
13548
  tpl.language
13303
13549
  ] })
13304
13550
  ] })
13305
13551
  ] }),
13306
- /* @__PURE__ */ jsx20(
13552
+ /* @__PURE__ */ jsx21(
13307
13553
  "span",
13308
13554
  {
13309
13555
  className: `text-[9px] font-semibold px-2 py-0.5 rounded-full border shrink-0 ${statusConfig.badgeBg} ${statusConfig.badgeText}`,
@@ -13319,18 +13565,18 @@ function TemplateSelectionBlock({
13319
13565
  ] })
13320
13566
  ] })
13321
13567
  ] }),
13322
- /* @__PURE__ */ jsxs17("div", { className: "flex-1 min-h-0 flex flex-col gap-2", children: [
13323
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between text-[11px] font-semibold text-slate-600 shrink-0", children: [
13324
- /* @__PURE__ */ jsx20("span", { children: "\u05EA\u05E6\u05D5\u05D2\u05EA \u05D4\u05D5\u05D3\u05E2\u05D4" }),
13325
- selectedTemplate && /* @__PURE__ */ jsxs17("span", { className: "text-[10px] text-slate-400", children: [
13568
+ /* @__PURE__ */ jsxs18("div", { className: "flex-1 min-h-0 flex flex-col gap-2", children: [
13569
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between text-[11px] font-semibold text-slate-600 shrink-0", children: [
13570
+ /* @__PURE__ */ jsx21("span", { children: "\u05EA\u05E6\u05D5\u05D2\u05EA \u05D4\u05D5\u05D3\u05E2\u05D4" }),
13571
+ selectedTemplate && /* @__PURE__ */ jsxs18("span", { className: "text-[10px] text-slate-400", children: [
13326
13572
  "(",
13327
13573
  templateBodyText.length,
13328
13574
  " \u05EA\u05D5\u05D5\u05D9\u05DD)"
13329
13575
  ] })
13330
13576
  ] }),
13331
- selectedTemplate ? /* @__PURE__ */ jsx20("div", { className: "flex-1 min-h-0 overflow-y-auto bg-white border border-slate-200 rounded-lg p-3 text-sm text-slate-700 leading-relaxed font-sans whitespace-pre-wrap select-all shadow-2xs", children: templateBodyText || "(\u05D2\u05D5\u05E3 \u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 \u05E8\u05D9\u05E7)" }) : /* @__PURE__ */ jsxs17("div", { className: "flex-1 min-h-0 py-3 bg-white border border-dashed border-slate-200 rounded-lg text-center text-sm text-slate-400 flex flex-col items-center justify-center gap-0.5", children: [
13332
- /* @__PURE__ */ jsx20("span", { children: "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05EA\u05D1\u05E0\u05D9\u05EA" }),
13333
- /* @__PURE__ */ jsx20("span", { className: "text-xs text-slate-400", children: '\u05D1\u05D7\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA \u05DE\u05D4\u05E8\u05E9\u05D9\u05DE\u05D4 \u05D0\u05D5 \u05DC\u05D7\u05E5 \u05E2\u05DC "+ \u05D7\u05D3\u05E9"' })
13577
+ selectedTemplate ? /* @__PURE__ */ jsx21("div", { className: "flex-1 min-h-0 overflow-y-auto bg-white border border-slate-200 rounded-lg p-3 text-sm text-slate-700 leading-relaxed font-sans whitespace-pre-wrap select-all shadow-2xs", children: templateBodyText || "(\u05D2\u05D5\u05E3 \u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 \u05E8\u05D9\u05E7)" }) : /* @__PURE__ */ jsxs18("div", { className: "flex-1 min-h-0 py-3 bg-white border border-dashed border-slate-200 rounded-lg text-center text-sm text-slate-400 flex flex-col items-center justify-center gap-0.5", children: [
13578
+ /* @__PURE__ */ jsx21("span", { children: "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05EA\u05D1\u05E0\u05D9\u05EA" }),
13579
+ /* @__PURE__ */ jsx21("span", { className: "text-xs text-slate-400", children: '\u05D1\u05D7\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA \u05DE\u05D4\u05E8\u05E9\u05D9\u05DE\u05D4 \u05D0\u05D5 \u05DC\u05D7\u05E5 \u05E2\u05DC "+ \u05D7\u05D3\u05E9"' })
13334
13580
  ] }),
13335
13581
  selectedTemplate && (() => {
13336
13582
  var _a;
@@ -13339,19 +13585,19 @@ function TemplateSelectionBlock({
13339
13585
  );
13340
13586
  const tplButtons = (buttonsComp == null ? void 0 : buttonsComp.buttons) || [];
13341
13587
  if (!tplButtons || tplButtons.length === 0) return null;
13342
- return /* @__PURE__ */ jsx20("div", { className: "flex flex-wrap gap-1.5 shrink-0 pt-0.5", children: tplButtons.map((btn, idx) => {
13588
+ return /* @__PURE__ */ jsx21("div", { className: "flex flex-wrap gap-1.5 shrink-0 pt-0.5", children: tplButtons.map((btn, idx) => {
13343
13589
  const btnType = (btn.type || "").toUpperCase();
13344
13590
  const btnText = btn.text || (btnType === "COPY_CODE" ? `\u05D4\u05E2\u05EA\u05E7 \u05E7\u05D5\u05D3: ${btn.example}` : "\u05DB\u05E4\u05EA\u05D5\u05E8");
13345
- return /* @__PURE__ */ jsxs17(
13591
+ return /* @__PURE__ */ jsxs18(
13346
13592
  "div",
13347
13593
  {
13348
13594
  className: "inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg bg-white border border-slate-200/90 text-slate-700 text-xs font-semibold shadow-2xs select-none",
13349
13595
  children: [
13350
- btnType === "QUICK_REPLY" && /* @__PURE__ */ jsx20(MessageSquare2, { className: "w-3 h-3 text-emerald-600" }),
13351
- btnType === "URL" && /* @__PURE__ */ jsx20(ExternalLink4, { className: "w-3 h-3 text-sky-600" }),
13352
- btnType === "PHONE_NUMBER" && /* @__PURE__ */ jsx20(Phone2, { className: "w-3 h-3 text-violet-600" }),
13353
- btnType === "COPY_CODE" && /* @__PURE__ */ jsx20(Copy4, { className: "w-3 h-3 text-amber-600" }),
13354
- /* @__PURE__ */ jsx20("span", { className: "truncate max-w-[180px]", children: btnText })
13596
+ btnType === "QUICK_REPLY" && /* @__PURE__ */ jsx21(MessageSquare2, { className: "w-3 h-3 text-emerald-600" }),
13597
+ btnType === "URL" && /* @__PURE__ */ jsx21(ExternalLink4, { className: "w-3 h-3 text-sky-600" }),
13598
+ btnType === "PHONE_NUMBER" && /* @__PURE__ */ jsx21(Phone2, { className: "w-3 h-3 text-violet-600" }),
13599
+ btnType === "COPY_CODE" && /* @__PURE__ */ jsx21(Copy4, { className: "w-3 h-3 text-amber-600" }),
13600
+ /* @__PURE__ */ jsx21("span", { className: "truncate max-w-[180px]", children: btnText })
13355
13601
  ]
13356
13602
  },
13357
13603
  idx
@@ -13366,9 +13612,9 @@ function TemplateSelectionBlock({
13366
13612
  const docFilename = resolveDocumentFilename(templateHeaderComp, headerMediaUrl);
13367
13613
  const hasValidMedia = Boolean(headerMediaUrl && headerMediaUrl.trim() && headerMediaUrl.startsWith("http"));
13368
13614
  const uploadButtonLabel = headerFormat === "DOCUMENT" ? "\u05D4\u05E2\u05DC\u05D4 \u05DE\u05E1\u05DE\u05DA" : headerFormat === "IMAGE" ? "\u05D4\u05E2\u05DC\u05D4 \u05EA\u05DE\u05D5\u05E0\u05D4" : "\u05D4\u05E2\u05DC\u05D4 \u05E7\u05D5\u05D1\u05E5";
13369
- return /* @__PURE__ */ jsxs17("div", { className: "p-2.5 bg-slate-50 border border-slate-200/90 rounded-xl flex items-center justify-between gap-3 shrink-0 shadow-2xs", children: [
13370
- /* @__PURE__ */ jsx20("div", { className: "flex items-center gap-2.5 overflow-hidden", children: headerFormat === "IMAGE" ? /* @__PURE__ */ jsxs17(Fragment5, { children: [
13371
- /* @__PURE__ */ jsx20("div", { className: "w-8 h-8 rounded-lg overflow-hidden border border-slate-200 shrink-0 bg-slate-100 flex items-center justify-center", children: hasValidMedia ? /* @__PURE__ */ jsx20(
13615
+ return /* @__PURE__ */ jsxs18("div", { className: "p-2.5 bg-slate-50 border border-slate-200/90 rounded-xl flex items-center justify-between gap-3 shrink-0 shadow-2xs", children: [
13616
+ /* @__PURE__ */ jsx21("div", { className: "flex items-center gap-2.5 overflow-hidden", children: headerFormat === "IMAGE" ? /* @__PURE__ */ jsxs18(Fragment5, { children: [
13617
+ /* @__PURE__ */ jsx21("div", { className: "w-8 h-8 rounded-lg overflow-hidden border border-slate-200 shrink-0 bg-slate-100 flex items-center justify-center", children: hasValidMedia ? /* @__PURE__ */ jsx21(
13372
13618
  "img",
13373
13619
  {
13374
13620
  src: headerMediaUrl,
@@ -13378,33 +13624,33 @@ function TemplateSelectionBlock({
13378
13624
  e.currentTarget.style.display = "none";
13379
13625
  }
13380
13626
  }
13381
- ) : /* @__PURE__ */ jsx20(ImageIcon2, { className: "w-4 h-4 text-amber-600" }) }),
13382
- /* @__PURE__ */ jsxs17("div", { className: "overflow-hidden", children: [
13383
- /* @__PURE__ */ jsx20("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05EA\u05DE\u05D5\u05E0\u05EA \u05DB\u05D5\u05EA\u05E8\u05EA" }),
13384
- /* @__PURE__ */ jsx20("span", { className: "text-[10px] text-slate-400 block truncate", children: hasValidMedia ? "\u05E7\u05D5\u05D1\u05E5 \u05EA\u05DE\u05D5\u05E0\u05D4 \u05DE\u05E7\u05D5\u05E9\u05E8 \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA" : "\u05D8\u05E8\u05DD \u05D4\u05D5\u05E2\u05DC\u05D4 \u05E7\u05D5\u05D1\u05E5 \u05EA\u05DE\u05D5\u05E0\u05D4" })
13627
+ ) : /* @__PURE__ */ jsx21(ImageIcon2, { className: "w-4 h-4 text-amber-600" }) }),
13628
+ /* @__PURE__ */ jsxs18("div", { className: "overflow-hidden", children: [
13629
+ /* @__PURE__ */ jsx21("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05EA\u05DE\u05D5\u05E0\u05EA \u05DB\u05D5\u05EA\u05E8\u05EA" }),
13630
+ /* @__PURE__ */ jsx21("span", { className: "text-[10px] text-slate-400 block truncate", children: hasValidMedia ? "\u05E7\u05D5\u05D1\u05E5 \u05EA\u05DE\u05D5\u05E0\u05D4 \u05DE\u05E7\u05D5\u05E9\u05E8 \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA" : "\u05D8\u05E8\u05DD \u05D4\u05D5\u05E2\u05DC\u05D4 \u05E7\u05D5\u05D1\u05E5 \u05EA\u05DE\u05D5\u05E0\u05D4" })
13385
13631
  ] })
13386
- ] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs17(Fragment5, { children: [
13387
- /* @__PURE__ */ jsx20("div", { className: `w-8 h-8 rounded-lg flex items-center justify-center shrink-0 border ${hasValidMedia ? "bg-rose-50 text-rose-600 border-rose-100" : "bg-slate-100 text-slate-400 border-slate-200"}`, children: /* @__PURE__ */ jsx20(FileText3, { className: "w-4 h-4" }) }),
13388
- /* @__PURE__ */ jsxs17("div", { className: "overflow-hidden", children: [
13389
- /* @__PURE__ */ jsx20("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05DE\u05E1\u05DE\u05DA \u05DB\u05D5\u05EA\u05E8\u05EA (PDF)" }),
13390
- /* @__PURE__ */ jsx20("span", { className: "text-[10px] text-slate-500 font-mono block truncate", title: hasValidMedia ? docFilename : void 0, children: hasValidMedia ? docFilename : "\u05D8\u05E8\u05DD \u05D4\u05D5\u05E2\u05DC\u05D4 \u05E7\u05D5\u05D1\u05E5 \u05DE\u05E1\u05DE\u05DA" })
13632
+ ] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs18(Fragment5, { children: [
13633
+ /* @__PURE__ */ jsx21("div", { className: `w-8 h-8 rounded-lg flex items-center justify-center shrink-0 border ${hasValidMedia ? "bg-rose-50 text-rose-600 border-rose-100" : "bg-slate-100 text-slate-400 border-slate-200"}`, children: /* @__PURE__ */ jsx21(FileText3, { className: "w-4 h-4" }) }),
13634
+ /* @__PURE__ */ jsxs18("div", { className: "overflow-hidden", children: [
13635
+ /* @__PURE__ */ jsx21("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05DE\u05E1\u05DE\u05DA \u05DB\u05D5\u05EA\u05E8\u05EA (PDF)" }),
13636
+ /* @__PURE__ */ jsx21("span", { className: "text-[10px] text-slate-500 font-mono block truncate", title: hasValidMedia ? docFilename : void 0, children: hasValidMedia ? docFilename : "\u05D8\u05E8\u05DD \u05D4\u05D5\u05E2\u05DC\u05D4 \u05E7\u05D5\u05D1\u05E5 \u05DE\u05E1\u05DE\u05DA" })
13391
13637
  ] })
13392
- ] }) : /* @__PURE__ */ jsxs17(Fragment5, { children: [
13393
- /* @__PURE__ */ jsx20("div", { className: `w-8 h-8 rounded-lg flex items-center justify-center shrink-0 border ${hasValidMedia ? "bg-indigo-50 text-indigo-600 border-indigo-100" : "bg-slate-100 text-slate-400 border-slate-200"}`, children: /* @__PURE__ */ jsx20(Video2, { className: "w-4 h-4" }) }),
13394
- /* @__PURE__ */ jsxs17("div", { className: "overflow-hidden", children: [
13395
- /* @__PURE__ */ jsx20("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05E1\u05E8\u05D8\u05D5\u05DF \u05DB\u05D5\u05EA\u05E8\u05EA" }),
13396
- /* @__PURE__ */ jsx20("span", { className: "text-[10px] text-slate-400 block truncate", children: hasValidMedia ? "\u05E7\u05D5\u05D1\u05E5 \u05D5\u05D9\u05D3\u05D0\u05D5 \u05DE\u05E7\u05D5\u05E9\u05E8 \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA" : "\u05D8\u05E8\u05DD \u05D4\u05D5\u05E2\u05DC\u05D4 \u05E7\u05D5\u05D1\u05E5 \u05D5\u05D9\u05D3\u05D0\u05D5" })
13638
+ ] }) : /* @__PURE__ */ jsxs18(Fragment5, { children: [
13639
+ /* @__PURE__ */ jsx21("div", { className: `w-8 h-8 rounded-lg flex items-center justify-center shrink-0 border ${hasValidMedia ? "bg-indigo-50 text-indigo-600 border-indigo-100" : "bg-slate-100 text-slate-400 border-slate-200"}`, children: /* @__PURE__ */ jsx21(Video2, { className: "w-4 h-4" }) }),
13640
+ /* @__PURE__ */ jsxs18("div", { className: "overflow-hidden", children: [
13641
+ /* @__PURE__ */ jsx21("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05E1\u05E8\u05D8\u05D5\u05DF \u05DB\u05D5\u05EA\u05E8\u05EA" }),
13642
+ /* @__PURE__ */ jsx21("span", { className: "text-[10px] text-slate-400 block truncate", children: hasValidMedia ? "\u05E7\u05D5\u05D1\u05E5 \u05D5\u05D9\u05D3\u05D0\u05D5 \u05DE\u05E7\u05D5\u05E9\u05E8 \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA" : "\u05D8\u05E8\u05DD \u05D4\u05D5\u05E2\u05DC\u05D4 \u05E7\u05D5\u05D1\u05E5 \u05D5\u05D9\u05D3\u05D0\u05D5" })
13397
13643
  ] })
13398
13644
  ] }) }),
13399
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2 shrink-0", children: [
13400
- hasValidMedia ? /* @__PURE__ */ jsxs17("span", { className: "inline-flex items-center gap-1 text-[10px] font-medium text-emerald-800 px-2 py-0.5 bg-emerald-50 border border-emerald-200 rounded-lg", children: [
13401
- /* @__PURE__ */ jsx20(CheckCircle23, { className: "w-3 h-3 text-emerald-600" }),
13645
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2 shrink-0", children: [
13646
+ hasValidMedia ? /* @__PURE__ */ jsxs18("span", { className: "inline-flex items-center gap-1 text-[10px] font-medium text-emerald-800 px-2 py-0.5 bg-emerald-50 border border-emerald-200 rounded-lg", children: [
13647
+ /* @__PURE__ */ jsx21(CheckCircle23, { className: "w-3 h-3 text-emerald-600" }),
13402
13648
  "\u05E7\u05D5\u05D1\u05E5 \u05DE\u05E6\u05D5\u05E8\u05E3 \u05EA\u05E7\u05D9\u05DF"
13403
- ] }) : /* @__PURE__ */ jsxs17("span", { className: "inline-flex items-center gap-1 text-[10px] font-semibold text-amber-800 px-2 py-0.5 bg-amber-50 border border-amber-200 rounded-lg", children: [
13404
- /* @__PURE__ */ jsx20(AlertCircle3, { className: "w-3 h-3 text-amber-600 shrink-0" }),
13649
+ ] }) : /* @__PURE__ */ jsxs18("span", { className: "inline-flex items-center gap-1 text-[10px] font-semibold text-amber-800 px-2 py-0.5 bg-amber-50 border border-amber-200 rounded-lg", children: [
13650
+ /* @__PURE__ */ jsx21(AlertCircle3, { className: "w-3 h-3 text-amber-600 shrink-0" }),
13405
13651
  "\u05E0\u05D3\u05E8\u05E9 \u05E6\u05D9\u05E8\u05D5\u05E3 \u05E7\u05D5\u05D1\u05E5 \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA \u05D6\u05D5"
13406
13652
  ] }),
13407
- hasValidMedia && /* @__PURE__ */ jsx20(
13653
+ hasValidMedia && /* @__PURE__ */ jsx21(
13408
13654
  "a",
13409
13655
  {
13410
13656
  href: headerMediaUrl,
@@ -13412,10 +13658,10 @@ function TemplateSelectionBlock({
13412
13658
  rel: "noopener noreferrer",
13413
13659
  title: "\u05EA\u05E6\u05D5\u05D2\u05D4 \u05DE\u05E7\u05D3\u05D9\u05DE\u05D4 \u05E9\u05DC \u05D4\u05E7\u05D5\u05D1\u05E5",
13414
13660
  className: "p-1 text-slate-400 hover:text-emerald-700 hover:bg-slate-200/60 rounded-md transition-colors",
13415
- children: /* @__PURE__ */ jsx20(ExternalLink4, { className: "w-3.5 h-3.5" })
13661
+ children: /* @__PURE__ */ jsx21(ExternalLink4, { className: "w-3.5 h-3.5" })
13416
13662
  }
13417
13663
  ),
13418
- /* @__PURE__ */ jsx20(
13664
+ /* @__PURE__ */ jsx21(
13419
13665
  "input",
13420
13666
  {
13421
13667
  ref: fileInputRef,
@@ -13433,7 +13679,7 @@ function TemplateSelectionBlock({
13433
13679
  disabled: isUploadingMedia
13434
13680
  }
13435
13681
  ),
13436
- /* @__PURE__ */ jsx20(
13682
+ /* @__PURE__ */ jsx21(
13437
13683
  "button",
13438
13684
  {
13439
13685
  type: "button",
@@ -13444,39 +13690,39 @@ function TemplateSelectionBlock({
13444
13690
  },
13445
13691
  className: `inline-flex items-center gap-1.5 px-2.5 py-1 text-[11px] font-medium rounded-lg transition-colors border shadow-2xs ${isUploadingMedia ? "bg-slate-100 text-slate-400 border-slate-200 cursor-not-allowed" : hasValidMedia ? "bg-white text-slate-700 hover:bg-slate-50 border-slate-200 hover:border-slate-300" : "bg-emerald-600 text-white hover:bg-emerald-700 border-emerald-600"}`,
13446
13692
  title: hasValidMedia ? "\u05D4\u05D7\u05DC\u05E3 \u05E7\u05D5\u05D1\u05E5 \u05DE\u05D3\u05D9\u05D4 \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA \u05D6\u05D5" : `${uploadButtonLabel} \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA \u05D6\u05D5`,
13447
- children: isUploadingMedia ? /* @__PURE__ */ jsxs17(Fragment5, { children: [
13448
- /* @__PURE__ */ jsx20(Loader25, { className: "w-3.5 h-3.5 animate-spin" }),
13449
- /* @__PURE__ */ jsx20("span", { children: "\u05DE\u05E2\u05DC\u05D4..." })
13450
- ] }) : /* @__PURE__ */ jsxs17(Fragment5, { children: [
13451
- /* @__PURE__ */ jsx20(Upload3, { className: "w-3.5 h-3.5" }),
13452
- /* @__PURE__ */ jsx20("span", { children: hasValidMedia ? "\u05D4\u05D7\u05DC\u05E3 \u05E7\u05D5\u05D1\u05E5" : uploadButtonLabel })
13693
+ children: isUploadingMedia ? /* @__PURE__ */ jsxs18(Fragment5, { children: [
13694
+ /* @__PURE__ */ jsx21(Loader25, { className: "w-3.5 h-3.5 animate-spin" }),
13695
+ /* @__PURE__ */ jsx21("span", { children: "\u05DE\u05E2\u05DC\u05D4..." })
13696
+ ] }) : /* @__PURE__ */ jsxs18(Fragment5, { children: [
13697
+ /* @__PURE__ */ jsx21(Upload3, { className: "w-3.5 h-3.5" }),
13698
+ /* @__PURE__ */ jsx21("span", { children: hasValidMedia ? "\u05D4\u05D7\u05DC\u05E3 \u05E7\u05D5\u05D1\u05E5" : uploadButtonLabel })
13453
13699
  ] })
13454
13700
  }
13455
13701
  )
13456
13702
  ] })
13457
13703
  ] });
13458
13704
  })(),
13459
- selectedTemplate && templateVariables.length > 0 && /* @__PURE__ */ jsxs17("div", { className: "shrink-0 flex flex-col gap-1.5 pt-2 border-t border-slate-200/80 pb-0", children: [
13460
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between shrink-0", children: [
13461
- /* @__PURE__ */ jsx20("span", { className: "text-[11px] font-bold text-slate-700", children: "\u05DE\u05D9\u05E4\u05D5\u05D9 \u05DE\u05E9\u05EA\u05E0\u05D9\u05DD" }),
13462
- /* @__PURE__ */ jsxs17("span", { className: "text-[9px] font-semibold text-emerald-700 bg-emerald-50 px-1.5 py-0.5 rounded border border-emerald-200", children: [
13705
+ selectedTemplate && templateVariables.length > 0 && /* @__PURE__ */ jsxs18("div", { className: "shrink-0 flex flex-col gap-1.5 pt-2 border-t border-slate-200/80 pb-0", children: [
13706
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between shrink-0", children: [
13707
+ /* @__PURE__ */ jsx21("span", { className: "text-[11px] font-bold text-slate-700", children: "\u05DE\u05D9\u05E4\u05D5\u05D9 \u05DE\u05E9\u05EA\u05E0\u05D9\u05DD" }),
13708
+ /* @__PURE__ */ jsxs18("span", { className: "text-[9px] font-semibold text-emerald-700 bg-emerald-50 px-1.5 py-0.5 rounded border border-emerald-200", children: [
13463
13709
  templateVariables.length,
13464
13710
  " \u05DE\u05E9\u05EA\u05E0\u05D9\u05DD"
13465
13711
  ] })
13466
13712
  ] }),
13467
- /* @__PURE__ */ jsx20("div", { className: "max-h-48 overflow-y-auto space-y-1.5 pr-0.5", children: templateVariables.map((varKey) => {
13713
+ /* @__PURE__ */ jsx21("div", { className: "max-h-48 overflow-y-auto space-y-1.5 pr-0.5", children: templateVariables.map((varKey) => {
13468
13714
  var _a;
13469
13715
  const mapping = variableMapping[varKey] || { type: "column", value: "" };
13470
13716
  const isStatic = mapping.type === "static";
13471
13717
  const selectedColVal = textableColumnOptions.some((o) => o.id === mapping.value) ? mapping.value : ((_a = textableColumnOptions.find((o) => o.columnName === mapping.value)) == null ? void 0 : _a.id) || mapping.value || "";
13472
- return /* @__PURE__ */ jsxs17(
13718
+ return /* @__PURE__ */ jsxs18(
13473
13719
  "div",
13474
13720
  {
13475
13721
  className: "flex items-center gap-1.5 p-1 bg-white border border-slate-200 rounded-xl text-xs shrink-0",
13476
13722
  children: [
13477
- /* @__PURE__ */ jsx20("span", { className: "px-2 py-0.5 bg-emerald-50 text-emerald-800 font-mono font-bold text-[11px] rounded-lg border border-emerald-200/80 shrink-0", children: `{{${varKey}}}` }),
13478
- /* @__PURE__ */ jsxs17("div", { className: "inline-flex items-center p-0.5 bg-slate-100 rounded-lg border border-slate-200/80 shrink-0 text-[10px] font-medium", children: [
13479
- /* @__PURE__ */ jsx20(
13723
+ /* @__PURE__ */ jsx21("span", { className: "px-2 py-0.5 bg-emerald-50 text-emerald-800 font-mono font-bold text-[11px] rounded-lg border border-emerald-200/80 shrink-0", children: `{{${varKey}}}` }),
13724
+ /* @__PURE__ */ jsxs18("div", { className: "inline-flex items-center p-0.5 bg-slate-100 rounded-lg border border-slate-200/80 shrink-0 text-[10px] font-medium", children: [
13725
+ /* @__PURE__ */ jsx21(
13480
13726
  "button",
13481
13727
  {
13482
13728
  type: "button",
@@ -13485,7 +13731,7 @@ function TemplateSelectionBlock({
13485
13731
  children: "\u05E2\u05DE\u05D5\u05D3\u05D4"
13486
13732
  }
13487
13733
  ),
13488
- /* @__PURE__ */ jsx20(
13734
+ /* @__PURE__ */ jsx21(
13489
13735
  "button",
13490
13736
  {
13491
13737
  type: "button",
@@ -13495,7 +13741,7 @@ function TemplateSelectionBlock({
13495
13741
  }
13496
13742
  )
13497
13743
  ] }),
13498
- isStatic ? /* @__PURE__ */ jsx20(
13744
+ isStatic ? /* @__PURE__ */ jsx21(
13499
13745
  "input",
13500
13746
  {
13501
13747
  type: "text",
@@ -13504,20 +13750,20 @@ function TemplateSelectionBlock({
13504
13750
  placeholder: "\u05D4\u05D6\u05DF \u05E2\u05E8\u05DA \u05E7\u05D1\u05D5\u05E2 (\u05D7\u05D5\u05D1\u05D4)...",
13505
13751
  className: `flex-1 min-w-0 h-7 px-2 text-[11px] rounded-lg border bg-white text-slate-800 placeholder:text-slate-400 focus:outline-none transition-colors ${!mapping.value || mapping.value.trim() === "" ? "border-amber-300 focus:border-amber-500 focus:ring-1 focus:ring-amber-500/20" : "border-slate-200 focus:border-emerald-500 focus:ring-1 focus:ring-emerald-500/20"}`
13506
13752
  }
13507
- ) : /* @__PURE__ */ jsxs17("div", { className: "relative flex-1 min-w-0", children: [
13508
- /* @__PURE__ */ jsxs17(
13753
+ ) : /* @__PURE__ */ jsxs18("div", { className: "relative flex-1 min-w-0", children: [
13754
+ /* @__PURE__ */ jsxs18(
13509
13755
  "select",
13510
13756
  {
13511
13757
  value: selectedColVal,
13512
13758
  onChange: (e) => handleVariableValueChange(varKey, e.target.value),
13513
13759
  className: "w-full h-7 pr-2.5 pl-6 text-[11px] rounded-lg border border-slate-200 bg-white text-slate-700 focus:border-emerald-500 focus:ring-1 focus:ring-emerald-500/20 cursor-pointer truncate appearance-none",
13514
13760
  children: [
13515
- /* @__PURE__ */ jsx20("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4..." }),
13516
- textableColumnOptions.map((opt) => /* @__PURE__ */ jsx20("option", { value: opt.id, children: opt.label }, opt.id))
13761
+ /* @__PURE__ */ jsx21("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4..." }),
13762
+ textableColumnOptions.map((opt) => /* @__PURE__ */ jsx21("option", { value: opt.id, children: opt.label }, opt.id))
13517
13763
  ]
13518
13764
  }
13519
13765
  ),
13520
- /* @__PURE__ */ jsx20(ChevronDown3, { className: "w-3 h-3 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
13766
+ /* @__PURE__ */ jsx21(ChevronDown3, { className: "w-3 h-3 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
13521
13767
  ] })
13522
13768
  ]
13523
13769
  },
@@ -13531,13 +13777,13 @@ function TemplateSelectionBlock({
13531
13777
 
13532
13778
  // src/components/WhatsAppComponent/ui/DynamicFiltersBlock.tsx
13533
13779
  import {
13534
- Filter as Filter2,
13780
+ Filter as Filter3,
13535
13781
  X as X10,
13536
13782
  ChevronDown as ChevronDown4,
13537
13783
  CheckSquare,
13538
13784
  RefreshCw
13539
13785
  } from "lucide-react";
13540
- import { Fragment as Fragment6, jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
13786
+ import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
13541
13787
  function DynamicFiltersBlock({
13542
13788
  filterableColumns,
13543
13789
  filters,
@@ -13552,31 +13798,31 @@ function DynamicFiltersBlock({
13552
13798
  loadTableData,
13553
13799
  isLoadingTableData
13554
13800
  }) {
13555
- return /* @__PURE__ */ jsxs18("div", { className: "col-span-12 lg:col-span-3 min-h-[26rem] h-full flex flex-col justify-between bg-slate-50/70 border border-slate-200 rounded-2xl p-3.5 gap-2", children: [
13556
- /* @__PURE__ */ jsxs18("div", { className: "space-y-2", children: [
13557
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between pb-2 border-b border-slate-200/70 shrink-0", children: [
13558
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
13559
- /* @__PURE__ */ jsx21(Filter2, { className: "w-4 h-4 text-emerald-600" }),
13560
- /* @__PURE__ */ jsx21("span", { className: "text-xs font-bold text-slate-800", children: "\u05E1\u05D9\u05E0\u05D5\u05DF \u05D3\u05D9\u05E0\u05DE\u05D9" }),
13561
- activeFiltersCount > 0 && /* @__PURE__ */ jsx21("span", { className: "text-[10px] font-bold px-1.5 py-0.5 rounded-full bg-emerald-100 text-emerald-800 border border-emerald-200", children: activeFiltersCount })
13801
+ return /* @__PURE__ */ jsxs19("div", { className: "col-span-12 lg:col-span-3 min-h-[26rem] h-full flex flex-col justify-between bg-slate-50/70 border border-slate-200 rounded-2xl p-3.5 gap-2", children: [
13802
+ /* @__PURE__ */ jsxs19("div", { className: "space-y-2", children: [
13803
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between pb-2 border-b border-slate-200/70 shrink-0", children: [
13804
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2", children: [
13805
+ /* @__PURE__ */ jsx22(Filter3, { className: "w-4 h-4 text-emerald-600" }),
13806
+ /* @__PURE__ */ jsx22("span", { className: "text-xs font-bold text-slate-800", children: "\u05E1\u05D9\u05E0\u05D5\u05DF \u05D3\u05D9\u05E0\u05DE\u05D9" }),
13807
+ activeFiltersCount > 0 && /* @__PURE__ */ jsx22("span", { className: "text-[10px] font-bold px-1.5 py-0.5 rounded-full bg-emerald-100 text-emerald-800 border border-emerald-200", children: activeFiltersCount })
13562
13808
  ] }),
13563
- activeFiltersCount > 0 && /* @__PURE__ */ jsxs18(
13809
+ activeFiltersCount > 0 && /* @__PURE__ */ jsxs19(
13564
13810
  "button",
13565
13811
  {
13566
13812
  type: "button",
13567
13813
  onClick: handleClearFilters,
13568
13814
  className: "text-[11px] text-rose-600 hover:text-rose-700 font-semibold hover:underline flex items-center gap-1 cursor-pointer",
13569
13815
  children: [
13570
- /* @__PURE__ */ jsx21(X10, { className: "w-3 h-3" }),
13571
- /* @__PURE__ */ jsx21("span", { children: "\u05E0\u05E7\u05D4" })
13816
+ /* @__PURE__ */ jsx22(X10, { className: "w-3 h-3" }),
13817
+ /* @__PURE__ */ jsx22("span", { children: "\u05E0\u05E7\u05D4" })
13572
13818
  ]
13573
13819
  }
13574
13820
  )
13575
13821
  ] }),
13576
- /* @__PURE__ */ jsx21("div", { className: "py-1", children: filterableColumns.length === 0 ? /* @__PURE__ */ jsxs18("div", { className: "flex flex-col items-center justify-center text-center p-4 text-xs text-slate-400 gap-1", children: [
13577
- /* @__PURE__ */ jsx21("span", { children: "\u05D0\u05D9\u05DF \u05E9\u05D3\u05D5\u05EA \u05DC\u05E1\u05D9\u05E0\u05D5\u05DF \u05D1\u05D8\u05D1\u05DC\u05D4 \u05D6\u05D5" }),
13578
- /* @__PURE__ */ jsx21("span", { className: "text-[10px] text-slate-400", children: "\u05E9\u05D3\u05D5\u05EA \u05DE\u05E1\u05D5\u05D2 \u05E7\u05E9\u05E8 \u05D5\u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9 \u05D1\u05DC\u05D1\u05D3" })
13579
- ] }) : /* @__PURE__ */ jsx21("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-1 gap-2", children: filterableColumns.map((col) => {
13822
+ /* @__PURE__ */ jsx22("div", { className: "py-1", children: filterableColumns.length === 0 ? /* @__PURE__ */ jsxs19("div", { className: "flex flex-col items-center justify-center text-center p-4 text-xs text-slate-400 gap-1", children: [
13823
+ /* @__PURE__ */ jsx22("span", { children: "\u05D0\u05D9\u05DF \u05E9\u05D3\u05D5\u05EA \u05DC\u05E1\u05D9\u05E0\u05D5\u05DF \u05D1\u05D8\u05D1\u05DC\u05D4 \u05D6\u05D5" }),
13824
+ /* @__PURE__ */ jsx22("span", { className: "text-[10px] text-slate-400", children: "\u05E9\u05D3\u05D5\u05EA \u05DE\u05E1\u05D5\u05D2 \u05E7\u05E9\u05E8 \u05D5\u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9 \u05D1\u05DC\u05D1\u05D3" })
13825
+ ] }) : /* @__PURE__ */ jsx22("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-1 gap-2", children: filterableColumns.map((col) => {
13580
13826
  var _a, _b, _c;
13581
13827
  const colType = (_a = col.type) == null ? void 0 : _a.toUpperCase();
13582
13828
  const isBoolean = colType === "BOOLEAN";
@@ -13584,9 +13830,9 @@ function DynamicFiltersBlock({
13584
13830
  const isActive = Boolean(currentValue);
13585
13831
  const refTableId = ((_b = col == null ? void 0 : col.config) == null ? void 0 : _b.referencedTableId) || (col == null ? void 0 : col.referencedTableId);
13586
13832
  const options = ((_c = getRelationOptionsForCol ? getRelationOptionsForCol(col.name) : []) == null ? void 0 : _c.length) > 0 ? getRelationOptionsForCol(col.name) : relationOptions[col.name] && relationOptions[col.name].length > 0 ? relationOptions[col.name] : refTableId && relationOptions[refTableId] && relationOptions[refTableId].length > 0 ? relationOptions[refTableId] : col.id && relationOptions[col.id] && relationOptions[col.id].length > 0 ? relationOptions[col.id] : [];
13587
- return /* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
13588
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between", children: [
13589
- /* @__PURE__ */ jsx21(
13833
+ return /* @__PURE__ */ jsxs19("div", { className: "space-y-1", children: [
13834
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between", children: [
13835
+ /* @__PURE__ */ jsx22(
13590
13836
  "label",
13591
13837
  {
13592
13838
  className: "text-[11px] font-semibold text-slate-700 truncate max-w-[130px]",
@@ -13594,49 +13840,49 @@ function DynamicFiltersBlock({
13594
13840
  children: col.name
13595
13841
  }
13596
13842
  ),
13597
- /* @__PURE__ */ jsx21("span", { className: "text-[9px] text-slate-400 font-mono", children: isBoolean ? "\u05DB\u05DF/\u05DC\u05D0" : "\u05E7\u05E9\u05E8" })
13843
+ /* @__PURE__ */ jsx22("span", { className: "text-[9px] text-slate-400 font-mono", children: isBoolean ? "\u05DB\u05DF/\u05DC\u05D0" : "\u05E7\u05E9\u05E8" })
13598
13844
  ] }),
13599
- /* @__PURE__ */ jsxs18("div", { className: "relative", children: [
13600
- /* @__PURE__ */ jsxs18(
13845
+ /* @__PURE__ */ jsxs19("div", { className: "relative", children: [
13846
+ /* @__PURE__ */ jsxs19(
13601
13847
  "select",
13602
13848
  {
13603
13849
  value: currentValue,
13604
13850
  onChange: (e) => handleFilterChange(col.name, e.target.value),
13605
13851
  className: `w-full h-8 px-2 pr-2.5 pl-6 text-[11px] rounded-lg border transition-all appearance-none bg-white cursor-pointer truncate ${isActive ? "border-emerald-500 bg-emerald-50/20 text-emerald-900 font-medium ring-1 ring-emerald-500/20" : "border-slate-200 text-slate-700 hover:border-slate-300 focus:border-emerald-500"}`,
13606
13852
  children: [
13607
- /* @__PURE__ */ jsx21("option", { value: "", children: "\u05D4\u05DB\u05DC" }),
13608
- isBoolean ? /* @__PURE__ */ jsxs18(Fragment6, { children: [
13609
- /* @__PURE__ */ jsx21("option", { value: "true", children: "\u05DB\u05DF" }),
13610
- /* @__PURE__ */ jsx21("option", { value: "false", children: "\u05DC\u05D0" })
13611
- ] }) : options.map((opt) => /* @__PURE__ */ jsx21("option", { value: opt.id || opt._id, children: getRelationOptionLabel(opt, col, relationOptions) }, opt.id || opt._id))
13853
+ /* @__PURE__ */ jsx22("option", { value: "", children: "\u05D4\u05DB\u05DC" }),
13854
+ isBoolean ? /* @__PURE__ */ jsxs19(Fragment6, { children: [
13855
+ /* @__PURE__ */ jsx22("option", { value: "true", children: "\u05DB\u05DF" }),
13856
+ /* @__PURE__ */ jsx22("option", { value: "false", children: "\u05DC\u05D0" })
13857
+ ] }) : options.map((opt) => /* @__PURE__ */ jsx22("option", { value: opt.id || opt._id, children: getRelationOptionLabel(opt, col, relationOptions) }, opt.id || opt._id))
13612
13858
  ]
13613
13859
  }
13614
13860
  ),
13615
- /* @__PURE__ */ jsx21(ChevronDown4, { className: "w-3 h-3 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
13861
+ /* @__PURE__ */ jsx22(ChevronDown4, { className: "w-3 h-3 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
13616
13862
  ] })
13617
13863
  ] }, col.name);
13618
13864
  }) }) })
13619
13865
  ] }),
13620
- /* @__PURE__ */ jsxs18("div", { className: "pt-2.5 mt-2 border-t border-slate-200/80 flex items-center justify-between gap-1.5 shrink-0", children: [
13621
- /* @__PURE__ */ jsxs18(
13866
+ /* @__PURE__ */ jsxs19("div", { className: "pt-2.5 mt-2 border-t border-slate-200/80 flex items-center justify-between gap-1.5 shrink-0", children: [
13867
+ /* @__PURE__ */ jsxs19(
13622
13868
  "div",
13623
13869
  {
13624
13870
  className: `inline-flex items-center gap-1 px-2 py-0.5 rounded-lg text-[11px] font-semibold border transition-all ${selectedRowIds.length > 0 ? "bg-emerald-50 text-emerald-800 border-emerald-200 shadow-2xs" : "bg-white text-slate-600 border-slate-200"}`,
13625
13871
  children: [
13626
- /* @__PURE__ */ jsx21(
13872
+ /* @__PURE__ */ jsx22(
13627
13873
  CheckSquare,
13628
13874
  {
13629
13875
  className: `w-3 h-3 ${selectedRowIds.length > 0 ? "text-emerald-600" : "text-slate-400"}`
13630
13876
  }
13631
13877
  ),
13632
- /* @__PURE__ */ jsxs18("span", { children: [
13878
+ /* @__PURE__ */ jsxs19("span", { children: [
13633
13879
  "\u05E0\u05D1\u05D7\u05E8\u05D5 ",
13634
13880
  selectedRowIds.length
13635
13881
  ] })
13636
13882
  ]
13637
13883
  }
13638
13884
  ),
13639
- /* @__PURE__ */ jsx21(
13885
+ /* @__PURE__ */ jsx22(
13640
13886
  "button",
13641
13887
  {
13642
13888
  type: "button",
@@ -13644,7 +13890,7 @@ function DynamicFiltersBlock({
13644
13890
  disabled: isLoadingTableData,
13645
13891
  className: "p-1.5 text-slate-500 hover:text-slate-800 bg-white hover:bg-slate-100 border border-slate-200 rounded-lg transition-colors cursor-pointer disabled:opacity-50 shrink-0",
13646
13892
  title: "\u05E8\u05E2\u05E0\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9 \u05D8\u05D1\u05DC\u05D4",
13647
- children: /* @__PURE__ */ jsx21(
13893
+ children: /* @__PURE__ */ jsx22(
13648
13894
  RefreshCw,
13649
13895
  {
13650
13896
  className: `w-3.5 h-3.5 ${isLoadingTableData ? "animate-spin text-emerald-600" : ""}`
@@ -13656,85 +13902,6 @@ function DynamicFiltersBlock({
13656
13902
  ] });
13657
13903
  }
13658
13904
 
13659
- // src/components/WhatsAppComponent/ui/WhatsAppRelationButtons.tsx
13660
- import { useMemo as useMemo11 } from "react";
13661
- import { Zap } from "lucide-react";
13662
- import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
13663
- var isRawObjectId3 = (s) => /^[0-9a-fA-F]{24}$/.test(s);
13664
- function recordMatches(record, colDef, filterVal) {
13665
- var _a;
13666
- if (!colDef) return true;
13667
- const cell = ((record == null ? void 0 : record.data) || {})[colDef.name];
13668
- const type = (_a = colDef.type) == null ? void 0 : _a.toUpperCase();
13669
- if (type === "BOOLEAN") {
13670
- const isTrue = cell === true || cell === "true" || cell === 1;
13671
- return isTrue === (filterVal === "true");
13672
- }
13673
- if (type === "RELATION") {
13674
- return normalizeRelationValue(cell).includes(filterVal);
13675
- }
13676
- return true;
13677
- }
13678
- function WhatsAppRelationButtons({
13679
- columnNames,
13680
- tableColumns: tableColumns2,
13681
- records,
13682
- filters,
13683
- onFilterChange,
13684
- relationOptions,
13685
- getRelationOptionsForCol
13686
- }) {
13687
- const groups = useMemo11(() => {
13688
- var _a, _b;
13689
- const activeEntries = Object.entries(filters).filter(([, v]) => v !== void 0 && v !== null && v !== "");
13690
- const result = [];
13691
- for (const colName of columnNames || []) {
13692
- const colDef = (tableColumns2 || []).find((c) => c.name === colName);
13693
- if (!colDef || ((_a = colDef.type) == null ? void 0 : _a.toUpperCase()) !== "RELATION") continue;
13694
- const otherEntries = activeEntries.filter(([name]) => name !== colName);
13695
- const base = otherEntries.length === 0 ? records : records.filter(
13696
- (rec) => otherEntries.every(
13697
- ([name, val]) => recordMatches(rec, (tableColumns2 || []).find((c) => c.name === name), val)
13698
- )
13699
- );
13700
- const counts = /* @__PURE__ */ new Map();
13701
- for (const rec of base) {
13702
- const ids = new Set(normalizeRelationValue(((rec == null ? void 0 : rec.data) || {})[colName]));
13703
- ids.forEach((id) => counts.set(id, (counts.get(id) || 0) + 1));
13704
- }
13705
- const optionList = ((_b = getRelationOptionsForCol ? getRelationOptionsForCol(colName) : []) == null ? void 0 : _b.length) > 0 ? getRelationOptionsForCol(colName) : relationOptions[colName] || [];
13706
- const activeId = filters[colName] ? String(filters[colName]) : null;
13707
- const seen = /* @__PURE__ */ new Set();
13708
- const options = [];
13709
- for (const opt of optionList) {
13710
- const id = String((opt == null ? void 0 : opt.id) || (opt == null ? void 0 : opt._id) || "");
13711
- if (!id || seen.has(id)) continue;
13712
- const count = counts.get(id) || 0;
13713
- if (count === 0 && id !== activeId) continue;
13714
- seen.add(id);
13715
- options.push({ id, label: getRelationOptionLabel(opt, colDef, relationOptions), count });
13716
- }
13717
- counts.forEach((count, id) => {
13718
- if (seen.has(id)) return;
13719
- const label = getRelationOptionLabel(id, colDef, relationOptions);
13720
- if (!label || isRawObjectId3(label)) return;
13721
- seen.add(id);
13722
- options.push({ id, label, count });
13723
- });
13724
- result.push({ key: colName, title: colName, options, activeId });
13725
- }
13726
- return result;
13727
- }, [columnNames, tableColumns2, records, filters, relationOptions, getRelationOptionsForCol]);
13728
- if (!columnNames || columnNames.length === 0) return null;
13729
- return /* @__PURE__ */ jsx22("div", { className: "relative min-h-[12rem] 2xl:min-h-0", "data-testid": "whatsapp-relation-buttons", children: /* @__PURE__ */ jsxs19("div", { className: "2xl:absolute 2xl:inset-0 flex flex-col bg-slate-50/70 border border-slate-200 rounded-2xl p-3.5 gap-2 overflow-hidden", children: [
13730
- /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2 pb-2 border-b border-slate-200/70 shrink-0", children: [
13731
- /* @__PURE__ */ jsx22(Zap, { className: "w-4 h-4 text-emerald-600" }),
13732
- /* @__PURE__ */ jsx22("span", { className: "text-xs font-bold text-slate-800", children: "\u05E1\u05D9\u05E0\u05D5\u05DF \u05DE\u05D4\u05D9\u05E8" })
13733
- ] }),
13734
- /* @__PURE__ */ jsx22("div", { className: "flex-1 min-h-0 overflow-y-auto max-h-[22rem] 2xl:max-h-none pr-0.5", children: groups.every((g) => g.options.length === 0) ? /* @__PURE__ */ jsx22("div", { className: "p-4 text-center text-xs text-slate-400", children: "\u05D0\u05D9\u05DF \u05E2\u05E8\u05DB\u05D9\u05DD \u05DC\u05D4\u05E6\u05D2\u05D4 \u05D1\u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05E9\u05E0\u05D1\u05D7\u05E8\u05D5" }) : /* @__PURE__ */ jsx22(RelationButtonsView, { groups, stacked: true, onSelect: (col, id) => onFilterChange(col, id || "") }) })
13735
- ] }) });
13736
- }
13737
-
13738
13905
  // src/components/WhatsAppComponent/ui/SettingsAndActionsBlock.tsx
13739
13906
  import {
13740
13907
  Phone as Phone3,
@@ -14486,13 +14653,6 @@ function WhatsAppComponent(props) {
14486
14653
  const { className = "", settings, orgId, componentId, executeAction } = props;
14487
14654
  const state = useWhatsAppState(props);
14488
14655
  const [activeTab, setActiveTab] = React20.useState("broadcast");
14489
- const relationButtonColumns = (Array.isArray(settings == null ? void 0 : settings.relationButtonColumns) ? settings.relationButtonColumns : []).filter(
14490
- (name) => (state.tableColumns || []).some((c) => {
14491
- var _a2;
14492
- return c.name === name && ((_a2 = c.type) == null ? void 0 : _a2.toUpperCase()) === "RELATION";
14493
- })
14494
- );
14495
- const hasRelationButtons = relationButtonColumns.length > 0;
14496
14656
  return /* @__PURE__ */ jsxs24(
14497
14657
  "div",
14498
14658
  {
@@ -14600,111 +14760,97 @@ function WhatsAppComponent(props) {
14600
14760
  )
14601
14761
  ] }),
14602
14762
  /* @__PURE__ */ jsxs24("div", { className: "p-4 flex flex-col gap-4", children: [
14603
- /* @__PURE__ */ jsxs24("div", { className: `grid grid-cols-1 gap-4 shrink-0 items-stretch ${hasRelationButtons ? "2xl:grid-cols-2" : ""}`, children: [
14604
- hasRelationButtons && /* @__PURE__ */ jsx27(
14605
- WhatsAppRelationButtons,
14763
+ /* @__PURE__ */ jsxs24("div", { className: "grid grid-cols-1 lg:grid-cols-12 gap-4 shrink-0 items-stretch", children: [
14764
+ /* @__PURE__ */ jsx27(
14765
+ TemplateSelectionBlock,
14606
14766
  {
14607
- columnNames: relationButtonColumns,
14608
- tableColumns: state.tableColumns,
14609
- records: state.rawRecords,
14767
+ selectedTemplate: state.selectedTemplate,
14768
+ selectedTemplateId: state.selectedTemplateId,
14769
+ setSelectedTemplateId: state.setSelectedTemplateId,
14770
+ templates: state.templates,
14771
+ isLoadingTemplates: state.isLoadingTemplates,
14772
+ isDropdownOpen: state.isDropdownOpen,
14773
+ setIsDropdownOpen: state.setIsDropdownOpen,
14774
+ templateBodyText: state.templateBodyText,
14775
+ templateHeaderComp: state.templateHeaderComp,
14776
+ headerMediaUrl: state.headerMediaUrl,
14777
+ handleHeaderMediaUrlChange: state.handleHeaderMediaUrlChange,
14778
+ handleResetHeaderMediaUrl: state.handleResetHeaderMediaUrl,
14779
+ templateVariables: state.templateVariables,
14780
+ variableMapping: state.variableMapping,
14781
+ handleVariableTypeChange: state.handleVariableTypeChange,
14782
+ handleVariableValueChange: state.handleVariableValueChange,
14783
+ textableColumnOptions: state.textableColumnOptions,
14784
+ handleDeleteTemplate: state.handleDeleteTemplate,
14785
+ isDeleting: state.isDeleting,
14786
+ setIsModalOpen: state.setIsModalOpen,
14787
+ setFeedback: state.setFeedback,
14788
+ isUploadingMedia: state.isUploadingMedia,
14789
+ handleFileUpload: state.handleFileUpload
14790
+ }
14791
+ ),
14792
+ /* @__PURE__ */ jsx27(
14793
+ DynamicFiltersBlock,
14794
+ {
14795
+ filterableColumns: state.filterableColumns,
14610
14796
  filters: state.filters,
14611
- onFilterChange: state.handleFilterChange,
14797
+ handleFilterChange: state.handleFilterChange,
14798
+ handleClearFilters: state.handleClearFilters,
14799
+ activeFiltersCount: state.activeFiltersCount,
14612
14800
  relationOptions: state.relationOptions,
14613
- getRelationOptionsForCol: state.getRelationOptionsForCol
14801
+ getRelationOptionsForCol: state.getRelationOptionsForCol,
14802
+ selectedRowIds: state.selectedRowIds,
14803
+ filteredRecordsCount: state.filteredRecords.length,
14804
+ rawRecordsCount: state.rawRecords.length,
14805
+ loadTableData: state.loadTableData,
14806
+ isLoadingTableData: state.isLoadingTableData
14614
14807
  }
14615
14808
  ),
14616
- /* @__PURE__ */ jsxs24("div", { className: "grid grid-cols-1 lg:grid-cols-12 gap-4 items-stretch", children: [
14617
- /* @__PURE__ */ jsx27(
14618
- TemplateSelectionBlock,
14619
- {
14620
- selectedTemplate: state.selectedTemplate,
14621
- selectedTemplateId: state.selectedTemplateId,
14622
- setSelectedTemplateId: state.setSelectedTemplateId,
14623
- templates: state.templates,
14624
- isLoadingTemplates: state.isLoadingTemplates,
14625
- isDropdownOpen: state.isDropdownOpen,
14626
- setIsDropdownOpen: state.setIsDropdownOpen,
14627
- templateBodyText: state.templateBodyText,
14628
- templateHeaderComp: state.templateHeaderComp,
14629
- headerMediaUrl: state.headerMediaUrl,
14630
- handleHeaderMediaUrlChange: state.handleHeaderMediaUrlChange,
14631
- handleResetHeaderMediaUrl: state.handleResetHeaderMediaUrl,
14632
- templateVariables: state.templateVariables,
14633
- variableMapping: state.variableMapping,
14634
- handleVariableTypeChange: state.handleVariableTypeChange,
14635
- handleVariableValueChange: state.handleVariableValueChange,
14636
- textableColumnOptions: state.textableColumnOptions,
14637
- handleDeleteTemplate: state.handleDeleteTemplate,
14638
- isDeleting: state.isDeleting,
14639
- setIsModalOpen: state.setIsModalOpen,
14640
- setFeedback: state.setFeedback,
14641
- isUploadingMedia: state.isUploadingMedia,
14642
- handleFileUpload: state.handleFileUpload
14643
- }
14644
- ),
14645
- /* @__PURE__ */ jsx27(
14646
- DynamicFiltersBlock,
14647
- {
14648
- filterableColumns: state.filterableColumns,
14649
- filters: state.filters,
14650
- handleFilterChange: state.handleFilterChange,
14651
- handleClearFilters: state.handleClearFilters,
14652
- activeFiltersCount: state.activeFiltersCount,
14653
- relationOptions: state.relationOptions,
14654
- getRelationOptionsForCol: state.getRelationOptionsForCol,
14655
- selectedRowIds: state.selectedRowIds,
14656
- filteredRecordsCount: state.filteredRecords.length,
14657
- rawRecordsCount: state.rawRecords.length,
14658
- loadTableData: state.loadTableData,
14659
- isLoadingTableData: state.isLoadingTableData
14660
- }
14661
- ),
14662
- /* @__PURE__ */ jsx27(
14663
- SettingsAndActionsBlock,
14664
- {
14665
- isScanningPhoneColumns: state.isScanningPhoneColumns,
14666
- targetPhoneOptions: state.targetPhoneOptions,
14667
- phoneColumnId: state.phoneColumnId,
14668
- setPhoneColumnId: state.setPhoneColumnId,
14669
- selectedPhoneOption: state.selectedPhoneOption,
14670
- autoSelectCount: state.autoSelectCount,
14671
- setAutoSelectCount: state.setAutoSelectCount,
14672
- subtableFilterColumn: state.subtableFilterColumn,
14673
- setSubtableFilterColumn: state.setSubtableFilterColumn,
14674
- subtableFilterValue: state.subtableFilterValue,
14675
- setSubtableFilterValue: state.setSubtableFilterValue,
14676
- subtableSendLimit: state.subtableSendLimit,
14677
- setSubtableSendLimit: state.setSubtableSendLimit,
14678
- subtableFilterableColumns: state.subtableFilterableColumns,
14679
- selectedSubtableFilterCol: state.selectedSubtableFilterCol,
14680
- getRelationOptionsForCol: state.getRelationOptionsForCol,
14681
- relationOptions: state.relationOptions,
14682
- enablePostSendAction: state.enablePostSendAction,
14683
- setEnablePostSendAction: state.setEnablePostSendAction,
14684
- postSendActionColumn: state.postSendActionColumn,
14685
- setPostSendActionColumn: state.setPostSendActionColumn,
14686
- postSendActionValue: state.postSendActionValue,
14687
- setPostSendActionValue: state.setPostSendActionValue,
14688
- postSendActionTargetType: state.postSendActionTargetType,
14689
- setPostSendActionTargetType: state.setPostSendActionTargetType,
14690
- postSendActionTargetOptions: state.postSendActionTargetOptions,
14691
- selectedPostSendOption: state.selectedPostSendCol,
14692
- isTestDisabled: state.isTestDisabled,
14693
- testButtonTitle: state.testButtonTitle,
14694
- setIsTestPromptOpen: state.setIsTestPromptOpen,
14695
- isSendDisabled: state.isSendDisabled,
14696
- sendButtonTitle: state.sendButtonTitle,
14697
- handleSendMessages: state.handleSendMessages,
14698
- selectedRowIdsCount: state.selectedRowIds.length,
14699
- finalRecipientCount: state.finalRecipientCount,
14700
- validMainRowsCount: state.validMainRowsCount,
14701
- isSendingBroadcast: state.isSendingBroadcast,
14702
- broadcastProgress: state.broadcastProgress,
14703
- broadcastSummary: state.broadcastSummary,
14704
- clearBroadcastSummary: state.clearBroadcastSummary
14705
- }
14706
- )
14707
- ] })
14809
+ /* @__PURE__ */ jsx27(
14810
+ SettingsAndActionsBlock,
14811
+ {
14812
+ isScanningPhoneColumns: state.isScanningPhoneColumns,
14813
+ targetPhoneOptions: state.targetPhoneOptions,
14814
+ phoneColumnId: state.phoneColumnId,
14815
+ setPhoneColumnId: state.setPhoneColumnId,
14816
+ selectedPhoneOption: state.selectedPhoneOption,
14817
+ autoSelectCount: state.autoSelectCount,
14818
+ setAutoSelectCount: state.setAutoSelectCount,
14819
+ subtableFilterColumn: state.subtableFilterColumn,
14820
+ setSubtableFilterColumn: state.setSubtableFilterColumn,
14821
+ subtableFilterValue: state.subtableFilterValue,
14822
+ setSubtableFilterValue: state.setSubtableFilterValue,
14823
+ subtableSendLimit: state.subtableSendLimit,
14824
+ setSubtableSendLimit: state.setSubtableSendLimit,
14825
+ subtableFilterableColumns: state.subtableFilterableColumns,
14826
+ selectedSubtableFilterCol: state.selectedSubtableFilterCol,
14827
+ getRelationOptionsForCol: state.getRelationOptionsForCol,
14828
+ relationOptions: state.relationOptions,
14829
+ enablePostSendAction: state.enablePostSendAction,
14830
+ setEnablePostSendAction: state.setEnablePostSendAction,
14831
+ postSendActionColumn: state.postSendActionColumn,
14832
+ setPostSendActionColumn: state.setPostSendActionColumn,
14833
+ postSendActionValue: state.postSendActionValue,
14834
+ setPostSendActionValue: state.setPostSendActionValue,
14835
+ postSendActionTargetType: state.postSendActionTargetType,
14836
+ setPostSendActionTargetType: state.setPostSendActionTargetType,
14837
+ postSendActionTargetOptions: state.postSendActionTargetOptions,
14838
+ selectedPostSendOption: state.selectedPostSendCol,
14839
+ isTestDisabled: state.isTestDisabled,
14840
+ testButtonTitle: state.testButtonTitle,
14841
+ setIsTestPromptOpen: state.setIsTestPromptOpen,
14842
+ isSendDisabled: state.isSendDisabled,
14843
+ sendButtonTitle: state.sendButtonTitle,
14844
+ handleSendMessages: state.handleSendMessages,
14845
+ selectedRowIdsCount: state.selectedRowIds.length,
14846
+ finalRecipientCount: state.finalRecipientCount,
14847
+ validMainRowsCount: state.validMainRowsCount,
14848
+ isSendingBroadcast: state.isSendingBroadcast,
14849
+ broadcastProgress: state.broadcastProgress,
14850
+ broadcastSummary: state.broadcastSummary,
14851
+ clearBroadcastSummary: state.clearBroadcastSummary
14852
+ }
14853
+ )
14708
14854
  ] }),
14709
14855
  /* @__PURE__ */ jsx27("div", { className: "w-full h-[calc(100vh-420px)] min-h-[320px] overflow-hidden border border-slate-200 rounded-2xl shadow-xs bg-white flex flex-col", children: state.isLoadingTableData && state.rawRecords.length === 0 ? /* @__PURE__ */ jsxs24("div", { className: "flex-1 flex flex-col items-center justify-center p-12 text-center text-xs text-slate-400 gap-2", children: [
14710
14856
  /* @__PURE__ */ jsx27(Loader28, { className: "w-6 h-6 animate-spin text-emerald-600" }),
@@ -14730,8 +14876,7 @@ function WhatsAppComponent(props) {
14730
14876
  orgId,
14731
14877
  componentId: `${componentId || "whatsapp"}-embedded-table`,
14732
14878
  className: "h-full flex-1 border-0 rounded-2xl shadow-none",
14733
- rowStatusMap: state.rowStatusMap,
14734
- hideRelationButtons: true
14879
+ rowStatusMap: state.rowStatusMap
14735
14880
  }
14736
14881
  ) })
14737
14882
  ] }),