@universe-platform/ui 0.1.0-beta.56 → 0.1.0-beta.58

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
@@ -6264,7 +6264,9 @@ function TableBlockClient({
6264
6264
  onRowToggle,
6265
6265
  rowStatusMap,
6266
6266
  editModelUrl,
6267
- hideRelationButtons
6267
+ hideRelationButtons,
6268
+ rowExtraHeader,
6269
+ renderRowExtra
6268
6270
  }) {
6269
6271
  const { showError, addToast } = useToast();
6270
6272
  const [isExporting, setIsExporting] = useState15(false);
@@ -6555,8 +6557,8 @@ function TableBlockClient({
6555
6557
  const q = fVal.toLowerCase().trim();
6556
6558
  if (!q) continue;
6557
6559
  if (q === "true" || q === "false") {
6558
- const isTrue = cellVal === true || cellVal === "true" || cellVal === 1;
6559
- if (isTrue !== (q === "true")) return false;
6560
+ const isTrue2 = cellVal === true || cellVal === "true" || cellVal === 1;
6561
+ if (isTrue2 !== (q === "true")) return false;
6560
6562
  continue;
6561
6563
  }
6562
6564
  const relIds = normalizeRelationValue(cellVal);
@@ -6681,8 +6683,8 @@ function TableBlockClient({
6681
6683
  const q = fVal.toLowerCase().trim();
6682
6684
  if (!q) continue;
6683
6685
  if (q === "true" || q === "false") {
6684
- const isTrue = cellVal === true || cellVal === "true" || cellVal === 1;
6685
- if (isTrue !== (q === "true")) return false;
6686
+ const isTrue2 = cellVal === true || cellVal === "true" || cellVal === 1;
6687
+ if (isTrue2 !== (q === "true")) return false;
6686
6688
  continue;
6687
6689
  }
6688
6690
  const relIds = normalizeRelationValue(cellVal);
@@ -8001,6 +8003,7 @@ function TableBlockClient({
8001
8003
  return ((_a = c.type) == null ? void 0 : _a.toUpperCase()) === "SUB_TABLE";
8002
8004
  }) && /* @__PURE__ */ jsx16("div", { className: "w-5 h-5 shrink-0" })
8003
8005
  ] }) }),
8006
+ renderRowExtra && /* @__PURE__ */ jsx16("th", { className: "border-b border-l border-slate-200 p-1.5 text-right align-middle bg-white h-12 min-h-[48px] text-xs font-bold text-slate-600 whitespace-nowrap", children: rowExtraHeader }),
8004
8007
  filteredColumns.map((col) => {
8005
8008
  var _a, _b;
8006
8009
  const isSearching = activeSearchCol === col.name;
@@ -8174,7 +8177,8 @@ function TableBlockClient({
8174
8177
  executeAction,
8175
8178
  emitEvent,
8176
8179
  readOnly: effectiveReadOnly || !effectivePermissions.canUpdate,
8177
- permissions: effectivePermissions
8180
+ permissions: effectivePermissions,
8181
+ renderRowExtra
8178
8182
  },
8179
8183
  row.id
8180
8184
  );
@@ -8361,7 +8365,8 @@ var TableRow = React13.memo(function TableRow2({
8361
8365
  executeAction,
8362
8366
  emitEvent,
8363
8367
  readOnly,
8364
- permissions
8368
+ permissions,
8369
+ renderRowExtra
8365
8370
  }) {
8366
8371
  const lockedCopyTargets = getRelationCopyLockedTargets(schema == null ? void 0 : schema.columns);
8367
8372
  return /* @__PURE__ */ jsxs13(React13.Fragment, { children: [
@@ -8433,6 +8438,7 @@ var TableRow = React13.memo(function TableRow2({
8433
8438
  }
8434
8439
  )
8435
8440
  ] }) }),
8441
+ renderRowExtra && /* @__PURE__ */ jsx16("td", { className: "border-b border-l border-slate-200 px-2 py-1.5 align-middle bg-white group-hover:bg-transparent", children: renderRowExtra(row) }),
8436
8442
  filteredColumns.map((col) => {
8437
8443
  var _a;
8438
8444
  const colType = ((_a = col.type) == null ? void 0 : _a.toUpperCase()) || "DEFAULT";
@@ -8513,14 +8519,152 @@ var TableRow = React13.memo(function TableRow2({
8513
8519
  ] });
8514
8520
  });
8515
8521
 
8522
+ // src/components/TableBlock/formTracking/FormTrackingTableBlock.tsx
8523
+ import { useCallback as useCallback13, useState as useState16 } from "react";
8524
+
8525
+ // src/components/TableBlock/formTracking/formTracking.types.ts
8526
+ function getFormTrackingConfig(settings) {
8527
+ const ft = settings == null ? void 0 : settings.formTracking;
8528
+ if (!ft || ft.enabled !== true || !Array.isArray(ft.steps)) return null;
8529
+ const steps = ft.steps.filter(
8530
+ (s) => s && typeof s.formId === "string" && s.formId && typeof s.returnedColumn === "string" && s.returnedColumn
8531
+ );
8532
+ if (steps.length === 0) return null;
8533
+ return { enabled: true, steps };
8534
+ }
8535
+ var isTrue = (v) => v === true || v === "true" || v === 1;
8536
+ function getFormStepState(data, step, sentOverride) {
8537
+ if (isTrue(data == null ? void 0 : data[step.returnedColumn])) return "returned";
8538
+ const sent = sentOverride !== void 0 ? sentOverride : step.sentColumn ? isTrue(data == null ? void 0 : data[step.sentColumn]) : false;
8539
+ return sent ? "sent" : "none";
8540
+ }
8541
+
8542
+ // src/components/TableBlock/formTracking/FormTrackingTableBlock.tsx
8543
+ import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
8544
+ var PILL_STYLE = {
8545
+ none: "bg-slate-100 text-slate-500 border-slate-200",
8546
+ sent: "bg-amber-50 text-amber-700 border-amber-200",
8547
+ returned: "bg-emerald-50 text-emerald-700 border-emerald-200"
8548
+ };
8549
+ var PILL_ICON = { none: "\u25EF", sent: "\u2709", returned: "\u2713" };
8550
+ function stateText(step, state) {
8551
+ if (step.kind === "create") return state === "returned" ? "\u05DE\u05D5\u05DC\u05D0" : "\u05DC\u05D0 \u05DE\u05D5\u05DC\u05D0";
8552
+ return state === "returned" ? "\u05D4\u05D5\u05D7\u05D6\u05E8" : state === "sent" ? "\u05E0\u05E9\u05DC\u05D7" : "\u05DC\u05D0 \u05E0\u05E9\u05DC\u05D7";
8553
+ }
8554
+ function FormTrackingTableBlock(props) {
8555
+ const { settings, executeAction, readOnly } = props;
8556
+ const config = getFormTrackingConfig(settings);
8557
+ const { addToast, showError } = useToast();
8558
+ const tableId = (settings == null ? void 0 : settings.tableMetaId) || (settings == null ? void 0 : settings.tableId) || (settings == null ? void 0 : settings.id);
8559
+ const [sentOverrides, setSentOverrides] = useState16({});
8560
+ const [busyKey, setBusyKey] = useState16(null);
8561
+ const copyLink = useCallback13(
8562
+ async (rowId, step) => {
8563
+ if (!executeAction || !tableId) return;
8564
+ setBusyKey(`${rowId}|${step.formId}|link`);
8565
+ try {
8566
+ const res = await executeAction("FORM_TRACKING_GET_LINK", {
8567
+ tableId,
8568
+ recordId: rowId,
8569
+ formId: step.formId
8570
+ });
8571
+ const url = res == null ? void 0 : res.url;
8572
+ if (!url) throw new Error((res == null ? void 0 : res.error) || "\u05D9\u05E6\u05D9\u05E8\u05EA \u05D4\u05E7\u05D9\u05E9\u05D5\u05E8 \u05E0\u05DB\u05E9\u05DC\u05D4");
8573
+ try {
8574
+ await navigator.clipboard.writeText(url);
8575
+ addToast({ type: "success", message: `\u05D4\u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC"${step.label}" \u05D4\u05D5\u05E2\u05EA\u05E7` });
8576
+ } catch (e) {
8577
+ window.prompt(`\u05D4\u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC"${step.label}" - \u05D4\u05E2\u05EA\u05E7 \u05D9\u05D3\u05E0\u05D9\u05EA:`, url);
8578
+ }
8579
+ } catch (e) {
8580
+ showError((e == null ? void 0 : e.message) || "\u05D9\u05E6\u05D9\u05E8\u05EA \u05D4\u05E7\u05D9\u05E9\u05D5\u05E8 \u05E0\u05DB\u05E9\u05DC\u05D4");
8581
+ } finally {
8582
+ setBusyKey(null);
8583
+ }
8584
+ },
8585
+ [executeAction, tableId, addToast, showError]
8586
+ );
8587
+ const setSent = useCallback13(
8588
+ async (rowId, step, value) => {
8589
+ if (!executeAction || !tableId || !step.sentColumn) return;
8590
+ setBusyKey(`${rowId}|${step.formId}|sent`);
8591
+ try {
8592
+ await executeAction("FORM_TRACKING_SET_SENT", {
8593
+ tableId,
8594
+ recordId: rowId,
8595
+ formId: step.formId,
8596
+ value
8597
+ });
8598
+ setSentOverrides((prev) => __spreadProps(__spreadValues({}, prev), { [`${rowId}|${step.sentColumn}`]: value }));
8599
+ } catch (e) {
8600
+ showError((e == null ? void 0 : e.message) || "\u05E2\u05D3\u05DB\u05D5\u05DF \u05D4\u05E1\u05D8\u05D8\u05D5\u05E1 \u05E0\u05DB\u05E9\u05DC");
8601
+ } finally {
8602
+ setBusyKey(null);
8603
+ }
8604
+ },
8605
+ [executeAction, tableId, showError]
8606
+ );
8607
+ const renderRowExtra = useCallback13(
8608
+ (row) => {
8609
+ var _a;
8610
+ if (!config) return null;
8611
+ const rowId = String((_a = row == null ? void 0 : row.id) != null ? _a : "");
8612
+ return /* @__PURE__ */ jsx17("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1.5 py-0.5", children: config.steps.map((step) => {
8613
+ const override = step.sentColumn ? sentOverrides[`${rowId}|${step.sentColumn}`] : void 0;
8614
+ const state = getFormStepState(row == null ? void 0 : row.data, step, override);
8615
+ const showActions = step.kind === "update" && !!step.sentColumn && state !== "returned" && !readOnly;
8616
+ return /* @__PURE__ */ jsxs14("div", { className: "inline-flex items-center gap-1.5", children: [
8617
+ /* @__PURE__ */ jsxs14(
8618
+ "span",
8619
+ {
8620
+ className: `inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-semibold whitespace-nowrap ${PILL_STYLE[state]}`,
8621
+ title: `${step.label}: ${stateText(step, state)}`,
8622
+ children: [
8623
+ /* @__PURE__ */ jsx17("span", { children: PILL_ICON[state] }),
8624
+ /* @__PURE__ */ jsx17("span", { children: step.label })
8625
+ ]
8626
+ }
8627
+ ),
8628
+ showActions && /* @__PURE__ */ jsxs14(Fragment3, { children: [
8629
+ /* @__PURE__ */ jsx17(
8630
+ "button",
8631
+ {
8632
+ type: "button",
8633
+ disabled: busyKey !== null,
8634
+ onClick: () => copyLink(rowId, step),
8635
+ className: "text-[11px] font-semibold text-brand hover:underline disabled:opacity-40 cursor-pointer whitespace-nowrap",
8636
+ children: "\u05D4\u05E2\u05EA\u05E7 \u05E7\u05D9\u05E9\u05D5\u05E8"
8637
+ }
8638
+ ),
8639
+ /* @__PURE__ */ jsx17(
8640
+ "button",
8641
+ {
8642
+ type: "button",
8643
+ disabled: busyKey !== null,
8644
+ onClick: () => setSent(rowId, step, state !== "sent"),
8645
+ className: "text-[11px] font-semibold text-slate-500 hover:text-slate-800 hover:underline disabled:opacity-40 cursor-pointer whitespace-nowrap",
8646
+ children: state === "sent" ? "\u05D1\u05D8\u05DC \u05E1\u05D9\u05DE\u05D5\u05DF" : "\u05E1\u05DE\u05DF \u05DB\u05E0\u05E9\u05DC\u05D7"
8647
+ }
8648
+ )
8649
+ ] })
8650
+ ] }, step.formId);
8651
+ }) });
8652
+ },
8653
+ [config, sentOverrides, busyKey, readOnly, copyLink, setSent]
8654
+ );
8655
+ if (!config) return /* @__PURE__ */ jsx17(TableBlockClient, __spreadValues({}, props));
8656
+ return /* @__PURE__ */ jsx17(TableBlockClient, __spreadProps(__spreadValues({}, props), { rowExtraHeader: "\u05D4\u05EA\u05E7\u05D3\u05DE\u05D5\u05EA \u05D8\u05E4\u05E1\u05D9\u05DD", renderRowExtra }));
8657
+ }
8658
+
8516
8659
  // src/components/TableBlock/TableBlock.tsx
8517
- import { jsx as jsx17 } from "react/jsx-runtime";
8660
+ import { jsx as jsx18 } from "react/jsx-runtime";
8518
8661
  function TableBlock(props) {
8519
- return /* @__PURE__ */ jsx17(TableBlockClient, __spreadValues({}, props));
8662
+ if (getFormTrackingConfig(props.settings)) return /* @__PURE__ */ jsx18(FormTrackingTableBlock, __spreadValues({}, props));
8663
+ return /* @__PURE__ */ jsx18(TableBlockClient, __spreadValues({}, props));
8520
8664
  }
8521
8665
 
8522
8666
  // src/components/PlacementBlock/PlacementBlock.tsx
8523
- import { useState as useState16, useEffect as useEffect14, useRef as useRef14, useCallback as useCallback13, useMemo as useMemo9 } from "react";
8667
+ import { useState as useState17, useEffect as useEffect14, useRef as useRef14, useCallback as useCallback14, useMemo as useMemo9 } from "react";
8524
8668
  import { AgGridReact } from "ag-grid-react";
8525
8669
  import {
8526
8670
  ModuleRegistry,
@@ -8529,7 +8673,7 @@ import {
8529
8673
  import { Filter as Filter2 } from "lucide-react";
8530
8674
 
8531
8675
  // src/components/PlacementBlock/PlacementSettings.tsx
8532
- import React14 from "react";
8676
+ import React15 from "react";
8533
8677
 
8534
8678
  // src/components/PlacementBlock/placementColumns.ts
8535
8679
  var RELATION_SEP = "::";
@@ -8626,7 +8770,7 @@ function readColumnValue(data, ref) {
8626
8770
  }
8627
8771
 
8628
8772
  // src/components/PlacementBlock/PlacementSettings.tsx
8629
- import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
8773
+ import { Fragment as Fragment4, jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
8630
8774
  var DEFAULT_PLACEMENT_STATUS_COLORS = [
8631
8775
  { id: "1", hex: "#10b981", label: "\u05DE\u05EA\u05D0\u05D9\u05DD / \u05D0\u05D5\u05E9\u05E8" },
8632
8776
  { id: "2", hex: "#f59e0b", label: "\u05DE\u05DE\u05EA\u05D9\u05DF \u05DC\u05E8\u05D0\u05D9\u05D5\u05DF" },
@@ -8638,20 +8782,20 @@ function resolveDefaultStatusId(list, wanted) {
8638
8782
  if (list.some((s) => s.id === "3")) return "3";
8639
8783
  return (_b = (_a = list[0]) == null ? void 0 : _a.id) != null ? _b : "";
8640
8784
  }
8641
- var SummaryRow = ({ label, value, hint }) => /* @__PURE__ */ jsxs14("div", { className: "flex items-start gap-2 text-sm", children: [
8642
- /* @__PURE__ */ jsx18("span", { className: value ? "text-emerald-600" : "text-slate-300", children: value ? "\u2713" : "\u25CB" }),
8643
- /* @__PURE__ */ jsxs14("span", { className: "text-slate-500 shrink-0", children: [
8785
+ var SummaryRow = ({ label, value, hint }) => /* @__PURE__ */ jsxs15("div", { className: "flex items-start gap-2 text-sm", children: [
8786
+ /* @__PURE__ */ jsx19("span", { className: value ? "text-emerald-600" : "text-slate-300", children: value ? "\u2713" : "\u25CB" }),
8787
+ /* @__PURE__ */ jsxs15("span", { className: "text-slate-500 shrink-0", children: [
8644
8788
  label,
8645
8789
  ":"
8646
8790
  ] }),
8647
- value ? /* @__PURE__ */ jsxs14("span", { className: "font-semibold text-slate-800 break-words", children: [
8791
+ value ? /* @__PURE__ */ jsxs15("span", { className: "font-semibold text-slate-800 break-words", children: [
8648
8792
  value,
8649
- hint && /* @__PURE__ */ jsx18("span", { className: "mr-2 text-[11px] font-normal text-indigo-600", children: hint })
8650
- ] }) : /* @__PURE__ */ jsx18("span", { className: "text-slate-400", children: "\u05D8\u05E8\u05DD \u05E0\u05D1\u05D7\u05E8" })
8793
+ hint && /* @__PURE__ */ jsx19("span", { className: "mr-2 text-[11px] font-normal text-indigo-600", children: hint })
8794
+ ] }) : /* @__PURE__ */ jsx19("span", { className: "text-slate-400", children: "\u05D8\u05E8\u05DD \u05E0\u05D1\u05D7\u05E8" })
8651
8795
  ] });
8652
8796
  var PlacementStatusEditor = ({ config, onChange }) => {
8653
8797
  var _a;
8654
- const radioName = `placement-default-status-${React14.useId()}`;
8798
+ const radioName = `placement-default-status-${React15.useId()}`;
8655
8799
  const statuses = ((_a = config.statusColors) == null ? void 0 : _a.length) ? config.statusColors : DEFAULT_PLACEMENT_STATUS_COLORS;
8656
8800
  const defaultStatusId = resolveDefaultStatusId(statuses, config.defaultReturnStatusId);
8657
8801
  const setStatuses = (next, defId = defaultStatusId) => {
@@ -8673,11 +8817,11 @@ var PlacementStatusEditor = ({ config, onChange }) => {
8673
8817
  [next[index], next[j]] = [next[j], next[index]];
8674
8818
  setStatuses(next);
8675
8819
  };
8676
- return /* @__PURE__ */ jsxs14("div", { className: "p-4 border border-emerald-200 bg-emerald-50/50 rounded space-y-3", children: [
8677
- /* @__PURE__ */ jsx18("h4", { className: "font-semibold text-emerald-900", children: "\u05E9\u05DC\u05D1 3: \u05E1\u05D8\u05D8\u05D5\u05E1\u05D9\u05DD (\u05D4\u05E2\u05D9\u05D2\u05D5\u05DC\u05D9\u05DD \u05D4\u05E6\u05D1\u05E2\u05D5\u05E0\u05D9\u05D9\u05DD)" }),
8678
- /* @__PURE__ */ jsx18("p", { className: "text-xs text-slate-500", children: "\u05DC\u05D7\u05D9\u05E6\u05D4 \u05E2\u05DC \u05E2\u05D9\u05D2\u05D5\u05DC \u05D1\u05E8\u05DB\u05D9\u05D1 \u05DE\u05D7\u05DC\u05D9\u05E4\u05D4 \u05D1\u05D9\u05DF \u05D4\u05E1\u05D8\u05D8\u05D5\u05E1\u05D9\u05DD \u05DC\u05E4\u05D9 \u05D4\u05E1\u05D3\u05E8 \u05E9\u05DB\u05D0\u05DF. \u05D4\u05D8\u05E7\u05E1\u05D8 \u05DE\u05D5\u05E4\u05D9\u05E2 \u05D1\u05D1\u05D5\u05E2\u05D4 \u05DB\u05E9\u05D4\u05E2\u05DB\u05D1\u05E8 \u05E2\u05D5\u05DE\u05D3 \u05DE\u05E2\u05DC \u05D4\u05E2\u05D9\u05D2\u05D5\u05DC." }),
8679
- /* @__PURE__ */ jsx18("div", { className: "space-y-2", children: statuses.map((st, i) => /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2 bg-white border rounded p-2", children: [
8680
- /* @__PURE__ */ jsx18(
8820
+ return /* @__PURE__ */ jsxs15("div", { className: "p-4 border border-emerald-200 bg-emerald-50/50 rounded space-y-3", children: [
8821
+ /* @__PURE__ */ jsx19("h4", { className: "font-semibold text-emerald-900", children: "\u05E9\u05DC\u05D1 3: \u05E1\u05D8\u05D8\u05D5\u05E1\u05D9\u05DD (\u05D4\u05E2\u05D9\u05D2\u05D5\u05DC\u05D9\u05DD \u05D4\u05E6\u05D1\u05E2\u05D5\u05E0\u05D9\u05D9\u05DD)" }),
8822
+ /* @__PURE__ */ jsx19("p", { className: "text-xs text-slate-500", children: "\u05DC\u05D7\u05D9\u05E6\u05D4 \u05E2\u05DC \u05E2\u05D9\u05D2\u05D5\u05DC \u05D1\u05E8\u05DB\u05D9\u05D1 \u05DE\u05D7\u05DC\u05D9\u05E4\u05D4 \u05D1\u05D9\u05DF \u05D4\u05E1\u05D8\u05D8\u05D5\u05E1\u05D9\u05DD \u05DC\u05E4\u05D9 \u05D4\u05E1\u05D3\u05E8 \u05E9\u05DB\u05D0\u05DF. \u05D4\u05D8\u05E7\u05E1\u05D8 \u05DE\u05D5\u05E4\u05D9\u05E2 \u05D1\u05D1\u05D5\u05E2\u05D4 \u05DB\u05E9\u05D4\u05E2\u05DB\u05D1\u05E8 \u05E2\u05D5\u05DE\u05D3 \u05DE\u05E2\u05DC \u05D4\u05E2\u05D9\u05D2\u05D5\u05DC." }),
8823
+ /* @__PURE__ */ jsx19("div", { className: "space-y-2", children: statuses.map((st, i) => /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2 bg-white border rounded p-2", children: [
8824
+ /* @__PURE__ */ jsx19(
8681
8825
  "input",
8682
8826
  {
8683
8827
  type: "color",
@@ -8687,7 +8831,7 @@ var PlacementStatusEditor = ({ config, onChange }) => {
8687
8831
  "aria-label": "\u05E6\u05D1\u05E2"
8688
8832
  }
8689
8833
  ),
8690
- /* @__PURE__ */ jsx18(
8834
+ /* @__PURE__ */ jsx19(
8691
8835
  "input",
8692
8836
  {
8693
8837
  type: "text",
@@ -8697,8 +8841,8 @@ var PlacementStatusEditor = ({ config, onChange }) => {
8697
8841
  className: "flex-1 min-w-0 border p-2 rounded text-sm"
8698
8842
  }
8699
8843
  ),
8700
- /* @__PURE__ */ jsxs14("label", { className: "flex items-center gap-1 text-xs text-slate-600 shrink-0 cursor-pointer", title: "\u05D4\u05E1\u05D8\u05D8\u05D5\u05E1 \u05D4\u05D4\u05EA\u05D7\u05DC\u05EA\u05D9, \u05D5\u05D2\u05DD \u05D6\u05D4 \u05E9\u05D0\u05DC\u05D9\u05D5 \u05D7\u05D5\u05D6\u05E8 \u05DE\u05D5\u05E2\u05DE\u05D3 \u05E9\u05DE\u05D5\u05D7\u05D6\u05E8 \u05DC\u05E8\u05E9\u05D9\u05DE\u05EA \u05D4\u05DE\u05E7\u05D5\u05E8", children: [
8701
- /* @__PURE__ */ jsx18(
8844
+ /* @__PURE__ */ jsxs15("label", { className: "flex items-center gap-1 text-xs text-slate-600 shrink-0 cursor-pointer", title: "\u05D4\u05E1\u05D8\u05D8\u05D5\u05E1 \u05D4\u05D4\u05EA\u05D7\u05DC\u05EA\u05D9, \u05D5\u05D2\u05DD \u05D6\u05D4 \u05E9\u05D0\u05DC\u05D9\u05D5 \u05D7\u05D5\u05D6\u05E8 \u05DE\u05D5\u05E2\u05DE\u05D3 \u05E9\u05DE\u05D5\u05D7\u05D6\u05E8 \u05DC\u05E8\u05E9\u05D9\u05DE\u05EA \u05D4\u05DE\u05E7\u05D5\u05E8", children: [
8845
+ /* @__PURE__ */ jsx19(
8702
8846
  "input",
8703
8847
  {
8704
8848
  type: "radio",
@@ -8709,13 +8853,13 @@ var PlacementStatusEditor = ({ config, onChange }) => {
8709
8853
  ),
8710
8854
  "\u05D1\u05E8\u05D9\u05E8\u05EA \u05DE\u05D7\u05D3\u05DC"
8711
8855
  ] }),
8712
- /* @__PURE__ */ jsx18("button", { type: "button", onClick: () => moveStatus(i, -1), disabled: i === 0, className: "px-2 py-1 border rounded text-xs disabled:opacity-30", "aria-label": "\u05D4\u05D6\u05D6 \u05DC\u05DE\u05E2\u05DC\u05D4", children: "\u25B2" }),
8713
- /* @__PURE__ */ jsx18("button", { type: "button", onClick: () => moveStatus(i, 1), disabled: i === statuses.length - 1, className: "px-2 py-1 border rounded text-xs disabled:opacity-30", "aria-label": "\u05D4\u05D6\u05D6 \u05DC\u05DE\u05D8\u05D4", children: "\u25BC" }),
8714
- /* @__PURE__ */ jsx18("button", { type: "button", onClick: () => removeStatus(st.id), disabled: statuses.length <= 1, className: "px-2 py-1 border border-rose-300 text-rose-600 rounded text-xs disabled:opacity-30", "aria-label": "\u05DE\u05D7\u05E7 \u05E1\u05D8\u05D8\u05D5\u05E1", children: "\u2715" })
8856
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: () => moveStatus(i, -1), disabled: i === 0, className: "px-2 py-1 border rounded text-xs disabled:opacity-30", "aria-label": "\u05D4\u05D6\u05D6 \u05DC\u05DE\u05E2\u05DC\u05D4", children: "\u25B2" }),
8857
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: () => moveStatus(i, 1), disabled: i === statuses.length - 1, className: "px-2 py-1 border rounded text-xs disabled:opacity-30", "aria-label": "\u05D4\u05D6\u05D6 \u05DC\u05DE\u05D8\u05D4", children: "\u25BC" }),
8858
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: () => removeStatus(st.id), disabled: statuses.length <= 1, className: "px-2 py-1 border border-rose-300 text-rose-600 rounded text-xs disabled:opacity-30", "aria-label": "\u05DE\u05D7\u05E7 \u05E1\u05D8\u05D8\u05D5\u05E1", children: "\u2715" })
8715
8859
  ] }, st.id)) }),
8716
- /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-3", children: [
8717
- /* @__PURE__ */ jsx18("button", { type: "button", onClick: addStatus, className: "px-3 py-1.5 rounded text-sm font-medium bg-emerald-600 text-white hover:bg-emerald-700", children: "+ \u05D4\u05D5\u05E1\u05E3 \u05E1\u05D8\u05D8\u05D5\u05E1" }),
8718
- /* @__PURE__ */ jsx18("button", { type: "button", onClick: () => setStatuses(DEFAULT_PLACEMENT_STATUS_COLORS, "3"), className: "text-xs text-slate-500 underline", children: "\u05D0\u05E4\u05E1 \u05DC\u05D1\u05E8\u05D9\u05E8\u05EA \u05D4\u05DE\u05D7\u05D3\u05DC" })
8860
+ /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-3", children: [
8861
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: addStatus, className: "px-3 py-1.5 rounded text-sm font-medium bg-emerald-600 text-white hover:bg-emerald-700", children: "+ \u05D4\u05D5\u05E1\u05E3 \u05E1\u05D8\u05D8\u05D5\u05E1" }),
8862
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: () => setStatuses(DEFAULT_PLACEMENT_STATUS_COLORS, "3"), className: "text-xs text-slate-500 underline", children: "\u05D0\u05E4\u05E1 \u05DC\u05D1\u05E8\u05D9\u05E8\u05EA \u05D4\u05DE\u05D7\u05D3\u05DC" })
8719
8863
  ] })
8720
8864
  ] });
8721
8865
  };
@@ -8751,15 +8895,15 @@ var PlacementSettings = ({ config, onChange, tables }) => {
8751
8895
  return cols.filter((c) => c.id === config[currentKey] || !used.includes(c.id));
8752
8896
  };
8753
8897
  const selectClass = "w-full border p-2 rounded bg-white text-sm";
8754
- return /* @__PURE__ */ jsxs14("div", { className: "p-4 border rounded shadow-sm bg-gray-50 space-y-6", dir: "rtl", children: [
8755
- /* @__PURE__ */ jsx18("h3", { className: "text-lg font-bold", children: "\u05D4\u05D2\u05D3\u05E8\u05D5\u05EA \u05E8\u05DB\u05D9\u05D1 \u05E9\u05D9\u05D1\u05D5\u05E5" }),
8756
- /* @__PURE__ */ jsxs14("div", { className: "p-4 border border-indigo-200 bg-indigo-50/60 rounded space-y-2", "aria-live": "polite", children: [
8757
- /* @__PURE__ */ jsx18("h4", { className: "font-semibold text-indigo-900 text-sm", children: "\u05D4\u05D1\u05D7\u05D9\u05E8\u05D5\u05EA \u05E9\u05E0\u05E2\u05E9\u05D5 \u05E2\u05D3 \u05DB\u05D4" }),
8758
- /* @__PURE__ */ jsxs14("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-1.5", children: [
8759
- /* @__PURE__ */ jsxs14("div", { className: "space-y-1.5", children: [
8760
- /* @__PURE__ */ jsx18("div", { className: "text-xs font-bold text-slate-500", children: "\u05DE\u05E7\u05D5\u05E8" }),
8761
- /* @__PURE__ */ jsx18(SummaryRow, { label: "\u05D8\u05D1\u05DC\u05EA \u05DE\u05E7\u05D5\u05E8", value: sourceTable == null ? void 0 : sourceTable.name }),
8762
- /* @__PURE__ */ jsx18(
8898
+ return /* @__PURE__ */ jsxs15("div", { className: "p-4 border rounded shadow-sm bg-gray-50 space-y-6", dir: "rtl", children: [
8899
+ /* @__PURE__ */ jsx19("h3", { className: "text-lg font-bold", children: "\u05D4\u05D2\u05D3\u05E8\u05D5\u05EA \u05E8\u05DB\u05D9\u05D1 \u05E9\u05D9\u05D1\u05D5\u05E5" }),
8900
+ /* @__PURE__ */ jsxs15("div", { className: "p-4 border border-indigo-200 bg-indigo-50/60 rounded space-y-2", "aria-live": "polite", children: [
8901
+ /* @__PURE__ */ jsx19("h4", { className: "font-semibold text-indigo-900 text-sm", children: "\u05D4\u05D1\u05D7\u05D9\u05E8\u05D5\u05EA \u05E9\u05E0\u05E2\u05E9\u05D5 \u05E2\u05D3 \u05DB\u05D4" }),
8902
+ /* @__PURE__ */ jsxs15("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-1.5", children: [
8903
+ /* @__PURE__ */ jsxs15("div", { className: "space-y-1.5", children: [
8904
+ /* @__PURE__ */ jsx19("div", { className: "text-xs font-bold text-slate-500", children: "\u05DE\u05E7\u05D5\u05E8" }),
8905
+ /* @__PURE__ */ jsx19(SummaryRow, { label: "\u05D8\u05D1\u05DC\u05EA \u05DE\u05E7\u05D5\u05E8", value: sourceTable == null ? void 0 : sourceTable.name }),
8906
+ /* @__PURE__ */ jsx19(
8763
8907
  SummaryRow,
8764
8908
  {
8765
8909
  label: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05DE\u05D9\u05D3\u05E2",
@@ -8768,10 +8912,10 @@ var PlacementSettings = ({ config, onChange, tables }) => {
8768
8912
  }
8769
8913
  )
8770
8914
  ] }),
8771
- /* @__PURE__ */ jsxs14("div", { className: "space-y-1.5", children: [
8772
- /* @__PURE__ */ jsx18("div", { className: "text-xs font-bold text-slate-500", children: "\u05D9\u05E2\u05D3" }),
8773
- /* @__PURE__ */ jsx18(SummaryRow, { label: "\u05D8\u05D1\u05DC\u05EA \u05D9\u05E2\u05D3", value: targetTable == null ? void 0 : targetTable.name }),
8774
- /* @__PURE__ */ jsx18(
8915
+ /* @__PURE__ */ jsxs15("div", { className: "space-y-1.5", children: [
8916
+ /* @__PURE__ */ jsx19("div", { className: "text-xs font-bold text-slate-500", children: "\u05D9\u05E2\u05D3" }),
8917
+ /* @__PURE__ */ jsx19(SummaryRow, { label: "\u05D8\u05D1\u05DC\u05EA \u05D9\u05E2\u05D3", value: targetTable == null ? void 0 : targetTable.name }),
8918
+ /* @__PURE__ */ jsx19(
8775
8919
  SummaryRow,
8776
8920
  {
8777
8921
  label: "\u05E1\u05D9\u05E0\u05D5\u05DF 1",
@@ -8779,7 +8923,7 @@ var PlacementSettings = ({ config, onChange, tables }) => {
8779
8923
  hint: relatedHint(config.targetFilterField1Id, targetTextColumns)
8780
8924
  }
8781
8925
  ),
8782
- /* @__PURE__ */ jsx18(
8926
+ /* @__PURE__ */ jsx19(
8783
8927
  SummaryRow,
8784
8928
  {
8785
8929
  label: "\u05E1\u05D9\u05E0\u05D5\u05DF 2",
@@ -8787,7 +8931,7 @@ var PlacementSettings = ({ config, onChange, tables }) => {
8787
8931
  hint: relatedHint(config.targetFilterField2Id, targetTextColumns)
8788
8932
  }
8789
8933
  ),
8790
- /* @__PURE__ */ jsx18(
8934
+ /* @__PURE__ */ jsx19(
8791
8935
  SummaryRow,
8792
8936
  {
8793
8937
  label: "\u05D1\u05D7\u05D9\u05E8\u05EA \u05E8\u05E9\u05D5\u05DE\u05D4",
@@ -8795,31 +8939,31 @@ var PlacementSettings = ({ config, onChange, tables }) => {
8795
8939
  hint: relatedHint(config.targetSelectorFieldId, targetTextColumns)
8796
8940
  }
8797
8941
  ),
8798
- /* @__PURE__ */ jsx18(SummaryRow, { label: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05E9\u05D9\u05D1\u05D5\u05E5", value: config.targetAssignmentFieldId })
8942
+ /* @__PURE__ */ jsx19(SummaryRow, { label: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05E9\u05D9\u05D1\u05D5\u05E5", value: config.targetAssignmentFieldId })
8799
8943
  ] })
8800
8944
  ] })
8801
8945
  ] }),
8802
- /* @__PURE__ */ jsxs14("div", { className: "p-4 border border-slate-200 bg-white rounded space-y-3", children: [
8803
- /* @__PURE__ */ jsx18("h4", { className: "font-semibold text-slate-800", children: "\u05E9\u05DC\u05D1 1: \u05D8\u05D1\u05DC\u05EA \u05D4\u05DE\u05E7\u05D5\u05E8" }),
8804
- /* @__PURE__ */ jsxs14("div", { className: "grid grid-cols-2 gap-4", children: [
8805
- /* @__PURE__ */ jsxs14("div", { children: [
8806
- /* @__PURE__ */ jsx18("label", { className: "block text-sm font-medium mb-1", children: "\u05D8\u05D1\u05DC\u05EA \u05DE\u05E7\u05D5\u05E8 (\u05DC\u05DE\u05E9\u05DC: \u05DE\u05D3\u05E8\u05D9\u05DB\u05D9\u05DD):" }),
8807
- /* @__PURE__ */ jsxs14(
8946
+ /* @__PURE__ */ jsxs15("div", { className: "p-4 border border-slate-200 bg-white rounded space-y-3", children: [
8947
+ /* @__PURE__ */ jsx19("h4", { className: "font-semibold text-slate-800", children: "\u05E9\u05DC\u05D1 1: \u05D8\u05D1\u05DC\u05EA \u05D4\u05DE\u05E7\u05D5\u05E8" }),
8948
+ /* @__PURE__ */ jsxs15("div", { className: "grid grid-cols-2 gap-4", children: [
8949
+ /* @__PURE__ */ jsxs15("div", { children: [
8950
+ /* @__PURE__ */ jsx19("label", { className: "block text-sm font-medium mb-1", children: "\u05D8\u05D1\u05DC\u05EA \u05DE\u05E7\u05D5\u05E8 (\u05DC\u05DE\u05E9\u05DC: \u05DE\u05D3\u05E8\u05D9\u05DB\u05D9\u05DD):" }),
8951
+ /* @__PURE__ */ jsxs15(
8808
8952
  "select",
8809
8953
  {
8810
8954
  className: selectClass,
8811
8955
  value: config.sourceTableId || "",
8812
8956
  onChange: (e) => handleSourceTableChange(e.target.value),
8813
8957
  children: [
8814
- /* @__PURE__ */ jsx18("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05D8\u05D1\u05DC\u05EA \u05DE\u05E7\u05D5\u05E8 --" }),
8815
- tables == null ? void 0 : tables.map((t) => /* @__PURE__ */ jsx18("option", { value: t.id, children: t.name }, t.id))
8958
+ /* @__PURE__ */ jsx19("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05D8\u05D1\u05DC\u05EA \u05DE\u05E7\u05D5\u05E8 --" }),
8959
+ tables == null ? void 0 : tables.map((t) => /* @__PURE__ */ jsx19("option", { value: t.id, children: t.name }, t.id))
8816
8960
  ]
8817
8961
  }
8818
8962
  )
8819
8963
  ] }),
8820
- /* @__PURE__ */ jsxs14("div", { children: [
8821
- /* @__PURE__ */ jsx18("label", { className: "block text-sm font-medium mb-1", children: "\u05E2\u05DE\u05D5\u05D3\u05D4 \u05DC\u05E7\u05D7\u05EA \u05DE\u05DE\u05E0\u05D4 \u05DE\u05D9\u05D3\u05E2 (\u05DC\u05DE\u05E9\u05DC: \u05E9\u05DD \u05DE\u05D3\u05E8\u05D9\u05DA):" }),
8822
- /* @__PURE__ */ jsxs14(
8964
+ /* @__PURE__ */ jsxs15("div", { children: [
8965
+ /* @__PURE__ */ jsx19("label", { className: "block text-sm font-medium mb-1", children: "\u05E2\u05DE\u05D5\u05D3\u05D4 \u05DC\u05E7\u05D7\u05EA \u05DE\u05DE\u05E0\u05D4 \u05DE\u05D9\u05D3\u05E2 (\u05DC\u05DE\u05E9\u05DC: \u05E9\u05DD \u05DE\u05D3\u05E8\u05D9\u05DA):" }),
8966
+ /* @__PURE__ */ jsxs15(
8823
8967
  "select",
8824
8968
  {
8825
8969
  className: selectClass,
@@ -8827,103 +8971,103 @@ var PlacementSettings = ({ config, onChange, tables }) => {
8827
8971
  value: config.sourceDisplayFieldId || "",
8828
8972
  onChange: (e) => onChange(__spreadProps(__spreadValues({}, config), { sourceDisplayFieldId: e.target.value })),
8829
8973
  children: [
8830
- /* @__PURE__ */ jsx18("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05EA \u05DE\u05E7\u05D5\u05E8 --" }),
8831
- sourceColumns.map((f) => /* @__PURE__ */ jsx18("option", { value: f.id, children: f.name }, f.id))
8974
+ /* @__PURE__ */ jsx19("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05EA \u05DE\u05E7\u05D5\u05E8 --" }),
8975
+ sourceColumns.map((f) => /* @__PURE__ */ jsx19("option", { value: f.id, children: f.name }, f.id))
8832
8976
  ]
8833
8977
  }
8834
8978
  )
8835
8979
  ] })
8836
8980
  ] })
8837
8981
  ] }),
8838
- /* @__PURE__ */ jsxs14("div", { className: "p-4 border border-blue-200 bg-blue-50 rounded space-y-3", children: [
8839
- /* @__PURE__ */ jsx18("h4", { className: "font-semibold text-blue-900", children: "\u05E9\u05DC\u05D1 2: \u05D8\u05D1\u05DC\u05EA \u05D4\u05D9\u05E2\u05D3" }),
8840
- /* @__PURE__ */ jsxs14("div", { children: [
8841
- /* @__PURE__ */ jsx18("label", { className: "block text-sm font-medium mb-1", children: "\u05D8\u05D1\u05DC\u05EA \u05D9\u05E2\u05D3:" }),
8842
- /* @__PURE__ */ jsxs14(
8982
+ /* @__PURE__ */ jsxs15("div", { className: "p-4 border border-blue-200 bg-blue-50 rounded space-y-3", children: [
8983
+ /* @__PURE__ */ jsx19("h4", { className: "font-semibold text-blue-900", children: "\u05E9\u05DC\u05D1 2: \u05D8\u05D1\u05DC\u05EA \u05D4\u05D9\u05E2\u05D3" }),
8984
+ /* @__PURE__ */ jsxs15("div", { children: [
8985
+ /* @__PURE__ */ jsx19("label", { className: "block text-sm font-medium mb-1", children: "\u05D8\u05D1\u05DC\u05EA \u05D9\u05E2\u05D3:" }),
8986
+ /* @__PURE__ */ jsxs15(
8843
8987
  "select",
8844
8988
  {
8845
8989
  className: selectClass,
8846
8990
  value: config.targetTableId || "",
8847
8991
  onChange: (e) => handleTargetTableChange(e.target.value),
8848
8992
  children: [
8849
- /* @__PURE__ */ jsx18("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05D8\u05D1\u05DC\u05EA \u05D9\u05E2\u05D3 --" }),
8850
- tables == null ? void 0 : tables.map((t) => /* @__PURE__ */ jsx18("option", { value: t.id, children: t.name }, t.id))
8993
+ /* @__PURE__ */ jsx19("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05D8\u05D1\u05DC\u05EA \u05D9\u05E2\u05D3 --" }),
8994
+ tables == null ? void 0 : tables.map((t) => /* @__PURE__ */ jsx19("option", { value: t.id, children: t.name }, t.id))
8851
8995
  ]
8852
8996
  }
8853
8997
  )
8854
8998
  ] }),
8855
- config.targetTableId && /* @__PURE__ */ jsxs14(Fragment3, { children: [
8856
- /* @__PURE__ */ jsxs14("div", { className: "grid grid-cols-3 gap-4", children: [
8857
- /* @__PURE__ */ jsxs14("div", { children: [
8858
- /* @__PURE__ */ jsx18("label", { className: "block text-sm font-medium mb-1", children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05E1\u05D9\u05E0\u05D5\u05DF 1:" }),
8859
- /* @__PURE__ */ jsxs14(
8999
+ config.targetTableId && /* @__PURE__ */ jsxs15(Fragment4, { children: [
9000
+ /* @__PURE__ */ jsxs15("div", { className: "grid grid-cols-3 gap-4", children: [
9001
+ /* @__PURE__ */ jsxs15("div", { children: [
9002
+ /* @__PURE__ */ jsx19("label", { className: "block text-sm font-medium mb-1", children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05E1\u05D9\u05E0\u05D5\u05DF 1:" }),
9003
+ /* @__PURE__ */ jsxs15(
8860
9004
  "select",
8861
9005
  {
8862
9006
  className: selectClass,
8863
9007
  value: config.targetFilterField1Id || "",
8864
9008
  onChange: (e) => onChange(__spreadProps(__spreadValues({}, config), { targetFilterField1Id: e.target.value })),
8865
9009
  children: [
8866
- /* @__PURE__ */ jsx18("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4 --" }),
8867
- optionsFor(targetTextColumns, "targetFilterField1Id").map((f) => /* @__PURE__ */ jsx18("option", { value: f.id, children: f.name }, f.id))
9010
+ /* @__PURE__ */ jsx19("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4 --" }),
9011
+ optionsFor(targetTextColumns, "targetFilterField1Id").map((f) => /* @__PURE__ */ jsx19("option", { value: f.id, children: f.name }, f.id))
8868
9012
  ]
8869
9013
  }
8870
9014
  )
8871
9015
  ] }),
8872
- /* @__PURE__ */ jsxs14("div", { children: [
8873
- /* @__PURE__ */ jsx18("label", { className: "block text-sm font-medium mb-1", children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05E1\u05D9\u05E0\u05D5\u05DF 2:" }),
8874
- /* @__PURE__ */ jsxs14(
9016
+ /* @__PURE__ */ jsxs15("div", { children: [
9017
+ /* @__PURE__ */ jsx19("label", { className: "block text-sm font-medium mb-1", children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05E1\u05D9\u05E0\u05D5\u05DF 2:" }),
9018
+ /* @__PURE__ */ jsxs15(
8875
9019
  "select",
8876
9020
  {
8877
9021
  className: selectClass,
8878
9022
  value: config.targetFilterField2Id || "",
8879
9023
  onChange: (e) => onChange(__spreadProps(__spreadValues({}, config), { targetFilterField2Id: e.target.value })),
8880
9024
  children: [
8881
- /* @__PURE__ */ jsx18("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4 --" }),
8882
- optionsFor(targetTextColumns, "targetFilterField2Id").map((f) => /* @__PURE__ */ jsx18("option", { value: f.id, children: f.name }, f.id))
9025
+ /* @__PURE__ */ jsx19("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4 --" }),
9026
+ optionsFor(targetTextColumns, "targetFilterField2Id").map((f) => /* @__PURE__ */ jsx19("option", { value: f.id, children: f.name }, f.id))
8883
9027
  ]
8884
9028
  }
8885
9029
  )
8886
9030
  ] }),
8887
- /* @__PURE__ */ jsxs14("div", { children: [
8888
- /* @__PURE__ */ jsx18("label", { className: "block text-sm font-medium mb-1", children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D1\u05D7\u05D9\u05E8\u05EA \u05D4\u05E8\u05E9\u05D5\u05DE\u05D4:" }),
8889
- /* @__PURE__ */ jsxs14(
9031
+ /* @__PURE__ */ jsxs15("div", { children: [
9032
+ /* @__PURE__ */ jsx19("label", { className: "block text-sm font-medium mb-1", children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D1\u05D7\u05D9\u05E8\u05EA \u05D4\u05E8\u05E9\u05D5\u05DE\u05D4:" }),
9033
+ /* @__PURE__ */ jsxs15(
8890
9034
  "select",
8891
9035
  {
8892
9036
  className: selectClass,
8893
9037
  value: config.targetSelectorFieldId || "",
8894
9038
  onChange: (e) => onChange(__spreadProps(__spreadValues({}, config), { targetSelectorFieldId: e.target.value })),
8895
9039
  children: [
8896
- /* @__PURE__ */ jsx18("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4 --" }),
8897
- optionsFor(targetTextColumns, "targetSelectorFieldId").map((f) => /* @__PURE__ */ jsx18("option", { value: f.id, children: f.name }, f.id))
9040
+ /* @__PURE__ */ jsx19("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4 --" }),
9041
+ optionsFor(targetTextColumns, "targetSelectorFieldId").map((f) => /* @__PURE__ */ jsx19("option", { value: f.id, children: f.name }, f.id))
8898
9042
  ]
8899
9043
  }
8900
9044
  )
8901
9045
  ] })
8902
9046
  ] }),
8903
- /* @__PURE__ */ jsxs14("div", { children: [
8904
- /* @__PURE__ */ jsx18("label", { className: "block text-sm font-medium mb-1", children: "\u05E2\u05DE\u05D5\u05D3\u05D4 \u05D1\u05D8\u05D1\u05DC\u05EA \u05D4\u05D9\u05E2\u05D3 \u05D0\u05DC\u05D9\u05D4 \u05D9\u05D9\u05DB\u05E0\u05E1 \u05D4\u05DE\u05D9\u05D3\u05E2 \u05DE\u05D4\u05DE\u05E7\u05D5\u05E8:" }),
8905
- /* @__PURE__ */ jsxs14(
9047
+ /* @__PURE__ */ jsxs15("div", { children: [
9048
+ /* @__PURE__ */ jsx19("label", { className: "block text-sm font-medium mb-1", children: "\u05E2\u05DE\u05D5\u05D3\u05D4 \u05D1\u05D8\u05D1\u05DC\u05EA \u05D4\u05D9\u05E2\u05D3 \u05D0\u05DC\u05D9\u05D4 \u05D9\u05D9\u05DB\u05E0\u05E1 \u05D4\u05DE\u05D9\u05D3\u05E2 \u05DE\u05D4\u05DE\u05E7\u05D5\u05E8:" }),
9049
+ /* @__PURE__ */ jsxs15(
8906
9050
  "select",
8907
9051
  {
8908
9052
  className: selectClass,
8909
9053
  value: config.targetAssignmentFieldId || "",
8910
9054
  onChange: (e) => onChange(__spreadProps(__spreadValues({}, config), { targetAssignmentFieldId: e.target.value })),
8911
9055
  children: [
8912
- /* @__PURE__ */ jsx18("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05EA \u05D9\u05E2\u05D3 --" }),
8913
- optionsFor(targetColumns, "targetAssignmentFieldId").map((f) => /* @__PURE__ */ jsx18("option", { value: f.id, children: f.name }, f.id))
9056
+ /* @__PURE__ */ jsx19("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05EA \u05D9\u05E2\u05D3 --" }),
9057
+ optionsFor(targetColumns, "targetAssignmentFieldId").map((f) => /* @__PURE__ */ jsx19("option", { value: f.id, children: f.name }, f.id))
8914
9058
  ]
8915
9059
  }
8916
9060
  )
8917
9061
  ] })
8918
9062
  ] })
8919
9063
  ] }),
8920
- /* @__PURE__ */ jsx18(PlacementStatusEditor, { config, onChange })
9064
+ /* @__PURE__ */ jsx19(PlacementStatusEditor, { config, onChange })
8921
9065
  ] });
8922
9066
  };
8923
9067
 
8924
9068
  // src/components/PlacementBlock/PlacementRelationButtons.tsx
8925
9069
  import { useMemo as useMemo8 } from "react";
8926
- import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
9070
+ import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
8927
9071
  var GROUP_COLORS = [
8928
9072
  { title: "bg-blue-600 text-white", active: "bg-blue-600 border-blue-600 text-white hover:bg-blue-700", count: "text-blue-700" },
8929
9073
  { title: "bg-violet-600 text-white", active: "bg-violet-600 border-violet-600 text-white hover:bg-violet-700", count: "text-violet-700" },
@@ -8973,20 +9117,20 @@ var PlacementRelationButtons = ({
8973
9117
  });
8974
9118
  }, [columnNames, rows, filters, relationOptions]);
8975
9119
  if (!columnNames || columnNames.length === 0) return null;
8976
- return /* @__PURE__ */ jsx19(
9120
+ return /* @__PURE__ */ jsx20(
8977
9121
  "div",
8978
9122
  {
8979
9123
  className: `border-t border-slate-100 pt-3 ${className}`,
8980
9124
  "data-testid": "placement-relation-buttons",
8981
- children: groups.every((g) => g.options.length === 0) ? /* @__PURE__ */ jsx19("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" }) : (
9125
+ children: groups.every((g) => g.options.length === 0) ? /* @__PURE__ */ jsx20("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" }) : (
8982
9126
  // כל עמודה במתחם נפרד: בשורה הראשונה הכותרת (תגית צבעונית), ומהשורה שמתחת הכפתורים
8983
- /* @__PURE__ */ jsx19("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-2.5", children: groups.map((group, gi) => {
9127
+ /* @__PURE__ */ jsx20("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-2.5", children: groups.map((group, gi) => {
8984
9128
  if (group.options.length === 0) return null;
8985
9129
  const color = GROUP_COLORS[gi % GROUP_COLORS.length];
8986
- return /* @__PURE__ */ jsxs15("div", { className: "bg-white border border-slate-200 rounded-xl p-3 flex flex-col gap-2.5 shadow-2xs", children: [
8987
- /* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between gap-2 pb-2 border-b border-slate-100", children: [
8988
- /* @__PURE__ */ jsx19("span", { className: `px-2.5 py-0.5 rounded-md text-xs font-bold truncate ${color.title}`, title: group.title, children: group.title }),
8989
- group.activeId && /* @__PURE__ */ jsx19(
9130
+ return /* @__PURE__ */ jsxs16("div", { className: "bg-white border border-slate-200 rounded-xl p-3 flex flex-col gap-2.5 shadow-2xs", children: [
9131
+ /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between gap-2 pb-2 border-b border-slate-100", children: [
9132
+ /* @__PURE__ */ jsx20("span", { className: `px-2.5 py-0.5 rounded-md text-xs font-bold truncate ${color.title}`, title: group.title, children: group.title }),
9133
+ group.activeId && /* @__PURE__ */ jsx20(
8990
9134
  "button",
8991
9135
  {
8992
9136
  type: "button",
@@ -8996,11 +9140,11 @@ var PlacementRelationButtons = ({
8996
9140
  }
8997
9141
  )
8998
9142
  ] }),
8999
- /* @__PURE__ */ jsx19("div", { className: "flex flex-wrap items-end gap-x-2 gap-y-2.5", children: group.options.map((opt) => {
9143
+ /* @__PURE__ */ jsx20("div", { className: "flex flex-wrap items-end gap-x-2 gap-y-2.5", children: group.options.map((opt) => {
9000
9144
  const active = group.activeId === opt.id;
9001
- return /* @__PURE__ */ jsxs15("div", { className: "flex flex-col items-center gap-0.5", children: [
9002
- /* @__PURE__ */ jsx19("span", { className: `text-[11px] font-bold leading-none ${active ? color.count : "text-slate-500"}`, children: opt.count }),
9003
- /* @__PURE__ */ jsx19(
9145
+ return /* @__PURE__ */ jsxs16("div", { className: "flex flex-col items-center gap-0.5", children: [
9146
+ /* @__PURE__ */ jsx20("span", { className: `text-[11px] font-bold leading-none ${active ? color.count : "text-slate-500"}`, children: opt.count }),
9147
+ /* @__PURE__ */ jsx20(
9004
9148
  "button",
9005
9149
  {
9006
9150
  type: "button",
@@ -9058,7 +9202,7 @@ function computePlacementDefaultFilters(args) {
9058
9202
  }
9059
9203
 
9060
9204
  // src/components/PlacementBlock/PlacementBlock.tsx
9061
- import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
9205
+ import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
9062
9206
  ModuleRegistry.registerModules([AllCommunityModule]);
9063
9207
  var FETCH_LIMIT = 1e3;
9064
9208
  function normalizeRows(records) {
@@ -9095,7 +9239,7 @@ var ColorDotRenderer = (props) => {
9095
9239
  const { statuses, defaultStatusId } = props;
9096
9240
  const status = statuses.find((c) => c.id === item.statusId) || statuses.find((c) => c.id === defaultStatusId) || statuses[0];
9097
9241
  if (!status) return null;
9098
- return /* @__PURE__ */ jsx20("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ jsx20(
9242
+ return /* @__PURE__ */ jsx21("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ jsx21(
9099
9243
  "button",
9100
9244
  {
9101
9245
  type: "button",
@@ -9109,7 +9253,7 @@ var ColorDotRenderer = (props) => {
9109
9253
  };
9110
9254
  var CheckCellRenderer = (props) => {
9111
9255
  if (!props.data) return null;
9112
- return /* @__PURE__ */ jsx20("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ jsx20(
9256
+ return /* @__PURE__ */ jsx21("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ jsx21(
9113
9257
  "input",
9114
9258
  {
9115
9259
  type: "checkbox",
@@ -9120,7 +9264,7 @@ var CheckCellRenderer = (props) => {
9120
9264
  }
9121
9265
  ) });
9122
9266
  };
9123
- var CheckHeader = (props) => /* @__PURE__ */ jsx20("div", { className: "flex items-center justify-center w-full", children: /* @__PURE__ */ jsx20(
9267
+ var CheckHeader = (props) => /* @__PURE__ */ jsx21("div", { className: "flex items-center justify-center w-full", children: /* @__PURE__ */ jsx21(
9124
9268
  "input",
9125
9269
  {
9126
9270
  type: "checkbox",
@@ -9135,8 +9279,8 @@ var CheckHeader = (props) => /* @__PURE__ */ jsx20("div", { className: "flex ite
9135
9279
  ) });
9136
9280
  var RelationFilterHeader = (props) => {
9137
9281
  const btnRef = useRef14(null);
9138
- 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: [
9139
- /* @__PURE__ */ jsx20(
9282
+ return /* @__PURE__ */ jsxs17("div", { className: "flex flex-col items-center justify-center w-full min-w-0 leading-tight select-none", title: props.displayName, children: [
9283
+ /* @__PURE__ */ jsx21(
9140
9284
  "button",
9141
9285
  {
9142
9286
  ref: btnRef,
@@ -9152,10 +9296,10 @@ var RelationFilterHeader = (props) => {
9152
9296
  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"}`,
9153
9297
  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",
9154
9298
  "aria-label": `\u05E1\u05D9\u05E0\u05D5\u05DF \u05DC\u05E4\u05D9 ${props.displayName}`,
9155
- children: /* @__PURE__ */ jsx20(Filter2, { className: "w-3 h-3" })
9299
+ children: /* @__PURE__ */ jsx21(Filter2, { className: "w-3 h-3" })
9156
9300
  }
9157
9301
  ),
9158
- /* @__PURE__ */ jsx20("span", { className: "truncate w-full text-center", children: props.displayName })
9302
+ /* @__PURE__ */ jsx21("span", { className: "truncate w-full text-center", children: props.displayName })
9159
9303
  ] });
9160
9304
  };
9161
9305
  var PlacementBlock = (props) => {
@@ -9186,27 +9330,27 @@ var PlacementBlock = (props) => {
9186
9330
  executeActionRef.current = executeAction;
9187
9331
  const legacyRef = useRef14({ fetchSourceData, fetchTargetData, updateAssignment });
9188
9332
  legacyRef.current = { fetchSourceData, fetchTargetData, updateAssignment };
9189
- const [sourceRows, setSourceRows] = useState16([]);
9190
- const [sourceColumns, setSourceColumns] = useState16([]);
9191
- const [sourceRelOptions, setSourceRelOptions] = useState16({});
9192
- const [sourceRelFilters, setSourceRelFilters] = useState16({});
9193
- const [targetRows, setTargetRows] = useState16([]);
9194
- const [targetColumns, setTargetColumns] = useState16([]);
9195
- const [targetRelOptions, setTargetRelOptions] = useState16({});
9196
- const [selectedTargetId, setSelectedTargetId] = useState16("");
9197
- const [candidateIds, setCandidateIds] = useState16([]);
9198
- const [checkedIds, setCheckedIds] = useState16([]);
9199
- const [isSaving, setIsSaving] = useState16(false);
9200
- const [sourceSearch, setSourceSearch] = useState16("");
9201
- const [candidateSearch, setCandidateSearch] = useState16("");
9202
- const [statusMap, setStatusMap] = useState16({});
9203
- const [isLoading, setIsLoading] = useState16(false);
9204
- const [loadError, setLoadError] = useState16(null);
9205
- const [saveError, setSaveError] = useState16(null);
9206
- const [colFilters, setColFilters] = useState16({ source: {}, cand: {} });
9207
- const [filterPopover, setFilterPopover] = useState16(null);
9208
- const [targetFilters, setTargetFilters] = useState16({});
9209
- const loadTable = useCallback13(async (tableId, kind) => {
9333
+ const [sourceRows, setSourceRows] = useState17([]);
9334
+ const [sourceColumns, setSourceColumns] = useState17([]);
9335
+ const [sourceRelOptions, setSourceRelOptions] = useState17({});
9336
+ const [sourceRelFilters, setSourceRelFilters] = useState17({});
9337
+ const [targetRows, setTargetRows] = useState17([]);
9338
+ const [targetColumns, setTargetColumns] = useState17([]);
9339
+ const [targetRelOptions, setTargetRelOptions] = useState17({});
9340
+ const [selectedTargetId, setSelectedTargetId] = useState17("");
9341
+ const [candidateIds, setCandidateIds] = useState17([]);
9342
+ const [checkedIds, setCheckedIds] = useState17([]);
9343
+ const [isSaving, setIsSaving] = useState17(false);
9344
+ const [sourceSearch, setSourceSearch] = useState17("");
9345
+ const [candidateSearch, setCandidateSearch] = useState17("");
9346
+ const [statusMap, setStatusMap] = useState17({});
9347
+ const [isLoading, setIsLoading] = useState17(false);
9348
+ const [loadError, setLoadError] = useState17(null);
9349
+ const [saveError, setSaveError] = useState17(null);
9350
+ const [colFilters, setColFilters] = useState17({ source: {}, cand: {} });
9351
+ const [filterPopover, setFilterPopover] = useState17(null);
9352
+ const [targetFilters, setTargetFilters] = useState17({});
9353
+ const loadTable = useCallback14(async (tableId, kind) => {
9210
9354
  const exec = executeActionRef.current;
9211
9355
  if (exec) {
9212
9356
  const res = await exec("FETCH_TABLE_DATA", { tableId, tableMetaId: tableId, limit: FETCH_LIMIT, skip: 0 });
@@ -9247,7 +9391,7 @@ var PlacementBlock = (props) => {
9247
9391
  cancelled = true;
9248
9392
  };
9249
9393
  }, [sourceTableId, targetTableId, loadTable]);
9250
- const displayValue = useCallback13((col, val) => {
9394
+ const displayValue = useCallback14((col, val) => {
9251
9395
  var _a2, _b2, _c, _d, _e;
9252
9396
  let text2 = cellText(val);
9253
9397
  if (text2 && /^[a-fA-F0-9]{24}$/.test(text2)) {
@@ -9280,7 +9424,7 @@ var PlacementBlock = (props) => {
9280
9424
  });
9281
9425
  return maps;
9282
9426
  }, [sourceRelOptions]);
9283
- const relationLabelsOf = useCallback13((row, colName) => {
9427
+ const relationLabelsOf = useCallback14((row, colName) => {
9284
9428
  var _a2;
9285
9429
  const map = relationLabelMaps[colName];
9286
9430
  const ids = normalizeRelationValue((_a2 = row.data) == null ? void 0 : _a2[colName]);
@@ -9289,7 +9433,7 @@ var PlacementBlock = (props) => {
9289
9433
  const txt = cellText(readColumnValue(row.data, colName));
9290
9434
  return txt && !/^[a-fA-F0-9]{24}$/.test(txt) ? txt.split(", ").filter(Boolean) : [];
9291
9435
  }, [relationLabelMaps]);
9292
- const rowPassesColFilters = useCallback13((row, filters) => {
9436
+ const rowPassesColFilters = useCallback14((row, filters) => {
9293
9437
  return Object.entries(filters).every(([colName, f]) => {
9294
9438
  if (!f) return true;
9295
9439
  const labels = relationLabelsOf(row, colName);
@@ -9298,7 +9442,7 @@ var PlacementBlock = (props) => {
9298
9442
  return true;
9299
9443
  });
9300
9444
  }, [relationLabelsOf]);
9301
- const setColFilter = useCallback13((grid, colName, payload) => {
9445
+ const setColFilter = useCallback14((grid, colName, payload) => {
9302
9446
  setColFilters((prev) => {
9303
9447
  const next = __spreadValues({}, prev[grid]);
9304
9448
  if (payload === void 0) delete next[colName];
@@ -9306,10 +9450,10 @@ var PlacementBlock = (props) => {
9306
9450
  return __spreadProps(__spreadValues({}, prev), { [grid]: next });
9307
9451
  });
9308
9452
  }, []);
9309
- const openColFilter = useCallback13((grid, colName, rect) => {
9453
+ const openColFilter = useCallback14((grid, colName, rect) => {
9310
9454
  setFilterPopover((cur) => cur && cur.grid === grid && cur.colName === colName ? null : { grid, colName, rect });
9311
9455
  }, []);
9312
- const closeColFilter = useCallback13(() => setFilterPopover(null), []);
9456
+ const closeColFilter = useCallback14(() => setFilterPopover(null), []);
9313
9457
  const filterColumns = useMemo9(() => {
9314
9458
  const definedFilters = (config == null ? void 0 : config.filterFields) || [];
9315
9459
  const legacyFilters = [config == null ? void 0 : config.targetFilterField1Id, config == null ? void 0 : config.targetFilterField2Id].filter(Boolean);
@@ -9383,7 +9527,7 @@ var PlacementBlock = (props) => {
9383
9527
  const assignmentColumn = useMemo9(() => targetColumns.find((c) => c.name === assignmentField), [targetColumns, assignmentField]);
9384
9528
  const isRelationField = ((_b = assignmentColumn == null ? void 0 : assignmentColumn.type) == null ? void 0 : _b.toUpperCase()) === "RELATION";
9385
9529
  const assignmentLabel = (assignmentColumn == null ? void 0 : assignmentColumn.label) || (assignmentColumn == null ? void 0 : assignmentColumn.name) || assignmentField || "";
9386
- const nameOf = useCallback13((row) => cellText(readColumnValue(row.data, displayField)) || "\u05DC\u05DC\u05D0 \u05E9\u05DD", [displayField]);
9530
+ const nameOf = useCallback14((row) => cellText(readColumnValue(row.data, displayField)) || "\u05DC\u05DC\u05D0 \u05E9\u05DD", [displayField]);
9387
9531
  const assignedIds = useMemo9(() => {
9388
9532
  var _a2;
9389
9533
  const target = targetRows.find((r) => r.id === selectedTargetId);
@@ -9404,7 +9548,7 @@ var PlacementBlock = (props) => {
9404
9548
  setCandidateIds(assignedIdsRef.current);
9405
9549
  setCheckedIds(assignedIdsRef.current);
9406
9550
  }, [selectedTargetId, sourceRows]);
9407
- 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]);
9551
+ const toGridRow = useCallback14((r, checked = false) => __spreadProps(__spreadValues({}, r.data), { id: r.id, __label: nameOf(r), __checked: checked, statusId: statusMap[r.id] || defaultStatusId }), [nameOf, statusMap, defaultStatusId]);
9408
9552
  const candidateRows = useMemo9(() => candidateIds.map((id) => sourceRows.find((r) => r.id === id)).filter((r) => !!r), [candidateIds, sourceRows]);
9409
9553
  const candidateGridData = useMemo9(() => {
9410
9554
  const checked = new Set(checkedIds);
@@ -9419,7 +9563,7 @@ var PlacementBlock = (props) => {
9419
9563
  return wanted.filter((name) => sourceColumns.some((c) => (c == null ? void 0 : c.name) === name && String(c == null ? void 0 : c.type).toUpperCase() === "RELATION"));
9420
9564
  }, [config, sourceColumns]);
9421
9565
  const hasRelationButtons = relationButtonColumns.length > 0;
9422
- const handleRelationFilterChange = useCallback13((colName, id) => {
9566
+ const handleRelationFilterChange = useCallback14((colName, id) => {
9423
9567
  setSourceRelFilters((prev) => __spreadProps(__spreadValues({}, prev), { [colName]: id }));
9424
9568
  }, []);
9425
9569
  const availableGridData = useMemo9(() => {
@@ -9427,7 +9571,7 @@ var PlacementBlock = (props) => {
9427
9571
  const byButtons = active.length === 0 ? availableRows : availableRows.filter((r) => active.every(([name, v]) => rowMatchesRelationFilter(r, name, v)));
9428
9572
  return byButtons.filter((r) => rowPassesColFilters(r, colFilters.source)).map((r) => toGridRow(r));
9429
9573
  }, [availableRows, sourceRelFilters, relationButtonColumns, toGridRow, rowPassesColFilters, colFilters.source]);
9430
- const persistAssignment = useCallback13(async (nextIds) => {
9574
+ const persistAssignment = useCallback14(async (nextIds) => {
9431
9575
  const exec = executeActionRef.current;
9432
9576
  if (exec && targetTableId && assignmentField && selectedTargetId) {
9433
9577
  const value = isRelationField ? nextIds : nextIds.map((id) => sourceRows.find((r) => r.id === id)).filter((r) => !!r).map(nameOf).join(", ");
@@ -9439,10 +9583,10 @@ var PlacementBlock = (props) => {
9439
9583
  for (const id of nextIds.filter((i) => !assignedIds.includes(i))) await legacyRef.current.updateAssignment(selectedTargetId, id);
9440
9584
  }
9441
9585
  }, [targetTableId, assignmentField, selectedTargetId, isRelationField, sourceRows, nameOf, assignedIds]);
9442
- const moveToCandidates = useCallback13((id) => {
9586
+ const moveToCandidates = useCallback14((id) => {
9443
9587
  setCandidateIds((prev) => prev.includes(id) ? prev : [...prev, id]);
9444
9588
  }, []);
9445
- const moveToSource = useCallback13((id) => {
9589
+ const moveToSource = useCallback14((id) => {
9446
9590
  setCandidateIds((prev) => prev.filter((x) => x !== id));
9447
9591
  setCheckedIds((prev) => prev.filter((x) => x !== id));
9448
9592
  setStatusMap((prev) => __spreadProps(__spreadValues({}, prev), { [id]: defaultStatusId }));
@@ -9451,21 +9595,21 @@ var PlacementBlock = (props) => {
9451
9595
  moveToCandidatesRef.current = moveToCandidates;
9452
9596
  const moveToSourceRef = useRef14(moveToSource);
9453
9597
  moveToSourceRef.current = moveToSource;
9454
- const toggleChecked = useCallback13((id) => {
9598
+ const toggleChecked = useCallback14((id) => {
9455
9599
  setCheckedIds((prev) => prev.includes(id) ? prev.filter((x) => x !== id) : [...prev, id]);
9456
9600
  }, []);
9457
9601
  const allChecked = candidateIds.length > 0 && candidateIds.every((id) => checkedIds.includes(id));
9458
9602
  const someChecked = candidateIds.some((id) => checkedIds.includes(id));
9459
- const toggleAll = useCallback13(() => {
9603
+ const toggleAll = useCallback14(() => {
9460
9604
  setCheckedIds(allChecked ? [] : [...candidateIds]);
9461
9605
  }, [allChecked, candidateIds]);
9462
- const returnAll = useCallback13(() => {
9606
+ const returnAll = useCallback14(() => {
9463
9607
  setCandidateIds([]);
9464
9608
  setCheckedIds([]);
9465
9609
  }, []);
9466
9610
  const checkedCandidates = useMemo9(() => candidateIds.filter((id) => checkedIds.includes(id)), [candidateIds, checkedIds]);
9467
9611
  const isDirty = checkedCandidates.length !== assignedIds.length || checkedCandidates.some((id) => !assignedIds.includes(id));
9468
- const submitAssignment = useCallback13(async () => {
9612
+ const submitAssignment = useCallback14(async () => {
9469
9613
  if (!selectedTargetId) {
9470
9614
  alert("\u05D0\u05E0\u05D0 \u05D1\u05D7\u05E8 \u05E7\u05D5\u05D3\u05DD \u05E8\u05E9\u05D5\u05DE\u05EA \u05D9\u05E2\u05D3 \u05DC\u05E4\u05E0\u05D9 \u05D4\u05E9\u05D9\u05D1\u05D5\u05E5");
9471
9615
  return;
@@ -9481,14 +9625,14 @@ var PlacementBlock = (props) => {
9481
9625
  setIsSaving(false);
9482
9626
  }
9483
9627
  }, [selectedTargetId, persistAssignment, checkedCandidates]);
9484
- const cycleStatus = useCallback13((recordId) => {
9628
+ const cycleStatus = useCallback14((recordId) => {
9485
9629
  setStatusMap((prev) => {
9486
9630
  const current = prev[recordId] || defaultStatusId;
9487
9631
  const idx = statuses.findIndex((c) => c.id === current);
9488
9632
  return __spreadProps(__spreadValues({}, prev), { [recordId]: statuses[(idx + 1) % statuses.length].id });
9489
9633
  });
9490
9634
  }, [statuses, defaultStatusId]);
9491
- const cancelAssignment = useCallback13(async () => {
9635
+ const cancelAssignment = useCallback14(async () => {
9492
9636
  if (!selectedTargetId || assignedIds.length === 0) return;
9493
9637
  if (!window.confirm(`\u05DC\u05D1\u05D8\u05DC \u05D0\u05EA \u05D4\u05E9\u05D9\u05D1\u05D5\u05E5 \u05D5\u05DC\u05DE\u05D7\u05D5\u05E7 \u05D0\u05EA \u05D4\u05E0\u05EA\u05D5\u05DF \u05DE\u05E9\u05D3\u05D4 "${assignmentLabel}"?`)) return;
9494
9638
  const removed = new Set(assignedIds);
@@ -9504,7 +9648,7 @@ var PlacementBlock = (props) => {
9504
9648
  setIsSaving(false);
9505
9649
  }
9506
9650
  }, [selectedTargetId, assignedIds, assignmentLabel, persistAssignment]);
9507
- const makeColDefs = useCallback13((columns, fallbackName, grid, withCheckbox = false) => {
9651
+ const makeColDefs = useCallback14((columns, fallbackName, grid, withCheckbox = false) => {
9508
9652
  const gridFilters = colFilters[grid];
9509
9653
  const defs = [];
9510
9654
  if (withCheckbox) {
@@ -9556,10 +9700,10 @@ var PlacementBlock = (props) => {
9556
9700
  var _a2;
9557
9701
  return (_a2 = d.colId) != null ? _a2 : d.field;
9558
9702
  }).filter(Boolean);
9559
- const expandColumns = useCallback13((api) => {
9703
+ const expandColumns = useCallback14((api) => {
9560
9704
  api == null ? void 0 : api.sizeColumnsToFit();
9561
9705
  }, []);
9562
- const shrinkColumns = useCallback13((api, defs) => {
9706
+ const shrinkColumns = useCallback14((api, defs) => {
9563
9707
  api == null ? void 0 : api.autoSizeColumns(scrollableColIds(defs));
9564
9708
  }, []);
9565
9709
  const popoverOptions = useMemo9(() => {
@@ -9573,11 +9717,11 @@ var PlacementBlock = (props) => {
9573
9717
  () => filterPopover ? sourceColumns.find((c) => c.name === filterPopover.colName) : void 0,
9574
9718
  [filterPopover, sourceColumns]
9575
9719
  );
9576
- const getRowId = useCallback13((p) => p.data.id, []);
9720
+ const getRowId = useCallback14((p) => p.data.id, []);
9577
9721
  const sourceContainerRef = useRef14(null);
9578
9722
  const assignedContainerRef = useRef14(null);
9579
- const [sourceApi, setSourceApi] = useState16(null);
9580
- const [assignedApi, setAssignedApi] = useState16(null);
9723
+ const [sourceApi, setSourceApi] = useState17(null);
9724
+ const [assignedApi, setAssignedApi] = useState17(null);
9581
9725
  useEffect14(() => {
9582
9726
  if (!sourceApi || !assignedApi) return;
9583
9727
  const toAssigned = { getContainer: () => assignedContainerRef.current, onDragStop: (p) => {
@@ -9610,52 +9754,52 @@ var PlacementBlock = (props) => {
9610
9754
  [assignedIds, sourceRows, nameOf]
9611
9755
  );
9612
9756
  const activeTarget = targetRows.find((r) => r.id === selectedTargetId);
9613
- const targetLabel = useCallback13((r) => {
9757
+ const targetLabel = useCallback14((r) => {
9614
9758
  const col = targetColumns.find((c) => c.name === selectorField || c.id === selectorField);
9615
9759
  return displayValue(col || { name: selectorField }, readColumnValue(r.data, selectorField)) || "\u05DC\u05DC\u05D0 \u05E9\u05DD";
9616
9760
  }, [selectorField, targetColumns, displayValue]);
9617
9761
  const previewColumns = useMemo9(() => targetColumns.filter((c) => isUserColumn(c) && c.name !== assignmentField && !["id", "_id", "id_", "statusId"].includes(c.name)), [targetColumns, assignmentField]);
9618
9762
  if (!config || !sourceTableId || !targetTableId) {
9619
- return /* @__PURE__ */ jsx20("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)." });
9763
+ return /* @__PURE__ */ jsx21("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)." });
9620
9764
  }
9621
9765
  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";
9622
9766
  const labelClass = "block text-[11px] font-semibold text-slate-500 mb-1";
9623
- 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: [
9624
- (loadError || saveError) && /* @__PURE__ */ jsx20("div", { className: "p-3 text-xs rounded-lg bg-rose-50 border border-rose-200 text-rose-700", children: loadError || saveError }),
9625
- /* @__PURE__ */ jsxs16("div", { className: "flex flex-col lg:flex-row gap-4", children: [
9626
- /* @__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: [
9627
- /* @__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: [
9628
- /* @__PURE__ */ jsx20("span", { children: "\u{1F4CC}" }),
9767
+ return /* @__PURE__ */ jsxs17("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: [
9768
+ (loadError || saveError) && /* @__PURE__ */ jsx21("div", { className: "p-3 text-xs rounded-lg bg-rose-50 border border-rose-200 text-rose-700", children: loadError || saveError }),
9769
+ /* @__PURE__ */ jsxs17("div", { className: "flex flex-col lg:flex-row gap-4", children: [
9770
+ /* @__PURE__ */ jsxs17("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: [
9771
+ /* @__PURE__ */ jsxs17("h4", { className: "font-bold text-teal-900 border-b border-teal-200 pb-2 mb-3 text-base flex items-center gap-2", children: [
9772
+ /* @__PURE__ */ jsx21("span", { children: "\u{1F4CC}" }),
9629
9773
  " \u05E4\u05E8\u05D8\u05D9 \u05D4\u05D9\u05E2\u05D3 \u05DC\u05E9\u05D9\u05D1\u05D5\u05E5"
9630
9774
  ] }),
9631
- 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: [
9632
- /* @__PURE__ */ jsx20("div", { className: "col-span-full font-bold text-slate-900 text-lg mb-1", children: targetLabel(activeTarget) }),
9775
+ activeTarget ? /* @__PURE__ */ jsxs17("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: [
9776
+ /* @__PURE__ */ jsx21("div", { className: "col-span-full font-bold text-slate-900 text-lg mb-1", children: targetLabel(activeTarget) }),
9633
9777
  previewColumns.map((col) => ({ col, text: displayValue(col, readColumnValue(activeTarget.data, col.name)) })).filter(({ col, text: text2 }) => {
9634
9778
  var _a2;
9635
9779
  return text2 && (col.type === "RELATION" || typeof ((_a2 = activeTarget.data) == null ? void 0 : _a2[col.name]) !== "object");
9636
- }).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: [
9637
- /* @__PURE__ */ jsxs16("span", { className: "font-semibold shrink-0", children: [
9780
+ }).map(({ col, text: text2 }) => /* @__PURE__ */ jsxs17("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: [
9781
+ /* @__PURE__ */ jsxs17("span", { className: "font-semibold shrink-0", children: [
9638
9782
  col.label || col.name,
9639
9783
  ":"
9640
9784
  ] }),
9641
- /* @__PURE__ */ jsx20("span", { className: "break-words", children: text2 })
9785
+ /* @__PURE__ */ jsx21("span", { className: "break-words", children: text2 })
9642
9786
  ] }, col.name)),
9643
- assignmentField && assignedText && /* @__PURE__ */ jsxs16("div", { className: "flex gap-2 items-start", children: [
9644
- /* @__PURE__ */ jsxs16("span", { className: "font-semibold shrink-0", children: [
9787
+ assignmentField && assignedText && /* @__PURE__ */ jsxs17("div", { className: "flex gap-2 items-start", children: [
9788
+ /* @__PURE__ */ jsxs17("span", { className: "font-semibold shrink-0", children: [
9645
9789
  assignmentLabel,
9646
9790
  ":"
9647
9791
  ] }),
9648
- /* @__PURE__ */ jsx20("span", { className: "break-words", title: assignedText, children: assignedText })
9792
+ /* @__PURE__ */ jsx21("span", { className: "break-words", title: assignedText, children: assignedText })
9649
9793
  ] }),
9650
- /* @__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: [
9794
+ /* @__PURE__ */ jsxs17("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: [
9651
9795
  "\u05DE\u05E9\u05D5\u05D1\u05E6\u05D9\u05DD \u05DB\u05E8\u05D2\u05E2: ",
9652
9796
  assignedIds.length
9653
9797
  ] })
9654
- ] }) : /* @__PURE__ */ jsx20("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." })
9798
+ ] }) : /* @__PURE__ */ jsx21("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." })
9655
9799
  ] }),
9656
- /* @__PURE__ */ jsx20("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: [
9657
- /* @__PURE__ */ jsx20("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" }),
9658
- /* @__PURE__ */ jsxs16("div", { className: "flex flex-col sm:flex-row gap-3", children: [
9800
+ /* @__PURE__ */ jsx21("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__ */ jsxs17("div", { children: [
9801
+ /* @__PURE__ */ jsx21("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" }),
9802
+ /* @__PURE__ */ jsxs17("div", { className: "flex flex-col sm:flex-row gap-3", children: [
9659
9803
  filterColumns.map((col, index) => {
9660
9804
  const previousColumns = filterColumns.slice(0, index);
9661
9805
  const validRowsForThisFilter = targetRows.filter((r) => {
@@ -9668,9 +9812,9 @@ var PlacementBlock = (props) => {
9668
9812
  const uniqueValues = Array.from(new Set(
9669
9813
  validRowsForThisFilter.map((r) => displayValue(col, readColumnValue(r.data, col.name)))
9670
9814
  )).filter(Boolean).sort((a, b) => a.localeCompare(b, "he"));
9671
- return /* @__PURE__ */ jsxs16("div", { className: "flex-1 basis-0 min-w-0", children: [
9672
- /* @__PURE__ */ jsx20("label", { className: labelClass, children: col.label || columnRefLabel(col.name) }),
9673
- /* @__PURE__ */ jsxs16(
9815
+ return /* @__PURE__ */ jsxs17("div", { className: "flex-1 basis-0 min-w-0", children: [
9816
+ /* @__PURE__ */ jsx21("label", { className: labelClass, children: col.label || columnRefLabel(col.name) }),
9817
+ /* @__PURE__ */ jsxs17(
9674
9818
  "select",
9675
9819
  {
9676
9820
  className: selectClass,
@@ -9686,26 +9830,26 @@ var PlacementBlock = (props) => {
9686
9830
  });
9687
9831
  },
9688
9832
  children: [
9689
- /* @__PURE__ */ jsx20("option", { value: "", children: "\u05D4\u05DB\u05DC" }),
9690
- uniqueValues.map((v) => /* @__PURE__ */ jsx20("option", { value: v, children: v }, v))
9833
+ /* @__PURE__ */ jsx21("option", { value: "", children: "\u05D4\u05DB\u05DC" }),
9834
+ uniqueValues.map((v) => /* @__PURE__ */ jsx21("option", { value: v, children: v }, v))
9691
9835
  ]
9692
9836
  }
9693
9837
  )
9694
9838
  ] }, col.name);
9695
9839
  }),
9696
- /* @__PURE__ */ jsxs16("div", { className: "flex-1 basis-0 min-w-0", children: [
9697
- /* @__PURE__ */ jsx20("label", { className: labelClass, children: selectorLabel }),
9698
- /* @__PURE__ */ jsxs16("select", { className: selectClass, value: selectedTargetId, onChange: (e) => setSelectedTargetId(e.target.value), children: [
9699
- /* @__PURE__ */ jsxs16("option", { value: "", children: [
9840
+ /* @__PURE__ */ jsxs17("div", { className: "flex-1 basis-0 min-w-0", children: [
9841
+ /* @__PURE__ */ jsx21("label", { className: labelClass, children: selectorLabel }),
9842
+ /* @__PURE__ */ jsxs17("select", { className: selectClass, value: selectedTargetId, onChange: (e) => setSelectedTargetId(e.target.value), children: [
9843
+ /* @__PURE__ */ jsxs17("option", { value: "", children: [
9700
9844
  "-- \u05D1\u05D7\u05E8 \u05DE\u05EA\u05D5\u05DA ",
9701
9845
  filteredTargetRows.length,
9702
9846
  " \u05EA\u05D5\u05E6\u05D0\u05D5\u05EA --"
9703
9847
  ] }),
9704
- filteredTargetRows.map((r) => /* @__PURE__ */ jsx20("option", { value: r.id, children: targetLabel(r) }, r.id))
9848
+ filteredTargetRows.map((r) => /* @__PURE__ */ jsx21("option", { value: r.id, children: targetLabel(r) }, r.id))
9705
9849
  ] })
9706
9850
  ] })
9707
9851
  ] }),
9708
- hasRelationButtons && /* @__PURE__ */ jsx20(
9852
+ hasRelationButtons && /* @__PURE__ */ jsx21(
9709
9853
  PlacementRelationButtons,
9710
9854
  {
9711
9855
  className: "mt-4 pb-24",
@@ -9718,50 +9862,50 @@ var PlacementBlock = (props) => {
9718
9862
  )
9719
9863
  ] }) })
9720
9864
  ] }),
9721
- /* @__PURE__ */ jsxs16("div", { className: "flex flex-col lg:flex-row w-full gap-4 h-[550px]", children: [
9722
- /* @__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: [
9723
- /* @__PURE__ */ jsxs16("div", { className: "bg-slate-100 p-3 border-b border-slate-200 flex flex-col gap-2", children: [
9724
- /* @__PURE__ */ jsxs16("div", { className: "flex justify-between items-center font-bold text-slate-800 text-sm", children: [
9725
- /* @__PURE__ */ jsxs16("span", { children: [
9865
+ /* @__PURE__ */ jsxs17("div", { className: "flex flex-col lg:flex-row w-full gap-4 h-[550px]", children: [
9866
+ /* @__PURE__ */ jsxs17("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: [
9867
+ /* @__PURE__ */ jsxs17("div", { className: "bg-slate-100 p-3 border-b border-slate-200 flex flex-col gap-2", children: [
9868
+ /* @__PURE__ */ jsxs17("div", { className: "flex justify-between items-center font-bold text-slate-800 text-sm", children: [
9869
+ /* @__PURE__ */ jsxs17("span", { children: [
9726
9870
  "\u05E8\u05E9\u05D9\u05DE\u05EA \u05DE\u05E7\u05D5\u05E8 (",
9727
9871
  availableGridData.length,
9728
9872
  ")"
9729
9873
  ] }),
9730
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
9731
- /* @__PURE__ */ jsx20("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" }),
9732
- /* @__PURE__ */ jsx20("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" }),
9733
- /* @__PURE__ */ jsx20("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" })
9874
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
9875
+ /* @__PURE__ */ jsx21("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" }),
9876
+ /* @__PURE__ */ jsx21("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" }),
9877
+ /* @__PURE__ */ jsx21("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" })
9734
9878
  ] })
9735
9879
  ] }),
9736
- /* @__PURE__ */ jsx20("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" })
9880
+ /* @__PURE__ */ jsx21("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" })
9737
9881
  ] }),
9738
- /* @__PURE__ */ jsx20("div", { ref: sourceContainerRef, className: "ag-theme-quartz flex-1 w-full h-full", children: /* @__PURE__ */ jsx20(AgGridReact, { rowData: availableGridData, columnDefs: sourceColDefs, defaultColDef, headerHeight: 56, getRowId, enableRtl: true, rowDragManaged: false, quickFilterText: sourceSearch, onGridReady: (e) => setSourceApi(e.api), loading: isLoading }) })
9882
+ /* @__PURE__ */ jsx21("div", { ref: sourceContainerRef, className: "ag-theme-quartz flex-1 w-full h-full", children: /* @__PURE__ */ jsx21(AgGridReact, { rowData: availableGridData, columnDefs: sourceColDefs, defaultColDef, headerHeight: 56, getRowId, enableRtl: true, rowDragManaged: false, quickFilterText: sourceSearch, onGridReady: (e) => setSourceApi(e.api), loading: isLoading }) })
9739
9883
  ] }),
9740
- /* @__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: [
9741
- /* @__PURE__ */ jsxs16("div", { className: "bg-blue-50/80 p-3 border-b border-blue-100 flex flex-col gap-2", children: [
9742
- /* @__PURE__ */ jsxs16("div", { className: "flex flex-wrap justify-between items-center gap-2", children: [
9743
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2 font-bold text-blue-900 text-sm", children: [
9744
- /* @__PURE__ */ jsxs16("span", { children: [
9884
+ /* @__PURE__ */ jsxs17("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: [
9885
+ /* @__PURE__ */ jsxs17("div", { className: "bg-blue-50/80 p-3 border-b border-blue-100 flex flex-col gap-2", children: [
9886
+ /* @__PURE__ */ jsxs17("div", { className: "flex flex-wrap justify-between items-center gap-2", children: [
9887
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2 font-bold text-blue-900 text-sm", children: [
9888
+ /* @__PURE__ */ jsxs17("span", { children: [
9745
9889
  "\u05DE\u05D5\u05E2\u05DE\u05D3\u05D9\u05DD \u05DC\u05E9\u05D9\u05D1\u05D5\u05E5 (",
9746
9890
  candidateGridData.length,
9747
9891
  ")"
9748
9892
  ] }),
9749
- /* @__PURE__ */ jsx20("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" }),
9750
- /* @__PURE__ */ jsx20("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" }),
9751
- /* @__PURE__ */ jsx20("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" })
9893
+ /* @__PURE__ */ jsx21("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" }),
9894
+ /* @__PURE__ */ jsx21("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" }),
9895
+ /* @__PURE__ */ jsx21("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" })
9752
9896
  ] }),
9753
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
9754
- /* @__PURE__ */ jsx20("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" }),
9755
- /* @__PURE__ */ jsx20("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" }),
9756
- /* @__PURE__ */ jsx20("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" })
9897
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
9898
+ /* @__PURE__ */ jsx21("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" }),
9899
+ /* @__PURE__ */ jsx21("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" }),
9900
+ /* @__PURE__ */ jsx21("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" })
9757
9901
  ] })
9758
9902
  ] }),
9759
- /* @__PURE__ */ jsx20("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" })
9903
+ /* @__PURE__ */ jsx21("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" })
9760
9904
  ] }),
9761
- /* @__PURE__ */ jsx20("div", { ref: assignedContainerRef, className: "ag-theme-quartz flex-1 w-full h-full", children: /* @__PURE__ */ jsx20(AgGridReact, { rowData: candidateGridData, columnDefs: candidateColDefs, defaultColDef, headerHeight: 56, getRowId, enableRtl: true, rowDragManaged: false, quickFilterText: candidateSearch, onGridReady: (e) => setAssignedApi(e.api), loading: isLoading }) })
9905
+ /* @__PURE__ */ jsx21("div", { ref: assignedContainerRef, className: "ag-theme-quartz flex-1 w-full h-full", children: /* @__PURE__ */ jsx21(AgGridReact, { rowData: candidateGridData, columnDefs: candidateColDefs, defaultColDef, headerHeight: 56, getRowId, enableRtl: true, rowDragManaged: false, quickFilterText: candidateSearch, onGridReady: (e) => setAssignedApi(e.api), loading: isLoading }) })
9762
9906
  ] })
9763
9907
  ] }),
9764
- filterPopover && popoverColumn && /* @__PURE__ */ jsx20(
9908
+ filterPopover && popoverColumn && /* @__PURE__ */ jsx21(
9765
9909
  RelationFilterPopover,
9766
9910
  {
9767
9911
  isOpen: true,
@@ -9777,11 +9921,11 @@ var PlacementBlock = (props) => {
9777
9921
  };
9778
9922
 
9779
9923
  // src/components/WhatsAppComponent/WhatsAppComponent.tsx
9780
- import React20 from "react";
9924
+ import React21 from "react";
9781
9925
  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";
9782
9926
 
9783
9927
  // src/components/WhatsAppComponent/CreateTemplateModal.tsx
9784
- import { useState as useState17, useEffect as useEffect15, useRef as useRef15, useMemo as useMemo10 } from "react";
9928
+ import { useState as useState18, useEffect as useEffect15, useRef as useRef15, useMemo as useMemo10 } from "react";
9785
9929
  import {
9786
9930
  X as X9,
9787
9931
  Plus,
@@ -9924,7 +10068,7 @@ function readFileAsBase64(file) {
9924
10068
  }
9925
10069
 
9926
10070
  // src/components/WhatsAppComponent/CreateTemplateModal.tsx
9927
- import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
10071
+ import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
9928
10072
  function CreateTemplateModal({
9929
10073
  isOpen,
9930
10074
  onClose,
@@ -9934,25 +10078,25 @@ function CreateTemplateModal({
9934
10078
  executeAction,
9935
10079
  orgId
9936
10080
  }) {
9937
- const [templateName, setTemplateName] = useState17("");
9938
- const [language, setLanguage] = useState17("he");
9939
- const [category, setCategory] = useState17("MARKETING");
9940
- const [bodyText, setBodyText] = useState17("");
9941
- const [variableSamples, setVariableSamples] = useState17({});
9942
- const [hasFileHeader, setHasFileHeader] = useState17(false);
9943
- const [selectedFile, setSelectedFile] = useState17(null);
9944
- const [fileBase64, setFileBase64] = useState17("");
9945
- const [buttons, setButtons] = useState17([]);
9946
- const [isAddButtonOpen, setIsAddButtonOpen] = useState17(false);
10081
+ const [templateName, setTemplateName] = useState18("");
10082
+ const [language, setLanguage] = useState18("he");
10083
+ const [category, setCategory] = useState18("MARKETING");
10084
+ const [bodyText, setBodyText] = useState18("");
10085
+ const [variableSamples, setVariableSamples] = useState18({});
10086
+ const [hasFileHeader, setHasFileHeader] = useState18(false);
10087
+ const [selectedFile, setSelectedFile] = useState18(null);
10088
+ const [fileBase64, setFileBase64] = useState18("");
10089
+ const [buttons, setButtons] = useState18([]);
10090
+ const [isAddButtonOpen, setIsAddButtonOpen] = useState18(false);
9947
10091
  const addButtonDropdownRef = useRef15(null);
9948
- const [isSubmitting, setIsSubmitting] = useState17(false);
9949
- const [submittingStep, setSubmittingStep] = useState17("");
9950
- const [submitError, setSubmitError] = useState17(null);
9951
- const [fileError, setFileError] = useState17(null);
10092
+ const [isSubmitting, setIsSubmitting] = useState18(false);
10093
+ const [submittingStep, setSubmittingStep] = useState18("");
10094
+ const [submitError, setSubmitError] = useState18(null);
10095
+ const [fileError, setFileError] = useState18(null);
9952
10096
  const textareaRef = useRef15(null);
9953
10097
  const fileInputRef = useRef15(null);
9954
10098
  const emojiPickerRef = useRef15(null);
9955
- const [isEmojiPickerOpen, setIsEmojiPickerOpen] = useState17(false);
10099
+ const [isEmojiPickerOpen, setIsEmojiPickerOpen] = useState18(false);
9956
10100
  useEffect15(() => {
9957
10101
  function handleClickOutside(event) {
9958
10102
  if (emojiPickerRef.current && !emojiPickerRef.current.contains(event.target)) {
@@ -10276,12 +10420,12 @@ function CreateTemplateModal({
10276
10420
  }
10277
10421
  };
10278
10422
  if (!isOpen) return null;
10279
- return /* @__PURE__ */ jsx21(
10423
+ return /* @__PURE__ */ jsx22(
10280
10424
  "div",
10281
10425
  {
10282
10426
  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",
10283
10427
  dir: "rtl",
10284
- children: /* @__PURE__ */ jsxs17(
10428
+ children: /* @__PURE__ */ jsxs18(
10285
10429
  "div",
10286
10430
  {
10287
10431
  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",
@@ -10289,43 +10433,43 @@ function CreateTemplateModal({
10289
10433
  "aria-modal": "true",
10290
10434
  "aria-labelledby": "modal-title",
10291
10435
  children: [
10292
- /* @__PURE__ */ jsxs17("div", { className: "px-6 py-4 border-b border-slate-100 flex items-center justify-between bg-slate-50/70", children: [
10293
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2.5", children: [
10294
- /* @__PURE__ */ jsx21("div", { className: "w-8 h-8 rounded-lg bg-emerald-100 text-emerald-700 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx21(Plus, { className: "w-4 h-4" }) }),
10295
- /* @__PURE__ */ jsxs17("div", { children: [
10296
- /* @__PURE__ */ jsx21("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" }),
10297
- /* @__PURE__ */ jsx21("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" })
10436
+ /* @__PURE__ */ jsxs18("div", { className: "px-6 py-4 border-b border-slate-100 flex items-center justify-between bg-slate-50/70", children: [
10437
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2.5", children: [
10438
+ /* @__PURE__ */ jsx22("div", { className: "w-8 h-8 rounded-lg bg-emerald-100 text-emerald-700 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx22(Plus, { className: "w-4 h-4" }) }),
10439
+ /* @__PURE__ */ jsxs18("div", { children: [
10440
+ /* @__PURE__ */ jsx22("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" }),
10441
+ /* @__PURE__ */ jsx22("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" })
10298
10442
  ] })
10299
10443
  ] }),
10300
- /* @__PURE__ */ jsx21(
10444
+ /* @__PURE__ */ jsx22(
10301
10445
  "button",
10302
10446
  {
10303
10447
  type: "button",
10304
10448
  onClick: onClose,
10305
10449
  className: "p-1.5 text-slate-400 hover:text-slate-700 hover:bg-slate-200/60 rounded-lg transition-colors cursor-pointer",
10306
10450
  "aria-label": "\u05E1\u05D2\u05D5\u05E8",
10307
- children: /* @__PURE__ */ jsx21(X9, { className: "w-5 h-5" })
10451
+ children: /* @__PURE__ */ jsx22(X9, { className: "w-5 h-5" })
10308
10452
  }
10309
10453
  )
10310
10454
  ] }),
10311
- /* @__PURE__ */ jsxs17("form", { onSubmit: handleSubmit, className: "flex flex-col overflow-hidden flex-1", children: [
10312
- /* @__PURE__ */ jsxs17("div", { className: "p-6 overflow-y-auto space-y-5 flex-1", children: [
10313
- 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: [
10314
- /* @__PURE__ */ jsx21(AlertCircle2, { className: "w-4 h-4 text-rose-600 shrink-0" }),
10315
- /* @__PURE__ */ jsx21("span", { children: submitError })
10455
+ /* @__PURE__ */ jsxs18("form", { onSubmit: handleSubmit, className: "flex flex-col overflow-hidden flex-1", children: [
10456
+ /* @__PURE__ */ jsxs18("div", { className: "p-6 overflow-y-auto space-y-5 flex-1", children: [
10457
+ submitError && /* @__PURE__ */ jsxs18("div", { className: "p-3 bg-rose-50 border border-rose-200 rounded-xl text-xs text-rose-800 flex items-center gap-2", children: [
10458
+ /* @__PURE__ */ jsx22(AlertCircle2, { className: "w-4 h-4 text-rose-600 shrink-0" }),
10459
+ /* @__PURE__ */ jsx22("span", { children: submitError })
10316
10460
  ] }),
10317
- /* @__PURE__ */ jsxs17("div", { className: "space-y-1.5", children: [
10318
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between", children: [
10319
- /* @__PURE__ */ jsxs17("label", { className: "block text-xs font-bold text-slate-800", children: [
10461
+ /* @__PURE__ */ jsxs18("div", { className: "space-y-1.5", children: [
10462
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between", children: [
10463
+ /* @__PURE__ */ jsxs18("label", { className: "block text-xs font-bold text-slate-800", children: [
10320
10464
  "\u05E9\u05DD \u05EA\u05D1\u05E0\u05D9\u05EA \u05D7\u05D3\u05E9\u05D4 ",
10321
- /* @__PURE__ */ jsx21("span", { className: "text-rose-500", children: "*" })
10465
+ /* @__PURE__ */ jsx22("span", { className: "text-rose-500", children: "*" })
10322
10466
  ] }),
10323
- templateName && isNamePatternValid && !isNameDuplicate && /* @__PURE__ */ jsxs17("span", { className: "text-[11px] text-emerald-600 font-semibold flex items-center gap-1", children: [
10324
- /* @__PURE__ */ jsx21(CheckCircle22, { className: "w-3.5 h-3.5" }),
10467
+ templateName && isNamePatternValid && !isNameDuplicate && /* @__PURE__ */ jsxs18("span", { className: "text-[11px] text-emerald-600 font-semibold flex items-center gap-1", children: [
10468
+ /* @__PURE__ */ jsx22(CheckCircle22, { className: "w-3.5 h-3.5" }),
10325
10469
  " \u05E9\u05DD \u05EA\u05E7\u05D9\u05DF"
10326
10470
  ] })
10327
10471
  ] }),
10328
- /* @__PURE__ */ jsx21(
10472
+ /* @__PURE__ */ jsx22(
10329
10473
  "input",
10330
10474
  {
10331
10475
  type: "text",
@@ -10337,47 +10481,47 @@ function CreateTemplateModal({
10337
10481
  required: true
10338
10482
  }
10339
10483
  ),
10340
- /* @__PURE__ */ jsx21("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." }),
10341
- !isNameEmpty && isNameDuplicate && /* @__PURE__ */ jsxs17("p", { className: "text-[11px] text-rose-600 font-semibold flex items-center gap-1 mt-1", children: [
10342
- /* @__PURE__ */ jsx21(AlertCircle2, { className: "w-3.5 h-3.5 shrink-0" }),
10484
+ /* @__PURE__ */ jsx22("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." }),
10485
+ !isNameEmpty && isNameDuplicate && /* @__PURE__ */ jsxs18("p", { className: "text-[11px] text-rose-600 font-semibold flex items-center gap-1 mt-1", children: [
10486
+ /* @__PURE__ */ jsx22(AlertCircle2, { className: "w-3.5 h-3.5 shrink-0" }),
10343
10487
  "\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 (",
10344
10488
  language,
10345
10489
  "). \u05D0\u05E0\u05D0 \u05D1\u05D7\u05E8 \u05E9\u05DD \u05D9\u05D9\u05D7\u05D5\u05D3\u05D9 \u05D0\u05D5 \u05E9\u05E4\u05D4 \u05D0\u05D7\u05E8\u05EA."
10346
10490
  ] })
10347
10491
  ] }),
10348
- /* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-2 gap-4", children: [
10349
- /* @__PURE__ */ jsxs17("div", { className: "space-y-1.5", children: [
10350
- /* @__PURE__ */ jsx21("label", { className: "block text-xs font-semibold text-slate-700", children: "\u05E9\u05E4\u05D4" }),
10351
- /* @__PURE__ */ jsx21(
10492
+ /* @__PURE__ */ jsxs18("div", { className: "grid grid-cols-2 gap-4", children: [
10493
+ /* @__PURE__ */ jsxs18("div", { className: "space-y-1.5", children: [
10494
+ /* @__PURE__ */ jsx22("label", { className: "block text-xs font-semibold text-slate-700", children: "\u05E9\u05E4\u05D4" }),
10495
+ /* @__PURE__ */ jsx22(
10352
10496
  "select",
10353
10497
  {
10354
10498
  value: language,
10355
10499
  onChange: (e) => setLanguage(e.target.value),
10356
10500
  className: "w-full px-3 py-2 text-xs bg-slate-50 border border-slate-200 rounded-xl text-slate-800 outline-hidden",
10357
- children: LANGUAGE_OPTIONS.map((opt) => /* @__PURE__ */ jsx21("option", { value: opt.value, children: opt.label }, opt.value))
10501
+ children: LANGUAGE_OPTIONS.map((opt) => /* @__PURE__ */ jsx22("option", { value: opt.value, children: opt.label }, opt.value))
10358
10502
  }
10359
10503
  )
10360
10504
  ] }),
10361
- /* @__PURE__ */ jsxs17("div", { className: "space-y-1.5", children: [
10362
- /* @__PURE__ */ jsx21("label", { className: "block text-xs font-semibold text-slate-700", children: "\u05E7\u05D8\u05D2\u05D5\u05E8\u05D9\u05D4" }),
10363
- /* @__PURE__ */ jsx21(
10505
+ /* @__PURE__ */ jsxs18("div", { className: "space-y-1.5", children: [
10506
+ /* @__PURE__ */ jsx22("label", { className: "block text-xs font-semibold text-slate-700", children: "\u05E7\u05D8\u05D2\u05D5\u05E8\u05D9\u05D4" }),
10507
+ /* @__PURE__ */ jsx22(
10364
10508
  "select",
10365
10509
  {
10366
10510
  value: category,
10367
10511
  onChange: (e) => setCategory(e.target.value),
10368
10512
  className: "w-full px-3 py-2 text-xs bg-slate-50 border border-slate-200 rounded-xl text-slate-800 outline-hidden",
10369
- children: CATEGORY_OPTIONS.map((opt) => /* @__PURE__ */ jsx21("option", { value: opt.value, children: opt.label }, opt.value))
10513
+ children: CATEGORY_OPTIONS.map((opt) => /* @__PURE__ */ jsx22("option", { value: opt.value, children: opt.label }, opt.value))
10370
10514
  }
10371
10515
  )
10372
10516
  ] })
10373
10517
  ] }),
10374
- /* @__PURE__ */ jsxs17("div", { className: "space-y-2", children: [
10375
- /* @__PURE__ */ jsxs17("label", { className: "block text-xs font-bold text-slate-800", children: [
10518
+ /* @__PURE__ */ jsxs18("div", { className: "space-y-2", children: [
10519
+ /* @__PURE__ */ jsxs18("label", { className: "block text-xs font-bold text-slate-800", children: [
10376
10520
  "\u05EA\u05D5\u05DB\u05DF \u05D2\u05D5\u05E3 \u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 ",
10377
- /* @__PURE__ */ jsx21("span", { className: "text-rose-500", children: "*" })
10521
+ /* @__PURE__ */ jsx22("span", { className: "text-rose-500", children: "*" })
10378
10522
  ] }),
10379
- /* @__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: [
10380
- /* @__PURE__ */ jsx21(
10523
+ /* @__PURE__ */ jsxs18("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: [
10524
+ /* @__PURE__ */ jsx22(
10381
10525
  "textarea",
10382
10526
  {
10383
10527
  ref: textareaRef,
@@ -10392,14 +10536,14 @@ function CreateTemplateModal({
10392
10536
  required: true
10393
10537
  }
10394
10538
  ),
10395
- /* @__PURE__ */ jsxs17(
10539
+ /* @__PURE__ */ jsxs18(
10396
10540
  "div",
10397
10541
  {
10398
10542
  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",
10399
10543
  dir: language === "en_US" ? "ltr" : "rtl",
10400
10544
  children: [
10401
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-1", children: [
10402
- /* @__PURE__ */ jsx21(
10545
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1", children: [
10546
+ /* @__PURE__ */ jsx22(
10403
10547
  "button",
10404
10548
  {
10405
10549
  type: "button",
@@ -10407,10 +10551,10 @@ function CreateTemplateModal({
10407
10551
  onClick: () => handleApplyFormatting("*"),
10408
10552
  title: "\u05DE\u05D5\u05D3\u05D2\u05E9 (Bold) *\u05D8\u05E7\u05E1\u05D8*",
10409
10553
  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",
10410
- children: /* @__PURE__ */ jsx21(Bold, { className: "w-3.5 h-3.5" })
10554
+ children: /* @__PURE__ */ jsx22(Bold, { className: "w-3.5 h-3.5" })
10411
10555
  }
10412
10556
  ),
10413
- /* @__PURE__ */ jsx21(
10557
+ /* @__PURE__ */ jsx22(
10414
10558
  "button",
10415
10559
  {
10416
10560
  type: "button",
@@ -10418,10 +10562,10 @@ function CreateTemplateModal({
10418
10562
  onClick: () => handleApplyFormatting("_"),
10419
10563
  title: "\u05E0\u05D8\u05D5\u05D9 (Italic) _\u05D8\u05E7\u05E1\u05D8_",
10420
10564
  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",
10421
- children: /* @__PURE__ */ jsx21(Italic, { className: "w-3.5 h-3.5" })
10565
+ children: /* @__PURE__ */ jsx22(Italic, { className: "w-3.5 h-3.5" })
10422
10566
  }
10423
10567
  ),
10424
- /* @__PURE__ */ jsx21(
10568
+ /* @__PURE__ */ jsx22(
10425
10569
  "button",
10426
10570
  {
10427
10571
  type: "button",
@@ -10429,12 +10573,12 @@ function CreateTemplateModal({
10429
10573
  onClick: () => handleApplyFormatting("~"),
10430
10574
  title: "\u05E7\u05D5 \u05D7\u05D5\u05E6\u05D4 (Strikethrough) ~\u05D8\u05E7\u05E1\u05D8~",
10431
10575
  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",
10432
- children: /* @__PURE__ */ jsx21(Strikethrough, { className: "w-3.5 h-3.5" })
10576
+ children: /* @__PURE__ */ jsx22(Strikethrough, { className: "w-3.5 h-3.5" })
10433
10577
  }
10434
10578
  ),
10435
- /* @__PURE__ */ jsx21("div", { className: "h-4 w-px bg-slate-200 mx-1" }),
10436
- /* @__PURE__ */ jsxs17("div", { className: "relative inline-block", ref: emojiPickerRef, children: [
10437
- /* @__PURE__ */ jsx21(
10579
+ /* @__PURE__ */ jsx22("div", { className: "h-4 w-px bg-slate-200 mx-1" }),
10580
+ /* @__PURE__ */ jsxs18("div", { className: "relative inline-block", ref: emojiPickerRef, children: [
10581
+ /* @__PURE__ */ jsx22(
10438
10582
  "button",
10439
10583
  {
10440
10584
  type: "button",
@@ -10442,16 +10586,16 @@ function CreateTemplateModal({
10442
10586
  onClick: () => setIsEmojiPickerOpen(!isEmojiPickerOpen),
10443
10587
  title: "\u05D4\u05D5\u05E1\u05E3 \u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9 (Emoji)",
10444
10588
  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"}`,
10445
- children: /* @__PURE__ */ jsx21(Smile, { className: "w-4 h-4" })
10589
+ children: /* @__PURE__ */ jsx22(Smile, { className: "w-4 h-4" })
10446
10590
  }
10447
10591
  ),
10448
- isEmojiPickerOpen && /* @__PURE__ */ jsx21(
10592
+ isEmojiPickerOpen && /* @__PURE__ */ jsx22(
10449
10593
  "div",
10450
10594
  {
10451
10595
  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`,
10452
10596
  dir: "ltr",
10453
10597
  onMouseDown: (e) => e.stopPropagation(),
10454
- children: /* @__PURE__ */ jsx21(
10598
+ children: /* @__PURE__ */ jsx22(
10455
10599
  EmojiPicker,
10456
10600
  {
10457
10601
  onEmojiClick: (emojiData) => {
@@ -10468,8 +10612,8 @@ function CreateTemplateModal({
10468
10612
  }
10469
10613
  )
10470
10614
  ] }),
10471
- /* @__PURE__ */ jsx21("div", { className: "h-4 w-px bg-slate-200 mx-1" }),
10472
- /* @__PURE__ */ jsxs17(
10615
+ /* @__PURE__ */ jsx22("div", { className: "h-4 w-px bg-slate-200 mx-1" }),
10616
+ /* @__PURE__ */ jsxs18(
10473
10617
  "button",
10474
10618
  {
10475
10619
  type: "button",
@@ -10479,28 +10623,28 @@ function CreateTemplateModal({
10479
10623
  "aria-label": language === "en_US" ? "Add variable" : "\u05DE\u05E9\u05EA\u05E0\u05D4",
10480
10624
  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",
10481
10625
  children: [
10482
- /* @__PURE__ */ jsx21(Plus, { className: "w-3.5 h-3.5" }),
10483
- /* @__PURE__ */ jsx21("span", { children: language === "en_US" ? "Add variable" : "\u05DE\u05E9\u05EA\u05E0\u05D4" })
10626
+ /* @__PURE__ */ jsx22(Plus, { className: "w-3.5 h-3.5" }),
10627
+ /* @__PURE__ */ jsx22("span", { children: language === "en_US" ? "Add variable" : "\u05DE\u05E9\u05EA\u05E0\u05D4" })
10484
10628
  ]
10485
10629
  }
10486
10630
  )
10487
10631
  ] }),
10488
- /* @__PURE__ */ jsxs17(
10632
+ /* @__PURE__ */ jsxs18(
10489
10633
  "div",
10490
10634
  {
10491
10635
  className: "flex items-center gap-1 font-mono text-[11px]",
10492
10636
  dir: "ltr",
10493
10637
  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)",
10494
10638
  children: [
10495
- /* @__PURE__ */ jsx21(
10639
+ /* @__PURE__ */ jsx22(
10496
10640
  "span",
10497
10641
  {
10498
10642
  className: `font-semibold transition-colors ${bodyText.length >= 1024 ? "text-rose-600" : bodyText.length >= 950 ? "text-amber-600" : "text-slate-500"}`,
10499
10643
  children: bodyText.length
10500
10644
  }
10501
10645
  ),
10502
- /* @__PURE__ */ jsx21("span", { className: "text-slate-300", children: "/" }),
10503
- /* @__PURE__ */ jsx21("span", { className: "text-slate-400", children: "1024" })
10646
+ /* @__PURE__ */ jsx22("span", { className: "text-slate-300", children: "/" }),
10647
+ /* @__PURE__ */ jsx22("span", { className: "text-slate-400", children: "1024" })
10504
10648
  ]
10505
10649
  }
10506
10650
  )
@@ -10508,30 +10652,30 @@ function CreateTemplateModal({
10508
10652
  }
10509
10653
  )
10510
10654
  ] }),
10511
- /* @__PURE__ */ jsx21("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: [
10512
- /* @__PURE__ */ jsxs17("span", { children: [
10655
+ /* @__PURE__ */ jsx22("div", { className: "flex flex-wrap items-center justify-between text-[11px] text-slate-400 px-1 gap-2", children: /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-3", children: [
10656
+ /* @__PURE__ */ jsxs18("span", { children: [
10513
10657
  ratioInfo.staticWordsCount,
10514
10658
  " \u05DE\u05D9\u05DC\u05D9\u05DD"
10515
10659
  ] }),
10516
- /* @__PURE__ */ jsxs17("span", { children: [
10660
+ /* @__PURE__ */ jsxs18("span", { children: [
10517
10661
  ratioInfo.variableCount,
10518
10662
  " \u05DE\u05E9\u05EA\u05E0\u05D9\u05DD"
10519
10663
  ] })
10520
10664
  ] }) }),
10521
- uniqueVariables.length > 0 && /* @__PURE__ */ jsxs17("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3", children: [
10522
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-1.5 text-xs font-bold text-slate-800", children: [
10523
- /* @__PURE__ */ jsx21(Info2, { className: "w-4 h-4 text-emerald-600" }),
10524
- /* @__PURE__ */ jsx21("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)" })
10665
+ uniqueVariables.length > 0 && /* @__PURE__ */ jsxs18("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3", children: [
10666
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1.5 text-xs font-bold text-slate-800", children: [
10667
+ /* @__PURE__ */ jsx22(Info2, { className: "w-4 h-4 text-emerald-600" }),
10668
+ /* @__PURE__ */ jsx22("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)" })
10525
10669
  ] }),
10526
- /* @__PURE__ */ jsx21("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." }),
10527
- /* @__PURE__ */ jsx21("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: [
10528
- /* @__PURE__ */ jsxs17("label", { className: "block text-[11px] font-semibold text-slate-700 font-mono", children: [
10670
+ /* @__PURE__ */ jsx22("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." }),
10671
+ /* @__PURE__ */ jsx22("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 pt-1", children: uniqueVariables.map((idx) => /* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
10672
+ /* @__PURE__ */ jsxs18("label", { className: "block text-[11px] font-semibold text-slate-700 font-mono", children: [
10529
10673
  "\u05D3\u05D5\u05D2\u05DE\u05D4 \u05E2\u05D1\u05D5\u05E8 ",
10530
10674
  `{{${idx}}}`,
10531
10675
  " ",
10532
- /* @__PURE__ */ jsx21("span", { className: "text-rose-500", children: "*" })
10676
+ /* @__PURE__ */ jsx22("span", { className: "text-rose-500", children: "*" })
10533
10677
  ] }),
10534
- /* @__PURE__ */ jsx21(
10678
+ /* @__PURE__ */ jsx22(
10535
10679
  "input",
10536
10680
  {
10537
10681
  type: "text",
@@ -10546,21 +10690,21 @@ function CreateTemplateModal({
10546
10690
  )
10547
10691
  ] }, idx)) })
10548
10692
  ] }),
10549
- 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: [
10550
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-1.5 font-bold", children: [
10551
- /* @__PURE__ */ jsx21(AlertCircle2, { className: "w-4 h-4 text-amber-600 shrink-0" }),
10552
- /* @__PURE__ */ jsx21("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:" })
10693
+ bodyText.trim().length > 0 && validationResult.errors.length > 0 && /* @__PURE__ */ jsxs18("div", { className: "p-3.5 bg-amber-50 border border-amber-200 rounded-xl space-y-1.5 text-xs text-amber-900", children: [
10694
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1.5 font-bold", children: [
10695
+ /* @__PURE__ */ jsx22(AlertCircle2, { className: "w-4 h-4 text-amber-600 shrink-0" }),
10696
+ /* @__PURE__ */ jsx22("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:" })
10553
10697
  ] }),
10554
- /* @__PURE__ */ jsx21("ul", { className: "list-disc list-inside space-y-1 text-[11px] pr-2 leading-relaxed", children: validationResult.errors.map((err, i) => /* @__PURE__ */ jsx21("li", { children: err }, i)) })
10698
+ /* @__PURE__ */ jsx22("ul", { className: "list-disc list-inside space-y-1 text-[11px] pr-2 leading-relaxed", children: validationResult.errors.map((err, i) => /* @__PURE__ */ jsx22("li", { children: err }, i)) })
10555
10699
  ] })
10556
10700
  ] }),
10557
- /* @__PURE__ */ jsxs17("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3", children: [
10558
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between", children: [
10559
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
10560
- /* @__PURE__ */ jsx21(Paperclip, { className: "w-4 h-4 text-slate-600" }),
10561
- /* @__PURE__ */ jsx21("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)" })
10701
+ /* @__PURE__ */ jsxs18("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3", children: [
10702
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between", children: [
10703
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
10704
+ /* @__PURE__ */ jsx22(Paperclip, { className: "w-4 h-4 text-slate-600" }),
10705
+ /* @__PURE__ */ jsx22("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)" })
10562
10706
  ] }),
10563
- /* @__PURE__ */ jsx21(
10707
+ /* @__PURE__ */ jsx22(
10564
10708
  "input",
10565
10709
  {
10566
10710
  type: "checkbox",
@@ -10576,12 +10720,12 @@ function CreateTemplateModal({
10576
10720
  }
10577
10721
  )
10578
10722
  ] }),
10579
- hasFileHeader && /* @__PURE__ */ jsxs17("div", { className: "space-y-3 pt-1", children: [
10580
- 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: [
10581
- /* @__PURE__ */ jsx21(AlertCircle2, { className: "w-4 h-4 text-rose-600 shrink-0" }),
10582
- /* @__PURE__ */ jsx21("span", { children: fileError })
10723
+ hasFileHeader && /* @__PURE__ */ jsxs18("div", { className: "space-y-3 pt-1", children: [
10724
+ fileError && /* @__PURE__ */ jsxs18("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: [
10725
+ /* @__PURE__ */ jsx22(AlertCircle2, { className: "w-4 h-4 text-rose-600 shrink-0" }),
10726
+ /* @__PURE__ */ jsx22("span", { children: fileError })
10583
10727
  ] }),
10584
- /* @__PURE__ */ jsx21(
10728
+ /* @__PURE__ */ jsx22(
10585
10729
  "input",
10586
10730
  {
10587
10731
  ref: fileInputRef,
@@ -10591,7 +10735,7 @@ function CreateTemplateModal({
10591
10735
  className: "hidden"
10592
10736
  }
10593
10737
  ),
10594
- !selectedFile && /* @__PURE__ */ jsxs17(
10738
+ !selectedFile && /* @__PURE__ */ jsxs18(
10595
10739
  "button",
10596
10740
  {
10597
10741
  type: "button",
@@ -10601,49 +10745,49 @@ function CreateTemplateModal({
10601
10745
  },
10602
10746
  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",
10603
10747
  children: [
10604
- /* @__PURE__ */ jsx21("div", { className: "w-9 h-9 rounded-full bg-slate-100 text-slate-500 flex items-center justify-center", children: /* @__PURE__ */ jsx21(Upload2, { className: "w-4 h-4" }) }),
10605
- /* @__PURE__ */ jsxs17("div", { className: "text-center", children: [
10606
- /* @__PURE__ */ jsx21("span", { className: "text-xs font-bold text-emerald-700 block", children: "\u05DC\u05D7\u05E5 \u05DC\u05D1\u05D7\u05D9\u05E8\u05EA \u05E7\u05D5\u05D1\u05E5" }),
10607
- /* @__PURE__ */ jsx21("span", { className: "text-[10px] text-slate-400", children: "PDF, JPG, PNG, MP4 \u05E2\u05D3 5MB" })
10748
+ /* @__PURE__ */ jsx22("div", { className: "w-9 h-9 rounded-full bg-slate-100 text-slate-500 flex items-center justify-center", children: /* @__PURE__ */ jsx22(Upload2, { className: "w-4 h-4" }) }),
10749
+ /* @__PURE__ */ jsxs18("div", { className: "text-center", children: [
10750
+ /* @__PURE__ */ jsx22("span", { className: "text-xs font-bold text-emerald-700 block", children: "\u05DC\u05D7\u05E5 \u05DC\u05D1\u05D7\u05D9\u05E8\u05EA \u05E7\u05D5\u05D1\u05E5" }),
10751
+ /* @__PURE__ */ jsx22("span", { className: "text-[10px] text-slate-400", children: "PDF, JPG, PNG, MP4 \u05E2\u05D3 5MB" })
10608
10752
  ] })
10609
10753
  ]
10610
10754
  }
10611
10755
  ),
10612
- 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: [
10613
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2.5 overflow-hidden", children: [
10614
- /* @__PURE__ */ jsx21("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__ */ jsx21(FileText2, { className: "w-4 h-4" }) : selectedFile.type.includes("video") || selectedFile.name.toLowerCase().match(/\.(mp4|mov|avi|webm)$/) ? /* @__PURE__ */ jsx21(Video, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx21(ImageIcon, { className: "w-4 h-4" }) }),
10615
- /* @__PURE__ */ jsxs17("div", { className: "overflow-hidden", children: [
10616
- /* @__PURE__ */ jsx21("p", { className: "text-xs font-bold text-slate-800 truncate", title: selectedFile.name, children: /* @__PURE__ */ jsx21("span", { dir: "ltr", className: "inline-block truncate max-w-full", children: selectedFile.name }) }),
10617
- /* @__PURE__ */ jsx21("p", { className: "text-[10px] text-slate-400", children: /* @__PURE__ */ jsxs17("span", { dir: "ltr", className: "inline-block", children: [
10756
+ selectedFile && /* @__PURE__ */ jsxs18("div", { className: "p-3 bg-white border border-emerald-200 rounded-xl flex items-center justify-between gap-3 shadow-2xs", children: [
10757
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2.5 overflow-hidden", children: [
10758
+ /* @__PURE__ */ jsx22("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__ */ jsx22(FileText2, { className: "w-4 h-4" }) : selectedFile.type.includes("video") || selectedFile.name.toLowerCase().match(/\.(mp4|mov|avi|webm)$/) ? /* @__PURE__ */ jsx22(Video, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx22(ImageIcon, { className: "w-4 h-4" }) }),
10759
+ /* @__PURE__ */ jsxs18("div", { className: "overflow-hidden", children: [
10760
+ /* @__PURE__ */ jsx22("p", { className: "text-xs font-bold text-slate-800 truncate", title: selectedFile.name, children: /* @__PURE__ */ jsx22("span", { dir: "ltr", className: "inline-block truncate max-w-full", children: selectedFile.name }) }),
10761
+ /* @__PURE__ */ jsx22("p", { className: "text-[10px] text-slate-400", children: /* @__PURE__ */ jsxs18("span", { dir: "ltr", className: "inline-block", children: [
10618
10762
  formatFileSize(selectedFile.size),
10619
10763
  selectedFile.type ? ` \u2022 ${selectedFile.type}` : ""
10620
10764
  ] }) })
10621
10765
  ] })
10622
10766
  ] }),
10623
- /* @__PURE__ */ jsx21(
10767
+ /* @__PURE__ */ jsx22(
10624
10768
  "button",
10625
10769
  {
10626
10770
  type: "button",
10627
10771
  onClick: handleRemoveFile,
10628
10772
  className: "p-1 text-slate-400 hover:text-rose-600 rounded-md transition-colors cursor-pointer",
10629
10773
  title: "\u05D4\u05E1\u05E8 \u05E7\u05D5\u05D1\u05E5",
10630
- children: /* @__PURE__ */ jsx21(Trash22, { className: "w-4 h-4" })
10774
+ children: /* @__PURE__ */ jsx22(Trash22, { className: "w-4 h-4" })
10631
10775
  }
10632
10776
  )
10633
10777
  ] })
10634
10778
  ] })
10635
10779
  ] }),
10636
- /* @__PURE__ */ jsxs17("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3.5", children: [
10637
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between", children: [
10638
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
10639
- /* @__PURE__ */ jsx21(MousePointerClick, { className: "w-4 h-4 text-slate-600" }),
10640
- /* @__PURE__ */ jsxs17("div", { children: [
10641
- /* @__PURE__ */ jsx21("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)" }),
10642
- /* @__PURE__ */ jsx21("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)" })
10780
+ /* @__PURE__ */ jsxs18("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3.5", children: [
10781
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between", children: [
10782
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
10783
+ /* @__PURE__ */ jsx22(MousePointerClick, { className: "w-4 h-4 text-slate-600" }),
10784
+ /* @__PURE__ */ jsxs18("div", { children: [
10785
+ /* @__PURE__ */ jsx22("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)" }),
10786
+ /* @__PURE__ */ jsx22("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)" })
10643
10787
  ] })
10644
10788
  ] }),
10645
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
10646
- /* @__PURE__ */ jsxs17(
10789
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
10790
+ /* @__PURE__ */ jsxs18(
10647
10791
  "span",
10648
10792
  {
10649
10793
  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"}`,
@@ -10653,8 +10797,8 @@ function CreateTemplateModal({
10653
10797
  ]
10654
10798
  }
10655
10799
  ),
10656
- /* @__PURE__ */ jsxs17("div", { className: "relative", ref: addButtonDropdownRef, children: [
10657
- /* @__PURE__ */ jsxs17(
10800
+ /* @__PURE__ */ jsxs18("div", { className: "relative", ref: addButtonDropdownRef, children: [
10801
+ /* @__PURE__ */ jsxs18(
10658
10802
  "button",
10659
10803
  {
10660
10804
  type: "button",
@@ -10663,9 +10807,9 @@ function CreateTemplateModal({
10663
10807
  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"}`,
10664
10808
  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",
10665
10809
  children: [
10666
- /* @__PURE__ */ jsx21(Plus, { className: "w-3.5 h-3.5" }),
10667
- /* @__PURE__ */ jsx21("span", { children: "\u05D4\u05D5\u05E1\u05E3 \u05DB\u05E4\u05EA\u05D5\u05E8" }),
10668
- /* @__PURE__ */ jsx21(
10810
+ /* @__PURE__ */ jsx22(Plus, { className: "w-3.5 h-3.5" }),
10811
+ /* @__PURE__ */ jsx22("span", { children: "\u05D4\u05D5\u05E1\u05E3 \u05DB\u05E4\u05EA\u05D5\u05E8" }),
10812
+ /* @__PURE__ */ jsx22(
10669
10813
  ChevronDown3,
10670
10814
  {
10671
10815
  className: `w-3.5 h-3.5 transition-transform ${isAddButtonOpen ? "rotate-180" : ""}`
@@ -10674,63 +10818,63 @@ function CreateTemplateModal({
10674
10818
  ]
10675
10819
  }
10676
10820
  ),
10677
- 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: [
10678
- /* @__PURE__ */ jsxs17(
10821
+ isAddButtonOpen && /* @__PURE__ */ jsxs18("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: [
10822
+ /* @__PURE__ */ jsxs18(
10679
10823
  "button",
10680
10824
  {
10681
10825
  type: "button",
10682
10826
  onClick: () => handleAddButton("QUICK_REPLY"),
10683
10827
  className: "w-full p-2 text-right rounded-lg hover:bg-slate-50 flex items-start gap-2.5 transition-colors cursor-pointer group",
10684
10828
  children: [
10685
- /* @__PURE__ */ jsx21("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__ */ jsx21(MessageSquare, { className: "w-3.5 h-3.5" }) }),
10686
- /* @__PURE__ */ jsxs17("div", { children: [
10687
- /* @__PURE__ */ jsx21("p", { className: "text-xs font-semibold text-slate-800", children: "Custom (\u05EA\u05D2\u05D5\u05D1\u05D4 \u05DE\u05D4\u05D9\u05E8\u05D4)" }),
10688
- /* @__PURE__ */ jsx21("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" })
10829
+ /* @__PURE__ */ jsx22("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__ */ jsx22(MessageSquare, { className: "w-3.5 h-3.5" }) }),
10830
+ /* @__PURE__ */ jsxs18("div", { children: [
10831
+ /* @__PURE__ */ jsx22("p", { className: "text-xs font-semibold text-slate-800", children: "Custom (\u05EA\u05D2\u05D5\u05D1\u05D4 \u05DE\u05D4\u05D9\u05E8\u05D4)" }),
10832
+ /* @__PURE__ */ jsx22("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" })
10689
10833
  ] })
10690
10834
  ]
10691
10835
  }
10692
10836
  ),
10693
- /* @__PURE__ */ jsxs17(
10837
+ /* @__PURE__ */ jsxs18(
10694
10838
  "button",
10695
10839
  {
10696
10840
  type: "button",
10697
10841
  onClick: () => handleAddButton("URL"),
10698
10842
  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",
10699
10843
  children: [
10700
- /* @__PURE__ */ jsx21("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__ */ jsx21(ExternalLink3, { className: "w-3.5 h-3.5" }) }),
10701
- /* @__PURE__ */ jsxs17("div", { children: [
10702
- /* @__PURE__ */ jsx21("p", { className: "text-xs font-semibold text-slate-800", children: "Visit website (\u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC\u05D0\u05EA\u05E8)" }),
10703
- /* @__PURE__ */ jsx21("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" })
10844
+ /* @__PURE__ */ jsx22("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__ */ jsx22(ExternalLink3, { className: "w-3.5 h-3.5" }) }),
10845
+ /* @__PURE__ */ jsxs18("div", { children: [
10846
+ /* @__PURE__ */ jsx22("p", { className: "text-xs font-semibold text-slate-800", children: "Visit website (\u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC\u05D0\u05EA\u05E8)" }),
10847
+ /* @__PURE__ */ jsx22("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" })
10704
10848
  ] })
10705
10849
  ]
10706
10850
  }
10707
10851
  ),
10708
- /* @__PURE__ */ jsxs17(
10852
+ /* @__PURE__ */ jsxs18(
10709
10853
  "button",
10710
10854
  {
10711
10855
  type: "button",
10712
10856
  onClick: () => handleAddButton("PHONE_NUMBER"),
10713
10857
  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",
10714
10858
  children: [
10715
- /* @__PURE__ */ jsx21("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__ */ jsx21(Phone, { className: "w-3.5 h-3.5" }) }),
10716
- /* @__PURE__ */ jsxs17("div", { children: [
10717
- /* @__PURE__ */ jsx21("p", { className: "text-xs font-semibold text-slate-800", children: "Call phone number (\u05D7\u05D9\u05D5\u05D2 \u05DC\u05DE\u05E1\u05E4\u05E8)" }),
10718
- /* @__PURE__ */ jsx21("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" })
10859
+ /* @__PURE__ */ jsx22("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__ */ jsx22(Phone, { className: "w-3.5 h-3.5" }) }),
10860
+ /* @__PURE__ */ jsxs18("div", { children: [
10861
+ /* @__PURE__ */ jsx22("p", { className: "text-xs font-semibold text-slate-800", children: "Call phone number (\u05D7\u05D9\u05D5\u05D2 \u05DC\u05DE\u05E1\u05E4\u05E8)" }),
10862
+ /* @__PURE__ */ jsx22("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" })
10719
10863
  ] })
10720
10864
  ]
10721
10865
  }
10722
10866
  ),
10723
- /* @__PURE__ */ jsxs17(
10867
+ /* @__PURE__ */ jsxs18(
10724
10868
  "button",
10725
10869
  {
10726
10870
  type: "button",
10727
10871
  onClick: () => handleAddButton("COPY_CODE"),
10728
10872
  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",
10729
10873
  children: [
10730
- /* @__PURE__ */ jsx21("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__ */ jsx21(Copy3, { className: "w-3.5 h-3.5" }) }),
10731
- /* @__PURE__ */ jsxs17("div", { children: [
10732
- /* @__PURE__ */ jsx21("p", { className: "text-xs font-semibold text-slate-800", children: "Copy offer code (\u05D4\u05E2\u05EA\u05E7\u05EA \u05E7\u05D5\u05D3)" }),
10733
- /* @__PURE__ */ jsx21("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" })
10874
+ /* @__PURE__ */ jsx22("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__ */ jsx22(Copy3, { className: "w-3.5 h-3.5" }) }),
10875
+ /* @__PURE__ */ jsxs18("div", { children: [
10876
+ /* @__PURE__ */ jsx22("p", { className: "text-xs font-semibold text-slate-800", children: "Copy offer code (\u05D4\u05E2\u05EA\u05E7\u05EA \u05E7\u05D5\u05D3)" }),
10877
+ /* @__PURE__ */ jsx22("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" })
10734
10878
  ] })
10735
10879
  ]
10736
10880
  }
@@ -10739,55 +10883,55 @@ function CreateTemplateModal({
10739
10883
  ] })
10740
10884
  ] })
10741
10885
  ] }),
10742
- buttons.length === 0 && /* @__PURE__ */ jsx21("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.' }),
10743
- buttons.length > 0 && /* @__PURE__ */ jsx21("div", { className: "space-y-2.5", children: buttons.map((btn, index) => {
10886
+ buttons.length === 0 && /* @__PURE__ */ jsx22("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.' }),
10887
+ buttons.length > 0 && /* @__PURE__ */ jsx22("div", { className: "space-y-2.5", children: buttons.map((btn, index) => {
10744
10888
  const btnNum = index + 1;
10745
- return /* @__PURE__ */ jsxs17(
10889
+ return /* @__PURE__ */ jsxs18(
10746
10890
  "div",
10747
10891
  {
10748
10892
  className: "p-3 bg-white border border-slate-200 rounded-xl space-y-2.5 shadow-2xs transition-all hover:border-slate-300",
10749
10893
  children: [
10750
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between", children: [
10751
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
10752
- /* @__PURE__ */ jsxs17("span", { className: "text-[11px] font-bold text-slate-400 font-mono", children: [
10894
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between", children: [
10895
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
10896
+ /* @__PURE__ */ jsxs18("span", { className: "text-[11px] font-bold text-slate-400 font-mono", children: [
10753
10897
  "#",
10754
10898
  btnNum
10755
10899
  ] }),
10756
- 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: [
10757
- /* @__PURE__ */ jsx21(MessageSquare, { className: "w-3 h-3" }),
10758
- /* @__PURE__ */ jsx21("span", { children: "Custom (\u05EA\u05D2\u05D5\u05D1\u05D4 \u05DE\u05D4\u05D9\u05E8\u05D4)" })
10900
+ btn.type === "QUICK_REPLY" && /* @__PURE__ */ jsxs18("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: [
10901
+ /* @__PURE__ */ jsx22(MessageSquare, { className: "w-3 h-3" }),
10902
+ /* @__PURE__ */ jsx22("span", { children: "Custom (\u05EA\u05D2\u05D5\u05D1\u05D4 \u05DE\u05D4\u05D9\u05E8\u05D4)" })
10759
10903
  ] }),
10760
- 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: [
10761
- /* @__PURE__ */ jsx21(ExternalLink3, { className: "w-3 h-3" }),
10762
- /* @__PURE__ */ jsx21("span", { children: "Visit website (\u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC\u05D0\u05EA\u05E8)" })
10904
+ btn.type === "URL" && /* @__PURE__ */ jsxs18("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: [
10905
+ /* @__PURE__ */ jsx22(ExternalLink3, { className: "w-3 h-3" }),
10906
+ /* @__PURE__ */ jsx22("span", { children: "Visit website (\u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC\u05D0\u05EA\u05E8)" })
10763
10907
  ] }),
10764
- 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: [
10765
- /* @__PURE__ */ jsx21(Phone, { className: "w-3 h-3" }),
10766
- /* @__PURE__ */ jsx21("span", { children: "Call phone number (\u05D7\u05D9\u05D5\u05D2 \u05DC\u05DE\u05E1\u05E4\u05E8)" })
10908
+ btn.type === "PHONE_NUMBER" && /* @__PURE__ */ jsxs18("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: [
10909
+ /* @__PURE__ */ jsx22(Phone, { className: "w-3 h-3" }),
10910
+ /* @__PURE__ */ jsx22("span", { children: "Call phone number (\u05D7\u05D9\u05D5\u05D2 \u05DC\u05DE\u05E1\u05E4\u05E8)" })
10767
10911
  ] }),
10768
- 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: [
10769
- /* @__PURE__ */ jsx21(Copy3, { className: "w-3 h-3" }),
10770
- /* @__PURE__ */ jsx21("span", { children: "Copy offer code (\u05D4\u05E2\u05EA\u05E7\u05EA \u05E7\u05D5\u05D3)" })
10912
+ btn.type === "COPY_CODE" && /* @__PURE__ */ jsxs18("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: [
10913
+ /* @__PURE__ */ jsx22(Copy3, { className: "w-3 h-3" }),
10914
+ /* @__PURE__ */ jsx22("span", { children: "Copy offer code (\u05D4\u05E2\u05EA\u05E7\u05EA \u05E7\u05D5\u05D3)" })
10771
10915
  ] })
10772
10916
  ] }),
10773
- /* @__PURE__ */ jsx21(
10917
+ /* @__PURE__ */ jsx22(
10774
10918
  "button",
10775
10919
  {
10776
10920
  type: "button",
10777
10921
  onClick: () => handleRemoveButton(index),
10778
10922
  className: "p-1 text-slate-400 hover:text-rose-600 hover:bg-rose-50 rounded-lg transition-colors cursor-pointer",
10779
10923
  title: "\u05D4\u05E1\u05E8 \u05DB\u05E4\u05EA\u05D5\u05E8",
10780
- children: /* @__PURE__ */ jsx21(Trash22, { className: "w-3.5 h-3.5" })
10924
+ children: /* @__PURE__ */ jsx22(Trash22, { className: "w-3.5 h-3.5" })
10781
10925
  }
10782
10926
  )
10783
10927
  ] }),
10784
- btn.type === "QUICK_REPLY" && /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
10785
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between text-[11px]", children: [
10786
- /* @__PURE__ */ jsxs17("label", { className: "font-semibold text-slate-700", children: [
10928
+ btn.type === "QUICK_REPLY" && /* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
10929
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between text-[11px]", children: [
10930
+ /* @__PURE__ */ jsxs18("label", { className: "font-semibold text-slate-700", children: [
10787
10931
  "\u05D8\u05E7\u05E1\u05D8 \u05D4\u05DB\u05E4\u05EA\u05D5\u05E8 ",
10788
- /* @__PURE__ */ jsx21("span", { className: "text-rose-500", children: "*" })
10932
+ /* @__PURE__ */ jsx22("span", { className: "text-rose-500", children: "*" })
10789
10933
  ] }),
10790
- /* @__PURE__ */ jsxs17(
10934
+ /* @__PURE__ */ jsxs18(
10791
10935
  "span",
10792
10936
  {
10793
10937
  className: `font-mono text-[10px] ${(btn.text || "").length >= 25 ? "text-amber-600 font-bold" : "text-slate-400"}`,
@@ -10798,7 +10942,7 @@ function CreateTemplateModal({
10798
10942
  }
10799
10943
  )
10800
10944
  ] }),
10801
- /* @__PURE__ */ jsx21(
10945
+ /* @__PURE__ */ jsx22(
10802
10946
  "input",
10803
10947
  {
10804
10948
  type: "text",
@@ -10810,14 +10954,14 @@ function CreateTemplateModal({
10810
10954
  }
10811
10955
  )
10812
10956
  ] }),
10813
- btn.type === "URL" && /* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: [
10814
- /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
10815
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between text-[11px]", children: [
10816
- /* @__PURE__ */ jsxs17("label", { className: "font-semibold text-slate-700", children: [
10957
+ btn.type === "URL" && /* @__PURE__ */ jsxs18("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: [
10958
+ /* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
10959
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between text-[11px]", children: [
10960
+ /* @__PURE__ */ jsxs18("label", { className: "font-semibold text-slate-700", children: [
10817
10961
  "\u05D8\u05E7\u05E1\u05D8 \u05D4\u05DB\u05E4\u05EA\u05D5\u05E8 ",
10818
- /* @__PURE__ */ jsx21("span", { className: "text-rose-500", children: "*" })
10962
+ /* @__PURE__ */ jsx22("span", { className: "text-rose-500", children: "*" })
10819
10963
  ] }),
10820
- /* @__PURE__ */ jsxs17(
10964
+ /* @__PURE__ */ jsxs18(
10821
10965
  "span",
10822
10966
  {
10823
10967
  className: `font-mono text-[10px] ${(btn.text || "").length >= 25 ? "text-amber-600 font-bold" : "text-slate-400"}`,
@@ -10828,7 +10972,7 @@ function CreateTemplateModal({
10828
10972
  }
10829
10973
  )
10830
10974
  ] }),
10831
- /* @__PURE__ */ jsx21(
10975
+ /* @__PURE__ */ jsx22(
10832
10976
  "input",
10833
10977
  {
10834
10978
  type: "text",
@@ -10840,18 +10984,18 @@ function CreateTemplateModal({
10840
10984
  }
10841
10985
  )
10842
10986
  ] }),
10843
- /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
10844
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between text-[11px]", children: [
10845
- /* @__PURE__ */ jsxs17("label", { className: "font-semibold text-slate-700", children: [
10987
+ /* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
10988
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between text-[11px]", children: [
10989
+ /* @__PURE__ */ jsxs18("label", { className: "font-semibold text-slate-700", children: [
10846
10990
  "\u05DB\u05EA\u05D5\u05D1\u05EA URL \u05E1\u05D8\u05D8\u05D9\u05EA ",
10847
- /* @__PURE__ */ jsx21("span", { className: "text-rose-500", children: "*" })
10991
+ /* @__PURE__ */ jsx22("span", { className: "text-rose-500", children: "*" })
10848
10992
  ] }),
10849
- /* @__PURE__ */ jsxs17("span", { className: "font-mono text-[10px] text-slate-400", children: [
10993
+ /* @__PURE__ */ jsxs18("span", { className: "font-mono text-[10px] text-slate-400", children: [
10850
10994
  (btn.url || "").length,
10851
10995
  "/2000"
10852
10996
  ] })
10853
10997
  ] }),
10854
- /* @__PURE__ */ jsx21(
10998
+ /* @__PURE__ */ jsx22(
10855
10999
  "input",
10856
11000
  {
10857
11001
  type: "url",
@@ -10865,14 +11009,14 @@ function CreateTemplateModal({
10865
11009
  )
10866
11010
  ] })
10867
11011
  ] }),
10868
- btn.type === "PHONE_NUMBER" && /* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: [
10869
- /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
10870
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between text-[11px]", children: [
10871
- /* @__PURE__ */ jsxs17("label", { className: "font-semibold text-slate-700", children: [
11012
+ btn.type === "PHONE_NUMBER" && /* @__PURE__ */ jsxs18("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: [
11013
+ /* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
11014
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between text-[11px]", children: [
11015
+ /* @__PURE__ */ jsxs18("label", { className: "font-semibold text-slate-700", children: [
10872
11016
  "\u05D8\u05E7\u05E1\u05D8 \u05D4\u05DB\u05E4\u05EA\u05D5\u05E8 ",
10873
- /* @__PURE__ */ jsx21("span", { className: "text-rose-500", children: "*" })
11017
+ /* @__PURE__ */ jsx22("span", { className: "text-rose-500", children: "*" })
10874
11018
  ] }),
10875
- /* @__PURE__ */ jsxs17(
11019
+ /* @__PURE__ */ jsxs18(
10876
11020
  "span",
10877
11021
  {
10878
11022
  className: `font-mono text-[10px] ${(btn.text || "").length >= 25 ? "text-amber-600 font-bold" : "text-slate-400"}`,
@@ -10883,7 +11027,7 @@ function CreateTemplateModal({
10883
11027
  }
10884
11028
  )
10885
11029
  ] }),
10886
- /* @__PURE__ */ jsx21(
11030
+ /* @__PURE__ */ jsx22(
10887
11031
  "input",
10888
11032
  {
10889
11033
  type: "text",
@@ -10895,18 +11039,18 @@ function CreateTemplateModal({
10895
11039
  }
10896
11040
  )
10897
11041
  ] }),
10898
- /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
10899
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between text-[11px]", children: [
10900
- /* @__PURE__ */ jsxs17("label", { className: "font-semibold text-slate-700", children: [
11042
+ /* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
11043
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between text-[11px]", children: [
11044
+ /* @__PURE__ */ jsxs18("label", { className: "font-semibold text-slate-700", children: [
10901
11045
  "\u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF (\u05E4\u05D5\u05E8\u05DE\u05D8: +[\u05E7\u05D9\u05D3\u05D5\u05DE\u05EA][\u05DE\u05E1\u05E4\u05E8]) ",
10902
- /* @__PURE__ */ jsx21("span", { className: "text-rose-500", children: "*" })
11046
+ /* @__PURE__ */ jsx22("span", { className: "text-rose-500", children: "*" })
10903
11047
  ] }),
10904
- /* @__PURE__ */ jsxs17("span", { className: "font-mono text-[10px] text-slate-400", children: [
11048
+ /* @__PURE__ */ jsxs18("span", { className: "font-mono text-[10px] text-slate-400", children: [
10905
11049
  (btn.phone_number || "").length,
10906
11050
  "/20"
10907
11051
  ] })
10908
11052
  ] }),
10909
- /* @__PURE__ */ jsx21(
11053
+ /* @__PURE__ */ jsx22(
10910
11054
  "input",
10911
11055
  {
10912
11056
  type: "tel",
@@ -10920,14 +11064,14 @@ function CreateTemplateModal({
10920
11064
  )
10921
11065
  ] })
10922
11066
  ] }),
10923
- btn.type === "COPY_CODE" && /* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: [
10924
- /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
10925
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between text-[11px]", children: [
10926
- /* @__PURE__ */ jsxs17("label", { className: "font-semibold text-slate-700", children: [
11067
+ btn.type === "COPY_CODE" && /* @__PURE__ */ jsxs18("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: [
11068
+ /* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
11069
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between text-[11px]", children: [
11070
+ /* @__PURE__ */ jsxs18("label", { className: "font-semibold text-slate-700", children: [
10927
11071
  "\u05E7\u05D5\u05D3 \u05D4\u05E6\u05E2\u05D4 / \u05E7\u05D5\u05E4\u05D5\u05DF ",
10928
- /* @__PURE__ */ jsx21("span", { className: "text-rose-500", children: "*" })
11072
+ /* @__PURE__ */ jsx22("span", { className: "text-rose-500", children: "*" })
10929
11073
  ] }),
10930
- /* @__PURE__ */ jsxs17(
11074
+ /* @__PURE__ */ jsxs18(
10931
11075
  "span",
10932
11076
  {
10933
11077
  className: `font-mono text-[10px] ${(btn.example || "").length >= 15 ? "text-amber-600 font-bold" : "text-slate-400"}`,
@@ -10938,7 +11082,7 @@ function CreateTemplateModal({
10938
11082
  }
10939
11083
  )
10940
11084
  ] }),
10941
- /* @__PURE__ */ jsx21(
11085
+ /* @__PURE__ */ jsx22(
10942
11086
  "input",
10943
11087
  {
10944
11088
  type: "text",
@@ -10951,15 +11095,15 @@ function CreateTemplateModal({
10951
11095
  }
10952
11096
  )
10953
11097
  ] }),
10954
- /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
10955
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between text-[11px]", children: [
10956
- /* @__PURE__ */ jsx21("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)" }),
10957
- /* @__PURE__ */ jsxs17("span", { className: "font-mono text-[10px] text-slate-400", children: [
11098
+ /* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
11099
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between text-[11px]", children: [
11100
+ /* @__PURE__ */ jsx22("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)" }),
11101
+ /* @__PURE__ */ jsxs18("span", { className: "font-mono text-[10px] text-slate-400", children: [
10958
11102
  (btn.text || "").length,
10959
11103
  "/25"
10960
11104
  ] })
10961
11105
  ] }),
10962
- /* @__PURE__ */ jsx21(
11106
+ /* @__PURE__ */ jsx22(
10963
11107
  "input",
10964
11108
  {
10965
11109
  type: "text",
@@ -10979,8 +11123,8 @@ function CreateTemplateModal({
10979
11123
  }) })
10980
11124
  ] })
10981
11125
  ] }),
10982
- /* @__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: [
10983
- /* @__PURE__ */ jsx21(
11126
+ /* @__PURE__ */ jsxs18("div", { className: "px-6 py-4 border-t border-slate-100 flex items-center justify-end gap-3 bg-slate-50/50", children: [
11127
+ /* @__PURE__ */ jsx22(
10984
11128
  "button",
10985
11129
  {
10986
11130
  type: "button",
@@ -10990,19 +11134,19 @@ function CreateTemplateModal({
10990
11134
  children: "\u05D1\u05D9\u05D8\u05D5\u05DC"
10991
11135
  }
10992
11136
  ),
10993
- /* @__PURE__ */ jsx21(
11137
+ /* @__PURE__ */ jsx22(
10994
11138
  "button",
10995
11139
  {
10996
11140
  type: "submit",
10997
11141
  disabled: !canSubmit,
10998
11142
  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"}`,
10999
11143
  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",
11000
- children: isSubmitting ? /* @__PURE__ */ jsxs17(Fragment4, { children: [
11001
- /* @__PURE__ */ jsx21(Loader24, { className: "w-4 h-4 animate-spin" }),
11002
- /* @__PURE__ */ jsx21("span", { children: submittingStep || "\u05D9\u05D5\u05E6\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA..." })
11003
- ] }) : /* @__PURE__ */ jsxs17(Fragment4, { children: [
11004
- /* @__PURE__ */ jsx21(CheckCircle22, { className: "w-4 h-4" }),
11005
- /* @__PURE__ */ jsx21("span", { children: "\u05E9\u05DC\u05D7 \u05DC\u05D1\u05D3\u05D9\u05E7\u05D4" })
11144
+ children: isSubmitting ? /* @__PURE__ */ jsxs18(Fragment5, { children: [
11145
+ /* @__PURE__ */ jsx22(Loader24, { className: "w-4 h-4 animate-spin" }),
11146
+ /* @__PURE__ */ jsx22("span", { children: submittingStep || "\u05D9\u05D5\u05E6\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA..." })
11147
+ ] }) : /* @__PURE__ */ jsxs18(Fragment5, { children: [
11148
+ /* @__PURE__ */ jsx22(CheckCircle22, { className: "w-4 h-4" }),
11149
+ /* @__PURE__ */ jsx22("span", { children: "\u05E9\u05DC\u05D7 \u05DC\u05D1\u05D3\u05D9\u05E7\u05D4" })
11006
11150
  ] })
11007
11151
  }
11008
11152
  )
@@ -11016,7 +11160,7 @@ function CreateTemplateModal({
11016
11160
  }
11017
11161
 
11018
11162
  // src/components/WhatsAppComponent/hooks/useWhatsAppState.ts
11019
- import { useState as useState18, useEffect as useEffect16, useRef as useRef16, useMemo as useMemo11, useCallback as useCallback14 } from "react";
11163
+ import { useState as useState19, useEffect as useEffect16, useRef as useRef16, useMemo as useMemo11, useCallback as useCallback15 } from "react";
11020
11164
 
11021
11165
  // src/components/WhatsAppComponent/utils/recipientEngine.ts
11022
11166
  var STORAGE_KEY_TEST_PHONE = "whatsapp_test_phone";
@@ -11210,9 +11354,9 @@ function prepareRecipients(params) {
11210
11354
  const subData = (item == null ? void 0 : item._resolvedData) || ((item == null ? void 0 : item.data) && typeof item.data === "object" ? item.data : item) || {};
11211
11355
  const cellVal = subData[subtableFilterColumn];
11212
11356
  if (filterType === "BOOLEAN" || filterVal === "true" || filterVal === "false") {
11213
- const isTrue = cellValueIsTrue(cellVal);
11357
+ const isTrue2 = cellValueIsTrue(cellVal);
11214
11358
  const target = filterVal === "true";
11215
- return isTrue === target;
11359
+ return isTrue2 === target;
11216
11360
  }
11217
11361
  const relIds = normalizeRelationValue(cellVal);
11218
11362
  if (relIds.length > 0) {
@@ -11314,9 +11458,9 @@ function matchesColumnFilter(cellValue, filterVal, colName, relationOptions, col
11314
11458
  const q = filterVal.toLowerCase().trim();
11315
11459
  if (!q) return true;
11316
11460
  if (q === "true" || q === "false" || q === "\u05DB\u05DF" || q === "\u05DC\u05D0") {
11317
- const isTrue = cellValue === true || cellValue === "true" || cellValue === 1;
11461
+ const isTrue2 = cellValue === true || cellValue === "true" || cellValue === 1;
11318
11462
  const targetBool = q === "true" || q === "\u05DB\u05DF";
11319
- return isTrue === targetBool;
11463
+ return isTrue2 === targetBool;
11320
11464
  }
11321
11465
  const relIds = normalizeRelationValue(cellValue);
11322
11466
  if (relIds.length > 0) {
@@ -11551,12 +11695,12 @@ function formatVariableValue(value, columnType, templateLanguage, options) {
11551
11695
  }
11552
11696
  }
11553
11697
  function formatBoolean(value, templateLanguage) {
11554
- const isTrue = value === true || value === "true" || value === 1 || value === "1";
11698
+ const isTrue2 = value === true || value === "true" || value === 1 || value === "1";
11555
11699
  const isHebrew = templateLanguage === "he" || templateLanguage.startsWith("he_") || templateLanguage.startsWith("he-");
11556
11700
  if (isHebrew) {
11557
- return isTrue ? "\u05DB\u05DF" : "\u05DC\u05D0";
11701
+ return isTrue2 ? "\u05DB\u05DF" : "\u05DC\u05D0";
11558
11702
  }
11559
- return isTrue ? "Yes" : "No";
11703
+ return isTrue2 ? "Yes" : "No";
11560
11704
  }
11561
11705
  function formatDate(value) {
11562
11706
  if (!value) return "";
@@ -12321,29 +12465,29 @@ function useWhatsAppState(props) {
12321
12465
  data: injectedData
12322
12466
  } = props;
12323
12467
  const orgId = props.orgId || props.organizationId || (settings == null ? void 0 : settings.orgId) || (settings == null ? void 0 : settings.organizationId) || (injectedData == null ? void 0 : injectedData.orgId) || (injectedData == null ? void 0 : injectedData.organizationId);
12324
- const [tableColumns2, setTableColumns] = useState18(() => {
12468
+ const [tableColumns2, setTableColumns] = useState19(() => {
12325
12469
  return Array.isArray(settings == null ? void 0 : settings.columns) ? settings.columns : [];
12326
12470
  });
12327
- const [rawRecords, setRawRecords] = useState18(() => {
12471
+ const [rawRecords, setRawRecords] = useState19(() => {
12328
12472
  if (Array.isArray(injectedData)) return injectedData;
12329
12473
  if (Array.isArray(injectedData == null ? void 0 : injectedData.records)) return injectedData.records;
12330
12474
  return [];
12331
12475
  });
12332
- const [relationOptions, setRelationOptions] = useState18(() => {
12476
+ const [relationOptions, setRelationOptions] = useState19(() => {
12333
12477
  return (injectedData == null ? void 0 : injectedData.relationOptions) || {};
12334
12478
  });
12335
- const [isLoadingTableData, setIsLoadingTableData] = useState18(() => Boolean(settings == null ? void 0 : settings.tableMetaId));
12336
- const [activeSubtableScans, setActiveSubtableScans] = useState18(0);
12337
- const [tableError, setTableError] = useState18(null);
12338
- const [filters, setFilters] = useState18({});
12339
- const [selectedRowIds, setSelectedRowIds] = useState18([]);
12340
- const [autoSelectCount, setAutoSelectCount] = useState18(null);
12479
+ const [isLoadingTableData, setIsLoadingTableData] = useState19(() => Boolean(settings == null ? void 0 : settings.tableMetaId));
12480
+ const [activeSubtableScans, setActiveSubtableScans] = useState19(0);
12481
+ const [tableError, setTableError] = useState19(null);
12482
+ const [filters, setFilters] = useState19({});
12483
+ const [selectedRowIds, setSelectedRowIds] = useState19([]);
12484
+ const [autoSelectCount, setAutoSelectCount] = useState19(null);
12341
12485
  const isAutoSelectingRef = useRef16(false);
12342
12486
  const isManualOverrideRef = useRef16(false);
12343
12487
  const prevAutoSelectCountRef = useRef16(null);
12344
12488
  const fetchedTableIdsRef = useRef16(/* @__PURE__ */ new Set());
12345
12489
  const fullyFetchedRelationKeysRef = useRef16(/* @__PURE__ */ new Set());
12346
- const loadTableData = useCallback14(async () => {
12490
+ const loadTableData = useCallback15(async () => {
12347
12491
  var _a2;
12348
12492
  const tableId = (settings == null ? void 0 : settings.tableMetaId) || (injectedData == null ? void 0 : injectedData.tableMetaId) || (injectedData == null ? void 0 : injectedData.tableId);
12349
12493
  if (!tableId || !executeAction) return;
@@ -12421,7 +12565,7 @@ function useWhatsAppState(props) {
12421
12565
  return type === "RELATION" || type === "BOOLEAN";
12422
12566
  });
12423
12567
  }, [tableColumns2]);
12424
- const [referencedTableSchemas, setReferencedTableSchemas] = useState18({});
12568
+ const [referencedTableSchemas, setReferencedTableSchemas] = useState19({});
12425
12569
  const subtableCols = useMemo11(() => {
12426
12570
  return (tableColumns2 || []).filter((col) => {
12427
12571
  var _a2;
@@ -12482,10 +12626,10 @@ function useWhatsAppState(props) {
12482
12626
  const phoneColumns = useMemo11(() => {
12483
12627
  return targetPhoneOptions.map((opt) => ({ name: opt.label, id: opt.id, type: "PHONE" }));
12484
12628
  }, [targetPhoneOptions]);
12485
- const [phoneColumnId, setPhoneColumnId] = useState18("");
12486
- const [subtableFilterColumn, setSubtableFilterColumn] = useState18("");
12487
- const [subtableFilterValue, setSubtableFilterValue] = useState18("");
12488
- const [subtableSendLimit, setSubtableSendLimit] = useState18(
12629
+ const [phoneColumnId, setPhoneColumnId] = useState19("");
12630
+ const [subtableFilterColumn, setSubtableFilterColumn] = useState19("");
12631
+ const [subtableFilterValue, setSubtableFilterValue] = useState19("");
12632
+ const [subtableSendLimit, setSubtableSendLimit] = useState19(
12489
12633
  (settings == null ? void 0 : settings.subtableSendLimit) || "PRIMARY"
12490
12634
  );
12491
12635
  useEffect16(() => {
@@ -12528,10 +12672,10 @@ function useWhatsAppState(props) {
12528
12672
  const selectedSubtableFilterCol = useMemo11(() => {
12529
12673
  return subtableFilterableColumns.find((c) => c.name === subtableFilterColumn);
12530
12674
  }, [subtableFilterableColumns, subtableFilterColumn]);
12531
- const [enablePostSendAction, setEnablePostSendAction] = useState18(false);
12532
- const [postSendActionColumn, setPostSendActionColumn] = useState18("");
12533
- const [postSendActionValue, setPostSendActionValue] = useState18("");
12534
- const [postSendActionTargetType, setPostSendActionTargetType] = useState18("MAIN");
12675
+ const [enablePostSendAction, setEnablePostSendAction] = useState19(false);
12676
+ const [postSendActionColumn, setPostSendActionColumn] = useState19("");
12677
+ const [postSendActionValue, setPostSendActionValue] = useState19("");
12678
+ const [postSendActionTargetType, setPostSendActionTargetType] = useState19("MAIN");
12535
12679
  const postSendActionTargetOptions = useMemo11(() => {
12536
12680
  var _a2, _b2, _c;
12537
12681
  const options = [];
@@ -12583,8 +12727,8 @@ function useWhatsAppState(props) {
12583
12727
  );
12584
12728
  }, [postSendActionTargetOptions, postSendActionColumn]);
12585
12729
  const selectedPostSendCol = selectedPostSendOption;
12586
- const [isTestPromptOpen, setIsTestPromptOpen] = useState18(false);
12587
- const [testPhoneNumber, setTestPhoneNumber] = useState18(() => {
12730
+ const [isTestPromptOpen, setIsTestPromptOpen] = useState19(false);
12731
+ const [testPhoneNumber, setTestPhoneNumber] = useState19(() => {
12588
12732
  if (typeof window !== "undefined") {
12589
12733
  try {
12590
12734
  return localStorage.getItem(STORAGE_KEY_TEST_PHONE) || "";
@@ -12594,10 +12738,10 @@ function useWhatsAppState(props) {
12594
12738
  }
12595
12739
  return "";
12596
12740
  });
12597
- const [testFeedback, setTestFeedback] = useState18(null);
12598
- const [isSendingTest, setIsSendingTest] = useState18(false);
12599
- const [isSendingBroadcast, setIsSendingBroadcast] = useState18(false);
12600
- const [broadcastProgress, setBroadcastProgress] = useState18({
12741
+ const [testFeedback, setTestFeedback] = useState19(null);
12742
+ const [isSendingTest, setIsSendingTest] = useState19(false);
12743
+ const [isSendingBroadcast, setIsSendingBroadcast] = useState19(false);
12744
+ const [broadcastProgress, setBroadcastProgress] = useState19({
12601
12745
  current: 0,
12602
12746
  total: 0,
12603
12747
  successful: 0,
@@ -12605,12 +12749,12 @@ function useWhatsAppState(props) {
12605
12749
  skipped: 0,
12606
12750
  percent: 0
12607
12751
  });
12608
- const [broadcastSummary, setBroadcastSummary] = useState18(null);
12609
- const [rowStatusMap, setRowStatusMap] = useState18({});
12610
- const clearBroadcastSummary = useCallback14(() => {
12752
+ const [broadcastSummary, setBroadcastSummary] = useState19(null);
12753
+ const [rowStatusMap, setRowStatusMap] = useState19({});
12754
+ const clearBroadcastSummary = useCallback15(() => {
12611
12755
  setBroadcastSummary(null);
12612
12756
  }, []);
12613
- const handleTestPhoneChange = useCallback14((val) => {
12757
+ const handleTestPhoneChange = useCallback15((val) => {
12614
12758
  setTestPhoneNumber(val);
12615
12759
  if (typeof window !== "undefined") {
12616
12760
  try {
@@ -12620,7 +12764,7 @@ function useWhatsAppState(props) {
12620
12764
  }
12621
12765
  }
12622
12766
  }, []);
12623
- const getRelationOptionsForCol = useCallback14(
12767
+ const getRelationOptionsForCol = useCallback15(
12624
12768
  (colName, parentColName) => {
12625
12769
  var _a2, _b2, _c, _d;
12626
12770
  if (parentColName) {
@@ -12877,9 +13021,9 @@ function useWhatsAppState(props) {
12877
13021
  const colType = (_a2 = colDef.type) == null ? void 0 : _a2.toUpperCase();
12878
13022
  const cellValue = rowData[colName];
12879
13023
  if (colType === "BOOLEAN") {
12880
- const isTrue = cellValue === true || cellValue === "true" || cellValue === 1;
13024
+ const isTrue2 = cellValue === true || cellValue === "true" || cellValue === 1;
12881
13025
  const targetBool = filterVal === "true";
12882
- if (isTrue !== targetBool) {
13026
+ if (isTrue2 !== targetBool) {
12883
13027
  return false;
12884
13028
  }
12885
13029
  } else if (colType === "RELATION") {
@@ -12911,7 +13055,7 @@ function useWhatsAppState(props) {
12911
13055
  isManualOverrideRef.current = false;
12912
13056
  prevAutoSelectCountRef.current = autoSelectCount;
12913
13057
  }, [autoSelectCount, filteredData]);
12914
- const embeddedTableExecuteAction = useCallback14(async (actionType, payload) => {
13058
+ const embeddedTableExecuteAction = useCallback15(async (actionType, payload) => {
12915
13059
  if (actionType === "FETCH_TABLE_DATA") {
12916
13060
  const colFilters = (payload == null ? void 0 : payload.columnFilters) || (payload == null ? void 0 : payload.filters);
12917
13061
  const searchQuery = payload == null ? void 0 : payload.search;
@@ -12957,7 +13101,7 @@ function useWhatsAppState(props) {
12957
13101
  const activeFiltersCount = useMemo11(() => {
12958
13102
  return Object.values(filters).filter((v) => v !== "").length;
12959
13103
  }, [filters]);
12960
- const handleSelectionChange = useCallback14((selectedIds) => {
13104
+ const handleSelectionChange = useCallback15((selectedIds) => {
12961
13105
  setSelectedRowIds((prev) => {
12962
13106
  if (prev.length === selectedIds.length && prev.every((id, idx) => id === selectedIds[idx])) {
12963
13107
  return prev;
@@ -12971,13 +13115,13 @@ function useWhatsAppState(props) {
12971
13115
  return selectedIds;
12972
13116
  });
12973
13117
  }, [autoSelectCount]);
12974
- const handleRowToggle = useCallback14((rowId, checked) => {
13118
+ const handleRowToggle = useCallback15((rowId, checked) => {
12975
13119
  if (autoSelectCount !== null && autoSelectCount > 0) {
12976
13120
  isManualOverrideRef.current = true;
12977
13121
  setAutoSelectCount(null);
12978
13122
  }
12979
13123
  }, [autoSelectCount]);
12980
- const toggleRowSelection = useCallback14((rowId, checked) => {
13124
+ const toggleRowSelection = useCallback15((rowId, checked) => {
12981
13125
  if (autoSelectCount !== null && autoSelectCount > 0) {
12982
13126
  isManualOverrideRef.current = true;
12983
13127
  setAutoSelectCount(null);
@@ -12993,15 +13137,15 @@ function useWhatsAppState(props) {
12993
13137
  return prev;
12994
13138
  });
12995
13139
  }, [autoSelectCount]);
12996
- const [templates, setTemplates] = useState18([]);
12997
- const [selectedTemplateId, setSelectedTemplateId] = useState18(null);
12998
- const [isLoading, setIsLoading] = useState18(true);
12999
- const [fetchError, setFetchError] = useState18(null);
13000
- const [isModalOpen, setIsModalOpen] = useState18(false);
13001
- const [isDropdownOpen, setIsDropdownOpen] = useState18(false);
13002
- const [isDeleting, setIsDeleting] = useState18(false);
13003
- const [feedback, setFeedback] = useState18(null);
13004
- const loadTemplates = useCallback14(async () => {
13140
+ const [templates, setTemplates] = useState19([]);
13141
+ const [selectedTemplateId, setSelectedTemplateId] = useState19(null);
13142
+ const [isLoading, setIsLoading] = useState19(true);
13143
+ const [fetchError, setFetchError] = useState19(null);
13144
+ const [isModalOpen, setIsModalOpen] = useState19(false);
13145
+ const [isDropdownOpen, setIsDropdownOpen] = useState19(false);
13146
+ const [isDeleting, setIsDeleting] = useState19(false);
13147
+ const [feedback, setFeedback] = useState19(null);
13148
+ const loadTemplates = useCallback15(async () => {
13005
13149
  var _a2, _b2;
13006
13150
  if (!executeAction) {
13007
13151
  setIsLoading(false);
@@ -13078,7 +13222,7 @@ function useWhatsAppState(props) {
13078
13222
  }
13079
13223
  ) || null;
13080
13224
  }, [selectedTemplate]);
13081
- const [headerMediaUrl, setHeaderMediaUrl] = useState18("");
13225
+ const [headerMediaUrl, setHeaderMediaUrl] = useState19("");
13082
13226
  useEffect16(() => {
13083
13227
  if (!templateHeaderComp) {
13084
13228
  setHeaderMediaUrl("");
@@ -13096,7 +13240,7 @@ function useWhatsAppState(props) {
13096
13240
  setHeaderMediaUrl("");
13097
13241
  }
13098
13242
  }, [templateHeaderComp, selectedTemplate == null ? void 0 : selectedTemplate.name]);
13099
- const handleHeaderMediaUrlChange = useCallback14(
13243
+ const handleHeaderMediaUrlChange = useCallback15(
13100
13244
  (newUrl) => {
13101
13245
  setHeaderMediaUrl(newUrl);
13102
13246
  if ((selectedTemplate == null ? void 0 : selectedTemplate.name) && typeof window !== "undefined") {
@@ -13115,7 +13259,7 @@ function useWhatsAppState(props) {
13115
13259
  },
13116
13260
  [selectedTemplate == null ? void 0 : selectedTemplate.name]
13117
13261
  );
13118
- const handleResetHeaderMediaUrl = useCallback14(() => {
13262
+ const handleResetHeaderMediaUrl = useCallback15(() => {
13119
13263
  if ((selectedTemplate == null ? void 0 : selectedTemplate.name) && typeof window !== "undefined") {
13120
13264
  try {
13121
13265
  localStorage.removeItem(`whatsapp_template_media_${selectedTemplate.name}`);
@@ -13129,8 +13273,8 @@ function useWhatsAppState(props) {
13129
13273
  );
13130
13274
  setHeaderMediaUrl(defaultUrl || "");
13131
13275
  }, [templateHeaderComp, selectedTemplate == null ? void 0 : selectedTemplate.name]);
13132
- const [isUploadingMedia, setIsUploadingMedia] = useState18(false);
13133
- const handleFileUpload = useCallback14(
13276
+ const [isUploadingMedia, setIsUploadingMedia] = useState19(false);
13277
+ const handleFileUpload = useCallback15(
13134
13278
  async (file, templateName) => {
13135
13279
  const tplName = templateName || (selectedTemplate == null ? void 0 : selectedTemplate.name) || "";
13136
13280
  if (!file) return;
@@ -13174,7 +13318,7 @@ function useWhatsAppState(props) {
13174
13318
  const templateVariables = useMemo11(() => {
13175
13319
  return extractTemplateVariables(selectedTemplate);
13176
13320
  }, [selectedTemplate]);
13177
- const [variableMapping, setVariableMapping] = useState18({});
13321
+ const [variableMapping, setVariableMapping] = useState19({});
13178
13322
  useEffect16(() => {
13179
13323
  setVariableMapping({});
13180
13324
  }, [selectedTemplateId]);
@@ -13387,7 +13531,7 @@ function useWhatsAppState(props) {
13387
13531
  setIsSendingTest(false);
13388
13532
  }
13389
13533
  };
13390
- const handleSendMessages = useCallback14(async () => {
13534
+ const handleSendMessages = useCallback15(async () => {
13391
13535
  var _a2, _b2;
13392
13536
  if (isSendDisabled || isSendingBroadcast) return;
13393
13537
  const recipients = preparedRecipients;
@@ -13710,7 +13854,7 @@ import {
13710
13854
  CheckCircle2 as CheckCircle23,
13711
13855
  AlertCircle as AlertCircle3
13712
13856
  } from "lucide-react";
13713
- import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
13857
+ import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
13714
13858
  function TemplateSelectionBlock({
13715
13859
  selectedTemplate,
13716
13860
  selectedTemplateId,
@@ -13737,15 +13881,15 @@ function TemplateSelectionBlock({
13737
13881
  handleFileUpload
13738
13882
  }) {
13739
13883
  const fileInputRef = useRef17(null);
13740
- 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: [
13741
- /* @__PURE__ */ jsxs18("div", { className: "space-y-1.5 shrink-0", children: [
13742
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between pb-1.5 border-b border-slate-200/70 shrink-0 gap-2", children: [
13743
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1.5 min-w-0", children: [
13744
- /* @__PURE__ */ jsx22(FileText3, { className: "w-4 h-4 text-emerald-600 shrink-0" }),
13745
- /* @__PURE__ */ jsx22("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" })
13884
+ return /* @__PURE__ */ jsxs19("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: [
13885
+ /* @__PURE__ */ jsxs19("div", { className: "space-y-1.5 shrink-0", children: [
13886
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between pb-1.5 border-b border-slate-200/70 shrink-0 gap-2", children: [
13887
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-1.5 min-w-0", children: [
13888
+ /* @__PURE__ */ jsx23(FileText3, { className: "w-4 h-4 text-emerald-600 shrink-0" }),
13889
+ /* @__PURE__ */ jsx23("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" })
13746
13890
  ] }),
13747
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1.5 shrink-0", children: [
13748
- /* @__PURE__ */ jsxs18(
13891
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-1.5 shrink-0", children: [
13892
+ /* @__PURE__ */ jsxs19(
13749
13893
  "button",
13750
13894
  {
13751
13895
  type: "button",
@@ -13754,12 +13898,12 @@ function TemplateSelectionBlock({
13754
13898
  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"}`,
13755
13899
  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}"`,
13756
13900
  children: [
13757
- isDeleting ? /* @__PURE__ */ jsx22(Loader25, { className: "w-3.5 h-3.5 animate-spin text-rose-500" }) : /* @__PURE__ */ jsx22(Trash23, { className: "w-3.5 h-3.5 text-rose-500" }),
13758
- /* @__PURE__ */ jsx22("span", { children: "\u05DE\u05D7\u05D9\u05E7\u05D4" })
13901
+ isDeleting ? /* @__PURE__ */ jsx23(Loader25, { className: "w-3.5 h-3.5 animate-spin text-rose-500" }) : /* @__PURE__ */ jsx23(Trash23, { className: "w-3.5 h-3.5 text-rose-500" }),
13902
+ /* @__PURE__ */ jsx23("span", { children: "\u05DE\u05D7\u05D9\u05E7\u05D4" })
13759
13903
  ]
13760
13904
  }
13761
13905
  ),
13762
- /* @__PURE__ */ jsxs18(
13906
+ /* @__PURE__ */ jsxs19(
13763
13907
  "button",
13764
13908
  {
13765
13909
  type: "button",
@@ -13767,40 +13911,40 @@ function TemplateSelectionBlock({
13767
13911
  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",
13768
13912
  title: "\u05E6\u05D5\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA \u05D7\u05D3\u05E9\u05D4",
13769
13913
  children: [
13770
- /* @__PURE__ */ jsx22(Plus2, { className: "w-3.5 h-3.5" }),
13771
- /* @__PURE__ */ jsx22("span", { children: "\u05D7\u05D3\u05E9" })
13914
+ /* @__PURE__ */ jsx23(Plus2, { className: "w-3.5 h-3.5" }),
13915
+ /* @__PURE__ */ jsx23("span", { children: "\u05D7\u05D3\u05E9" })
13772
13916
  ]
13773
13917
  }
13774
13918
  )
13775
13919
  ] })
13776
13920
  ] }),
13777
- /* @__PURE__ */ jsxs18("div", { className: "relative", children: [
13778
- /* @__PURE__ */ jsxs18(
13921
+ /* @__PURE__ */ jsxs19("div", { className: "relative", children: [
13922
+ /* @__PURE__ */ jsxs19(
13779
13923
  "button",
13780
13924
  {
13781
13925
  type: "button",
13782
13926
  onClick: () => setIsDropdownOpen((prev) => !prev),
13783
13927
  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",
13784
13928
  children: [
13785
- selectedTemplate ? /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2 overflow-hidden", children: [
13786
- /* @__PURE__ */ jsx22(
13929
+ selectedTemplate ? /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2 overflow-hidden", children: [
13930
+ /* @__PURE__ */ jsx23(
13787
13931
  "span",
13788
13932
  {
13789
13933
  className: `w-2 h-2 rounded-full shrink-0 ${getStatusConfig(selectedTemplate.status).dotColor}`
13790
13934
  }
13791
13935
  ),
13792
- /* @__PURE__ */ jsx22("span", { className: "text-xs font-semibold text-slate-900 truncate", children: selectedTemplate.name }),
13793
- /* @__PURE__ */ jsxs18("span", { className: "text-[10px] text-slate-400 shrink-0", children: [
13936
+ /* @__PURE__ */ jsx23("span", { className: "text-xs font-semibold text-slate-900 truncate", children: selectedTemplate.name }),
13937
+ /* @__PURE__ */ jsxs19("span", { className: "text-[10px] text-slate-400 shrink-0", children: [
13794
13938
  "(",
13795
13939
  selectedTemplate.category,
13796
13940
  " \u2022 ",
13797
13941
  selectedTemplate.language,
13798
13942
  ")"
13799
13943
  ] })
13800
- ] }) : /* @__PURE__ */ jsx22("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..." }),
13801
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1.5 shrink-0 mr-1", children: [
13802
- isLoadingTemplates && /* @__PURE__ */ jsx22(Loader25, { className: "w-3.5 h-3.5 text-emerald-600 animate-spin" }),
13803
- /* @__PURE__ */ jsx22(
13944
+ ] }) : /* @__PURE__ */ jsx23("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..." }),
13945
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-1.5 shrink-0 mr-1", children: [
13946
+ isLoadingTemplates && /* @__PURE__ */ jsx23(Loader25, { className: "w-3.5 h-3.5 text-emerald-600 animate-spin" }),
13947
+ /* @__PURE__ */ jsx23(
13804
13948
  ChevronDown4,
13805
13949
  {
13806
13950
  className: `w-3.5 h-3.5 text-slate-400 transition-transform ${isDropdownOpen ? "rotate-180" : ""}`
@@ -13810,21 +13954,21 @@ function TemplateSelectionBlock({
13810
13954
  ]
13811
13955
  }
13812
13956
  ),
13813
- isDropdownOpen && /* @__PURE__ */ jsxs18(Fragment5, { children: [
13814
- /* @__PURE__ */ jsx22(
13957
+ isDropdownOpen && /* @__PURE__ */ jsxs19(Fragment6, { children: [
13958
+ /* @__PURE__ */ jsx23(
13815
13959
  "div",
13816
13960
  {
13817
13961
  className: "fixed inset-0 z-40",
13818
13962
  onClick: () => setIsDropdownOpen(false)
13819
13963
  }
13820
13964
  ),
13821
- /* @__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: [
13822
- templates.length === 0 && !isLoadingTemplates && /* @__PURE__ */ jsx22("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".' }),
13965
+ /* @__PURE__ */ jsxs19("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: [
13966
+ templates.length === 0 && !isLoadingTemplates && /* @__PURE__ */ jsx23("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".' }),
13823
13967
  templates.map((tpl) => {
13824
13968
  const statusConfig = getStatusConfig(tpl.status);
13825
13969
  const isSelected = tpl.id === selectedTemplateId;
13826
13970
  const canSelect = statusConfig.isSelectable;
13827
- return /* @__PURE__ */ jsxs18(
13971
+ return /* @__PURE__ */ jsxs19(
13828
13972
  "div",
13829
13973
  {
13830
13974
  onClick: () => {
@@ -13837,29 +13981,29 @@ function TemplateSelectionBlock({
13837
13981
  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" : ""}`,
13838
13982
  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,
13839
13983
  children: [
13840
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2 overflow-hidden", children: [
13841
- /* @__PURE__ */ jsx22(
13984
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2 overflow-hidden", children: [
13985
+ /* @__PURE__ */ jsx23(
13842
13986
  "span",
13843
13987
  {
13844
13988
  className: `w-2 h-2 rounded-full shrink-0 ${statusConfig.dotColor}`
13845
13989
  }
13846
13990
  ),
13847
- /* @__PURE__ */ jsxs18("div", { className: "overflow-hidden", children: [
13848
- /* @__PURE__ */ jsx22(
13991
+ /* @__PURE__ */ jsxs19("div", { className: "overflow-hidden", children: [
13992
+ /* @__PURE__ */ jsx23(
13849
13993
  "p",
13850
13994
  {
13851
13995
  className: `text-xs font-semibold truncate ${isSelected ? "text-emerald-700" : canSelect ? "text-slate-800" : "text-slate-500"}`,
13852
13996
  children: tpl.name
13853
13997
  }
13854
13998
  ),
13855
- /* @__PURE__ */ jsxs18("p", { className: "text-[10px] text-slate-400", children: [
13999
+ /* @__PURE__ */ jsxs19("p", { className: "text-[10px] text-slate-400", children: [
13856
14000
  tpl.category,
13857
14001
  " \u2022 ",
13858
14002
  tpl.language
13859
14003
  ] })
13860
14004
  ] })
13861
14005
  ] }),
13862
- /* @__PURE__ */ jsx22(
14006
+ /* @__PURE__ */ jsx23(
13863
14007
  "span",
13864
14008
  {
13865
14009
  className: `text-[9px] font-semibold px-2 py-0.5 rounded-full border shrink-0 ${statusConfig.badgeBg} ${statusConfig.badgeText}`,
@@ -13875,18 +14019,18 @@ function TemplateSelectionBlock({
13875
14019
  ] })
13876
14020
  ] })
13877
14021
  ] }),
13878
- /* @__PURE__ */ jsxs18("div", { className: "flex-1 min-h-0 flex flex-col gap-2", children: [
13879
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between text-[11px] font-semibold text-slate-600 shrink-0", children: [
13880
- /* @__PURE__ */ jsx22("span", { children: "\u05EA\u05E6\u05D5\u05D2\u05EA \u05D4\u05D5\u05D3\u05E2\u05D4" }),
13881
- selectedTemplate && /* @__PURE__ */ jsxs18("span", { className: "text-[10px] text-slate-400", children: [
14022
+ /* @__PURE__ */ jsxs19("div", { className: "flex-1 min-h-0 flex flex-col gap-2", children: [
14023
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between text-[11px] font-semibold text-slate-600 shrink-0", children: [
14024
+ /* @__PURE__ */ jsx23("span", { children: "\u05EA\u05E6\u05D5\u05D2\u05EA \u05D4\u05D5\u05D3\u05E2\u05D4" }),
14025
+ selectedTemplate && /* @__PURE__ */ jsxs19("span", { className: "text-[10px] text-slate-400", children: [
13882
14026
  "(",
13883
14027
  templateBodyText.length,
13884
14028
  " \u05EA\u05D5\u05D5\u05D9\u05DD)"
13885
14029
  ] })
13886
14030
  ] }),
13887
- selectedTemplate ? /* @__PURE__ */ jsx22("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: [
13888
- /* @__PURE__ */ jsx22("span", { children: "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05EA\u05D1\u05E0\u05D9\u05EA" }),
13889
- /* @__PURE__ */ jsx22("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"' })
14031
+ selectedTemplate ? /* @__PURE__ */ jsx23("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__ */ jsxs19("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: [
14032
+ /* @__PURE__ */ jsx23("span", { children: "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05EA\u05D1\u05E0\u05D9\u05EA" }),
14033
+ /* @__PURE__ */ jsx23("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"' })
13890
14034
  ] }),
13891
14035
  selectedTemplate && (() => {
13892
14036
  var _a;
@@ -13895,19 +14039,19 @@ function TemplateSelectionBlock({
13895
14039
  );
13896
14040
  const tplButtons = (buttonsComp == null ? void 0 : buttonsComp.buttons) || [];
13897
14041
  if (!tplButtons || tplButtons.length === 0) return null;
13898
- return /* @__PURE__ */ jsx22("div", { className: "flex flex-wrap gap-1.5 shrink-0 pt-0.5", children: tplButtons.map((btn, idx) => {
14042
+ return /* @__PURE__ */ jsx23("div", { className: "flex flex-wrap gap-1.5 shrink-0 pt-0.5", children: tplButtons.map((btn, idx) => {
13899
14043
  const btnType = (btn.type || "").toUpperCase();
13900
14044
  const btnText = btn.text || (btnType === "COPY_CODE" ? `\u05D4\u05E2\u05EA\u05E7 \u05E7\u05D5\u05D3: ${btn.example}` : "\u05DB\u05E4\u05EA\u05D5\u05E8");
13901
- return /* @__PURE__ */ jsxs18(
14045
+ return /* @__PURE__ */ jsxs19(
13902
14046
  "div",
13903
14047
  {
13904
14048
  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",
13905
14049
  children: [
13906
- btnType === "QUICK_REPLY" && /* @__PURE__ */ jsx22(MessageSquare2, { className: "w-3 h-3 text-emerald-600" }),
13907
- btnType === "URL" && /* @__PURE__ */ jsx22(ExternalLink4, { className: "w-3 h-3 text-sky-600" }),
13908
- btnType === "PHONE_NUMBER" && /* @__PURE__ */ jsx22(Phone2, { className: "w-3 h-3 text-violet-600" }),
13909
- btnType === "COPY_CODE" && /* @__PURE__ */ jsx22(Copy4, { className: "w-3 h-3 text-amber-600" }),
13910
- /* @__PURE__ */ jsx22("span", { className: "truncate max-w-[180px]", children: btnText })
14050
+ btnType === "QUICK_REPLY" && /* @__PURE__ */ jsx23(MessageSquare2, { className: "w-3 h-3 text-emerald-600" }),
14051
+ btnType === "URL" && /* @__PURE__ */ jsx23(ExternalLink4, { className: "w-3 h-3 text-sky-600" }),
14052
+ btnType === "PHONE_NUMBER" && /* @__PURE__ */ jsx23(Phone2, { className: "w-3 h-3 text-violet-600" }),
14053
+ btnType === "COPY_CODE" && /* @__PURE__ */ jsx23(Copy4, { className: "w-3 h-3 text-amber-600" }),
14054
+ /* @__PURE__ */ jsx23("span", { className: "truncate max-w-[180px]", children: btnText })
13911
14055
  ]
13912
14056
  },
13913
14057
  idx
@@ -13922,9 +14066,9 @@ function TemplateSelectionBlock({
13922
14066
  const docFilename = resolveDocumentFilename(templateHeaderComp, headerMediaUrl);
13923
14067
  const hasValidMedia = Boolean(headerMediaUrl && headerMediaUrl.trim() && headerMediaUrl.startsWith("http"));
13924
14068
  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";
13925
- 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: [
13926
- /* @__PURE__ */ jsx22("div", { className: "flex items-center gap-2.5 overflow-hidden", children: headerFormat === "IMAGE" ? /* @__PURE__ */ jsxs18(Fragment5, { children: [
13927
- /* @__PURE__ */ jsx22("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__ */ jsx22(
14069
+ return /* @__PURE__ */ jsxs19("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: [
14070
+ /* @__PURE__ */ jsx23("div", { className: "flex items-center gap-2.5 overflow-hidden", children: headerFormat === "IMAGE" ? /* @__PURE__ */ jsxs19(Fragment6, { children: [
14071
+ /* @__PURE__ */ jsx23("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__ */ jsx23(
13928
14072
  "img",
13929
14073
  {
13930
14074
  src: headerMediaUrl,
@@ -13934,33 +14078,33 @@ function TemplateSelectionBlock({
13934
14078
  e.currentTarget.style.display = "none";
13935
14079
  }
13936
14080
  }
13937
- ) : /* @__PURE__ */ jsx22(ImageIcon2, { className: "w-4 h-4 text-amber-600" }) }),
13938
- /* @__PURE__ */ jsxs18("div", { className: "overflow-hidden", children: [
13939
- /* @__PURE__ */ jsx22("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05EA\u05DE\u05D5\u05E0\u05EA \u05DB\u05D5\u05EA\u05E8\u05EA" }),
13940
- /* @__PURE__ */ jsx22("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" })
14081
+ ) : /* @__PURE__ */ jsx23(ImageIcon2, { className: "w-4 h-4 text-amber-600" }) }),
14082
+ /* @__PURE__ */ jsxs19("div", { className: "overflow-hidden", children: [
14083
+ /* @__PURE__ */ jsx23("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05EA\u05DE\u05D5\u05E0\u05EA \u05DB\u05D5\u05EA\u05E8\u05EA" }),
14084
+ /* @__PURE__ */ jsx23("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" })
13941
14085
  ] })
13942
- ] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs18(Fragment5, { children: [
13943
- /* @__PURE__ */ jsx22("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__ */ jsx22(FileText3, { className: "w-4 h-4" }) }),
13944
- /* @__PURE__ */ jsxs18("div", { className: "overflow-hidden", children: [
13945
- /* @__PURE__ */ jsx22("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05DE\u05E1\u05DE\u05DA \u05DB\u05D5\u05EA\u05E8\u05EA (PDF)" }),
13946
- /* @__PURE__ */ jsx22("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" })
14086
+ ] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs19(Fragment6, { children: [
14087
+ /* @__PURE__ */ jsx23("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__ */ jsx23(FileText3, { className: "w-4 h-4" }) }),
14088
+ /* @__PURE__ */ jsxs19("div", { className: "overflow-hidden", children: [
14089
+ /* @__PURE__ */ jsx23("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05DE\u05E1\u05DE\u05DA \u05DB\u05D5\u05EA\u05E8\u05EA (PDF)" }),
14090
+ /* @__PURE__ */ jsx23("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" })
13947
14091
  ] })
13948
- ] }) : /* @__PURE__ */ jsxs18(Fragment5, { children: [
13949
- /* @__PURE__ */ jsx22("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__ */ jsx22(Video2, { className: "w-4 h-4" }) }),
13950
- /* @__PURE__ */ jsxs18("div", { className: "overflow-hidden", children: [
13951
- /* @__PURE__ */ jsx22("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05E1\u05E8\u05D8\u05D5\u05DF \u05DB\u05D5\u05EA\u05E8\u05EA" }),
13952
- /* @__PURE__ */ jsx22("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" })
14092
+ ] }) : /* @__PURE__ */ jsxs19(Fragment6, { children: [
14093
+ /* @__PURE__ */ jsx23("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__ */ jsx23(Video2, { className: "w-4 h-4" }) }),
14094
+ /* @__PURE__ */ jsxs19("div", { className: "overflow-hidden", children: [
14095
+ /* @__PURE__ */ jsx23("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05E1\u05E8\u05D8\u05D5\u05DF \u05DB\u05D5\u05EA\u05E8\u05EA" }),
14096
+ /* @__PURE__ */ jsx23("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" })
13953
14097
  ] })
13954
14098
  ] }) }),
13955
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2 shrink-0", children: [
13956
- 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: [
13957
- /* @__PURE__ */ jsx22(CheckCircle23, { className: "w-3 h-3 text-emerald-600" }),
14099
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2 shrink-0", children: [
14100
+ hasValidMedia ? /* @__PURE__ */ jsxs19("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: [
14101
+ /* @__PURE__ */ jsx23(CheckCircle23, { className: "w-3 h-3 text-emerald-600" }),
13958
14102
  "\u05E7\u05D5\u05D1\u05E5 \u05DE\u05E6\u05D5\u05E8\u05E3 \u05EA\u05E7\u05D9\u05DF"
13959
- ] }) : /* @__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: [
13960
- /* @__PURE__ */ jsx22(AlertCircle3, { className: "w-3 h-3 text-amber-600 shrink-0" }),
14103
+ ] }) : /* @__PURE__ */ jsxs19("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: [
14104
+ /* @__PURE__ */ jsx23(AlertCircle3, { className: "w-3 h-3 text-amber-600 shrink-0" }),
13961
14105
  "\u05E0\u05D3\u05E8\u05E9 \u05E6\u05D9\u05E8\u05D5\u05E3 \u05E7\u05D5\u05D1\u05E5 \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA \u05D6\u05D5"
13962
14106
  ] }),
13963
- hasValidMedia && /* @__PURE__ */ jsx22(
14107
+ hasValidMedia && /* @__PURE__ */ jsx23(
13964
14108
  "a",
13965
14109
  {
13966
14110
  href: headerMediaUrl,
@@ -13968,10 +14112,10 @@ function TemplateSelectionBlock({
13968
14112
  rel: "noopener noreferrer",
13969
14113
  title: "\u05EA\u05E6\u05D5\u05D2\u05D4 \u05DE\u05E7\u05D3\u05D9\u05DE\u05D4 \u05E9\u05DC \u05D4\u05E7\u05D5\u05D1\u05E5",
13970
14114
  className: "p-1 text-slate-400 hover:text-emerald-700 hover:bg-slate-200/60 rounded-md transition-colors",
13971
- children: /* @__PURE__ */ jsx22(ExternalLink4, { className: "w-3.5 h-3.5" })
14115
+ children: /* @__PURE__ */ jsx23(ExternalLink4, { className: "w-3.5 h-3.5" })
13972
14116
  }
13973
14117
  ),
13974
- /* @__PURE__ */ jsx22(
14118
+ /* @__PURE__ */ jsx23(
13975
14119
  "input",
13976
14120
  {
13977
14121
  ref: fileInputRef,
@@ -13989,7 +14133,7 @@ function TemplateSelectionBlock({
13989
14133
  disabled: isUploadingMedia
13990
14134
  }
13991
14135
  ),
13992
- /* @__PURE__ */ jsx22(
14136
+ /* @__PURE__ */ jsx23(
13993
14137
  "button",
13994
14138
  {
13995
14139
  type: "button",
@@ -14000,39 +14144,39 @@ function TemplateSelectionBlock({
14000
14144
  },
14001
14145
  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"}`,
14002
14146
  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`,
14003
- children: isUploadingMedia ? /* @__PURE__ */ jsxs18(Fragment5, { children: [
14004
- /* @__PURE__ */ jsx22(Loader25, { className: "w-3.5 h-3.5 animate-spin" }),
14005
- /* @__PURE__ */ jsx22("span", { children: "\u05DE\u05E2\u05DC\u05D4..." })
14006
- ] }) : /* @__PURE__ */ jsxs18(Fragment5, { children: [
14007
- /* @__PURE__ */ jsx22(Upload3, { className: "w-3.5 h-3.5" }),
14008
- /* @__PURE__ */ jsx22("span", { children: hasValidMedia ? "\u05D4\u05D7\u05DC\u05E3 \u05E7\u05D5\u05D1\u05E5" : uploadButtonLabel })
14147
+ children: isUploadingMedia ? /* @__PURE__ */ jsxs19(Fragment6, { children: [
14148
+ /* @__PURE__ */ jsx23(Loader25, { className: "w-3.5 h-3.5 animate-spin" }),
14149
+ /* @__PURE__ */ jsx23("span", { children: "\u05DE\u05E2\u05DC\u05D4..." })
14150
+ ] }) : /* @__PURE__ */ jsxs19(Fragment6, { children: [
14151
+ /* @__PURE__ */ jsx23(Upload3, { className: "w-3.5 h-3.5" }),
14152
+ /* @__PURE__ */ jsx23("span", { children: hasValidMedia ? "\u05D4\u05D7\u05DC\u05E3 \u05E7\u05D5\u05D1\u05E5" : uploadButtonLabel })
14009
14153
  ] })
14010
14154
  }
14011
14155
  )
14012
14156
  ] })
14013
14157
  ] });
14014
14158
  })(),
14015
- 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: [
14016
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between shrink-0", children: [
14017
- /* @__PURE__ */ jsx22("span", { className: "text-[11px] font-bold text-slate-700", children: "\u05DE\u05D9\u05E4\u05D5\u05D9 \u05DE\u05E9\u05EA\u05E0\u05D9\u05DD" }),
14018
- /* @__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: [
14159
+ selectedTemplate && templateVariables.length > 0 && /* @__PURE__ */ jsxs19("div", { className: "shrink-0 flex flex-col gap-1.5 pt-2 border-t border-slate-200/80 pb-0", children: [
14160
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between shrink-0", children: [
14161
+ /* @__PURE__ */ jsx23("span", { className: "text-[11px] font-bold text-slate-700", children: "\u05DE\u05D9\u05E4\u05D5\u05D9 \u05DE\u05E9\u05EA\u05E0\u05D9\u05DD" }),
14162
+ /* @__PURE__ */ jsxs19("span", { className: "text-[9px] font-semibold text-emerald-700 bg-emerald-50 px-1.5 py-0.5 rounded border border-emerald-200", children: [
14019
14163
  templateVariables.length,
14020
14164
  " \u05DE\u05E9\u05EA\u05E0\u05D9\u05DD"
14021
14165
  ] })
14022
14166
  ] }),
14023
- /* @__PURE__ */ jsx22("div", { className: "max-h-48 overflow-y-auto space-y-1.5 pr-0.5", children: templateVariables.map((varKey) => {
14167
+ /* @__PURE__ */ jsx23("div", { className: "max-h-48 overflow-y-auto space-y-1.5 pr-0.5", children: templateVariables.map((varKey) => {
14024
14168
  var _a;
14025
14169
  const mapping = variableMapping[varKey] || { type: "column", value: "" };
14026
14170
  const isStatic = mapping.type === "static";
14027
14171
  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 || "";
14028
- return /* @__PURE__ */ jsxs18(
14172
+ return /* @__PURE__ */ jsxs19(
14029
14173
  "div",
14030
14174
  {
14031
14175
  className: "flex items-center gap-1.5 p-1 bg-white border border-slate-200 rounded-xl text-xs shrink-0",
14032
14176
  children: [
14033
- /* @__PURE__ */ jsx22("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}}}` }),
14034
- /* @__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: [
14035
- /* @__PURE__ */ jsx22(
14177
+ /* @__PURE__ */ jsx23("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}}}` }),
14178
+ /* @__PURE__ */ jsxs19("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: [
14179
+ /* @__PURE__ */ jsx23(
14036
14180
  "button",
14037
14181
  {
14038
14182
  type: "button",
@@ -14041,7 +14185,7 @@ function TemplateSelectionBlock({
14041
14185
  children: "\u05E2\u05DE\u05D5\u05D3\u05D4"
14042
14186
  }
14043
14187
  ),
14044
- /* @__PURE__ */ jsx22(
14188
+ /* @__PURE__ */ jsx23(
14045
14189
  "button",
14046
14190
  {
14047
14191
  type: "button",
@@ -14051,7 +14195,7 @@ function TemplateSelectionBlock({
14051
14195
  }
14052
14196
  )
14053
14197
  ] }),
14054
- isStatic ? /* @__PURE__ */ jsx22(
14198
+ isStatic ? /* @__PURE__ */ jsx23(
14055
14199
  "input",
14056
14200
  {
14057
14201
  type: "text",
@@ -14060,20 +14204,20 @@ function TemplateSelectionBlock({
14060
14204
  placeholder: "\u05D4\u05D6\u05DF \u05E2\u05E8\u05DA \u05E7\u05D1\u05D5\u05E2 (\u05D7\u05D5\u05D1\u05D4)...",
14061
14205
  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"}`
14062
14206
  }
14063
- ) : /* @__PURE__ */ jsxs18("div", { className: "relative flex-1 min-w-0", children: [
14064
- /* @__PURE__ */ jsxs18(
14207
+ ) : /* @__PURE__ */ jsxs19("div", { className: "relative flex-1 min-w-0", children: [
14208
+ /* @__PURE__ */ jsxs19(
14065
14209
  "select",
14066
14210
  {
14067
14211
  value: selectedColVal,
14068
14212
  onChange: (e) => handleVariableValueChange(varKey, e.target.value),
14069
14213
  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",
14070
14214
  children: [
14071
- /* @__PURE__ */ jsx22("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4..." }),
14072
- textableColumnOptions.map((opt) => /* @__PURE__ */ jsx22("option", { value: opt.id, children: opt.label }, opt.id))
14215
+ /* @__PURE__ */ jsx23("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4..." }),
14216
+ textableColumnOptions.map((opt) => /* @__PURE__ */ jsx23("option", { value: opt.id, children: opt.label }, opt.id))
14073
14217
  ]
14074
14218
  }
14075
14219
  ),
14076
- /* @__PURE__ */ jsx22(ChevronDown4, { className: "w-3 h-3 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
14220
+ /* @__PURE__ */ jsx23(ChevronDown4, { className: "w-3 h-3 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
14077
14221
  ] })
14078
14222
  ]
14079
14223
  },
@@ -14093,7 +14237,7 @@ import {
14093
14237
  CheckSquare,
14094
14238
  RefreshCw
14095
14239
  } from "lucide-react";
14096
- import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
14240
+ import { Fragment as Fragment7, jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
14097
14241
  function DynamicFiltersBlock({
14098
14242
  filterableColumns,
14099
14243
  filters,
@@ -14108,31 +14252,31 @@ function DynamicFiltersBlock({
14108
14252
  loadTableData,
14109
14253
  isLoadingTableData
14110
14254
  }) {
14111
- 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: [
14112
- /* @__PURE__ */ jsxs19("div", { className: "space-y-2", children: [
14113
- /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between pb-2 border-b border-slate-200/70 shrink-0", children: [
14114
- /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2", children: [
14115
- /* @__PURE__ */ jsx23(Filter3, { className: "w-4 h-4 text-emerald-600" }),
14116
- /* @__PURE__ */ jsx23("span", { className: "text-xs font-bold text-slate-800", children: "\u05E1\u05D9\u05E0\u05D5\u05DF \u05D3\u05D9\u05E0\u05DE\u05D9" }),
14117
- activeFiltersCount > 0 && /* @__PURE__ */ jsx23("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 })
14255
+ return /* @__PURE__ */ jsxs20("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: [
14256
+ /* @__PURE__ */ jsxs20("div", { className: "space-y-2", children: [
14257
+ /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between pb-2 border-b border-slate-200/70 shrink-0", children: [
14258
+ /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
14259
+ /* @__PURE__ */ jsx24(Filter3, { className: "w-4 h-4 text-emerald-600" }),
14260
+ /* @__PURE__ */ jsx24("span", { className: "text-xs font-bold text-slate-800", children: "\u05E1\u05D9\u05E0\u05D5\u05DF \u05D3\u05D9\u05E0\u05DE\u05D9" }),
14261
+ activeFiltersCount > 0 && /* @__PURE__ */ jsx24("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 })
14118
14262
  ] }),
14119
- activeFiltersCount > 0 && /* @__PURE__ */ jsxs19(
14263
+ activeFiltersCount > 0 && /* @__PURE__ */ jsxs20(
14120
14264
  "button",
14121
14265
  {
14122
14266
  type: "button",
14123
14267
  onClick: handleClearFilters,
14124
14268
  className: "text-[11px] text-rose-600 hover:text-rose-700 font-semibold hover:underline flex items-center gap-1 cursor-pointer",
14125
14269
  children: [
14126
- /* @__PURE__ */ jsx23(X10, { className: "w-3 h-3" }),
14127
- /* @__PURE__ */ jsx23("span", { children: "\u05E0\u05E7\u05D4" })
14270
+ /* @__PURE__ */ jsx24(X10, { className: "w-3 h-3" }),
14271
+ /* @__PURE__ */ jsx24("span", { children: "\u05E0\u05E7\u05D4" })
14128
14272
  ]
14129
14273
  }
14130
14274
  )
14131
14275
  ] }),
14132
- /* @__PURE__ */ jsx23("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: [
14133
- /* @__PURE__ */ jsx23("span", { children: "\u05D0\u05D9\u05DF \u05E9\u05D3\u05D5\u05EA \u05DC\u05E1\u05D9\u05E0\u05D5\u05DF \u05D1\u05D8\u05D1\u05DC\u05D4 \u05D6\u05D5" }),
14134
- /* @__PURE__ */ jsx23("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" })
14135
- ] }) : /* @__PURE__ */ jsx23("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-1 gap-2", children: filterableColumns.map((col) => {
14276
+ /* @__PURE__ */ jsx24("div", { className: "py-1", children: filterableColumns.length === 0 ? /* @__PURE__ */ jsxs20("div", { className: "flex flex-col items-center justify-center text-center p-4 text-xs text-slate-400 gap-1", children: [
14277
+ /* @__PURE__ */ jsx24("span", { children: "\u05D0\u05D9\u05DF \u05E9\u05D3\u05D5\u05EA \u05DC\u05E1\u05D9\u05E0\u05D5\u05DF \u05D1\u05D8\u05D1\u05DC\u05D4 \u05D6\u05D5" }),
14278
+ /* @__PURE__ */ jsx24("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" })
14279
+ ] }) : /* @__PURE__ */ jsx24("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-1 gap-2", children: filterableColumns.map((col) => {
14136
14280
  var _a, _b, _c;
14137
14281
  const colType = (_a = col.type) == null ? void 0 : _a.toUpperCase();
14138
14282
  const isBoolean = colType === "BOOLEAN";
@@ -14140,9 +14284,9 @@ function DynamicFiltersBlock({
14140
14284
  const isActive = Boolean(currentValue);
14141
14285
  const refTableId = ((_b = col == null ? void 0 : col.config) == null ? void 0 : _b.referencedTableId) || (col == null ? void 0 : col.referencedTableId);
14142
14286
  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] : [];
14143
- return /* @__PURE__ */ jsxs19("div", { className: "space-y-1", children: [
14144
- /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between", children: [
14145
- /* @__PURE__ */ jsx23(
14287
+ return /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
14288
+ /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between", children: [
14289
+ /* @__PURE__ */ jsx24(
14146
14290
  "label",
14147
14291
  {
14148
14292
  className: "text-[11px] font-semibold text-slate-700 truncate max-w-[130px]",
@@ -14150,49 +14294,49 @@ function DynamicFiltersBlock({
14150
14294
  children: col.name
14151
14295
  }
14152
14296
  ),
14153
- /* @__PURE__ */ jsx23("span", { className: "text-[9px] text-slate-400 font-mono", children: isBoolean ? "\u05DB\u05DF/\u05DC\u05D0" : "\u05E7\u05E9\u05E8" })
14297
+ /* @__PURE__ */ jsx24("span", { className: "text-[9px] text-slate-400 font-mono", children: isBoolean ? "\u05DB\u05DF/\u05DC\u05D0" : "\u05E7\u05E9\u05E8" })
14154
14298
  ] }),
14155
- /* @__PURE__ */ jsxs19("div", { className: "relative", children: [
14156
- /* @__PURE__ */ jsxs19(
14299
+ /* @__PURE__ */ jsxs20("div", { className: "relative", children: [
14300
+ /* @__PURE__ */ jsxs20(
14157
14301
  "select",
14158
14302
  {
14159
14303
  value: currentValue,
14160
14304
  onChange: (e) => handleFilterChange(col.name, e.target.value),
14161
14305
  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"}`,
14162
14306
  children: [
14163
- /* @__PURE__ */ jsx23("option", { value: "", children: "\u05D4\u05DB\u05DC" }),
14164
- isBoolean ? /* @__PURE__ */ jsxs19(Fragment6, { children: [
14165
- /* @__PURE__ */ jsx23("option", { value: "true", children: "\u05DB\u05DF" }),
14166
- /* @__PURE__ */ jsx23("option", { value: "false", children: "\u05DC\u05D0" })
14167
- ] }) : options.map((opt) => /* @__PURE__ */ jsx23("option", { value: opt.id || opt._id, children: getRelationOptionLabel(opt, col, relationOptions) }, opt.id || opt._id))
14307
+ /* @__PURE__ */ jsx24("option", { value: "", children: "\u05D4\u05DB\u05DC" }),
14308
+ isBoolean ? /* @__PURE__ */ jsxs20(Fragment7, { children: [
14309
+ /* @__PURE__ */ jsx24("option", { value: "true", children: "\u05DB\u05DF" }),
14310
+ /* @__PURE__ */ jsx24("option", { value: "false", children: "\u05DC\u05D0" })
14311
+ ] }) : options.map((opt) => /* @__PURE__ */ jsx24("option", { value: opt.id || opt._id, children: getRelationOptionLabel(opt, col, relationOptions) }, opt.id || opt._id))
14168
14312
  ]
14169
14313
  }
14170
14314
  ),
14171
- /* @__PURE__ */ jsx23(ChevronDown5, { className: "w-3 h-3 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
14315
+ /* @__PURE__ */ jsx24(ChevronDown5, { className: "w-3 h-3 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
14172
14316
  ] })
14173
14317
  ] }, col.name);
14174
14318
  }) }) })
14175
14319
  ] }),
14176
- /* @__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: [
14177
- /* @__PURE__ */ jsxs19(
14320
+ /* @__PURE__ */ jsxs20("div", { className: "pt-2.5 mt-2 border-t border-slate-200/80 flex items-center justify-between gap-1.5 shrink-0", children: [
14321
+ /* @__PURE__ */ jsxs20(
14178
14322
  "div",
14179
14323
  {
14180
14324
  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"}`,
14181
14325
  children: [
14182
- /* @__PURE__ */ jsx23(
14326
+ /* @__PURE__ */ jsx24(
14183
14327
  CheckSquare,
14184
14328
  {
14185
14329
  className: `w-3 h-3 ${selectedRowIds.length > 0 ? "text-emerald-600" : "text-slate-400"}`
14186
14330
  }
14187
14331
  ),
14188
- /* @__PURE__ */ jsxs19("span", { children: [
14332
+ /* @__PURE__ */ jsxs20("span", { children: [
14189
14333
  "\u05E0\u05D1\u05D7\u05E8\u05D5 ",
14190
14334
  selectedRowIds.length
14191
14335
  ] })
14192
14336
  ]
14193
14337
  }
14194
14338
  ),
14195
- /* @__PURE__ */ jsx23(
14339
+ /* @__PURE__ */ jsx24(
14196
14340
  "button",
14197
14341
  {
14198
14342
  type: "button",
@@ -14200,7 +14344,7 @@ function DynamicFiltersBlock({
14200
14344
  disabled: isLoadingTableData,
14201
14345
  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",
14202
14346
  title: "\u05E8\u05E2\u05E0\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9 \u05D8\u05D1\u05DC\u05D4",
14203
- children: /* @__PURE__ */ jsx23(
14347
+ children: /* @__PURE__ */ jsx24(
14204
14348
  RefreshCw,
14205
14349
  {
14206
14350
  className: `w-3.5 h-3.5 ${isLoadingTableData ? "animate-spin text-emerald-600" : ""}`
@@ -14223,7 +14367,7 @@ import {
14223
14367
  X as X11,
14224
14368
  CheckSquare as CheckSquare2
14225
14369
  } from "lucide-react";
14226
- import { Fragment as Fragment7, jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
14370
+ import { Fragment as Fragment8, jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
14227
14371
  function SettingsAndActionsBlock({
14228
14372
  isScanningPhoneColumns,
14229
14373
  targetPhoneOptions,
@@ -14266,29 +14410,29 @@ function SettingsAndActionsBlock({
14266
14410
  clearBroadcastSummary
14267
14411
  }) {
14268
14412
  var _a;
14269
- return /* @__PURE__ */ jsxs20("div", { className: "col-span-12 lg:col-span-4 min-h-[26rem] flex flex-col justify-between bg-slate-50/70 border border-slate-200 rounded-2xl p-3.5 gap-2", children: [
14270
- /* @__PURE__ */ jsxs20("div", { className: "space-y-2", children: [
14271
- /* @__PURE__ */ jsx24("div", { className: "flex items-center justify-between pb-2 border-b border-slate-200/70 shrink-0", children: /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
14272
- /* @__PURE__ */ jsx24("span", { className: "text-sm", children: "\u2699\uFE0F" }),
14273
- /* @__PURE__ */ jsx24("span", { className: "text-xs font-bold text-slate-800", children: "\u05D4\u05D2\u05D3\u05E8\u05D5\u05EA \u05D5\u05E4\u05E2\u05D5\u05DC\u05D5\u05EA" })
14413
+ return /* @__PURE__ */ jsxs21("div", { className: "col-span-12 lg:col-span-4 min-h-[26rem] flex flex-col justify-between bg-slate-50/70 border border-slate-200 rounded-2xl p-3.5 gap-2", children: [
14414
+ /* @__PURE__ */ jsxs21("div", { className: "space-y-2", children: [
14415
+ /* @__PURE__ */ jsx25("div", { className: "flex items-center justify-between pb-2 border-b border-slate-200/70 shrink-0", children: /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2", children: [
14416
+ /* @__PURE__ */ jsx25("span", { className: "text-sm", children: "\u2699\uFE0F" }),
14417
+ /* @__PURE__ */ jsx25("span", { className: "text-xs font-bold text-slate-800", children: "\u05D4\u05D2\u05D3\u05E8\u05D5\u05EA \u05D5\u05E4\u05E2\u05D5\u05DC\u05D5\u05EA" })
14274
14418
  ] }) }),
14275
- /* @__PURE__ */ jsxs20("div", { className: "space-y-2.5 py-1", children: [
14276
- isScanningPhoneColumns && targetPhoneOptions.length === 0 ? /* @__PURE__ */ jsxs20("div", { className: "p-2.5 bg-slate-100/80 border border-slate-200 rounded-xl text-slate-500 text-xs flex items-center gap-2 shadow-2xs animate-pulse", children: [
14277
- /* @__PURE__ */ jsx24(Loader26, { className: "w-4 h-4 animate-spin text-emerald-600 shrink-0" }),
14278
- /* @__PURE__ */ jsx24("span", { className: "font-medium text-[11px] text-slate-600", children: "\u05E1\u05D5\u05E8\u05E7 \u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05D8\u05DC\u05E4\u05D5\u05DF \u05D1\u05D8\u05D1\u05DC\u05D4 \u05D5\u05D1\u05D8\u05D1\u05DC\u05D0\u05D5\u05EA \u05DE\u05E7\u05D5\u05E9\u05E8\u05D5\u05EA..." })
14279
- ] }) : targetPhoneOptions.length === 0 ? /* @__PURE__ */ jsxs20("div", { className: "p-2.5 bg-amber-50 border border-amber-200 rounded-xl text-amber-900 text-xs flex items-center gap-2 shadow-2xs", children: [
14280
- /* @__PURE__ */ jsx24(AlertCircle4, { className: "w-4 h-4 text-amber-600 shrink-0" }),
14281
- /* @__PURE__ */ jsx24("span", { className: "font-semibold text-[11px]", children: "\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D4 \u05E2\u05DE\u05D5\u05D3\u05EA \u05D8\u05DC\u05E4\u05D5\u05DF \u05D1\u05D8\u05D1\u05DC\u05D4" })
14282
- ] }) : targetPhoneOptions.length === 1 && targetPhoneOptions[0].type === "DIRECT" ? /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
14283
- /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between", children: [
14284
- /* @__PURE__ */ jsxs20("label", { className: "text-[11px] font-semibold text-slate-700 flex items-center gap-1", children: [
14285
- /* @__PURE__ */ jsx24(Phone3, { className: "w-3 h-3 text-slate-400" }),
14286
- /* @__PURE__ */ jsx24("span", { children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D8\u05DC\u05E4\u05D5\u05DF \u05D9\u05E2\u05D3" })
14419
+ /* @__PURE__ */ jsxs21("div", { className: "space-y-2.5 py-1", children: [
14420
+ isScanningPhoneColumns && targetPhoneOptions.length === 0 ? /* @__PURE__ */ jsxs21("div", { className: "p-2.5 bg-slate-100/80 border border-slate-200 rounded-xl text-slate-500 text-xs flex items-center gap-2 shadow-2xs animate-pulse", children: [
14421
+ /* @__PURE__ */ jsx25(Loader26, { className: "w-4 h-4 animate-spin text-emerald-600 shrink-0" }),
14422
+ /* @__PURE__ */ jsx25("span", { className: "font-medium text-[11px] text-slate-600", children: "\u05E1\u05D5\u05E8\u05E7 \u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05D8\u05DC\u05E4\u05D5\u05DF \u05D1\u05D8\u05D1\u05DC\u05D4 \u05D5\u05D1\u05D8\u05D1\u05DC\u05D0\u05D5\u05EA \u05DE\u05E7\u05D5\u05E9\u05E8\u05D5\u05EA..." })
14423
+ ] }) : targetPhoneOptions.length === 0 ? /* @__PURE__ */ jsxs21("div", { className: "p-2.5 bg-amber-50 border border-amber-200 rounded-xl text-amber-900 text-xs flex items-center gap-2 shadow-2xs", children: [
14424
+ /* @__PURE__ */ jsx25(AlertCircle4, { className: "w-4 h-4 text-amber-600 shrink-0" }),
14425
+ /* @__PURE__ */ jsx25("span", { className: "font-semibold text-[11px]", children: "\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D4 \u05E2\u05DE\u05D5\u05D3\u05EA \u05D8\u05DC\u05E4\u05D5\u05DF \u05D1\u05D8\u05D1\u05DC\u05D4" })
14426
+ ] }) : targetPhoneOptions.length === 1 && targetPhoneOptions[0].type === "DIRECT" ? /* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
14427
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between", children: [
14428
+ /* @__PURE__ */ jsxs21("label", { className: "text-[11px] font-semibold text-slate-700 flex items-center gap-1", children: [
14429
+ /* @__PURE__ */ jsx25(Phone3, { className: "w-3 h-3 text-slate-400" }),
14430
+ /* @__PURE__ */ jsx25("span", { children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D8\u05DC\u05E4\u05D5\u05DF \u05D9\u05E2\u05D3" })
14287
14431
  ] }),
14288
- /* @__PURE__ */ jsx24("span", { className: "text-[9px] font-medium text-slate-500 bg-slate-100 px-1.5 py-0.5 rounded border border-slate-200", children: "\u05D6\u05D5\u05D4\u05EA\u05D4 \u05D0\u05D5\u05D8\u05D5\u05DE\u05D8\u05D9\u05EA" })
14432
+ /* @__PURE__ */ jsx25("span", { className: "text-[9px] font-medium text-slate-500 bg-slate-100 px-1.5 py-0.5 rounded border border-slate-200", children: "\u05D6\u05D5\u05D4\u05EA\u05D4 \u05D0\u05D5\u05D8\u05D5\u05DE\u05D8\u05D9\u05EA" })
14289
14433
  ] }),
14290
- /* @__PURE__ */ jsxs20("div", { className: "relative", children: [
14291
- /* @__PURE__ */ jsx24(
14434
+ /* @__PURE__ */ jsxs21("div", { className: "relative", children: [
14435
+ /* @__PURE__ */ jsx25(
14292
14436
  "input",
14293
14437
  {
14294
14438
  type: "text",
@@ -14298,52 +14442,52 @@ function SettingsAndActionsBlock({
14298
14442
  className: "w-full h-8 px-2.5 pl-7 text-[11px] rounded-lg border border-slate-200 bg-slate-100 text-slate-600 cursor-not-allowed font-medium select-none"
14299
14443
  }
14300
14444
  ),
14301
- /* @__PURE__ */ jsx24(Phone3, { className: "w-3.5 h-3.5 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
14445
+ /* @__PURE__ */ jsx25(Phone3, { className: "w-3.5 h-3.5 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
14302
14446
  ] })
14303
- ] }) : /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
14304
- /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between", children: [
14305
- /* @__PURE__ */ jsxs20("label", { className: "text-[11px] font-semibold text-slate-700 flex items-center gap-1", children: [
14306
- /* @__PURE__ */ jsx24(Phone3, { className: "w-3 h-3 text-slate-400" }),
14307
- /* @__PURE__ */ jsx24("span", { children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D8\u05DC\u05E4\u05D5\u05DF \u05D9\u05E2\u05D3" })
14447
+ ] }) : /* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
14448
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between", children: [
14449
+ /* @__PURE__ */ jsxs21("label", { className: "text-[11px] font-semibold text-slate-700 flex items-center gap-1", children: [
14450
+ /* @__PURE__ */ jsx25(Phone3, { className: "w-3 h-3 text-slate-400" }),
14451
+ /* @__PURE__ */ jsx25("span", { children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D8\u05DC\u05E4\u05D5\u05DF \u05D9\u05E2\u05D3" })
14308
14452
  ] }),
14309
- /* @__PURE__ */ jsx24("span", { className: "text-[9px] text-slate-400", children: "\u05D7\u05D5\u05D1\u05D4" })
14453
+ /* @__PURE__ */ jsx25("span", { className: "text-[9px] text-slate-400", children: "\u05D7\u05D5\u05D1\u05D4" })
14310
14454
  ] }),
14311
- /* @__PURE__ */ jsxs20("div", { className: "relative", children: [
14312
- /* @__PURE__ */ jsx24(
14455
+ /* @__PURE__ */ jsxs21("div", { className: "relative", children: [
14456
+ /* @__PURE__ */ jsx25(
14313
14457
  "select",
14314
14458
  {
14315
14459
  value: phoneColumnId,
14316
14460
  onChange: (e) => setPhoneColumnId(e.target.value),
14317
14461
  className: "w-full h-8 px-2.5 pr-2.5 pl-6 text-[11px] rounded-lg border border-slate-200 bg-white text-slate-700 appearance-none focus:border-emerald-500 cursor-pointer",
14318
- children: targetPhoneOptions.map((opt) => /* @__PURE__ */ jsx24("option", { value: opt.id, children: opt.label }, opt.id))
14462
+ children: targetPhoneOptions.map((opt) => /* @__PURE__ */ jsx25("option", { value: opt.id, children: opt.label }, opt.id))
14319
14463
  }
14320
14464
  ),
14321
- /* @__PURE__ */ jsx24(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
14465
+ /* @__PURE__ */ jsx25(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
14322
14466
  ] })
14323
14467
  ] }),
14324
- /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
14325
- /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between", children: [
14326
- /* @__PURE__ */ jsxs20(
14468
+ /* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
14469
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between", children: [
14470
+ /* @__PURE__ */ jsxs21(
14327
14471
  "label",
14328
14472
  {
14329
14473
  htmlFor: "whatsapp-auto-select-records",
14330
14474
  className: "text-[11px] font-semibold text-slate-700 flex items-center gap-1 cursor-pointer",
14331
14475
  children: [
14332
- /* @__PURE__ */ jsx24(CheckSquare2, { className: "w-3 h-3 text-slate-400" }),
14333
- /* @__PURE__ */ jsx24("span", { children: "\u05D1\u05D7\u05E8 \u05E8\u05E9\u05D5\u05DE\u05D4 (\u05DB\u05DE\u05D5\u05EA \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05DE\u05E8\u05D1\u05D9\u05EA)" })
14476
+ /* @__PURE__ */ jsx25(CheckSquare2, { className: "w-3 h-3 text-slate-400" }),
14477
+ /* @__PURE__ */ jsx25("span", { children: "\u05D1\u05D7\u05E8 \u05E8\u05E9\u05D5\u05DE\u05D4 (\u05DB\u05DE\u05D5\u05EA \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05DE\u05E8\u05D1\u05D9\u05EA)" })
14334
14478
  ]
14335
14479
  }
14336
14480
  ),
14337
- autoSelectCount !== null && autoSelectCount > 0 && /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-1.5 animate-in fade-in duration-150", children: [
14338
- /* @__PURE__ */ jsxs20("span", { className: "text-[9px] font-semibold text-emerald-700 bg-emerald-50 border border-emerald-200/80 px-1.5 py-0.5 rounded-full flex items-center gap-1", children: [
14339
- /* @__PURE__ */ jsx24("span", { className: "w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse" }),
14340
- /* @__PURE__ */ jsxs20("span", { children: [
14481
+ autoSelectCount !== null && autoSelectCount > 0 && /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-1.5 animate-in fade-in duration-150", children: [
14482
+ /* @__PURE__ */ jsxs21("span", { className: "text-[9px] font-semibold text-emerald-700 bg-emerald-50 border border-emerald-200/80 px-1.5 py-0.5 rounded-full flex items-center gap-1", children: [
14483
+ /* @__PURE__ */ jsx25("span", { className: "w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse" }),
14484
+ /* @__PURE__ */ jsxs21("span", { children: [
14341
14485
  "\u05E0\u05D1\u05D7\u05E8\u05D5 ",
14342
14486
  selectedRowIdsCount,
14343
14487
  " \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA"
14344
14488
  ] })
14345
14489
  ] }),
14346
- /* @__PURE__ */ jsxs20(
14490
+ /* @__PURE__ */ jsxs21(
14347
14491
  "button",
14348
14492
  {
14349
14493
  type: "button",
@@ -14352,14 +14496,14 @@ function SettingsAndActionsBlock({
14352
14496
  title: "\u05E0\u05E7\u05D4 \u05D1\u05D7\u05D9\u05E8\u05D4 \u05D0\u05D5\u05D8\u05D5\u05DE\u05D8\u05D9\u05EA",
14353
14497
  "aria-label": "Clear auto select count",
14354
14498
  children: [
14355
- /* @__PURE__ */ jsx24(X11, { className: "w-3 h-3" }),
14356
- /* @__PURE__ */ jsx24("span", { children: "\u05E0\u05E7\u05D4" })
14499
+ /* @__PURE__ */ jsx25(X11, { className: "w-3 h-3" }),
14500
+ /* @__PURE__ */ jsx25("span", { children: "\u05E0\u05E7\u05D4" })
14357
14501
  ]
14358
14502
  }
14359
14503
  )
14360
14504
  ] })
14361
14505
  ] }),
14362
- /* @__PURE__ */ jsx24("div", { className: "relative", children: /* @__PURE__ */ jsx24(
14506
+ /* @__PURE__ */ jsx25("div", { className: "relative", children: /* @__PURE__ */ jsx25(
14363
14507
  "input",
14364
14508
  {
14365
14509
  id: "whatsapp-auto-select-records",
@@ -14387,19 +14531,19 @@ function SettingsAndActionsBlock({
14387
14531
  }
14388
14532
  ) })
14389
14533
  ] }),
14390
- (selectedPhoneOption == null ? void 0 : selectedPhoneOption.type) === "SUBTABLE" && /* @__PURE__ */ jsxs20("div", { className: "p-2.5 bg-emerald-50/60 border border-emerald-200/80 rounded-xl space-y-2 animate-in fade-in duration-150", children: [
14391
- /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-1.5 pb-1 border-b border-emerald-200/60", children: [
14392
- /* @__PURE__ */ jsx24(Users, { className: "w-3.5 h-3.5 text-emerald-700" }),
14393
- /* @__PURE__ */ jsxs20("span", { className: "text-[10.5px] font-bold text-emerald-900 truncate", children: [
14534
+ (selectedPhoneOption == null ? void 0 : selectedPhoneOption.type) === "SUBTABLE" && /* @__PURE__ */ jsxs21("div", { className: "p-2.5 bg-emerald-50/60 border border-emerald-200/80 rounded-xl space-y-2 animate-in fade-in duration-150", children: [
14535
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-1.5 pb-1 border-b border-emerald-200/60", children: [
14536
+ /* @__PURE__ */ jsx25(Users, { className: "w-3.5 h-3.5 text-emerald-700" }),
14537
+ /* @__PURE__ */ jsxs21("span", { className: "text-[10.5px] font-bold text-emerald-900 truncate", children: [
14394
14538
  "\u05D4\u05D2\u05D3\u05E8\u05D5\u05EA \u05E9\u05DC\u05D9\u05D7\u05D4 \u05DC\u05EA\u05EA-\u05D8\u05D1\u05DC\u05D4 \u05DE\u05E7\u05D5\u05E9\u05E8\u05EA (",
14395
14539
  selectedPhoneOption.parentColumnName,
14396
14540
  ")"
14397
14541
  ] })
14398
14542
  ] }),
14399
- /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
14400
- /* @__PURE__ */ jsx24("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsx24("label", { className: "text-[10px] font-semibold text-slate-700 block", children: "\u05E1\u05E0\u05DF \u05E0\u05E6\u05D9\u05D2\u05D9\u05DD (\u05D1\u05EA\u05EA-\u05D4\u05D8\u05D1\u05DC\u05D4) \u05DC\u05E4\u05D9 \u05E2\u05DE\u05D5\u05D3\u05D4:" }) }),
14401
- /* @__PURE__ */ jsxs20("div", { className: "relative", children: [
14402
- /* @__PURE__ */ jsxs20(
14543
+ /* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
14544
+ /* @__PURE__ */ jsx25("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsx25("label", { className: "text-[10px] font-semibold text-slate-700 block", children: "\u05E1\u05E0\u05DF \u05E0\u05E6\u05D9\u05D2\u05D9\u05DD (\u05D1\u05EA\u05EA-\u05D4\u05D8\u05D1\u05DC\u05D4) \u05DC\u05E4\u05D9 \u05E2\u05DE\u05D5\u05D3\u05D4:" }) }),
14545
+ /* @__PURE__ */ jsxs21("div", { className: "relative", children: [
14546
+ /* @__PURE__ */ jsxs21(
14403
14547
  "select",
14404
14548
  {
14405
14549
  value: subtableFilterColumn,
@@ -14409,10 +14553,10 @@ function SettingsAndActionsBlock({
14409
14553
  },
14410
14554
  className: "w-full h-7 px-2 pr-2 pl-5 text-[11px] rounded-lg border border-slate-200 bg-white text-slate-700 appearance-none focus:border-emerald-500 cursor-pointer truncate",
14411
14555
  children: [
14412
- /* @__PURE__ */ jsx24("option", { value: "", children: "\u05DB\u05DC \u05D4\u05E0\u05E6\u05D9\u05D2\u05D9\u05DD \u05E9\u05E0\u05D1\u05D7\u05E8\u05D5 (\u05DC\u05DC\u05D0 \u05E1\u05D9\u05E0\u05D5\u05DF \u05E0\u05D5\u05E1\u05E3)" }),
14556
+ /* @__PURE__ */ jsx25("option", { value: "", children: "\u05DB\u05DC \u05D4\u05E0\u05E6\u05D9\u05D2\u05D9\u05DD \u05E9\u05E0\u05D1\u05D7\u05E8\u05D5 (\u05DC\u05DC\u05D0 \u05E1\u05D9\u05E0\u05D5\u05DF \u05E0\u05D5\u05E1\u05E3)" }),
14413
14557
  subtableFilterableColumns.map((col) => {
14414
14558
  var _a2;
14415
- return /* @__PURE__ */ jsxs20("option", { value: col.name, children: [
14559
+ return /* @__PURE__ */ jsxs21("option", { value: col.name, children: [
14416
14560
  col.name,
14417
14561
  " (",
14418
14562
  ((_a2 = col.type) == null ? void 0 : _a2.toUpperCase()) === "BOOLEAN" ? "\u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9" : "\u05E7\u05E9\u05E8",
@@ -14422,30 +14566,30 @@ function SettingsAndActionsBlock({
14422
14566
  ]
14423
14567
  }
14424
14568
  ),
14425
- /* @__PURE__ */ jsx24(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
14569
+ /* @__PURE__ */ jsx25(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
14426
14570
  ] })
14427
14571
  ] }),
14428
- selectedSubtableFilterCol && /* @__PURE__ */ jsxs20("div", { className: "space-y-1 animate-in fade-in duration-150", children: [
14429
- /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between", children: [
14430
- /* @__PURE__ */ jsx24("label", { className: "text-[10px] font-semibold text-slate-700 block", children: "\u05E9\u05D4\u05E2\u05E8\u05DA \u05E9\u05DC\u05D4\u05DD \u05E9\u05D5\u05D5\u05D4 \u05DC:" }),
14431
- !subtableFilterValue && /* @__PURE__ */ jsx24("span", { className: "text-[9px] text-amber-600 font-medium", children: "\u05D1\u05D7\u05E8 \u05E2\u05E8\u05DA..." })
14572
+ selectedSubtableFilterCol && /* @__PURE__ */ jsxs21("div", { className: "space-y-1 animate-in fade-in duration-150", children: [
14573
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between", children: [
14574
+ /* @__PURE__ */ jsx25("label", { className: "text-[10px] font-semibold text-slate-700 block", children: "\u05E9\u05D4\u05E2\u05E8\u05DA \u05E9\u05DC\u05D4\u05DD \u05E9\u05D5\u05D5\u05D4 \u05DC:" }),
14575
+ !subtableFilterValue && /* @__PURE__ */ jsx25("span", { className: "text-[9px] text-amber-600 font-medium", children: "\u05D1\u05D7\u05E8 \u05E2\u05E8\u05DA..." })
14432
14576
  ] }),
14433
- /* @__PURE__ */ jsxs20("div", { className: "relative", children: [
14434
- /* @__PURE__ */ jsxs20(
14577
+ /* @__PURE__ */ jsxs21("div", { className: "relative", children: [
14578
+ /* @__PURE__ */ jsxs21(
14435
14579
  "select",
14436
14580
  {
14437
14581
  value: subtableFilterValue,
14438
14582
  onChange: (e) => setSubtableFilterValue(e.target.value),
14439
14583
  className: `w-full h-7 px-2 pr-2 pl-5 text-[11px] rounded-lg border appearance-none cursor-pointer truncate transition-colors ${!subtableFilterValue ? "border-amber-400 bg-amber-50/30 text-slate-700 focus:border-amber-500 focus:ring-1 focus:ring-amber-500" : "border-slate-200 bg-white text-slate-700 focus:border-emerald-500"}`,
14440
14584
  children: [
14441
- /* @__PURE__ */ jsx24("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05E8\u05DA \u05DC\u05E1\u05D9\u05E0\u05D5\u05DF..." }),
14442
- ((_a = selectedSubtableFilterCol.type) == null ? void 0 : _a.toUpperCase()) === "BOOLEAN" ? /* @__PURE__ */ jsxs20(Fragment7, { children: [
14443
- /* @__PURE__ */ jsx24("option", { value: "true", children: "\u05DB\u05DF (true)" }),
14444
- /* @__PURE__ */ jsx24("option", { value: "false", children: "\u05DC\u05D0 (false)" })
14585
+ /* @__PURE__ */ jsx25("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05E8\u05DA \u05DC\u05E1\u05D9\u05E0\u05D5\u05DF..." }),
14586
+ ((_a = selectedSubtableFilterCol.type) == null ? void 0 : _a.toUpperCase()) === "BOOLEAN" ? /* @__PURE__ */ jsxs21(Fragment8, { children: [
14587
+ /* @__PURE__ */ jsx25("option", { value: "true", children: "\u05DB\u05DF (true)" }),
14588
+ /* @__PURE__ */ jsx25("option", { value: "false", children: "\u05DC\u05D0 (false)" })
14445
14589
  ] }) : getRelationOptionsForCol(
14446
14590
  selectedSubtableFilterCol.name,
14447
14591
  selectedPhoneOption.parentColumnName
14448
- ).map((opt) => /* @__PURE__ */ jsx24("option", { value: opt.id, children: getRelationOptionLabel(
14592
+ ).map((opt) => /* @__PURE__ */ jsx25("option", { value: opt.id, children: getRelationOptionLabel(
14449
14593
  opt,
14450
14594
  selectedSubtableFilterCol,
14451
14595
  relationOptions
@@ -14453,32 +14597,32 @@ function SettingsAndActionsBlock({
14453
14597
  ]
14454
14598
  }
14455
14599
  ),
14456
- /* @__PURE__ */ jsx24(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
14600
+ /* @__PURE__ */ jsx25(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
14457
14601
  ] })
14458
14602
  ] }),
14459
- /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
14460
- /* @__PURE__ */ jsx24("label", { className: "text-[10px] font-semibold text-slate-700 block", children: "\u05DE\u05D2\u05D1\u05DC\u05EA \u05E9\u05DC\u05D9\u05D7\u05D4 \u05DC\u05DB\u05DC \u05E9\u05D5\u05E8\u05D4 \u05E8\u05D0\u05E9\u05D9\u05EA:" }),
14461
- /* @__PURE__ */ jsxs20("div", { className: "relative", children: [
14462
- /* @__PURE__ */ jsxs20(
14603
+ /* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
14604
+ /* @__PURE__ */ jsx25("label", { className: "text-[10px] font-semibold text-slate-700 block", children: "\u05DE\u05D2\u05D1\u05DC\u05EA \u05E9\u05DC\u05D9\u05D7\u05D4 \u05DC\u05DB\u05DC \u05E9\u05D5\u05E8\u05D4 \u05E8\u05D0\u05E9\u05D9\u05EA:" }),
14605
+ /* @__PURE__ */ jsxs21("div", { className: "relative", children: [
14606
+ /* @__PURE__ */ jsxs21(
14463
14607
  "select",
14464
14608
  {
14465
14609
  value: subtableSendLimit,
14466
14610
  onChange: (e) => setSubtableSendLimit(e.target.value),
14467
14611
  className: "w-full h-7 px-2 pr-2 pl-5 text-[11px] rounded-lg border border-slate-200 bg-white text-slate-700 appearance-none focus:border-emerald-500 cursor-pointer truncate",
14468
14612
  children: [
14469
- /* @__PURE__ */ jsx24("option", { value: "PRIMARY", children: "\u05DC\u05E0\u05E6\u05D9\u05D2 \u05E8\u05D0\u05E9\u05D9 \u05D1\u05DC\u05D1\u05D3" }),
14470
- /* @__PURE__ */ jsx24("option", { value: "FIRST", children: "\u05E0\u05E6\u05D9\u05D2 \u05D0\u05D7\u05D3 \u05D1\u05DC\u05D1\u05D3" }),
14471
- /* @__PURE__ */ jsx24("option", { value: "ALL", children: "\u05DB\u05DC \u05D4\u05E0\u05E6\u05D9\u05D2\u05D9\u05DD" })
14613
+ /* @__PURE__ */ jsx25("option", { value: "PRIMARY", children: "\u05DC\u05E0\u05E6\u05D9\u05D2 \u05E8\u05D0\u05E9\u05D9 \u05D1\u05DC\u05D1\u05D3" }),
14614
+ /* @__PURE__ */ jsx25("option", { value: "FIRST", children: "\u05E0\u05E6\u05D9\u05D2 \u05D0\u05D7\u05D3 \u05D1\u05DC\u05D1\u05D3" }),
14615
+ /* @__PURE__ */ jsx25("option", { value: "ALL", children: "\u05DB\u05DC \u05D4\u05E0\u05E6\u05D9\u05D2\u05D9\u05DD" })
14472
14616
  ]
14473
14617
  }
14474
14618
  ),
14475
- /* @__PURE__ */ jsx24(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
14619
+ /* @__PURE__ */ jsx25(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
14476
14620
  ] })
14477
14621
  ] })
14478
14622
  ] }),
14479
- /* @__PURE__ */ jsxs20("div", { className: "pt-2 border-t border-slate-200/70 space-y-2", children: [
14480
- /* @__PURE__ */ jsxs20("label", { className: "flex items-center gap-2 cursor-pointer select-none", children: [
14481
- /* @__PURE__ */ jsx24(
14623
+ /* @__PURE__ */ jsxs21("div", { className: "pt-2 border-t border-slate-200/70 space-y-2", children: [
14624
+ /* @__PURE__ */ jsxs21("label", { className: "flex items-center gap-2 cursor-pointer select-none", children: [
14625
+ /* @__PURE__ */ jsx25(
14482
14626
  "input",
14483
14627
  {
14484
14628
  type: "checkbox",
@@ -14495,13 +14639,13 @@ function SettingsAndActionsBlock({
14495
14639
  className: "w-3.5 h-3.5 rounded border-slate-300 text-emerald-600 focus:ring-emerald-500 cursor-pointer"
14496
14640
  }
14497
14641
  ),
14498
- /* @__PURE__ */ jsx24("span", { className: "text-[11px] font-semibold text-slate-800", children: "\u05E2\u05D3\u05DB\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05DC\u05D0\u05D7\u05E8 \u05E9\u05DC\u05D9\u05D7\u05D4 \u05DE\u05D5\u05E6\u05DC\u05D7\u05EA" })
14642
+ /* @__PURE__ */ jsx25("span", { className: "text-[11px] font-semibold text-slate-800", children: "\u05E2\u05D3\u05DB\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05DC\u05D0\u05D7\u05E8 \u05E9\u05DC\u05D9\u05D7\u05D4 \u05DE\u05D5\u05E6\u05DC\u05D7\u05EA" })
14499
14643
  ] }),
14500
- enablePostSendAction && /* @__PURE__ */ jsx24("div", { className: "p-2 bg-slate-100/70 border border-slate-200/80 rounded-xl space-y-2 animate-in fade-in duration-150", children: postSendActionTargetOptions.length === 0 ? /* @__PURE__ */ jsx24("div", { className: "text-[10px] text-slate-400 text-center py-1", children: "\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05E7\u05E9\u05E8 \u05D0\u05D5 \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9 \u05DC\u05E2\u05D3\u05DB\u05D5\u05DF" }) : /* @__PURE__ */ jsxs20(Fragment7, { children: [
14501
- /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
14502
- /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between", children: [
14503
- /* @__PURE__ */ jsx24("label", { className: "text-[10px] font-semibold text-slate-600 block", children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D9\u05E2\u05D3 \u05DC\u05E2\u05D3\u05DB\u05D5\u05DF" }),
14504
- selectedPostSendOption && /* @__PURE__ */ jsx24(
14644
+ enablePostSendAction && /* @__PURE__ */ jsx25("div", { className: "p-2 bg-slate-100/70 border border-slate-200/80 rounded-xl space-y-2 animate-in fade-in duration-150", children: postSendActionTargetOptions.length === 0 ? /* @__PURE__ */ jsx25("div", { className: "text-[10px] text-slate-400 text-center py-1", children: "\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05E7\u05E9\u05E8 \u05D0\u05D5 \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9 \u05DC\u05E2\u05D3\u05DB\u05D5\u05DF" }) : /* @__PURE__ */ jsxs21(Fragment8, { children: [
14645
+ /* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
14646
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between", children: [
14647
+ /* @__PURE__ */ jsx25("label", { className: "text-[10px] font-semibold text-slate-600 block", children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D9\u05E2\u05D3 \u05DC\u05E2\u05D3\u05DB\u05D5\u05DF" }),
14648
+ selectedPostSendOption && /* @__PURE__ */ jsx25(
14505
14649
  "span",
14506
14650
  {
14507
14651
  className: `text-[9px] font-medium px-1.5 py-0.5 rounded border ${selectedPostSendOption.targetType === "SUBTABLE" ? "bg-emerald-50 text-emerald-700 border-emerald-200" : "bg-slate-100 text-slate-600 border-slate-200"}`,
@@ -14509,8 +14653,8 @@ function SettingsAndActionsBlock({
14509
14653
  }
14510
14654
  )
14511
14655
  ] }),
14512
- /* @__PURE__ */ jsxs20("div", { className: "relative", children: [
14513
- /* @__PURE__ */ jsxs20(
14656
+ /* @__PURE__ */ jsxs21("div", { className: "relative", children: [
14657
+ /* @__PURE__ */ jsxs21(
14514
14658
  "select",
14515
14659
  {
14516
14660
  value: postSendActionColumn,
@@ -14523,35 +14667,35 @@ function SettingsAndActionsBlock({
14523
14667
  },
14524
14668
  className: "w-full h-7 px-2 pr-2 pl-5 text-[11px] rounded-lg border border-slate-200 bg-white text-slate-700 appearance-none focus:border-emerald-500 cursor-pointer truncate",
14525
14669
  children: [
14526
- /* @__PURE__ */ jsx24("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4..." }),
14527
- postSendActionTargetOptions.map((opt) => /* @__PURE__ */ jsx24("option", { value: opt.id, children: opt.label }, opt.id))
14670
+ /* @__PURE__ */ jsx25("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4..." }),
14671
+ postSendActionTargetOptions.map((opt) => /* @__PURE__ */ jsx25("option", { value: opt.id, children: opt.label }, opt.id))
14528
14672
  ]
14529
14673
  }
14530
14674
  ),
14531
- /* @__PURE__ */ jsx24(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
14675
+ /* @__PURE__ */ jsx25(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
14532
14676
  ] })
14533
14677
  ] }),
14534
- selectedPostSendOption && /* @__PURE__ */ jsxs20("div", { className: "space-y-1 animate-in fade-in duration-150", children: [
14535
- /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between", children: [
14536
- /* @__PURE__ */ jsx24("label", { className: "text-[10px] font-semibold text-slate-600 block", children: "\u05E2\u05E8\u05DA \u05DC\u05E2\u05D3\u05DB\u05D5\u05DF" }),
14537
- !postSendActionValue && /* @__PURE__ */ jsx24("span", { className: "text-[9px] text-amber-600 font-medium", children: "\u05D7\u05D5\u05D1\u05D4 \u05DC\u05D1\u05D7\u05D5\u05E8 \u05E2\u05E8\u05DA" })
14678
+ selectedPostSendOption && /* @__PURE__ */ jsxs21("div", { className: "space-y-1 animate-in fade-in duration-150", children: [
14679
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between", children: [
14680
+ /* @__PURE__ */ jsx25("label", { className: "text-[10px] font-semibold text-slate-600 block", children: "\u05E2\u05E8\u05DA \u05DC\u05E2\u05D3\u05DB\u05D5\u05DF" }),
14681
+ !postSendActionValue && /* @__PURE__ */ jsx25("span", { className: "text-[9px] text-amber-600 font-medium", children: "\u05D7\u05D5\u05D1\u05D4 \u05DC\u05D1\u05D7\u05D5\u05E8 \u05E2\u05E8\u05DA" })
14538
14682
  ] }),
14539
- /* @__PURE__ */ jsxs20("div", { className: "relative", children: [
14540
- /* @__PURE__ */ jsxs20(
14683
+ /* @__PURE__ */ jsxs21("div", { className: "relative", children: [
14684
+ /* @__PURE__ */ jsxs21(
14541
14685
  "select",
14542
14686
  {
14543
14687
  value: postSendActionValue,
14544
14688
  onChange: (e) => setPostSendActionValue(e.target.value),
14545
14689
  className: `w-full h-7 px-2 pr-2 pl-5 text-[11px] rounded-lg border appearance-none cursor-pointer truncate transition-colors ${!postSendActionValue ? "border-amber-400 bg-amber-50/30 text-slate-700 focus:border-amber-500 focus:ring-1 focus:ring-amber-500" : "border-slate-200 bg-white text-slate-700 focus:border-emerald-500"}`,
14546
14690
  children: [
14547
- /* @__PURE__ */ jsx24("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05E8\u05DA..." }),
14548
- selectedPostSendOption.type === "BOOLEAN" ? /* @__PURE__ */ jsxs20(Fragment7, { children: [
14549
- /* @__PURE__ */ jsx24("option", { value: "true", children: "\u05DB\u05DF (Yes)" }),
14550
- /* @__PURE__ */ jsx24("option", { value: "false", children: "\u05DC\u05D0 (No)" })
14691
+ /* @__PURE__ */ jsx25("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05E8\u05DA..." }),
14692
+ selectedPostSendOption.type === "BOOLEAN" ? /* @__PURE__ */ jsxs21(Fragment8, { children: [
14693
+ /* @__PURE__ */ jsx25("option", { value: "true", children: "\u05DB\u05DF (Yes)" }),
14694
+ /* @__PURE__ */ jsx25("option", { value: "false", children: "\u05DC\u05D0 (No)" })
14551
14695
  ] }) : getRelationOptionsForCol(
14552
14696
  selectedPostSendOption.columnName,
14553
14697
  selectedPostSendOption.parentColumnName
14554
- ).map((opt) => /* @__PURE__ */ jsx24("option", { value: opt.id, children: getRelationOptionLabel(
14698
+ ).map((opt) => /* @__PURE__ */ jsx25("option", { value: opt.id, children: getRelationOptionLabel(
14555
14699
  opt,
14556
14700
  selectedPostSendOption,
14557
14701
  relationOptions
@@ -14559,15 +14703,15 @@ function SettingsAndActionsBlock({
14559
14703
  ]
14560
14704
  }
14561
14705
  ),
14562
- /* @__PURE__ */ jsx24(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
14706
+ /* @__PURE__ */ jsx25(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
14563
14707
  ] })
14564
14708
  ] })
14565
14709
  ] }) })
14566
14710
  ] })
14567
14711
  ] })
14568
14712
  ] }),
14569
- /* @__PURE__ */ jsxs20("div", { className: "mt-auto pt-2.5 border-t border-slate-200/80 space-y-2 shrink-0", children: [
14570
- /* @__PURE__ */ jsxs20(
14713
+ /* @__PURE__ */ jsxs21("div", { className: "mt-auto pt-2.5 border-t border-slate-200/80 space-y-2 shrink-0", children: [
14714
+ /* @__PURE__ */ jsxs21(
14571
14715
  "button",
14572
14716
  {
14573
14717
  type: "button",
@@ -14576,23 +14720,23 @@ function SettingsAndActionsBlock({
14576
14720
  className: `w-full h-8 px-3 text-xs font-semibold rounded-xl border transition-all flex items-center justify-center gap-1.5 ${isTestDisabled || isSendingBroadcast ? "bg-slate-100 text-slate-400 border-slate-200 cursor-not-allowed opacity-60" : "bg-white hover:bg-slate-50 text-slate-700 border-slate-200 active:scale-[0.98] cursor-pointer shadow-2xs"}`,
14577
14721
  title: testButtonTitle,
14578
14722
  children: [
14579
- /* @__PURE__ */ jsx24(Phone3, { className: "w-3 h-3" }),
14580
- /* @__PURE__ */ jsx24("span", { children: "\u05E9\u05DC\u05D7 \u05D8\u05E1\u05D8" })
14723
+ /* @__PURE__ */ jsx25(Phone3, { className: "w-3 h-3" }),
14724
+ /* @__PURE__ */ jsx25("span", { children: "\u05E9\u05DC\u05D7 \u05D8\u05E1\u05D8" })
14581
14725
  ]
14582
14726
  }
14583
14727
  ),
14584
- isSendingBroadcast ? /* @__PURE__ */ jsxs20(
14728
+ isSendingBroadcast ? /* @__PURE__ */ jsxs21(
14585
14729
  "div",
14586
14730
  {
14587
14731
  className: "w-full bg-white border border-emerald-200 rounded-xl p-2.5 shadow-xs space-y-2 animate-in fade-in duration-200",
14588
14732
  "data-testid": "live-broadcast-progress",
14589
14733
  children: [
14590
- /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between text-[11px] font-semibold text-slate-700", children: [
14591
- /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-1.5 text-emerald-800 font-bold", children: [
14592
- /* @__PURE__ */ jsx24(Loader26, { className: "w-3.5 h-3.5 animate-spin text-emerald-600 shrink-0" }),
14593
- /* @__PURE__ */ jsx24("span", { children: "\u05E9\u05D5\u05DC\u05D7 \u05D4\u05D5\u05D3\u05E2\u05D5\u05EA \u05D1\u05EA\u05E4\u05D5\u05E6\u05D4..." })
14734
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between text-[11px] font-semibold text-slate-700", children: [
14735
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-1.5 text-emerald-800 font-bold", children: [
14736
+ /* @__PURE__ */ jsx25(Loader26, { className: "w-3.5 h-3.5 animate-spin text-emerald-600 shrink-0" }),
14737
+ /* @__PURE__ */ jsx25("span", { children: "\u05E9\u05D5\u05DC\u05D7 \u05D4\u05D5\u05D3\u05E2\u05D5\u05EA \u05D1\u05EA\u05E4\u05D5\u05E6\u05D4..." })
14594
14738
  ] }),
14595
- /* @__PURE__ */ jsxs20("span", { className: "text-emerald-700 font-bold", children: [
14739
+ /* @__PURE__ */ jsxs21("span", { className: "text-emerald-700 font-bold", children: [
14596
14740
  (broadcastProgress == null ? void 0 : broadcastProgress.percent) || 0,
14597
14741
  "% (",
14598
14742
  (broadcastProgress == null ? void 0 : broadcastProgress.current) || 0,
@@ -14601,7 +14745,7 @@ function SettingsAndActionsBlock({
14601
14745
  ")"
14602
14746
  ] })
14603
14747
  ] }),
14604
- /* @__PURE__ */ jsx24("div", { className: "w-full h-2.5 bg-slate-100 rounded-full overflow-hidden border border-slate-200", children: /* @__PURE__ */ jsx24(
14748
+ /* @__PURE__ */ jsx25("div", { className: "w-full h-2.5 bg-slate-100 rounded-full overflow-hidden border border-slate-200", children: /* @__PURE__ */ jsx25(
14605
14749
  "div",
14606
14750
  {
14607
14751
  className: "h-full bg-emerald-500 rounded-full transition-all duration-300 ease-out",
@@ -14610,18 +14754,18 @@ function SettingsAndActionsBlock({
14610
14754
  }
14611
14755
  }
14612
14756
  ) }),
14613
- /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-around pt-1 text-[11px] font-medium border-t border-slate-100", children: [
14614
- /* @__PURE__ */ jsxs20("span", { className: "text-emerald-700 flex items-center gap-1", title: "\u05E0\u05E9\u05DC\u05D7\u05D5 \u05D1\u05D4\u05E6\u05DC\u05D7\u05D4", children: [
14615
- /* @__PURE__ */ jsx24("span", { children: "\u2705" }),
14616
- /* @__PURE__ */ jsx24("span", { className: "font-bold", children: (broadcastProgress == null ? void 0 : broadcastProgress.successful) || 0 })
14757
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-around pt-1 text-[11px] font-medium border-t border-slate-100", children: [
14758
+ /* @__PURE__ */ jsxs21("span", { className: "text-emerald-700 flex items-center gap-1", title: "\u05E0\u05E9\u05DC\u05D7\u05D5 \u05D1\u05D4\u05E6\u05DC\u05D7\u05D4", children: [
14759
+ /* @__PURE__ */ jsx25("span", { children: "\u2705" }),
14760
+ /* @__PURE__ */ jsx25("span", { className: "font-bold", children: (broadcastProgress == null ? void 0 : broadcastProgress.successful) || 0 })
14617
14761
  ] }),
14618
- /* @__PURE__ */ jsxs20("span", { className: "text-rose-600 flex items-center gap-1", title: "\u05E9\u05DC\u05D9\u05D7\u05D4 \u05E0\u05DB\u05E9\u05DC\u05D4", children: [
14619
- /* @__PURE__ */ jsx24("span", { children: "\u274C" }),
14620
- /* @__PURE__ */ jsx24("span", { className: "font-bold", children: (broadcastProgress == null ? void 0 : broadcastProgress.failed) || 0 })
14762
+ /* @__PURE__ */ jsxs21("span", { className: "text-rose-600 flex items-center gap-1", title: "\u05E9\u05DC\u05D9\u05D7\u05D4 \u05E0\u05DB\u05E9\u05DC\u05D4", children: [
14763
+ /* @__PURE__ */ jsx25("span", { children: "\u274C" }),
14764
+ /* @__PURE__ */ jsx25("span", { className: "font-bold", children: (broadcastProgress == null ? void 0 : broadcastProgress.failed) || 0 })
14621
14765
  ] }),
14622
- /* @__PURE__ */ jsxs20("span", { className: "text-amber-700 flex items-center gap-1", title: "\u05E9\u05D5\u05E8\u05D5\u05EA \u05E9\u05D3\u05D5\u05DC\u05D2\u05D5 \u05DC\u05DC\u05D0 \u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF \u05EA\u05E7\u05D9\u05DF", children: [
14623
- /* @__PURE__ */ jsx24("span", { children: "\u26A0\uFE0F" }),
14624
- /* @__PURE__ */ jsxs20("span", { className: "font-bold", children: [
14766
+ /* @__PURE__ */ jsxs21("span", { className: "text-amber-700 flex items-center gap-1", title: "\u05E9\u05D5\u05E8\u05D5\u05EA \u05E9\u05D3\u05D5\u05DC\u05D2\u05D5 \u05DC\u05DC\u05D0 \u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF \u05EA\u05E7\u05D9\u05DF", children: [
14767
+ /* @__PURE__ */ jsx25("span", { children: "\u26A0\uFE0F" }),
14768
+ /* @__PURE__ */ jsxs21("span", { className: "font-bold", children: [
14625
14769
  (broadcastProgress == null ? void 0 : broadcastProgress.skipped) || 0,
14626
14770
  " \u05DC\u05DC\u05D0 \u05D8\u05DC\u05E4\u05D5\u05DF"
14627
14771
  ] })
@@ -14629,8 +14773,8 @@ function SettingsAndActionsBlock({
14629
14773
  ] })
14630
14774
  ]
14631
14775
  }
14632
- ) : /* @__PURE__ */ jsxs20(Fragment7, { children: [
14633
- /* @__PURE__ */ jsxs20(
14776
+ ) : /* @__PURE__ */ jsxs21(Fragment8, { children: [
14777
+ /* @__PURE__ */ jsxs21(
14634
14778
  "button",
14635
14779
  {
14636
14780
  type: "button",
@@ -14639,56 +14783,56 @@ function SettingsAndActionsBlock({
14639
14783
  className: `w-full h-9 px-3 text-xs font-bold rounded-xl shadow-xs transition-all flex items-center justify-center gap-2 ${isSendDisabled ? "bg-emerald-600/40 text-white/70 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 active:scale-[0.98] text-white cursor-pointer"}`,
14640
14784
  title: sendButtonTitle,
14641
14785
  children: [
14642
- /* @__PURE__ */ jsx24(Send, { className: "w-3.5 h-3.5" }),
14643
- /* @__PURE__ */ jsx24("span", { children: finalRecipientCount > 0 ? `\u05E9\u05DC\u05D7 \u05DC-${finalRecipientCount} \u05E0\u05DE\u05E2\u05E0\u05D9\u05DD` : "\u05E9\u05DC\u05D7 \u05D4\u05D5\u05D3\u05E2\u05D5\u05EA" })
14786
+ /* @__PURE__ */ jsx25(Send, { className: "w-3.5 h-3.5" }),
14787
+ /* @__PURE__ */ jsx25("span", { children: finalRecipientCount > 0 ? `\u05E9\u05DC\u05D7 \u05DC-${finalRecipientCount} \u05E0\u05DE\u05E2\u05E0\u05D9\u05DD` : "\u05E9\u05DC\u05D7 \u05D4\u05D5\u05D3\u05E2\u05D5\u05EA" })
14644
14788
  ]
14645
14789
  }
14646
14790
  ),
14647
- validMainRowsCount > 0 && /* @__PURE__ */ jsxs20("div", { className: "text-center text-[10.5px] text-slate-500 font-medium pt-0.5", children: [
14791
+ validMainRowsCount > 0 && /* @__PURE__ */ jsxs21("div", { className: "text-center text-[10.5px] text-slate-500 font-medium pt-0.5", children: [
14648
14792
  "\u05DE\u05EA\u05D5\u05DA ",
14649
14793
  validMainRowsCount,
14650
14794
  " \u05E9\u05D5\u05E8\u05D5\u05EA \u05E8\u05D0\u05E9\u05D9\u05D5\u05EA"
14651
14795
  ] }),
14652
- broadcastSummary && /* @__PURE__ */ jsxs20(
14796
+ broadcastSummary && /* @__PURE__ */ jsxs21(
14653
14797
  "div",
14654
14798
  {
14655
14799
  className: "w-full bg-slate-50/90 border border-slate-200/90 rounded-xl p-2.5 shadow-2xs space-y-2 animate-in fade-in duration-200",
14656
14800
  "data-testid": "broadcast-summary-card",
14657
14801
  children: [
14658
- /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between", children: [
14659
- /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-1.5 text-[11px] font-bold text-slate-700", children: [
14660
- /* @__PURE__ */ jsx24("span", { className: "text-xs", children: "\u{1F4CA}" }),
14661
- /* @__PURE__ */ jsx24("span", { children: "\u05E1\u05D9\u05DB\u05D5\u05DD \u05E9\u05D9\u05D3\u05D5\u05E8 \u05D0\u05D7\u05E8\u05D5\u05DF" })
14802
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between", children: [
14803
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-1.5 text-[11px] font-bold text-slate-700", children: [
14804
+ /* @__PURE__ */ jsx25("span", { className: "text-xs", children: "\u{1F4CA}" }),
14805
+ /* @__PURE__ */ jsx25("span", { children: "\u05E1\u05D9\u05DB\u05D5\u05DD \u05E9\u05D9\u05D3\u05D5\u05E8 \u05D0\u05D7\u05E8\u05D5\u05DF" })
14662
14806
  ] }),
14663
- clearBroadcastSummary && /* @__PURE__ */ jsx24(
14807
+ clearBroadcastSummary && /* @__PURE__ */ jsx25(
14664
14808
  "button",
14665
14809
  {
14666
14810
  type: "button",
14667
14811
  onClick: clearBroadcastSummary,
14668
14812
  className: "text-slate-400 hover:text-slate-600 p-0.5 rounded-md hover:bg-slate-200/60 transition-colors cursor-pointer",
14669
14813
  title: "\u05E1\u05D2\u05D5\u05E8 \u05E1\u05D9\u05DB\u05D5\u05DD",
14670
- children: /* @__PURE__ */ jsx24(X11, { className: "w-3.5 h-3.5" })
14814
+ children: /* @__PURE__ */ jsx25(X11, { className: "w-3.5 h-3.5" })
14671
14815
  }
14672
14816
  )
14673
14817
  ] }),
14674
- /* @__PURE__ */ jsxs20("div", { className: "flex flex-wrap items-center gap-1.5 pt-0.5", children: [
14675
- /* @__PURE__ */ jsxs20("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10.5px] font-semibold bg-emerald-50 text-emerald-700 border border-emerald-200/80", children: [
14676
- /* @__PURE__ */ jsx24("span", { children: "\u2705" }),
14677
- /* @__PURE__ */ jsxs20("span", { children: [
14818
+ /* @__PURE__ */ jsxs21("div", { className: "flex flex-wrap items-center gap-1.5 pt-0.5", children: [
14819
+ /* @__PURE__ */ jsxs21("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10.5px] font-semibold bg-emerald-50 text-emerald-700 border border-emerald-200/80", children: [
14820
+ /* @__PURE__ */ jsx25("span", { children: "\u2705" }),
14821
+ /* @__PURE__ */ jsxs21("span", { children: [
14678
14822
  broadcastSummary.successful,
14679
14823
  " \u05E0\u05E9\u05DC\u05D7\u05D5"
14680
14824
  ] })
14681
14825
  ] }),
14682
- broadcastSummary.failed > 0 && /* @__PURE__ */ jsxs20("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10.5px] font-semibold bg-rose-50 text-rose-700 border border-rose-200/80", children: [
14683
- /* @__PURE__ */ jsx24("span", { children: "\u274C" }),
14684
- /* @__PURE__ */ jsxs20("span", { children: [
14826
+ broadcastSummary.failed > 0 && /* @__PURE__ */ jsxs21("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10.5px] font-semibold bg-rose-50 text-rose-700 border border-rose-200/80", children: [
14827
+ /* @__PURE__ */ jsx25("span", { children: "\u274C" }),
14828
+ /* @__PURE__ */ jsxs21("span", { children: [
14685
14829
  broadcastSummary.failed,
14686
14830
  " \u05E0\u05DB\u05E9\u05DC\u05D5"
14687
14831
  ] })
14688
14832
  ] }),
14689
- broadcastSummary.skipped > 0 && /* @__PURE__ */ jsxs20("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10.5px] font-semibold bg-amber-50 text-amber-700 border border-amber-200/80", children: [
14690
- /* @__PURE__ */ jsx24("span", { children: "\u26A0\uFE0F" }),
14691
- /* @__PURE__ */ jsxs20("span", { children: [
14833
+ broadcastSummary.skipped > 0 && /* @__PURE__ */ jsxs21("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10.5px] font-semibold bg-amber-50 text-amber-700 border border-amber-200/80", children: [
14834
+ /* @__PURE__ */ jsx25("span", { children: "\u26A0\uFE0F" }),
14835
+ /* @__PURE__ */ jsxs21("span", { children: [
14692
14836
  broadcastSummary.skipped,
14693
14837
  " \u05DC\u05DC\u05D0 \u05D8\u05DC\u05E4\u05D5\u05DF"
14694
14838
  ] })
@@ -14703,19 +14847,19 @@ function SettingsAndActionsBlock({
14703
14847
  }
14704
14848
 
14705
14849
  // src/components/WhatsAppComponent/inbox/useInboxState.ts
14706
- import { useState as useState19, useEffect as useEffect17, useCallback as useCallback15, useRef as useRef18 } from "react";
14850
+ import { useState as useState20, useEffect as useEffect17, useCallback as useCallback16, useRef as useRef18 } from "react";
14707
14851
  function useInboxState(orgId, actions) {
14708
- const [conversations, setConversations] = useState19([]);
14709
- const [activeConversationId, setActiveConversationId] = useState19(null);
14710
- const [messages, setMessages] = useState19([]);
14711
- const [isLoading, setIsLoading] = useState19(false);
14712
- const [isSending, setIsSending] = useState19(false);
14713
- const [error, setError] = useState19(null);
14852
+ const [conversations, setConversations] = useState20([]);
14853
+ const [activeConversationId, setActiveConversationId] = useState20(null);
14854
+ const [messages, setMessages] = useState20([]);
14855
+ const [isLoading, setIsLoading] = useState20(false);
14856
+ const [isSending, setIsSending] = useState20(false);
14857
+ const [error, setError] = useState20(null);
14714
14858
  const actionsRef = useRef18(actions);
14715
14859
  useEffect17(() => {
14716
14860
  actionsRef.current = actions;
14717
14861
  });
14718
- const fetchConversations = useCallback15(async () => {
14862
+ const fetchConversations = useCallback16(async () => {
14719
14863
  if (!orgId) return;
14720
14864
  const res = await actionsRef.current.getConversations(orgId);
14721
14865
  if (res.success && res.data) {
@@ -14724,7 +14868,7 @@ function useInboxState(orgId, actions) {
14724
14868
  setError(res.error);
14725
14869
  }
14726
14870
  }, [orgId]);
14727
- const fetchMessages = useCallback15(async (conversationId, silent = false) => {
14871
+ const fetchMessages = useCallback16(async (conversationId, silent = false) => {
14728
14872
  if (!silent) setIsLoading(true);
14729
14873
  const res = await actionsRef.current.getMessages(conversationId);
14730
14874
  if (res.success && res.data) {
@@ -14786,14 +14930,14 @@ function useInboxState(orgId, actions) {
14786
14930
 
14787
14931
  // src/components/WhatsAppComponent/inbox/ConversationList.tsx
14788
14932
  import { Search as Search4, User } from "lucide-react";
14789
- import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
14933
+ import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
14790
14934
  function ConversationList({ conversations, activeId, onSelect }) {
14791
- return /* @__PURE__ */ jsxs21("div", { className: "w-80 border-l border-slate-200 bg-white flex flex-col h-full shrink-0", children: [
14792
- /* @__PURE__ */ jsxs21("div", { className: "p-4 border-b border-slate-100 bg-slate-50", children: [
14793
- /* @__PURE__ */ jsx25("h2", { className: "text-lg font-bold text-slate-800 mb-3", children: "\u05E9\u05D9\u05D7\u05D5\u05EA \u05E0\u05DB\u05E0\u05E1\u05D5\u05EA" }),
14794
- /* @__PURE__ */ jsxs21("div", { className: "relative", children: [
14795
- /* @__PURE__ */ jsx25(Search4, { className: "w-4 h-4 absolute right-3 top-1/2 -translate-y-1/2 text-slate-400" }),
14796
- /* @__PURE__ */ jsx25(
14935
+ return /* @__PURE__ */ jsxs22("div", { className: "w-80 border-l border-slate-200 bg-white flex flex-col h-full shrink-0", children: [
14936
+ /* @__PURE__ */ jsxs22("div", { className: "p-4 border-b border-slate-100 bg-slate-50", children: [
14937
+ /* @__PURE__ */ jsx26("h2", { className: "text-lg font-bold text-slate-800 mb-3", children: "\u05E9\u05D9\u05D7\u05D5\u05EA \u05E0\u05DB\u05E0\u05E1\u05D5\u05EA" }),
14938
+ /* @__PURE__ */ jsxs22("div", { className: "relative", children: [
14939
+ /* @__PURE__ */ jsx26(Search4, { className: "w-4 h-4 absolute right-3 top-1/2 -translate-y-1/2 text-slate-400" }),
14940
+ /* @__PURE__ */ jsx26(
14797
14941
  "input",
14798
14942
  {
14799
14943
  type: "text",
@@ -14803,27 +14947,27 @@ function ConversationList({ conversations, activeId, onSelect }) {
14803
14947
  )
14804
14948
  ] })
14805
14949
  ] }),
14806
- /* @__PURE__ */ jsx25("div", { className: "flex-1 overflow-y-auto", children: (() => {
14950
+ /* @__PURE__ */ jsx26("div", { className: "flex-1 overflow-y-auto", children: (() => {
14807
14951
  const sortedConversations = [...conversations].sort(
14808
14952
  (a, b) => new Date(b.lastMessageAt).getTime() - new Date(a.lastMessageAt).getTime()
14809
14953
  );
14810
- return sortedConversations.length === 0 ? /* @__PURE__ */ jsx25("div", { className: "p-6 text-center text-sm text-slate-400", children: "\u05D0\u05D9\u05DF \u05E9\u05D9\u05D7\u05D5\u05EA \u05E4\u05E2\u05D9\u05DC\u05D5\u05EA" }) : sortedConversations.map((conv) => {
14954
+ return sortedConversations.length === 0 ? /* @__PURE__ */ jsx26("div", { className: "p-6 text-center text-sm text-slate-400", children: "\u05D0\u05D9\u05DF \u05E9\u05D9\u05D7\u05D5\u05EA \u05E4\u05E2\u05D9\u05DC\u05D5\u05EA" }) : sortedConversations.map((conv) => {
14811
14955
  var _a, _b;
14812
- return /* @__PURE__ */ jsxs21(
14956
+ return /* @__PURE__ */ jsxs22(
14813
14957
  "button",
14814
14958
  {
14815
14959
  onClick: () => onSelect(conv.id),
14816
14960
  className: `w-full text-right p-4 border-b border-slate-100 transition-colors hover:bg-slate-50 flex items-start gap-3 ${activeId === conv.id ? "bg-emerald-50/50 border-r-4 border-r-emerald-500" : "border-r-4 border-r-transparent"}`,
14817
14961
  children: [
14818
- /* @__PURE__ */ jsx25("div", { className: "w-10 h-10 rounded-full bg-slate-200 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx25(User, { className: "w-5 h-5 text-slate-500" }) }),
14819
- /* @__PURE__ */ jsxs21("div", { className: "flex-1 overflow-hidden", children: [
14820
- /* @__PURE__ */ jsxs21("div", { className: "flex justify-between items-center mb-1", children: [
14821
- /* @__PURE__ */ jsx25("span", { className: "font-semibold text-slate-800 text-sm truncate", children: conv.contactName || conv.contactPhone }),
14822
- /* @__PURE__ */ jsx25("span", { className: "text-[10px] text-slate-400", children: new Date(conv.lastMessageAt).toLocaleTimeString("he-IL", { hour: "2-digit", minute: "2-digit" }) })
14962
+ /* @__PURE__ */ jsx26("div", { className: "w-10 h-10 rounded-full bg-slate-200 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx26(User, { className: "w-5 h-5 text-slate-500" }) }),
14963
+ /* @__PURE__ */ jsxs22("div", { className: "flex-1 overflow-hidden", children: [
14964
+ /* @__PURE__ */ jsxs22("div", { className: "flex justify-between items-center mb-1", children: [
14965
+ /* @__PURE__ */ jsx26("span", { className: "font-semibold text-slate-800 text-sm truncate", children: conv.contactName || conv.contactPhone }),
14966
+ /* @__PURE__ */ jsx26("span", { className: "text-[10px] text-slate-400", children: new Date(conv.lastMessageAt).toLocaleTimeString("he-IL", { hour: "2-digit", minute: "2-digit" }) })
14823
14967
  ] }),
14824
- /* @__PURE__ */ jsxs21("div", { className: "flex justify-between items-center", children: [
14825
- /* @__PURE__ */ jsx25("p", { className: "text-xs text-slate-500 truncate w-4/5", children: ((_b = (_a = conv.messages) == null ? void 0 : _a[0]) == null ? void 0 : _b.content) || "\u05D0\u05D9\u05DF \u05D4\u05D5\u05D3\u05E2\u05D5\u05EA" }),
14826
- conv.unreadCount > 0 && /* @__PURE__ */ jsx25("span", { className: "bg-emerald-500 text-white text-[10px] font-bold px-1.5 py-0.5 rounded-full min-w-[20px] text-center", children: conv.unreadCount })
14968
+ /* @__PURE__ */ jsxs22("div", { className: "flex justify-between items-center", children: [
14969
+ /* @__PURE__ */ jsx26("p", { className: "text-xs text-slate-500 truncate w-4/5", children: ((_b = (_a = conv.messages) == null ? void 0 : _a[0]) == null ? void 0 : _b.content) || "\u05D0\u05D9\u05DF \u05D4\u05D5\u05D3\u05E2\u05D5\u05EA" }),
14970
+ conv.unreadCount > 0 && /* @__PURE__ */ jsx26("span", { className: "bg-emerald-500 text-white text-[10px] font-bold px-1.5 py-0.5 rounded-full min-w-[20px] text-center", children: conv.unreadCount })
14827
14971
  ] })
14828
14972
  ] })
14829
14973
  ]
@@ -14836,11 +14980,11 @@ function ConversationList({ conversations, activeId, onSelect }) {
14836
14980
  }
14837
14981
 
14838
14982
  // src/components/WhatsAppComponent/inbox/ChatWindow.tsx
14839
- import { useState as useState20, useRef as useRef19, useEffect as useEffect18 } from "react";
14983
+ import { useState as useState21, useRef as useRef19, useEffect as useEffect18 } from "react";
14840
14984
  import { Send as Send2, User as User2, Loader2 as Loader27 } from "lucide-react";
14841
- import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
14985
+ import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
14842
14986
  function ChatWindow({ activeConversation, messages, isLoading, isSending, onSendMessage }) {
14843
- const [inputText, setInputText] = useState20("");
14987
+ const [inputText, setInputText] = useState21("");
14844
14988
  const messagesTopRef = useRef19(null);
14845
14989
  const scrollToTop = () => {
14846
14990
  var _a;
@@ -14856,34 +15000,34 @@ function ChatWindow({ activeConversation, messages, isLoading, isSending, onSend
14856
15000
  setInputText("");
14857
15001
  };
14858
15002
  if (!activeConversation) {
14859
- return /* @__PURE__ */ jsxs22("div", { className: "flex-1 bg-slate-50 flex items-center justify-center flex-col gap-4 text-slate-400", children: [
14860
- /* @__PURE__ */ jsx26("div", { className: "w-16 h-16 rounded-full bg-slate-200 flex items-center justify-center", children: /* @__PURE__ */ jsx26("svg", { className: "w-8 h-8 text-slate-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx26("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }) }),
14861
- /* @__PURE__ */ jsx26("p", { children: "\u05D1\u05D7\u05E8 \u05E9\u05D9\u05D7\u05D4 \u05DE\u05D4\u05E8\u05E9\u05D9\u05DE\u05D4 \u05DB\u05D3\u05D9 \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC" })
15003
+ return /* @__PURE__ */ jsxs23("div", { className: "flex-1 bg-slate-50 flex items-center justify-center flex-col gap-4 text-slate-400", children: [
15004
+ /* @__PURE__ */ jsx27("div", { className: "w-16 h-16 rounded-full bg-slate-200 flex items-center justify-center", children: /* @__PURE__ */ jsx27("svg", { className: "w-8 h-8 text-slate-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx27("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }) }),
15005
+ /* @__PURE__ */ jsx27("p", { children: "\u05D1\u05D7\u05E8 \u05E9\u05D9\u05D7\u05D4 \u05DE\u05D4\u05E8\u05E9\u05D9\u05DE\u05D4 \u05DB\u05D3\u05D9 \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC" })
14862
15006
  ] });
14863
15007
  }
14864
- return /* @__PURE__ */ jsxs22("div", { className: "flex-1 flex flex-col bg-[#efeae2] h-full relative", children: [
14865
- /* @__PURE__ */ jsxs22("div", { className: "h-16 bg-white border-b border-slate-200 px-6 flex items-center gap-3 shrink-0 z-10 shadow-sm", children: [
14866
- /* @__PURE__ */ jsx26("div", { className: "w-10 h-10 rounded-full bg-slate-200 flex items-center justify-center", children: /* @__PURE__ */ jsx26(User2, { className: "w-5 h-5 text-slate-500" }) }),
14867
- /* @__PURE__ */ jsxs22("div", { children: [
14868
- /* @__PURE__ */ jsx26("h3", { className: "font-bold text-slate-800", children: activeConversation.contactName || activeConversation.contactPhone }),
14869
- /* @__PURE__ */ jsx26("p", { className: "text-xs text-slate-500", dir: "ltr", children: activeConversation.contactPhone })
15008
+ return /* @__PURE__ */ jsxs23("div", { className: "flex-1 flex flex-col bg-[#efeae2] h-full relative", children: [
15009
+ /* @__PURE__ */ jsxs23("div", { className: "h-16 bg-white border-b border-slate-200 px-6 flex items-center gap-3 shrink-0 z-10 shadow-sm", children: [
15010
+ /* @__PURE__ */ jsx27("div", { className: "w-10 h-10 rounded-full bg-slate-200 flex items-center justify-center", children: /* @__PURE__ */ jsx27(User2, { className: "w-5 h-5 text-slate-500" }) }),
15011
+ /* @__PURE__ */ jsxs23("div", { children: [
15012
+ /* @__PURE__ */ jsx27("h3", { className: "font-bold text-slate-800", children: activeConversation.contactName || activeConversation.contactPhone }),
15013
+ /* @__PURE__ */ jsx27("p", { className: "text-xs text-slate-500", dir: "ltr", children: activeConversation.contactPhone })
14870
15014
  ] })
14871
15015
  ] }),
14872
- /* @__PURE__ */ jsxs22("div", { className: "flex-1 overflow-y-auto p-6 space-y-4", children: [
14873
- /* @__PURE__ */ jsx26("div", { ref: messagesTopRef }),
14874
- isLoading ? /* @__PURE__ */ jsx26("div", { className: "flex justify-center py-10", children: /* @__PURE__ */ jsx26(Loader27, { className: "w-6 h-6 animate-spin text-emerald-600" }) }) : messages.map((msg, idx) => {
15016
+ /* @__PURE__ */ jsxs23("div", { className: "flex-1 overflow-y-auto p-6 space-y-4", children: [
15017
+ /* @__PURE__ */ jsx27("div", { ref: messagesTopRef }),
15018
+ isLoading ? /* @__PURE__ */ jsx27("div", { className: "flex justify-center py-10", children: /* @__PURE__ */ jsx27(Loader27, { className: "w-6 h-6 animate-spin text-emerald-600" }) }) : messages.map((msg, idx) => {
14875
15019
  const isOutbound = msg.direction === "OUTBOUND";
14876
- return /* @__PURE__ */ jsx26("div", { className: `flex ${isOutbound ? "justify-start" : "justify-end"}`, children: /* @__PURE__ */ jsxs22("div", { className: `max-w-[70%] rounded-2xl px-4 py-2 shadow-sm relative ${isOutbound ? "bg-[#d9fdd3] text-slate-900 rounded-tr-none" : "bg-white text-slate-900 rounded-tl-none"}`, children: [
14877
- /* @__PURE__ */ jsx26("p", { className: "text-sm whitespace-pre-wrap", children: msg.content }),
14878
- /* @__PURE__ */ jsxs22("div", { className: "text-[11px] text-slate-600 mt-1 text-left flex items-center justify-end gap-1", children: [
15020
+ return /* @__PURE__ */ jsx27("div", { className: `flex ${isOutbound ? "justify-start" : "justify-end"}`, children: /* @__PURE__ */ jsxs23("div", { className: `max-w-[70%] rounded-2xl px-4 py-2 shadow-sm relative ${isOutbound ? "bg-[#d9fdd3] text-slate-900 rounded-tr-none" : "bg-white text-slate-900 rounded-tl-none"}`, children: [
15021
+ /* @__PURE__ */ jsx27("p", { className: "text-sm whitespace-pre-wrap", children: msg.content }),
15022
+ /* @__PURE__ */ jsxs23("div", { className: "text-[11px] text-slate-600 mt-1 text-left flex items-center justify-end gap-1", children: [
14879
15023
  new Date(msg.createdAt).toLocaleString("he-IL", { day: "2-digit", month: "2-digit", year: "numeric", hour: "2-digit", minute: "2-digit" }),
14880
- isOutbound && /* @__PURE__ */ jsx26("span", { className: msg.status === "READ" || msg.status === "DELIVERED" ? "text-blue-500" : "text-slate-500", children: msg.status === "READ" ? "\u2713\u2713" : msg.status === "DELIVERED" ? "\u2713\u2713" : "\u2713" })
15024
+ isOutbound && /* @__PURE__ */ jsx27("span", { className: msg.status === "READ" || msg.status === "DELIVERED" ? "text-blue-500" : "text-slate-500", children: msg.status === "READ" ? "\u2713\u2713" : msg.status === "DELIVERED" ? "\u2713\u2713" : "\u2713" })
14881
15025
  ] })
14882
15026
  ] }) }, msg.id || idx);
14883
15027
  })
14884
15028
  ] }),
14885
- /* @__PURE__ */ jsx26("div", { className: "bg-slate-50 p-4 border-t border-slate-200 shrink-0", children: /* @__PURE__ */ jsxs22("form", { onSubmit: handleSend, className: "flex items-end gap-2 max-w-4xl mx-auto", children: [
14886
- /* @__PURE__ */ jsx26("div", { className: "flex-1 bg-white border border-slate-300 rounded-2xl overflow-hidden focus-within:border-emerald-500 focus-within:ring-1 focus-within:ring-emerald-500", children: /* @__PURE__ */ jsx26(
15029
+ /* @__PURE__ */ jsx27("div", { className: "bg-slate-50 p-4 border-t border-slate-200 shrink-0", children: /* @__PURE__ */ jsxs23("form", { onSubmit: handleSend, className: "flex items-end gap-2 max-w-4xl mx-auto", children: [
15030
+ /* @__PURE__ */ jsx27("div", { className: "flex-1 bg-white border border-slate-300 rounded-2xl overflow-hidden focus-within:border-emerald-500 focus-within:ring-1 focus-within:ring-emerald-500", children: /* @__PURE__ */ jsx27(
14887
15031
  "textarea",
14888
15032
  {
14889
15033
  rows: 1,
@@ -14899,13 +15043,13 @@ function ChatWindow({ activeConversation, messages, isLoading, isSending, onSend
14899
15043
  className: "w-full max-h-32 min-h-[44px] p-3 text-sm bg-transparent outline-none resize-none"
14900
15044
  }
14901
15045
  ) }),
14902
- /* @__PURE__ */ jsx26(
15046
+ /* @__PURE__ */ jsx27(
14903
15047
  "button",
14904
15048
  {
14905
15049
  type: "submit",
14906
15050
  disabled: !inputText.trim() || isSending,
14907
15051
  className: `w-11 h-11 rounded-full flex items-center justify-center shrink-0 transition-colors ${!inputText.trim() || isSending ? "bg-slate-200 text-slate-400" : "bg-emerald-600 hover:bg-emerald-700 text-white shadow-md"}`,
14908
- children: isSending ? /* @__PURE__ */ jsx26(Loader27, { className: "w-5 h-5 animate-spin" }) : /* @__PURE__ */ jsx26(Send2, { className: "w-5 h-5 -ml-1" })
15052
+ children: isSending ? /* @__PURE__ */ jsx27(Loader27, { className: "w-5 h-5 animate-spin" }) : /* @__PURE__ */ jsx27(Send2, { className: "w-5 h-5 -ml-1" })
14909
15053
  }
14910
15054
  )
14911
15055
  ] }) })
@@ -14913,7 +15057,7 @@ function ChatWindow({ activeConversation, messages, isLoading, isSending, onSend
14913
15057
  }
14914
15058
 
14915
15059
  // src/components/WhatsAppComponent/inbox/WhatsAppInbox.tsx
14916
- import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
15060
+ import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
14917
15061
  function WhatsAppInbox({
14918
15062
  orgId,
14919
15063
  getConversationsAction,
@@ -14934,8 +15078,8 @@ function WhatsAppInbox({
14934
15078
  sendMessage: sendInboxMessageAction
14935
15079
  });
14936
15080
  const activeConversation = conversations.find((c) => c.id === activeConversationId);
14937
- return /* @__PURE__ */ jsxs23("div", { className: "flex h-[calc(100vh-140px)] min-h-[600px] w-full border border-slate-200 rounded-2xl overflow-hidden bg-white shadow-xs", dir: "rtl", children: [
14938
- /* @__PURE__ */ jsx27(
15081
+ return /* @__PURE__ */ jsxs24("div", { className: "flex h-[calc(100vh-140px)] min-h-[600px] w-full border border-slate-200 rounded-2xl overflow-hidden bg-white shadow-xs", dir: "rtl", children: [
15082
+ /* @__PURE__ */ jsx28(
14939
15083
  ConversationList,
14940
15084
  {
14941
15085
  conversations,
@@ -14943,7 +15087,7 @@ function WhatsAppInbox({
14943
15087
  onSelect: handleSelectConversation
14944
15088
  }
14945
15089
  ),
14946
- /* @__PURE__ */ jsx27(
15090
+ /* @__PURE__ */ jsx28(
14947
15091
  ChatWindow,
14948
15092
  {
14949
15093
  activeConversation,
@@ -14957,21 +15101,21 @@ function WhatsAppInbox({
14957
15101
  }
14958
15102
 
14959
15103
  // src/components/WhatsAppComponent/WhatsAppComponent.tsx
14960
- import { Fragment as Fragment8, jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
15104
+ import { Fragment as Fragment9, jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
14961
15105
  function WhatsAppComponent(props) {
14962
15106
  var _a;
14963
15107
  const { className = "", settings, orgId, componentId, executeAction } = props;
14964
15108
  const state = useWhatsAppState(props);
14965
- const [activeTab, setActiveTab] = React20.useState("broadcast");
14966
- return /* @__PURE__ */ jsxs24(
15109
+ const [activeTab, setActiveTab] = React21.useState("broadcast");
15110
+ return /* @__PURE__ */ jsxs25(
14967
15111
  "div",
14968
15112
  {
14969
15113
  className: `w-full flex flex-col bg-white border border-slate-200 rounded-2xl shadow-xs overflow-hidden ${className}`,
14970
15114
  "data-testid": "whatsapp-component",
14971
15115
  dir: "rtl",
14972
15116
  children: [
14973
- /* @__PURE__ */ jsxs24("div", { className: "flex border-b border-slate-200 bg-slate-50 px-6 pt-3 gap-4 shrink-0", children: [
14974
- /* @__PURE__ */ jsx28(
15117
+ /* @__PURE__ */ jsxs25("div", { className: "flex border-b border-slate-200 bg-slate-50 px-6 pt-3 gap-4 shrink-0", children: [
15118
+ /* @__PURE__ */ jsx29(
14975
15119
  "button",
14976
15120
  {
14977
15121
  type: "button",
@@ -14980,7 +15124,7 @@ function WhatsAppComponent(props) {
14980
15124
  children: "\u{1F4E4} \u05E9\u05DC\u05D9\u05D7\u05EA \u05D4\u05D5\u05D3\u05E2\u05D5\u05EA \u05D5\u05EA\u05E4\u05D5\u05E6\u05D4"
14981
15125
  }
14982
15126
  ),
14983
- /* @__PURE__ */ jsx28(
15127
+ /* @__PURE__ */ jsx29(
14984
15128
  "button",
14985
15129
  {
14986
15130
  type: "button",
@@ -14990,7 +15134,7 @@ function WhatsAppComponent(props) {
14990
15134
  }
14991
15135
  )
14992
15136
  ] }),
14993
- activeTab === "inbox" ? /* @__PURE__ */ jsx28("div", { className: "p-4 flex-1", children: /* @__PURE__ */ jsx28(
15137
+ activeTab === "inbox" ? /* @__PURE__ */ jsx29("div", { className: "p-4 flex-1", children: /* @__PURE__ */ jsx29(
14994
15138
  WhatsAppInbox,
14995
15139
  {
14996
15140
  orgId: orgId || props.organizationId || "",
@@ -15029,37 +15173,37 @@ function WhatsAppComponent(props) {
15029
15173
  }
15030
15174
  }
15031
15175
  }
15032
- ) }) : /* @__PURE__ */ jsxs24(Fragment8, { children: [
15033
- state.feedback && /* @__PURE__ */ jsxs24(
15176
+ ) }) : /* @__PURE__ */ jsxs25(Fragment9, { children: [
15177
+ state.feedback && /* @__PURE__ */ jsxs25(
15034
15178
  "div",
15035
15179
  {
15036
15180
  className: `px-6 py-3 border-b text-xs flex items-center justify-between gap-3 ${state.feedback.type === "success" ? "bg-emerald-50 border-emerald-200 text-emerald-800" : "bg-rose-50 border-rose-200 text-rose-800"}`,
15037
15181
  children: [
15038
- /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2", children: [
15039
- state.feedback.type === "success" ? /* @__PURE__ */ jsx28(CheckCircle24, { className: "w-4 h-4 text-emerald-600 shrink-0" }) : /* @__PURE__ */ jsx28(AlertCircle5, { className: "w-4 h-4 text-rose-600 shrink-0" }),
15040
- /* @__PURE__ */ jsx28("span", { children: state.feedback.message })
15182
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
15183
+ state.feedback.type === "success" ? /* @__PURE__ */ jsx29(CheckCircle24, { className: "w-4 h-4 text-emerald-600 shrink-0" }) : /* @__PURE__ */ jsx29(AlertCircle5, { className: "w-4 h-4 text-rose-600 shrink-0" }),
15184
+ /* @__PURE__ */ jsx29("span", { children: state.feedback.message })
15041
15185
  ] }),
15042
- /* @__PURE__ */ jsx28(
15186
+ /* @__PURE__ */ jsx29(
15043
15187
  "button",
15044
15188
  {
15045
15189
  type: "button",
15046
15190
  onClick: () => state.setFeedback(null),
15047
15191
  className: "text-slate-400 hover:text-slate-700 cursor-pointer",
15048
- children: /* @__PURE__ */ jsx28(X12, { className: "w-4 h-4" })
15192
+ children: /* @__PURE__ */ jsx29(X12, { className: "w-4 h-4" })
15049
15193
  }
15050
15194
  )
15051
15195
  ]
15052
15196
  }
15053
15197
  ),
15054
- state.fetchError && !state.isLoadingTemplates && /* @__PURE__ */ jsxs24("div", { className: "px-6 py-3 bg-amber-50 border-b border-amber-200 text-xs text-amber-900 flex items-center justify-between", children: [
15055
- /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2", children: [
15056
- /* @__PURE__ */ jsx28(AlertCircle5, { className: "w-4 h-4 text-amber-600 shrink-0" }),
15057
- /* @__PURE__ */ jsxs24("span", { children: [
15198
+ state.fetchError && !state.isLoadingTemplates && /* @__PURE__ */ jsxs25("div", { className: "px-6 py-3 bg-amber-50 border-b border-amber-200 text-xs text-amber-900 flex items-center justify-between", children: [
15199
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
15200
+ /* @__PURE__ */ jsx29(AlertCircle5, { className: "w-4 h-4 text-amber-600 shrink-0" }),
15201
+ /* @__PURE__ */ jsxs25("span", { children: [
15058
15202
  "\u05E9\u05D2\u05D9\u05D0\u05D4 \u05D1\u05D8\u05E2\u05D9\u05E0\u05EA \u05EA\u05D1\u05E0\u05D9\u05D5\u05EA \u05DE-Meta: ",
15059
15203
  state.fetchError
15060
15204
  ] })
15061
15205
  ] }),
15062
- /* @__PURE__ */ jsx28(
15206
+ /* @__PURE__ */ jsx29(
15063
15207
  "button",
15064
15208
  {
15065
15209
  type: "button",
@@ -15069,9 +15213,9 @@ function WhatsAppComponent(props) {
15069
15213
  }
15070
15214
  )
15071
15215
  ] }),
15072
- /* @__PURE__ */ jsxs24("div", { className: "p-4 flex flex-col gap-4", children: [
15073
- /* @__PURE__ */ jsxs24("div", { className: "grid grid-cols-1 lg:grid-cols-12 gap-4 shrink-0 items-stretch", children: [
15074
- /* @__PURE__ */ jsx28(
15216
+ /* @__PURE__ */ jsxs25("div", { className: "p-4 flex flex-col gap-4", children: [
15217
+ /* @__PURE__ */ jsxs25("div", { className: "grid grid-cols-1 lg:grid-cols-12 gap-4 shrink-0 items-stretch", children: [
15218
+ /* @__PURE__ */ jsx29(
15075
15219
  TemplateSelectionBlock,
15076
15220
  {
15077
15221
  selectedTemplate: state.selectedTemplate,
@@ -15099,7 +15243,7 @@ function WhatsAppComponent(props) {
15099
15243
  handleFileUpload: state.handleFileUpload
15100
15244
  }
15101
15245
  ),
15102
- /* @__PURE__ */ jsx28(
15246
+ /* @__PURE__ */ jsx29(
15103
15247
  DynamicFiltersBlock,
15104
15248
  {
15105
15249
  filterableColumns: state.filterableColumns,
@@ -15116,7 +15260,7 @@ function WhatsAppComponent(props) {
15116
15260
  isLoadingTableData: state.isLoadingTableData
15117
15261
  }
15118
15262
  ),
15119
- /* @__PURE__ */ jsx28(
15263
+ /* @__PURE__ */ jsx29(
15120
15264
  SettingsAndActionsBlock,
15121
15265
  {
15122
15266
  isScanningPhoneColumns: state.isScanningPhoneColumns,
@@ -15162,13 +15306,13 @@ function WhatsAppComponent(props) {
15162
15306
  }
15163
15307
  )
15164
15308
  ] }),
15165
- /* @__PURE__ */ jsx28("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: [
15166
- /* @__PURE__ */ jsx28(Loader28, { className: "w-6 h-6 animate-spin text-emerald-600" }),
15167
- /* @__PURE__ */ jsx28("span", { children: "\u05D8\u05D5\u05E2\u05DF \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05DE\u05D4\u05D8\u05D1\u05DC\u05D4..." })
15168
- ] }) : state.tableError ? /* @__PURE__ */ jsxs24("div", { className: "flex-1 flex items-center justify-center p-6 text-center text-xs text-rose-600 bg-rose-50 gap-2", children: [
15169
- /* @__PURE__ */ jsx28(AlertCircle5, { className: "w-4 h-4 text-rose-500 shrink-0" }),
15170
- /* @__PURE__ */ jsx28("span", { children: state.tableError })
15171
- ] }) : !(settings == null ? void 0 : settings.tableMetaId) ? /* @__PURE__ */ jsx28("div", { className: "flex-1 flex items-center justify-center p-10 text-center text-xs text-slate-400", children: "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05D8\u05D1\u05DC\u05EA \u05DE\u05E7\u05D5\u05E8 \u05E2\u05D1\u05D5\u05E8 \u05E8\u05DB\u05D9\u05D1 WhatsApp \u05D6\u05D4" }) : /* @__PURE__ */ jsx28(
15309
+ /* @__PURE__ */ jsx29("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__ */ jsxs25("div", { className: "flex-1 flex flex-col items-center justify-center p-12 text-center text-xs text-slate-400 gap-2", children: [
15310
+ /* @__PURE__ */ jsx29(Loader28, { className: "w-6 h-6 animate-spin text-emerald-600" }),
15311
+ /* @__PURE__ */ jsx29("span", { children: "\u05D8\u05D5\u05E2\u05DF \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05DE\u05D4\u05D8\u05D1\u05DC\u05D4..." })
15312
+ ] }) : state.tableError ? /* @__PURE__ */ jsxs25("div", { className: "flex-1 flex items-center justify-center p-6 text-center text-xs text-rose-600 bg-rose-50 gap-2", children: [
15313
+ /* @__PURE__ */ jsx29(AlertCircle5, { className: "w-4 h-4 text-rose-500 shrink-0" }),
15314
+ /* @__PURE__ */ jsx29("span", { children: state.tableError })
15315
+ ] }) : !(settings == null ? void 0 : settings.tableMetaId) ? /* @__PURE__ */ jsx29("div", { className: "flex-1 flex items-center justify-center p-10 text-center text-xs text-slate-400", children: "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05D8\u05D1\u05DC\u05EA \u05DE\u05E7\u05D5\u05E8 \u05E2\u05D1\u05D5\u05E8 \u05E8\u05DB\u05D9\u05D1 WhatsApp \u05D6\u05D4" }) : /* @__PURE__ */ jsx29(
15172
15316
  TableBlockClient,
15173
15317
  {
15174
15318
  settings: {
@@ -15190,7 +15334,7 @@ function WhatsAppComponent(props) {
15190
15334
  }
15191
15335
  ) })
15192
15336
  ] }),
15193
- /* @__PURE__ */ jsx28(
15337
+ /* @__PURE__ */ jsx29(
15194
15338
  CreateTemplateModal,
15195
15339
  {
15196
15340
  isOpen: state.isModalOpen,
@@ -15204,7 +15348,7 @@ function WhatsAppComponent(props) {
15204
15348
  orgId: state.orgId || orgId
15205
15349
  }
15206
15350
  ),
15207
- state.isTestPromptOpen && /* @__PURE__ */ jsx28(
15351
+ state.isTestPromptOpen && /* @__PURE__ */ jsx29(
15208
15352
  "div",
15209
15353
  {
15210
15354
  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-150",
@@ -15213,7 +15357,7 @@ function WhatsAppComponent(props) {
15213
15357
  state.setIsTestPromptOpen(false);
15214
15358
  state.setTestFeedback(null);
15215
15359
  },
15216
- children: /* @__PURE__ */ jsxs24(
15360
+ children: /* @__PURE__ */ jsxs25(
15217
15361
  "div",
15218
15362
  {
15219
15363
  className: "bg-white rounded-2xl border border-slate-200 shadow-2xl w-full max-w-md flex flex-col overflow-hidden animate-in zoom-in-95 duration-150",
@@ -15222,15 +15366,15 @@ function WhatsAppComponent(props) {
15222
15366
  "aria-labelledby": "test-modal-title",
15223
15367
  onClick: (e) => e.stopPropagation(),
15224
15368
  children: [
15225
- /* @__PURE__ */ jsxs24("div", { className: "px-5 py-4 border-b border-slate-100 flex items-center justify-between bg-slate-50/70", children: [
15226
- /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2.5", children: [
15227
- /* @__PURE__ */ jsx28("div", { className: "w-8 h-8 rounded-lg bg-emerald-100 text-emerald-700 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx28(Phone4, { className: "w-4 h-4" }) }),
15228
- /* @__PURE__ */ jsxs24("div", { children: [
15229
- /* @__PURE__ */ jsx28("h3", { id: "test-modal-title", className: "text-sm font-bold text-slate-900", children: "\u05E9\u05DC\u05D9\u05D7\u05EA \u05D4\u05D5\u05D3\u05E2\u05EA \u05D1\u05D3\u05D9\u05E7\u05D4 (\u05D8\u05E1\u05D8)" }),
15230
- /* @__PURE__ */ jsx28("p", { className: "text-[11px] text-slate-500", children: "\u05D1\u05D3\u05D9\u05E7\u05EA \u05D4\u05EA\u05D1\u05E0\u05D9\u05EA \u05DE\u05D5\u05DC \u05E0\u05DE\u05E2\u05DF \u05D1\u05D5\u05D3\u05D3 \u05DC\u05E4\u05E0\u05D9 \u05E9\u05D9\u05D3\u05D5\u05E8 \u05E8\u05D7\u05D1" })
15369
+ /* @__PURE__ */ jsxs25("div", { className: "px-5 py-4 border-b border-slate-100 flex items-center justify-between bg-slate-50/70", children: [
15370
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2.5", children: [
15371
+ /* @__PURE__ */ jsx29("div", { className: "w-8 h-8 rounded-lg bg-emerald-100 text-emerald-700 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx29(Phone4, { className: "w-4 h-4" }) }),
15372
+ /* @__PURE__ */ jsxs25("div", { children: [
15373
+ /* @__PURE__ */ jsx29("h3", { id: "test-modal-title", className: "text-sm font-bold text-slate-900", children: "\u05E9\u05DC\u05D9\u05D7\u05EA \u05D4\u05D5\u05D3\u05E2\u05EA \u05D1\u05D3\u05D9\u05E7\u05D4 (\u05D8\u05E1\u05D8)" }),
15374
+ /* @__PURE__ */ jsx29("p", { className: "text-[11px] text-slate-500", children: "\u05D1\u05D3\u05D9\u05E7\u05EA \u05D4\u05EA\u05D1\u05E0\u05D9\u05EA \u05DE\u05D5\u05DC \u05E0\u05DE\u05E2\u05DF \u05D1\u05D5\u05D3\u05D3 \u05DC\u05E4\u05E0\u05D9 \u05E9\u05D9\u05D3\u05D5\u05E8 \u05E8\u05D7\u05D1" })
15231
15375
  ] })
15232
15376
  ] }),
15233
- /* @__PURE__ */ jsx28(
15377
+ /* @__PURE__ */ jsx29(
15234
15378
  "button",
15235
15379
  {
15236
15380
  type: "button",
@@ -15242,25 +15386,25 @@ function WhatsAppComponent(props) {
15242
15386
  },
15243
15387
  className: `w-8 h-8 rounded-lg flex items-center justify-center transition-colors ${state.isSendingTest ? "text-slate-300 cursor-not-allowed" : "text-slate-400 hover:text-slate-700 hover:bg-slate-200/50 cursor-pointer"}`,
15244
15388
  title: "\u05E1\u05D2\u05D5\u05E8",
15245
- children: /* @__PURE__ */ jsx28(X12, { className: "w-4 h-4" })
15389
+ children: /* @__PURE__ */ jsx29(X12, { className: "w-4 h-4" })
15246
15390
  }
15247
15391
  )
15248
15392
  ] }),
15249
- /* @__PURE__ */ jsxs24("div", { className: "p-5 space-y-4", children: [
15250
- /* @__PURE__ */ jsxs24("div", { className: "p-2.5 bg-slate-50 border border-slate-200/80 rounded-xl flex items-center justify-between text-xs", children: [
15251
- /* @__PURE__ */ jsx28("span", { className: "text-slate-500 font-medium", children: "\u05EA\u05D1\u05E0\u05D9\u05EA \u05E0\u05D1\u05D7\u05E8\u05EA:" }),
15252
- /* @__PURE__ */ jsx28("span", { className: "font-bold text-slate-800 font-mono", children: ((_a = state.selectedTemplate) == null ? void 0 : _a.name) || "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05EA\u05D1\u05E0\u05D9\u05EA" })
15393
+ /* @__PURE__ */ jsxs25("div", { className: "p-5 space-y-4", children: [
15394
+ /* @__PURE__ */ jsxs25("div", { className: "p-2.5 bg-slate-50 border border-slate-200/80 rounded-xl flex items-center justify-between text-xs", children: [
15395
+ /* @__PURE__ */ jsx29("span", { className: "text-slate-500 font-medium", children: "\u05EA\u05D1\u05E0\u05D9\u05EA \u05E0\u05D1\u05D7\u05E8\u05EA:" }),
15396
+ /* @__PURE__ */ jsx29("span", { className: "font-bold text-slate-800 font-mono", children: ((_a = state.selectedTemplate) == null ? void 0 : _a.name) || "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05EA\u05D1\u05E0\u05D9\u05EA" })
15253
15397
  ] }),
15254
- state.selectedPhoneOption && /* @__PURE__ */ jsxs24("div", { className: "p-2 bg-emerald-50/50 border border-emerald-200/60 rounded-xl flex items-center justify-between text-[11px]", children: [
15255
- /* @__PURE__ */ jsx28("span", { className: "text-emerald-800 font-medium", children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D9\u05E2\u05D3:" }),
15256
- /* @__PURE__ */ jsx28("span", { className: "font-bold text-emerald-950 font-mono", children: state.selectedPhoneOption.label })
15398
+ state.selectedPhoneOption && /* @__PURE__ */ jsxs25("div", { className: "p-2 bg-emerald-50/50 border border-emerald-200/60 rounded-xl flex items-center justify-between text-[11px]", children: [
15399
+ /* @__PURE__ */ jsx29("span", { className: "text-emerald-800 font-medium", children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D9\u05E2\u05D3:" }),
15400
+ /* @__PURE__ */ jsx29("span", { className: "font-bold text-emerald-950 font-mono", children: state.selectedPhoneOption.label })
15257
15401
  ] }),
15258
15402
  state.templateHeaderComp && (() => {
15259
15403
  const headerFormat = (state.templateHeaderComp.format || "").toUpperCase();
15260
15404
  const docFilename = resolveDocumentFilename(state.templateHeaderComp, state.headerMediaUrl);
15261
- return /* @__PURE__ */ jsxs24("div", { className: "p-2.5 bg-slate-50 border border-slate-200/80 rounded-xl flex items-center justify-between text-xs", children: [
15262
- /* @__PURE__ */ jsx28("div", { className: "flex items-center gap-2 overflow-hidden", children: headerFormat === "IMAGE" ? /* @__PURE__ */ jsxs24(Fragment8, { children: [
15263
- /* @__PURE__ */ jsx28("div", { className: "w-7 h-7 rounded-md overflow-hidden border border-slate-200 shrink-0 bg-slate-100 flex items-center justify-center", children: state.headerMediaUrl && state.headerMediaUrl.startsWith("http") ? /* @__PURE__ */ jsx28(
15405
+ return /* @__PURE__ */ jsxs25("div", { className: "p-2.5 bg-slate-50 border border-slate-200/80 rounded-xl flex items-center justify-between text-xs", children: [
15406
+ /* @__PURE__ */ jsx29("div", { className: "flex items-center gap-2 overflow-hidden", children: headerFormat === "IMAGE" ? /* @__PURE__ */ jsxs25(Fragment9, { children: [
15407
+ /* @__PURE__ */ jsx29("div", { className: "w-7 h-7 rounded-md overflow-hidden border border-slate-200 shrink-0 bg-slate-100 flex items-center justify-center", children: state.headerMediaUrl && state.headerMediaUrl.startsWith("http") ? /* @__PURE__ */ jsx29(
15264
15408
  "img",
15265
15409
  {
15266
15410
  src: state.headerMediaUrl,
@@ -15270,28 +15414,28 @@ function WhatsAppComponent(props) {
15270
15414
  e.currentTarget.style.display = "none";
15271
15415
  }
15272
15416
  }
15273
- ) : /* @__PURE__ */ jsx28(ImageIcon3, { className: "w-3.5 h-3.5 text-emerald-600" }) }),
15274
- /* @__PURE__ */ jsx28("span", { className: "font-semibold text-slate-800 truncate", children: "\u05EA\u05DE\u05D5\u05E0\u05EA \u05DB\u05D5\u05EA\u05E8\u05EA" })
15275
- ] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs24(Fragment8, { children: [
15276
- /* @__PURE__ */ jsx28("div", { className: "w-7 h-7 rounded-md bg-rose-50 text-rose-600 border border-rose-100 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx28(FileText4, { className: "w-3.5 h-3.5" }) }),
15277
- /* @__PURE__ */ jsxs24("div", { className: "overflow-hidden", children: [
15278
- /* @__PURE__ */ jsx28("span", { className: "font-semibold text-slate-800 block truncate", children: "\u05DE\u05E1\u05DE\u05DA \u05DB\u05D5\u05EA\u05E8\u05EA (PDF)" }),
15279
- /* @__PURE__ */ jsx28("span", { className: "text-[10px] text-slate-500 font-mono block truncate", title: docFilename, children: docFilename })
15417
+ ) : /* @__PURE__ */ jsx29(ImageIcon3, { className: "w-3.5 h-3.5 text-emerald-600" }) }),
15418
+ /* @__PURE__ */ jsx29("span", { className: "font-semibold text-slate-800 truncate", children: "\u05EA\u05DE\u05D5\u05E0\u05EA \u05DB\u05D5\u05EA\u05E8\u05EA" })
15419
+ ] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs25(Fragment9, { children: [
15420
+ /* @__PURE__ */ jsx29("div", { className: "w-7 h-7 rounded-md bg-rose-50 text-rose-600 border border-rose-100 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx29(FileText4, { className: "w-3.5 h-3.5" }) }),
15421
+ /* @__PURE__ */ jsxs25("div", { className: "overflow-hidden", children: [
15422
+ /* @__PURE__ */ jsx29("span", { className: "font-semibold text-slate-800 block truncate", children: "\u05DE\u05E1\u05DE\u05DA \u05DB\u05D5\u05EA\u05E8\u05EA (PDF)" }),
15423
+ /* @__PURE__ */ jsx29("span", { className: "text-[10px] text-slate-500 font-mono block truncate", title: docFilename, children: docFilename })
15280
15424
  ] })
15281
- ] }) : /* @__PURE__ */ jsxs24(Fragment8, { children: [
15282
- /* @__PURE__ */ jsx28("div", { className: "w-7 h-7 rounded-md bg-indigo-50 text-indigo-600 border border-indigo-100 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx28(Video3, { className: "w-3.5 h-3.5" }) }),
15283
- /* @__PURE__ */ jsx28("span", { className: "font-semibold text-slate-800 truncate", children: "\u05E1\u05E8\u05D8\u05D5\u05DF \u05DB\u05D5\u05EA\u05E8\u05EA" })
15425
+ ] }) : /* @__PURE__ */ jsxs25(Fragment9, { children: [
15426
+ /* @__PURE__ */ jsx29("div", { className: "w-7 h-7 rounded-md bg-indigo-50 text-indigo-600 border border-indigo-100 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx29(Video3, { className: "w-3.5 h-3.5" }) }),
15427
+ /* @__PURE__ */ jsx29("span", { className: "font-semibold text-slate-800 truncate", children: "\u05E1\u05E8\u05D8\u05D5\u05DF \u05DB\u05D5\u05EA\u05E8\u05EA" })
15284
15428
  ] }) }),
15285
- state.headerMediaUrl && state.headerMediaUrl.startsWith("http") ? /* @__PURE__ */ jsx28("span", { className: "text-[10px] text-emerald-700 bg-emerald-50 border border-emerald-200 px-1.5 py-0.5 rounded font-medium shrink-0", children: "\u05E7\u05D5\u05D1\u05E5 \u05DE\u05E6\u05D5\u05E8\u05E3 \u05EA\u05E7\u05D9\u05DF" }) : /* @__PURE__ */ jsx28("span", { className: "text-[10px] text-amber-700 bg-amber-50 border border-amber-200 px-1.5 py-0.5 rounded font-medium shrink-0", children: "\u05E0\u05D3\u05E8\u05E9 \u05E6\u05D9\u05E8\u05D5\u05E3 \u05E7\u05D5\u05D1\u05E5 \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA \u05D6\u05D5" })
15429
+ state.headerMediaUrl && state.headerMediaUrl.startsWith("http") ? /* @__PURE__ */ jsx29("span", { className: "text-[10px] text-emerald-700 bg-emerald-50 border border-emerald-200 px-1.5 py-0.5 rounded font-medium shrink-0", children: "\u05E7\u05D5\u05D1\u05E5 \u05DE\u05E6\u05D5\u05E8\u05E3 \u05EA\u05E7\u05D9\u05DF" }) : /* @__PURE__ */ jsx29("span", { className: "text-[10px] text-amber-700 bg-amber-50 border border-amber-200 px-1.5 py-0.5 rounded font-medium shrink-0", children: "\u05E0\u05D3\u05E8\u05E9 \u05E6\u05D9\u05E8\u05D5\u05E3 \u05E7\u05D5\u05D1\u05E5 \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA \u05D6\u05D5" })
15286
15430
  ] });
15287
15431
  })(),
15288
- /* @__PURE__ */ jsxs24("div", { className: "space-y-1.5", children: [
15289
- /* @__PURE__ */ jsxs24("label", { className: "text-xs font-semibold text-slate-700 block", children: [
15432
+ /* @__PURE__ */ jsxs25("div", { className: "space-y-1.5", children: [
15433
+ /* @__PURE__ */ jsxs25("label", { className: "text-xs font-semibold text-slate-700 block", children: [
15290
15434
  "\u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF \u05DC\u05D8\u05E1\u05D8 ",
15291
- /* @__PURE__ */ jsx28("span", { className: "text-rose-500", children: "*" })
15435
+ /* @__PURE__ */ jsx29("span", { className: "text-rose-500", children: "*" })
15292
15436
  ] }),
15293
- /* @__PURE__ */ jsxs24("div", { className: "relative", children: [
15294
- /* @__PURE__ */ jsx28(
15437
+ /* @__PURE__ */ jsxs25("div", { className: "relative", children: [
15438
+ /* @__PURE__ */ jsx29(
15295
15439
  "input",
15296
15440
  {
15297
15441
  type: "tel",
@@ -15313,17 +15457,17 @@ function WhatsAppComponent(props) {
15313
15457
  className: "w-full h-10 px-3 pr-3 pl-8 text-sm rounded-xl border border-slate-200 bg-white text-slate-900 placeholder:text-slate-400 focus:outline-hidden focus:border-emerald-500 focus:ring-1 focus:ring-emerald-500 transition-all font-mono disabled:opacity-60 disabled:cursor-not-allowed"
15314
15458
  }
15315
15459
  ),
15316
- /* @__PURE__ */ jsx28(Phone4, { className: "w-4 h-4 text-slate-400 absolute left-2.5 top-1/2 -translate-y-1/2 pointer-events-none" })
15460
+ /* @__PURE__ */ jsx29(Phone4, { className: "w-4 h-4 text-slate-400 absolute left-2.5 top-1/2 -translate-y-1/2 pointer-events-none" })
15317
15461
  ] }),
15318
- /* @__PURE__ */ jsx28("p", { className: "text-[11px] text-slate-500 leading-normal", children: "\u05D4\u05D5\u05D3\u05E2\u05EA \u05D4\u05D1\u05D3\u05D9\u05E7\u05D4 \u05EA\u05D9\u05E9\u05DC\u05D7 \u05D9\u05E9\u05D9\u05E8\u05D5\u05EA \u05DC\u05DE\u05E1\u05E4\u05E8 \u05D6\u05D4 \u05DC\u05E6\u05D5\u05E8\u05DA \u05D5\u05D9\u05D3\u05D5\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D5\u05EA \u05EA\u05D5\u05DB\u05DF \u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 \u05D5\u05D4\u05E2\u05D9\u05E6\u05D5\u05D1." })
15462
+ /* @__PURE__ */ jsx29("p", { className: "text-[11px] text-slate-500 leading-normal", children: "\u05D4\u05D5\u05D3\u05E2\u05EA \u05D4\u05D1\u05D3\u05D9\u05E7\u05D4 \u05EA\u05D9\u05E9\u05DC\u05D7 \u05D9\u05E9\u05D9\u05E8\u05D5\u05EA \u05DC\u05DE\u05E1\u05E4\u05E8 \u05D6\u05D4 \u05DC\u05E6\u05D5\u05E8\u05DA \u05D5\u05D9\u05D3\u05D5\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D5\u05EA \u05EA\u05D5\u05DB\u05DF \u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 \u05D5\u05D4\u05E2\u05D9\u05E6\u05D5\u05D1." })
15319
15463
  ] }),
15320
- state.testFeedback && /* @__PURE__ */ jsxs24("div", { className: "p-2.5 bg-rose-50 border border-rose-200 rounded-xl text-xs text-rose-700 flex items-center gap-2", children: [
15321
- /* @__PURE__ */ jsx28(AlertCircle5, { className: "w-4 h-4 text-rose-500 shrink-0" }),
15322
- /* @__PURE__ */ jsx28("span", { children: state.testFeedback })
15464
+ state.testFeedback && /* @__PURE__ */ jsxs25("div", { className: "p-2.5 bg-rose-50 border border-rose-200 rounded-xl text-xs text-rose-700 flex items-center gap-2", children: [
15465
+ /* @__PURE__ */ jsx29(AlertCircle5, { className: "w-4 h-4 text-rose-500 shrink-0" }),
15466
+ /* @__PURE__ */ jsx29("span", { children: state.testFeedback })
15323
15467
  ] })
15324
15468
  ] }),
15325
- /* @__PURE__ */ jsxs24("div", { className: "px-5 py-3.5 bg-slate-50/70 border-t border-slate-100 flex items-center justify-end gap-2", children: [
15326
- /* @__PURE__ */ jsx28(
15469
+ /* @__PURE__ */ jsxs25("div", { className: "px-5 py-3.5 bg-slate-50/70 border-t border-slate-100 flex items-center justify-end gap-2", children: [
15470
+ /* @__PURE__ */ jsx29(
15327
15471
  "button",
15328
15472
  {
15329
15473
  type: "button",
@@ -15337,7 +15481,7 @@ function WhatsAppComponent(props) {
15337
15481
  children: "\u05D1\u05D9\u05D8\u05D5\u05DC"
15338
15482
  }
15339
15483
  ),
15340
- /* @__PURE__ */ jsx28(
15484
+ /* @__PURE__ */ jsx29(
15341
15485
  "button",
15342
15486
  {
15343
15487
  type: "button",
@@ -15345,12 +15489,12 @@ function WhatsAppComponent(props) {
15345
15489
  onClick: state.handleSendTest,
15346
15490
  title: state.testButtonTitle,
15347
15491
  className: `px-4 py-2 text-xs font-bold rounded-xl transition-all flex items-center gap-1.5 ${!state.testPhoneNumber.trim() || state.isSendingTest || state.isTestDisabled ? "bg-emerald-600/40 text-white/70 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 active:scale-[0.98] text-white shadow-xs cursor-pointer"}`,
15348
- children: state.isSendingTest ? /* @__PURE__ */ jsxs24(Fragment8, { children: [
15349
- /* @__PURE__ */ jsx28(Loader28, { className: "w-3.5 h-3.5 animate-spin" }),
15350
- /* @__PURE__ */ jsx28("span", { children: "\u05E9\u05D5\u05DC\u05D7..." })
15351
- ] }) : /* @__PURE__ */ jsxs24(Fragment8, { children: [
15352
- /* @__PURE__ */ jsx28(Send3, { className: "w-3.5 h-3.5" }),
15353
- /* @__PURE__ */ jsx28("span", { children: "\u05E9\u05DC\u05D7 \u05E2\u05DB\u05E9\u05D9\u05D5" })
15492
+ children: state.isSendingTest ? /* @__PURE__ */ jsxs25(Fragment9, { children: [
15493
+ /* @__PURE__ */ jsx29(Loader28, { className: "w-3.5 h-3.5 animate-spin" }),
15494
+ /* @__PURE__ */ jsx29("span", { children: "\u05E9\u05D5\u05DC\u05D7..." })
15495
+ ] }) : /* @__PURE__ */ jsxs25(Fragment9, { children: [
15496
+ /* @__PURE__ */ jsx29(Send3, { className: "w-3.5 h-3.5" }),
15497
+ /* @__PURE__ */ jsx29("span", { children: "\u05E9\u05DC\u05D7 \u05E2\u05DB\u05E9\u05D9\u05D5" })
15354
15498
  ] })
15355
15499
  }
15356
15500
  )
@@ -15367,12 +15511,12 @@ function WhatsAppComponent(props) {
15367
15511
  }
15368
15512
 
15369
15513
  // src/components/FormBlock/FormBlock.tsx
15370
- import { useState as useState21, useEffect as useEffect19 } from "react";
15514
+ import { useState as useState22, useEffect as useEffect19 } from "react";
15371
15515
  import { Loader2 as Loader29, CheckCircle2 as CheckCircle25 } from "lucide-react";
15372
- import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
15516
+ import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
15373
15517
 
15374
15518
  // src/components/FormBlock/StyledFormBlock.tsx
15375
- import { useState as useState22, useEffect as useEffect20, useId, useRef as useRef20 } from "react";
15519
+ import { useState as useState23, useEffect as useEffect20, useId, useRef as useRef20 } from "react";
15376
15520
  import { Loader2 as Loader210, CheckCircle2 as CheckCircle26 } from "lucide-react";
15377
15521
 
15378
15522
  // src/components/FormBlock/formDesign.ts
@@ -15481,6 +15625,31 @@ var ALWAYS_FULL_TYPES = /* @__PURE__ */ new Set(["GOOGLE_DRIVE_FILE", "SUB_TABLE
15481
15625
  function isFormPresetId(v) {
15482
15626
  return typeof v === "string" && v in FORM_PRESETS;
15483
15627
  }
15628
+ var FRAME_STYLES = ["none", "soft", "solid", "double"];
15629
+ function isFormFrameStyle(v) {
15630
+ return typeof v === "string" && FRAME_STYLES.includes(v);
15631
+ }
15632
+ function withAlpha(color, alpha) {
15633
+ const m = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec((color || "").trim());
15634
+ if (!m) return color;
15635
+ let h = m[1];
15636
+ if (h.length === 3) h = h.split("").map((c) => c + c).join("");
15637
+ const n = parseInt(h, 16);
15638
+ return `rgba(${n >> 16 & 255}, ${n >> 8 & 255}, ${n & 255}, ${alpha})`;
15639
+ }
15640
+ function frameToCss(frame) {
15641
+ if (!frame) return null;
15642
+ if (frame === "none") return { border: "none" };
15643
+ const c = frame.color;
15644
+ switch (frame.style) {
15645
+ case "soft":
15646
+ return { border: `1.5px solid ${withAlpha(c, 0.4)}`, boxShadow: `0 0 0 5px ${withAlpha(c, 0.08)}` };
15647
+ case "solid":
15648
+ return { border: `2px solid ${c}` };
15649
+ case "double":
15650
+ return { border: `1.5px solid ${c}`, outline: `1px solid ${withAlpha(c, 0.55)}`, outlineOffset: -7 };
15651
+ }
15652
+ }
15484
15653
  function safeLogoUrl(url) {
15485
15654
  const u = (url || "").trim();
15486
15655
  if (!u) return void 0;
@@ -15508,7 +15677,8 @@ function resolveFormDesign(design) {
15508
15677
  titleColor: (design == null ? void 0 : design.titleColor) || void 0,
15509
15678
  logoUrl: safeLogoUrl(design == null ? void 0 : design.logoUrl),
15510
15679
  logoHeight: Math.min(200, Math.max(24, Number(design == null ? void 0 : design.logoHeight) || 56)),
15511
- logoAlign: (design == null ? void 0 : design.logoAlign) || "start"
15680
+ logoAlign: (design == null ? void 0 : design.logoAlign) || "start",
15681
+ frame: isFormFrameStyle(design == null ? void 0 : design.frameStyle) ? design.frameStyle === "none" ? "none" : { style: design.frameStyle, color: (design == null ? void 0 : design.frameColor) || primary } : void 0
15512
15682
  };
15513
15683
  }
15514
15684
  var TODAY_DEFAULT_TOKEN = "@today";
@@ -15588,7 +15758,7 @@ function applyFieldOrder(cols, design) {
15588
15758
  }
15589
15759
 
15590
15760
  // src/components/FormBlock/StyledFormBlock.tsx
15591
- import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
15761
+ import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
15592
15762
  var SYSTEM_FIELDS = ["_id", "id", "createdAt", "updatedAt", "orgId", "tableId"];
15593
15763
  function StyledFormBlock({
15594
15764
  settings: schema,
@@ -15608,19 +15778,22 @@ function StyledFormBlock({
15608
15778
  const design = schema == null ? void 0 : schema.design;
15609
15779
  const d = resolveFormDesign(design);
15610
15780
  const t = d.tokens;
15611
- const [formData, setFormData] = useState22(initialValues || {});
15612
- const [isSubmitting, setIsSubmitting] = useState22(false);
15613
- const [isSubmitted, setIsSubmitted] = useState22(false);
15614
- const [columns, setColumns] = useState22((schema == null ? void 0 : schema.columns) || []);
15615
- const [isLoadingSchema, setIsLoadingSchema] = useState22(false);
15616
- const [dragName, setDragName] = useState22(null);
15617
- const [drop, setDrop] = useState22(null);
15618
- const [resizing, setResizing] = useState22(null);
15781
+ const [formData, setFormData] = useState23(initialValues || {});
15782
+ const [isSubmitting, setIsSubmitting] = useState23(false);
15783
+ const [isSubmitted, setIsSubmitted] = useState23(false);
15784
+ const [formError, setFormError] = useState23(null);
15785
+ const [missingNames, setMissingNames] = useState23([]);
15786
+ const errorRef = useRef20(null);
15787
+ const [columns, setColumns] = useState23((schema == null ? void 0 : schema.columns) || []);
15788
+ const [isLoadingSchema, setIsLoadingSchema] = useState23(false);
15789
+ const [dragName, setDragName] = useState23(null);
15790
+ const [drop, setDrop] = useState23(null);
15791
+ const [resizing, setResizing] = useState23(null);
15619
15792
  const resizeRef = useRef20(null);
15620
15793
  const gridRef = useRef20(null);
15621
15794
  const relationDictRef = useRef20({});
15622
15795
  const relationRequestedRef = useRef20(/* @__PURE__ */ new Set());
15623
- const [, bumpRelationLabels] = useState22(0);
15796
+ const [, bumpRelationLabels] = useState23(0);
15624
15797
  const targetTableId = (schema == null ? void 0 : schema.tableMetaId) || (schema == null ? void 0 : schema.tableId) || (schema == null ? void 0 : schema.id);
15625
15798
  useEffect20(() => {
15626
15799
  let isMounted = true;
@@ -15687,6 +15860,11 @@ function StyledFormBlock({
15687
15860
  const hiddenColumns = orderedColumns.filter((c) => isDesignHidden(c));
15688
15861
  const handleFieldChange = (colName, value) => {
15689
15862
  setFormData((prev) => __spreadProps(__spreadValues({}, prev), { [colName]: value }));
15863
+ if (missingNames.includes(colName)) {
15864
+ const left = missingNames.filter((n) => n !== colName);
15865
+ setMissingNames(left);
15866
+ if (left.length === 0) setFormError(null);
15867
+ }
15690
15868
  };
15691
15869
  const canReorder = !!onReorder;
15692
15870
  const reorderFields = (fromName, toName, side) => {
@@ -15831,13 +16009,29 @@ function StyledFormBlock({
15831
16009
  showError("\u05D4\u05E7\u05D9\u05E9\u05D5\u05E8 \u05D0\u05D9\u05E0\u05D5 \u05DE\u05E7\u05D5\u05E9\u05E8 \u05DC\u05E8\u05E9\u05D5\u05DE\u05D4 \u05E7\u05D9\u05D9\u05DE\u05EA", "\u05E9\u05D2\u05D9\u05D0\u05EA \u05E9\u05DE\u05D9\u05E8\u05D4");
15832
16010
  return;
15833
16011
  }
16012
+ const isEmptyValue = (col) => {
16013
+ var _a;
16014
+ const v = formData[col.name];
16015
+ if (((_a = col.type) == null ? void 0 : _a.toUpperCase()) === "BOOLEAN") return v !== true;
16016
+ return v === void 0 || v === null || v === "" || Array.isArray(v) && v.length === 0 || typeof v === "string" && v.trim() === "";
16017
+ };
15834
16018
  const missingFields = formColumns.filter(
15835
- (col) => isFieldRequired(col, design) && !isFieldLocked(col, design) && (formData[col.name] === void 0 || formData[col.name] === null || formData[col.name] === "")
16019
+ (col) => isFieldRequired(col, design) && !isFieldLocked(col, design) && isEmptyValue(col)
15836
16020
  );
15837
16021
  if (missingFields.length > 0) {
15838
- showError(`\u05D9\u05E9 \u05DC\u05DE\u05DC\u05D0 \u05D0\u05EA \u05D4\u05E9\u05D3\u05D5\u05EA \u05D4\u05D1\u05D0\u05D9\u05DD: ${missingFields.map((c) => c.name).join(", ")}`, "\u05E9\u05D2\u05D9\u05D0\u05EA \u05D5\u05DC\u05D9\u05D3\u05E6\u05D9\u05D4");
16022
+ const names = missingFields.map((c) => c.name);
16023
+ setMissingNames(names);
16024
+ setFormError(
16025
+ names.length === 1 ? `\u05E0\u05E8\u05D0\u05D4 \u05E9\u05E9\u05DB\u05D7\u05EA\u05DD \u05DC\u05DE\u05DC\u05D0 \u05D0\u05EA \u05D4\u05E9\u05D3\u05D4 "${names[0]}". \u05E0\u05E9\u05DE\u05D7 \u05D0\u05DD \u05EA\u05E9\u05DC\u05D9\u05DE\u05D5 \u05D0\u05D5\u05EA\u05D5 \u05D5\u05EA\u05E9\u05DC\u05D7\u05D5 \u05E9\u05D5\u05D1. \u05EA\u05D5\u05D3\u05D4!` : `\u05E0\u05E8\u05D0\u05D4 \u05E9\u05E9\u05DB\u05D7\u05EA\u05DD \u05DC\u05DE\u05DC\u05D0 \u05DB\u05DE\u05D4 \u05E9\u05D3\u05D5\u05EA \u05D7\u05D5\u05D1\u05D4: ${names.map((n) => `"${n}"`).join(", ")}. \u05E0\u05E9\u05DE\u05D7 \u05D0\u05DD \u05EA\u05E9\u05DC\u05D9\u05DE\u05D5 \u05D0\u05D5\u05EA\u05DD \u05D5\u05EA\u05E9\u05DC\u05D7\u05D5 \u05E9\u05D5\u05D1. \u05EA\u05D5\u05D3\u05D4!`
16026
+ );
16027
+ setTimeout(() => {
16028
+ var _a;
16029
+ return (_a = errorRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth", block: "nearest" });
16030
+ }, 0);
15839
16031
  return;
15840
16032
  }
16033
+ setFormError(null);
16034
+ setMissingNames([]);
15841
16035
  setIsSubmitting(true);
15842
16036
  try {
15843
16037
  const payload = {};
@@ -15882,20 +16076,28 @@ function StyledFormBlock({
15882
16076
  } catch (err) {
15883
16077
  console.error("[StyledFormBlock] Submit error:", err);
15884
16078
  showError((err == null ? void 0 : err.message) || String(err), "\u05E9\u05D2\u05D9\u05D0\u05D4 \u05D1\u05E9\u05DE\u05D9\u05E8\u05EA \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD");
16079
+ const raw = String((err == null ? void 0 : err.message) || "");
16080
+ setFormError(
16081
+ raw.startsWith("Validation Error") ? "\u05DC\u05D0 \u05D4\u05E6\u05DC\u05D7\u05E0\u05D5 \u05DC\u05E9\u05DE\u05D5\u05E8: \u05D7\u05DC\u05E7 \u05DE\u05D4\u05E4\u05E8\u05D8\u05D9\u05DD \u05D7\u05E1\u05E8\u05D9\u05DD \u05D0\u05D5 \u05D0\u05D9\u05E0\u05DD \u05EA\u05E7\u05D9\u05E0\u05D9\u05DD. \u05E0\u05E9\u05DE\u05D7 \u05D0\u05DD \u05EA\u05D1\u05D3\u05E7\u05D5 \u05D0\u05D5\u05EA\u05DD \u05D5\u05EA\u05E0\u05E1\u05D5 \u05E9\u05D5\u05D1." : "\u05D0\u05D9\u05E8\u05E2\u05D4 \u05EA\u05E7\u05DC\u05D4 \u05D1\u05E9\u05DE\u05D9\u05E8\u05EA \u05D4\u05E4\u05E8\u05D8\u05D9\u05DD. \u05E0\u05E1\u05D5 \u05E9\u05D5\u05D1 \u05D1\u05E2\u05D5\u05D3 \u05E8\u05D2\u05E2, \u05D5\u05D0\u05DD \u05D6\u05D4 \u05D7\u05D5\u05D6\u05E8 \u05E0\u05E9\u05DE\u05D7 \u05E9\u05EA\u05D9\u05E6\u05E8\u05D5 \u05D0\u05D9\u05EA\u05E0\u05D5 \u05E7\u05E9\u05E8."
16082
+ );
15885
16083
  } finally {
15886
16084
  setIsSubmitting(false);
15887
16085
  }
15888
16086
  };
15889
16087
  const muted = t.invertText ? "rgba(255,255,255,0.85)" : "#64748b";
15890
- const cardStyle = {
16088
+ const frameCss = frameToCss(d.frame);
16089
+ const framed = !!d.frame && d.frame !== "none";
16090
+ const cardRadius = t.radius || (framed ? 12 : 0);
16091
+ const cardPadding = t.padding || (framed ? 24 : 0);
16092
+ const cardStyle = __spreadValues({
15891
16093
  background: d.background,
15892
16094
  color: d.text,
15893
- borderRadius: t.radius,
16095
+ borderRadius: cardRadius,
15894
16096
  border: t.border,
15895
16097
  boxShadow: t.shadow,
15896
- padding: t.headerBand ? 0 : t.padding,
16098
+ padding: t.headerBand ? 0 : cardPadding,
15897
16099
  overflow: t.headerBand ? "hidden" : void 0
15898
- };
16100
+ }, frameCss ? __spreadValues(__spreadValues(__spreadValues({}, frameCss.border !== void 0 ? { border: frameCss.border } : {}), frameCss.boxShadow ? { boxShadow: t.shadow && t.shadow !== "none" ? `${frameCss.boxShadow}, ${t.shadow}` : frameCss.boxShadow } : {}), frameCss.outline ? { outline: frameCss.outline, outlineOffset: frameCss.outlineOffset } : {}) : {});
15899
16101
  const inputBoxStyle = t.inputStyle === "underline" ? { borderBottom: "1px solid #cbd5e1", borderRadius: 0, background: "transparent", minHeight: 40, position: "relative" } : {
15900
16102
  border: "1px solid #e2e8f0",
15901
16103
  borderRadius: Math.min(t.radius, 10) || 6,
@@ -15917,36 +16119,38 @@ function StyledFormBlock({
15917
16119
  .${uid} .fdz-grid{display:flex;flex-wrap:wrap;align-items:flex-end;gap:${t.gap}px}
15918
16120
  .${uid} .fdz-f{--n:6;flex:0 0 auto;box-sizing:border-box;min-width:0;display:flex;flex-direction:column;gap:6px;width:calc((100% - ${t.gap * 5}px) / 6 * var(--n) + ${t.gap}px * (var(--n) - 1) - 0.5px)}
15919
16121
  .${uid} .fdz-s1{--n:2}
15920
- .${uid} .fdz-b{width:fit-content;max-width:140px;margin-inline-end:-${Math.max(0, t.gap - 8)}px}
16122
+ .${uid} .fdz-b{width:fit-content;max-width:100%;margin-inline-end:-${Math.max(0, t.gap - 8)}px}
16123
+ .${uid} .fdz-b label{white-space:nowrap}
16124
+ .${uid} [data-fdz-box] input:focus,.${uid} [data-fdz-box] input:focus-visible,.${uid} [data-fdz-box] select:focus,.${uid} [data-fdz-box] textarea:focus{outline:none!important;box-shadow:none!important;--tw-ring-shadow:0 0 #0000!important;--tw-ring-offset-shadow:0 0 #0000!important}
15921
16125
  @container (min-width:480px){
15922
16126
  .${uid} .fdz-f{--n:var(--span)}
15923
16127
  }
15924
16128
  `;
15925
16129
  if (isLoadingSchema) {
15926
- return /* @__PURE__ */ jsxs26("div", { className: "p-8 flex items-center justify-center gap-2 text-slate-500", dir: "rtl", children: [
15927
- /* @__PURE__ */ jsx30(Loader210, { className: "w-5 h-5 animate-spin", style: { color: d.primary } }),
15928
- /* @__PURE__ */ jsx30("span", { className: "text-sm", children: "\u05D8\u05D5\u05E2\u05DF \u05E9\u05D3\u05D5\u05EA \u05D8\u05D5\u05E4\u05E1..." })
16130
+ return /* @__PURE__ */ jsxs27("div", { className: "p-8 flex items-center justify-center gap-2 text-slate-500", dir: "rtl", children: [
16131
+ /* @__PURE__ */ jsx31(Loader210, { className: "w-5 h-5 animate-spin", style: { color: d.primary } }),
16132
+ /* @__PURE__ */ jsx31("span", { className: "text-sm", children: "\u05D8\u05D5\u05E2\u05DF \u05E9\u05D3\u05D5\u05EA \u05D8\u05D5\u05E4\u05E1..." })
15929
16133
  ] });
15930
16134
  }
15931
16135
  if (!formColumns || formColumns.length === 0) {
15932
- return /* @__PURE__ */ jsx30("div", { className: "p-4 text-center text-slate-500", children: "\u05DC\u05D0 \u05D4\u05D5\u05D2\u05D3\u05E8\u05D5 \u05E9\u05D3\u05D5\u05EA \u05DC\u05D8\u05D5\u05E4\u05E1 \u05D6\u05D4." });
16136
+ return /* @__PURE__ */ jsx31("div", { className: "p-4 text-center text-slate-500", children: "\u05DC\u05D0 \u05D4\u05D5\u05D2\u05D3\u05E8\u05D5 \u05E9\u05D3\u05D5\u05EA \u05DC\u05D8\u05D5\u05E4\u05E1 \u05D6\u05D4." });
15933
16137
  }
15934
16138
  const logoJustify = d.logoAlign === "center" ? "center" : d.logoAlign === "end" ? "flex-end" : "flex-start";
15935
- const headerBlock = (schema == null ? void 0 : schema.title) || d.subtitle || d.logoUrl ? /* @__PURE__ */ jsxs26(
16139
+ const headerBlock = (schema == null ? void 0 : schema.title) || d.subtitle || d.logoUrl ? /* @__PURE__ */ jsxs27(
15936
16140
  "div",
15937
16141
  {
15938
16142
  style: t.headerBand ? { background: d.primary, color: "#ffffff", padding: `${t.padding * 0.8}px ${t.padding}px` } : { marginBottom: t.gap + 4 },
15939
16143
  children: [
15940
- d.logoUrl && /* @__PURE__ */ jsx30("div", { style: { display: "flex", justifyContent: logoJustify, marginBottom: (schema == null ? void 0 : schema.title) || d.subtitle ? 12 : 0 }, children: /* @__PURE__ */ jsx30("img", { src: d.logoUrl, alt: "", style: { height: d.logoHeight, maxWidth: "100%", objectFit: "contain", display: "block" } }) }),
15941
- (schema == null ? void 0 : schema.title) && /* @__PURE__ */ jsx30("h2", { style: __spreadValues({ fontSize: t.titleSize, fontWeight: 800, margin: 0 }, d.titleColor ? { color: d.titleColor } : {}), children: schema.title }),
15942
- d.subtitle && /* @__PURE__ */ jsx30("p", { style: { fontSize: 14, margin: "6px 0 0", color: t.headerBand ? "rgba(255,255,255,0.9)" : muted }, children: d.subtitle })
16144
+ d.logoUrl && /* @__PURE__ */ jsx31("div", { style: { display: "flex", justifyContent: logoJustify, marginBottom: (schema == null ? void 0 : schema.title) || d.subtitle ? 12 : 0 }, children: /* @__PURE__ */ jsx31("img", { src: d.logoUrl, alt: "", style: { height: d.logoHeight, maxWidth: "100%", objectFit: "contain", display: "block" } }) }),
16145
+ (schema == null ? void 0 : schema.title) && /* @__PURE__ */ jsx31("h2", { style: __spreadValues({ fontSize: t.titleSize, fontWeight: 800, margin: 0 }, d.titleColor ? { color: d.titleColor } : {}), children: schema.title }),
16146
+ d.subtitle && /* @__PURE__ */ jsx31("p", { style: { fontSize: 14, margin: "6px 0 0", color: t.headerBand ? "rgba(255,255,255,0.9)" : muted }, children: d.subtitle })
15943
16147
  ]
15944
16148
  }
15945
16149
  ) : null;
15946
16150
  if (isSubmitted) {
15947
16151
  const customMessage = (schema == null ? void 0 : schema.successMessage) || "\u05EA\u05D5\u05D3\u05D4 \u05E8\u05D1\u05D4! \u05D4\u05E4\u05E8\u05D8\u05D9\u05DD \u05D4\u05EA\u05E7\u05D1\u05DC\u05D5 \u05D1\u05D4\u05E6\u05DC\u05D7\u05D4.";
15948
- return /* @__PURE__ */ jsxs26("div", { id: componentId, dir: "rtl", className, style: __spreadProps(__spreadValues({}, cardStyle), { padding: t.padding || 24, textAlign: "center" }), children: [
15949
- /* @__PURE__ */ jsx30(
16152
+ return /* @__PURE__ */ jsxs27("div", { id: componentId, dir: "rtl", className, style: __spreadProps(__spreadValues({}, cardStyle), { padding: t.padding || 24, textAlign: "center" }), children: [
16153
+ /* @__PURE__ */ jsx31(
15950
16154
  "div",
15951
16155
  {
15952
16156
  style: {
@@ -15960,12 +16164,12 @@ function StyledFormBlock({
15960
16164
  background: t.invertText ? "rgba(255,255,255,0.2)" : "#ecfdf5",
15961
16165
  color: t.invertText ? "#ffffff" : "#059669"
15962
16166
  },
15963
- children: /* @__PURE__ */ jsx30(CheckCircle26, { className: "w-8 h-8" })
16167
+ children: /* @__PURE__ */ jsx31(CheckCircle26, { className: "w-8 h-8" })
15964
16168
  }
15965
16169
  ),
15966
- /* @__PURE__ */ jsx30("h3", { style: { fontSize: 24, fontWeight: 800, margin: "0 0 8px" }, children: "\u05D4\u05D5\u05D3\u05E2\u05D4 \u05E0\u05E9\u05DC\u05D7\u05D4" }),
15967
- /* @__PURE__ */ jsx30("p", { style: { fontSize: 16, color: muted, maxWidth: 420, margin: "0 auto", whiteSpace: "pre-wrap" }, children: customMessage }),
15968
- submitMode !== "update" && /* @__PURE__ */ jsx30(
16170
+ /* @__PURE__ */ jsx31("h3", { style: { fontSize: 24, fontWeight: 800, margin: "0 0 8px" }, children: "\u05D4\u05D5\u05D3\u05E2\u05D4 \u05E0\u05E9\u05DC\u05D7\u05D4" }),
16171
+ /* @__PURE__ */ jsx31("p", { style: { fontSize: 16, color: muted, maxWidth: 420, margin: "0 auto", whiteSpace: "pre-wrap" }, children: customMessage }),
16172
+ submitMode !== "update" && /* @__PURE__ */ jsx31(
15969
16173
  "button",
15970
16174
  {
15971
16175
  type: "button",
@@ -15977,11 +16181,11 @@ function StyledFormBlock({
15977
16181
  ] });
15978
16182
  }
15979
16183
  const justify = d.buttonAlign === "center" ? "center" : d.buttonAlign === "end" ? "flex-end" : d.buttonAlign === "full" ? "stretch" : "flex-start";
15980
- return /* @__PURE__ */ jsxs26("div", { id: componentId, dir: "rtl", className: `${uid} ${className}`, style: cardStyle, children: [
15981
- /* @__PURE__ */ jsx30("style", { children: css }),
16184
+ return /* @__PURE__ */ jsxs27("div", { id: componentId, dir: "rtl", className: `${uid} ${className}`, style: cardStyle, children: [
16185
+ /* @__PURE__ */ jsx31("style", { children: css }),
15982
16186
  headerBlock,
15983
- /* @__PURE__ */ jsx30("div", { style: t.headerBand ? { padding: t.padding } : void 0, children: /* @__PURE__ */ jsxs26("form", { onSubmit: handleSubmit, children: [
15984
- /* @__PURE__ */ jsx30("div", { className: "fdz-grid", ref: gridRef, children: (() => {
16187
+ /* @__PURE__ */ jsx31("div", { style: t.headerBand ? { padding: t.padding } : void 0, children: /* @__PURE__ */ jsxs27("form", { onSubmit: handleSubmit, children: [
16188
+ /* @__PURE__ */ jsx31("div", { className: "fdz-grid", ref: gridRef, children: (() => {
15985
16189
  const spanOf = (col) => {
15986
16190
  var _a;
15987
16191
  if (resizing && resizing.name === col.name) return resizing.span;
@@ -15998,8 +16202,8 @@ function StyledFormBlock({
15998
16202
  const shownValue = (_c = formData[col.name]) != null ? _c : locked && submitMode !== "update" ? (_b = parseColumnDefault(col)) != null ? _b : "" : "";
15999
16203
  const fieldHeight = resizing && resizing.name === col.name ? resizing.height : (_e = (_d = design == null ? void 0 : design.fields) == null ? void 0 : _d[col.name]) == null ? void 0 : _e.height;
16000
16204
  const useTextarea = !!fieldHeight && fieldHeight > 56 && InputComponent === FORM_INPUTS.DEFAULT;
16001
- const boxStyle = __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, isBoolean ? booleanBoxStyle : inputBoxStyle), fieldHeight && !isBoolean ? __spreadValues({ minHeight: fieldHeight }, useTextarea ? { height: fieldHeight } : {}) : {}), canReorder ? { pointerEvents: "none" } : {}), locked ? { background: t.inputStyle === "underline" ? "transparent" : "#f1f5f9", opacity: 0.85, cursor: "not-allowed" } : {});
16002
- return /* @__PURE__ */ jsxs26(
16205
+ const boxStyle = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, isBoolean ? booleanBoxStyle : inputBoxStyle), fieldHeight && !isBoolean ? __spreadValues({ minHeight: fieldHeight }, useTextarea ? { height: fieldHeight } : {}) : {}), canReorder ? { pointerEvents: "none" } : {}), missingNames.includes(col.name) ? t.inputStyle === "underline" ? { borderBottom: "2px solid #f43f5e" } : { border: "1px solid #f43f5e", boxShadow: "0 0 0 3px rgba(244,63,94,0.15)" } : {}), locked ? { background: t.inputStyle === "underline" ? "transparent" : "#f1f5f9", opacity: 0.85, cursor: "not-allowed" } : {});
16206
+ return /* @__PURE__ */ jsxs27(
16003
16207
  "div",
16004
16208
  {
16005
16209
  "data-fdz-field": col.name,
@@ -16023,13 +16227,13 @@ function StyledFormBlock({
16023
16227
  borderRadius: 6
16024
16228
  } : {}),
16025
16229
  children: [
16026
- /* @__PURE__ */ jsxs26("label", { style: { fontSize: t.labelSize, fontWeight: 600, color: d.text }, children: [
16230
+ /* @__PURE__ */ jsxs27("label", { style: { fontSize: t.labelSize, fontWeight: 600, color: d.text }, children: [
16027
16231
  col.name,
16028
16232
  " ",
16029
- isFieldRequired(col, design) && !locked && /* @__PURE__ */ jsx30("span", { style: { color: t.invertText ? "#fecdd3" : "#f43f5e" }, children: "*" }),
16030
- locked && /* @__PURE__ */ jsx30("span", { style: { fontSize: 11, fontWeight: 400, opacity: 0.7 }, children: "(\u05DC\u05D0 \u05E0\u05D9\u05EA\u05DF \u05DC\u05E2\u05E8\u05D9\u05DB\u05D4)" })
16233
+ isFieldRequired(col, design) && !locked && /* @__PURE__ */ jsx31("span", { style: { color: t.invertText ? "#fecdd3" : "#f43f5e" }, children: "*" }),
16234
+ locked && /* @__PURE__ */ jsx31("span", { style: { fontSize: 11, fontWeight: 400, opacity: 0.7 }, children: "(\u05DC\u05D0 \u05E0\u05D9\u05EA\u05DF \u05DC\u05E2\u05E8\u05D9\u05DB\u05D4)" })
16031
16235
  ] }),
16032
- /* @__PURE__ */ jsx30("div", { "data-fdz-box": true, style: boxStyle, children: useTextarea ? /* @__PURE__ */ jsx30(
16236
+ /* @__PURE__ */ jsx31("div", { "data-fdz-box": true, style: boxStyle, children: useTextarea ? /* @__PURE__ */ jsx31(
16033
16237
  "textarea",
16034
16238
  {
16035
16239
  value: shownValue,
@@ -16049,7 +16253,7 @@ function StyledFormBlock({
16049
16253
  boxSizing: "border-box"
16050
16254
  }
16051
16255
  }
16052
- ) : /* @__PURE__ */ jsx30(
16256
+ ) : /* @__PURE__ */ jsx31(
16053
16257
  InputComponent,
16054
16258
  {
16055
16259
  column: col,
@@ -16060,7 +16264,7 @@ function StyledFormBlock({
16060
16264
  context: { executeAction: previewMode ? void 0 : executeAction, tableId: targetTableId, relationDictionaryRef: relationDictRef }
16061
16265
  }
16062
16266
  ) }),
16063
- canReorder && dragName && drop && drop.name === col.name && /* @__PURE__ */ jsx30(
16267
+ canReorder && dragName && drop && drop.name === col.name && /* @__PURE__ */ jsx31(
16064
16268
  "div",
16065
16269
  {
16066
16270
  style: __spreadValues({
@@ -16075,7 +16279,7 @@ function StyledFormBlock({
16075
16279
  }, drop.side === "before" ? { insetInlineStart: -(t.gap / 2) - 2 } : { insetInlineEnd: -(t.gap / 2) - 2 })
16076
16280
  }
16077
16281
  ),
16078
- onFieldResize && !isBoolean && /* @__PURE__ */ jsx30(
16282
+ onFieldResize && !isBoolean && /* @__PURE__ */ jsx31(
16079
16283
  "div",
16080
16284
  {
16081
16285
  onMouseDown: (e) => e.stopPropagation(),
@@ -16105,7 +16309,26 @@ function StyledFormBlock({
16105
16309
  };
16106
16310
  return formColumns.map((col) => renderField(col));
16107
16311
  })() }),
16108
- /* @__PURE__ */ jsx30(
16312
+ formError && /* @__PURE__ */ jsx31(
16313
+ "div",
16314
+ {
16315
+ ref: errorRef,
16316
+ role: "alert",
16317
+ "aria-live": "polite",
16318
+ style: {
16319
+ marginTop: t.gap + 8,
16320
+ padding: "10px 14px",
16321
+ borderRadius: Math.min(t.radius, 10) || 6,
16322
+ background: "#fff1f2",
16323
+ border: "1px solid #fda4af",
16324
+ color: "#9f1239",
16325
+ fontSize: 14,
16326
+ lineHeight: 1.5
16327
+ },
16328
+ children: formError
16329
+ }
16330
+ ),
16331
+ /* @__PURE__ */ jsx31(
16109
16332
  "div",
16110
16333
  {
16111
16334
  style: {
@@ -16115,7 +16338,7 @@ function StyledFormBlock({
16115
16338
  display: "flex",
16116
16339
  justifyContent: justify
16117
16340
  },
16118
- children: /* @__PURE__ */ jsxs26(
16341
+ children: /* @__PURE__ */ jsxs27(
16119
16342
  "button",
16120
16343
  {
16121
16344
  type: "submit",
@@ -16138,8 +16361,8 @@ function StyledFormBlock({
16138
16361
  opacity: isSubmitting ? 0.5 : 1
16139
16362
  },
16140
16363
  children: [
16141
- isSubmitting && /* @__PURE__ */ jsx30(Loader210, { className: "w-4 h-4 animate-spin" }),
16142
- /* @__PURE__ */ jsx30("span", { children: isSubmitting ? "\u05E9\u05D5\u05DE\u05E8..." : d.buttonText })
16364
+ isSubmitting && /* @__PURE__ */ jsx31(Loader210, { className: "w-4 h-4 animate-spin" }),
16365
+ /* @__PURE__ */ jsx31("span", { children: isSubmitting ? "\u05E9\u05D5\u05DE\u05E8..." : d.buttonText })
16143
16366
  ]
16144
16367
  }
16145
16368
  )
@@ -16150,8 +16373,8 @@ function StyledFormBlock({
16150
16373
  }
16151
16374
 
16152
16375
  // src/themes/ThemeScope.tsx
16153
- import * as React23 from "react";
16154
- import { jsx as jsx31 } from "react/jsx-runtime";
16376
+ import * as React24 from "react";
16377
+ import { jsx as jsx32 } from "react/jsx-runtime";
16155
16378
  var UNIVERSE_THEME_IDS = ["classic", "clean", "ocean", "warm"];
16156
16379
  function resolveUniverseTheme(value) {
16157
16380
  return typeof value === "string" && UNIVERSE_THEME_IDS.includes(value) ? value : "classic";
@@ -16161,7 +16384,7 @@ function withThemeScope(Component) {
16161
16384
  var _a, _b, _c;
16162
16385
  const p = props;
16163
16386
  const theme = resolveUniverseTheme((_c = (_a = p.settings) == null ? void 0 : _a.theme) != null ? _c : (_b = p.config) == null ? void 0 : _b.theme);
16164
- return /* @__PURE__ */ jsx31("div", { "data-theme": theme, style: { display: "contents" }, children: React23.createElement(Component, props) });
16387
+ return /* @__PURE__ */ jsx32("div", { "data-theme": theme, style: { display: "contents" }, children: React24.createElement(Component, props) });
16165
16388
  }
16166
16389
  ThemeScoped.displayName = `ThemeScoped(${Component.displayName || Component.name || "Component"})`;
16167
16390
  return ThemeScoped;