mozrest-sdk-react-dev 0.3.74 → 0.3.76

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.
Files changed (3) hide show
  1. package/mozrest-sdk.es.js +595 -326
  2. package/package.json +1 -1
  3. package/style.css +217 -164
package/mozrest-sdk.es.js CHANGED
@@ -8,7 +8,7 @@ import ReactDOM__default, { createPortal } from "react-dom";
8
8
  const container$C = "_container_1xz3t_13";
9
9
  const item$8 = "_item_1xz3t_20";
10
10
  const itemfull$1 = "_itemfull_1xz3t_26";
11
- const styles$2q = {
11
+ const styles$2r = {
12
12
  "animate-pulse": "_animate-pulse_1xz3t_1",
13
13
  container: container$C,
14
14
  item: item$8,
@@ -960,15 +960,15 @@ const jsxs = jsxRuntimeExports.jsxs;
960
960
  const Fragment = jsxRuntimeExports.Fragment;
961
961
  const SkeletonPage$1 = () => {
962
962
  return /* @__PURE__ */ jsx$1("div", {
963
- className: styles$2q["animate-pulse"],
963
+ className: styles$2r["animate-pulse"],
964
964
  children: /* @__PURE__ */ jsxs("div", {
965
- className: styles$2q.container,
965
+ className: styles$2r.container,
966
966
  children: [/* @__PURE__ */ jsx$1("div", {
967
- className: styles$2q.item
967
+ className: styles$2r.item
968
968
  }), /* @__PURE__ */ jsx$1("div", {
969
- className: styles$2q.item
969
+ className: styles$2r.item
970
970
  }), /* @__PURE__ */ jsx$1("div", {
971
- className: styles$2q.itemfull
971
+ className: styles$2r.itemfull
972
972
  })]
973
973
  })
974
974
  });
@@ -3445,7 +3445,7 @@ const classNames$2 = (...classNames2) => {
3445
3445
  return resultClasses.join(" ");
3446
3446
  };
3447
3447
  const container$B = "_container_1ar7o_1";
3448
- const styles$2p = {
3448
+ const styles$2q = {
3449
3449
  container: container$B
3450
3450
  };
3451
3451
  const Container = ({
@@ -3459,12 +3459,12 @@ const Container = ({
3459
3459
  return /* @__PURE__ */ jsx$1(Tag2, {
3460
3460
  "aria-label": ariaLabel,
3461
3461
  "aria-labelledby": ariaLabelledby,
3462
- className: classNames$2(styles$2p["container"], className),
3462
+ className: classNames$2(styles$2q["container"], className),
3463
3463
  children
3464
3464
  });
3465
3465
  };
3466
3466
  const container$A = "_container_11xrj_1";
3467
- const styles$2o = {
3467
+ const styles$2p = {
3468
3468
  container: container$A
3469
3469
  };
3470
3470
  const LayoutPage$2 = ({
@@ -3474,12 +3474,12 @@ const LayoutPage$2 = ({
3474
3474
  contentClassName
3475
3475
  }) => {
3476
3476
  return /* @__PURE__ */ jsxs("div", {
3477
- className: classNames$2(styles$2o.container, containerClassName, "mz-sdk-cst-pf"),
3477
+ className: classNames$2(styles$2p.container, containerClassName, "mz-sdk-cst-pf"),
3478
3478
  children: [header2 && /* @__PURE__ */ jsx$1("div", {
3479
3479
  className: "mz-header",
3480
3480
  children: header2
3481
3481
  }), /* @__PURE__ */ jsx$1(Container, {
3482
- className: classNames$2(styles$2o.content, contentClassName),
3482
+ className: classNames$2(styles$2p.content, contentClassName),
3483
3483
  children
3484
3484
  })]
3485
3485
  });
@@ -7828,6 +7828,8 @@ const widget$4 = "Widget";
7828
7828
  const maxPartySize$4 = "Max party size";
7829
7829
  const VENUE_MANAGEMENT$4 = "Venue management";
7830
7830
  const BRAND_MANAGEMENT$4 = "Brand management";
7831
+ const LEGAL_TEXT_MANAGEMENT$4 = "Legal text management";
7832
+ const OCCASION_MANAGEMENT$4 = "Occasion management";
7831
7833
  const BRAND_DETAIL$4 = "Brand detail";
7832
7834
  const IMPORTANT_NOTICE$4 = "Important notice";
7833
7835
  const TERMS_CONDITIONS_LINK$4 = "Terms & Conditions Link";
@@ -8491,6 +8493,8 @@ const en = {
8491
8493
  maxPartySize: maxPartySize$4,
8492
8494
  VENUE_MANAGEMENT: VENUE_MANAGEMENT$4,
8493
8495
  BRAND_MANAGEMENT: BRAND_MANAGEMENT$4,
8496
+ LEGAL_TEXT_MANAGEMENT: LEGAL_TEXT_MANAGEMENT$4,
8497
+ OCCASION_MANAGEMENT: OCCASION_MANAGEMENT$4,
8494
8498
  BRAND_DETAIL: BRAND_DETAIL$4,
8495
8499
  IMPORTANT_NOTICE: IMPORTANT_NOTICE$4,
8496
8500
  TERMS_CONDITIONS_LINK: TERMS_CONDITIONS_LINK$4,
@@ -9115,6 +9119,8 @@ const widget$3 = "Widget";
9115
9119
  const maxPartySize$3 = "Tamaño máximo de grupo";
9116
9120
  const VENUE_MANAGEMENT$3 = "Gestión de restaurantes";
9117
9121
  const BRAND_MANAGEMENT$3 = "Gestión de marcas";
9122
+ const LEGAL_TEXT_MANAGEMENT$3 = "Gestión de textos legales";
9123
+ const OCCASION_MANAGEMENT$3 = "Gestión de ocasiones";
9118
9124
  const BRAND_DETAIL$3 = "Detalle de marca";
9119
9125
  const IMPORTANT_NOTICE$3 = "Aviso importante";
9120
9126
  const TERMS_CONDITIONS_LINK$3 = "Enlace de Términos y Condiciones";
@@ -9779,6 +9785,8 @@ const es$2 = {
9779
9785
  maxPartySize: maxPartySize$3,
9780
9786
  VENUE_MANAGEMENT: VENUE_MANAGEMENT$3,
9781
9787
  BRAND_MANAGEMENT: BRAND_MANAGEMENT$3,
9788
+ LEGAL_TEXT_MANAGEMENT: LEGAL_TEXT_MANAGEMENT$3,
9789
+ OCCASION_MANAGEMENT: OCCASION_MANAGEMENT$3,
9782
9790
  BRAND_DETAIL: BRAND_DETAIL$3,
9783
9791
  IMPORTANT_NOTICE: IMPORTANT_NOTICE$3,
9784
9792
  TERMS_CONDITIONS_LINK: TERMS_CONDITIONS_LINK$3,
@@ -10404,6 +10412,8 @@ const widget$2 = "Widget";
10404
10412
  const maxPartySize$2 = "Nombre maximum de personnes";
10405
10413
  const VENUE_MANAGEMENT$2 = "Gestion des établissements";
10406
10414
  const BRAND_MANAGEMENT$2 = "Gestion des marques";
10415
+ const LEGAL_TEXT_MANAGEMENT$2 = "Gestion des textes légaux";
10416
+ const OCCASION_MANAGEMENT$2 = "Gestion des occasions";
10407
10417
  const BRAND_DETAIL$2 = "Détail de la marque";
10408
10418
  const IMPORTANT_NOTICE$2 = "Avis important";
10409
10419
  const TERMS_CONDITIONS_LINK$2 = "Lien des Conditions Générales";
@@ -11067,6 +11077,8 @@ const fr$1 = {
11067
11077
  maxPartySize: maxPartySize$2,
11068
11078
  VENUE_MANAGEMENT: VENUE_MANAGEMENT$2,
11069
11079
  BRAND_MANAGEMENT: BRAND_MANAGEMENT$2,
11080
+ LEGAL_TEXT_MANAGEMENT: LEGAL_TEXT_MANAGEMENT$2,
11081
+ OCCASION_MANAGEMENT: OCCASION_MANAGEMENT$2,
11070
11082
  BRAND_DETAIL: BRAND_DETAIL$2,
11071
11083
  IMPORTANT_NOTICE: IMPORTANT_NOTICE$2,
11072
11084
  TERMS_CONDITIONS_LINK: TERMS_CONDITIONS_LINK$2,
@@ -11690,6 +11702,8 @@ const widget$1 = "Widget";
11690
11702
  const maxPartySize$1 = "Max. Gästeanzahl";
11691
11703
  const VENUE_MANAGEMENT$1 = "Standortverwaltung";
11692
11704
  const BRAND_MANAGEMENT$1 = "Markenverwaltung";
11705
+ const LEGAL_TEXT_MANAGEMENT$1 = "Rechtstextverwaltung";
11706
+ const OCCASION_MANAGEMENT$1 = "Anlassverwaltung";
11693
11707
  const BRAND_DETAIL$1 = "Markendetails";
11694
11708
  const IMPORTANT_NOTICE$1 = "Wichtiger Hinweis";
11695
11709
  const TERMS_CONDITIONS_LINK$1 = "Link zu den Allgemeinen Geschäftsbedingungen";
@@ -12294,6 +12308,8 @@ const de$1 = {
12294
12308
  maxPartySize: maxPartySize$1,
12295
12309
  VENUE_MANAGEMENT: VENUE_MANAGEMENT$1,
12296
12310
  BRAND_MANAGEMENT: BRAND_MANAGEMENT$1,
12311
+ LEGAL_TEXT_MANAGEMENT: LEGAL_TEXT_MANAGEMENT$1,
12312
+ OCCASION_MANAGEMENT: OCCASION_MANAGEMENT$1,
12297
12313
  BRAND_DETAIL: BRAND_DETAIL$1,
12298
12314
  IMPORTANT_NOTICE: IMPORTANT_NOTICE$1,
12299
12315
  TERMS_CONDITIONS_LINK: TERMS_CONDITIONS_LINK$1,
@@ -12859,6 +12875,8 @@ const widget = "Widget";
12859
12875
  const maxPartySize = "Max. gasten";
12860
12876
  const VENUE_MANAGEMENT = "Locatiebeheer";
12861
12877
  const BRAND_MANAGEMENT = "Merkbeheer";
12878
+ const LEGAL_TEXT_MANAGEMENT = "Beheer van juridische teksten";
12879
+ const OCCASION_MANAGEMENT = "Beheer van gelegenheden";
12862
12880
  const BRAND_DETAIL = "Merkdetails";
12863
12881
  const IMPORTANT_NOTICE = "Belangrijke mededeling";
12864
12882
  const TERMS_CONDITIONS_LINK = "Link naar Algemene Voorwaarden";
@@ -13463,6 +13481,8 @@ const nl$1 = {
13463
13481
  maxPartySize,
13464
13482
  VENUE_MANAGEMENT,
13465
13483
  BRAND_MANAGEMENT,
13484
+ LEGAL_TEXT_MANAGEMENT,
13485
+ OCCASION_MANAGEMENT,
13466
13486
  BRAND_DETAIL,
13467
13487
  IMPORTANT_NOTICE,
13468
13488
  TERMS_CONDITIONS_LINK,
@@ -17741,6 +17761,7 @@ const Provider = ({
17741
17761
  lang: lang2,
17742
17762
  parentUserId,
17743
17763
  children: Children2,
17764
+ page,
17744
17765
  ...props
17745
17766
  }) => {
17746
17767
  return /* @__PURE__ */ jsx$1(AuthHandler, {
@@ -17752,7 +17773,8 @@ const Provider = ({
17752
17773
  lang: lang2,
17753
17774
  children: /* @__PURE__ */ jsx$1(Children2, {
17754
17775
  ...props,
17755
- lang: lang2
17776
+ lang: lang2,
17777
+ page
17756
17778
  })
17757
17779
  })
17758
17780
  })
@@ -40815,25 +40837,25 @@ const ContextUserRole = React__default.createContext([
40815
40837
  const label$8 = "_label_7mgn7_1";
40816
40838
  const comment$4 = "_comment_7mgn7_5";
40817
40839
  const translate = "_translate_7mgn7_9";
40818
- const styles$2n = {
40840
+ const styles$2o = {
40819
40841
  label: label$8,
40820
40842
  comment: comment$4,
40821
40843
  translate
40822
40844
  };
40823
40845
  const sronly$1 = "_sronly_1n9bw_1";
40824
- const styles$2m = {
40846
+ const styles$2n = {
40825
40847
  sronly: sronly$1
40826
40848
  };
40827
40849
  const SrOnly$1 = ({
40828
40850
  children
40829
40851
  }) => {
40830
40852
  return /* @__PURE__ */ jsx$1("span", {
40831
- className: styles$2m.sronly,
40853
+ className: styles$2n.sronly,
40832
40854
  children
40833
40855
  });
40834
40856
  };
40835
40857
  const label$7 = "_label_1vki7_1";
40836
- const styles$2l = {
40858
+ const styles$2m = {
40837
40859
  label: label$7
40838
40860
  };
40839
40861
  var propTypes$3 = { exports: {} };
@@ -45739,7 +45761,7 @@ const icons$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
45739
45761
  yes: yes$1
45740
45762
  }, Symbol.toStringTag, { value: "Module" }));
45741
45763
  const icon$a = "_icon_69yub_1";
45742
- const styles$2k = {
45764
+ const styles$2l = {
45743
45765
  icon: icon$a,
45744
45766
  "icon--small": "_icon--small_69yub_12",
45745
45767
  "icon--medium": "_icon--medium_69yub_15",
@@ -45754,14 +45776,14 @@ const Icon$1 = ({
45754
45776
  ...props
45755
45777
  }) => {
45756
45778
  return /* @__PURE__ */ jsx$1("span", {
45757
- className: classNames$2(styles$2k["icon"], styles$2k[`icon--${size}`], className),
45779
+ className: classNames$2(styles$2l["icon"], styles$2l[`icon--${size}`], className),
45758
45780
  ...props,
45759
45781
  children: icons$1[icon2]()
45760
45782
  });
45761
45783
  };
45762
45784
  const tooltip$2 = "_tooltip_17puf_1";
45763
45785
  const tooltip__icon$1 = "_tooltip__icon_17puf_4";
45764
- const styles$2j = {
45786
+ const styles$2k = {
45765
45787
  tooltip: tooltip$2,
45766
45788
  tooltip__icon: tooltip__icon$1
45767
45789
  };
@@ -45769,9 +45791,9 @@ const Tooltip$2 = ({
45769
45791
  children
45770
45792
  }) => {
45771
45793
  return /* @__PURE__ */ jsxs("div", {
45772
- className: styles$2j.tooltip,
45794
+ className: styles$2k.tooltip,
45773
45795
  children: [/* @__PURE__ */ jsx$1(Icon$1, {
45774
- className: styles$2j.tooltip__icon,
45796
+ className: styles$2k.tooltip__icon,
45775
45797
  icon: "question",
45776
45798
  size: "small",
45777
45799
  "data-tip": true
@@ -45792,7 +45814,7 @@ const Label$2 = ({
45792
45814
  ...props
45793
45815
  }) => {
45794
45816
  const label2 = /* @__PURE__ */ jsxs("label", {
45795
- className: styles$2l.label,
45817
+ className: styles$2m.label,
45796
45818
  ...props,
45797
45819
  children: [children, tooltip2 && /* @__PURE__ */ jsx$1(Tooltip$2, {
45798
45820
  children: tooltip2
@@ -45804,7 +45826,7 @@ const Label$2 = ({
45804
45826
  };
45805
45827
  const label$6 = "_label_15hk9_1";
45806
45828
  const translation$1 = "_translation_15hk9_6";
45807
- const styles$2i = {
45829
+ const styles$2j = {
45808
45830
  label: label$6,
45809
45831
  translation: translation$1
45810
45832
  };
@@ -45844,13 +45866,13 @@ const ReplyTranslation = ({
45844
45866
  children: [isExecuting && /* @__PURE__ */ jsxs("span", {
45845
45867
  children: [t2("TRANSLATING"), "..."]
45846
45868
  }), !isExecuting && /* @__PURE__ */ jsxs("div", {
45847
- className: styles$2i.translation,
45869
+ className: styles$2j.translation,
45848
45870
  children: [/* @__PURE__ */ jsx$1(Label$2, {
45849
45871
  htmlFor: "",
45850
- className: styles$2i.label,
45872
+ className: styles$2j.label,
45851
45873
  children: t2("TRANSLATION")
45852
45874
  }), /* @__PURE__ */ jsx$1("p", {
45853
- className: styles$2i.translation,
45875
+ className: styles$2j.translation,
45854
45876
  children: data2 && data2.translatedText ? decodeHtmlEntities$1(data2.translatedText) : "---"
45855
45877
  })]
45856
45878
  })]
@@ -45870,6 +45892,24 @@ const Pointer = () => /* @__PURE__ */ jsx$1("svg", {
45870
45892
  d: "M7.904 17.563a1.2 1.2 0 0 0 2.228.308l2.09-3.093l4.907 4.907a1.067 1.067 0 0 0 1.509 0l1.047-1.047a1.067 1.067 0 0 0 0-1.509l-4.907-4.907l3.113-2.09a1.2 1.2 0 0 0-.309-2.228L4 4z"
45871
45893
  })
45872
45894
  });
45895
+ const Copy = () => /* @__PURE__ */ jsx$1("svg", {
45896
+ xmlns: "http://www.w3.org/2000/svg",
45897
+ width: "24",
45898
+ height: "24",
45899
+ viewBox: "0 0 24 24",
45900
+ children: /* @__PURE__ */ jsxs("g", {
45901
+ fill: "none",
45902
+ stroke: "currentColor",
45903
+ "stroke-linecap": "round",
45904
+ "stroke-linejoin": "round",
45905
+ "stroke-width": "2",
45906
+ children: [/* @__PURE__ */ jsx$1("path", {
45907
+ d: "M7 9.667A2.667 2.667 0 0 1 9.667 7h8.666A2.667 2.667 0 0 1 21 9.667v8.666A2.667 2.667 0 0 1 18.333 21H9.667A2.667 2.667 0 0 1 7 18.333z"
45908
+ }), /* @__PURE__ */ jsx$1("path", {
45909
+ d: "M4.012 16.737A2 2 0 0 1 3 15V5c0-1.1.9-2 2-2h10c.75 0 1.158.385 1.5 1"
45910
+ })]
45911
+ })
45912
+ });
45873
45913
  const Users$2 = () => /* @__PURE__ */ jsx$1("svg", {
45874
45914
  xmlns: "http://www.w3.org/2000/svg",
45875
45915
  width: "24",
@@ -47398,6 +47438,7 @@ const icons = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
47398
47438
  Bing,
47399
47439
  CalendarTime,
47400
47440
  CheckBox,
47441
+ Copy,
47401
47442
  EyeOff,
47402
47443
  FidgetSpinner,
47403
47444
  LetterX,
@@ -47484,7 +47525,7 @@ const icons = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
47484
47525
  yes
47485
47526
  }, Symbol.toStringTag, { value: "Module" }));
47486
47527
  const icon$9 = "_icon_lm3br_1";
47487
- const styles$2h = {
47528
+ const styles$2i = {
47488
47529
  icon: icon$9,
47489
47530
  "icon--xs": "_icon--xs_lm3br_12",
47490
47531
  "icon--small": "_icon--small_lm3br_15",
@@ -47499,13 +47540,13 @@ const Icon = ({
47499
47540
  ...props
47500
47541
  }) => {
47501
47542
  return /* @__PURE__ */ jsx$1("span", {
47502
- className: classNames$2(styles$2h["icon"], styles$2h[`icon--${size}`], className),
47543
+ className: classNames$2(styles$2i["icon"], styles$2i[`icon--${size}`], className),
47503
47544
  ...props,
47504
47545
  children: React__default.createElement(icons[icon2])
47505
47546
  });
47506
47547
  };
47507
47548
  const btn$2 = "_btn_g6dop_1";
47508
- const styles$2g = {
47549
+ const styles$2h = {
47509
47550
  btn: btn$2,
47510
47551
  "btn--large": "_btn--large_g6dop_16",
47511
47552
  "btn--default": "_btn--default_g6dop_20",
@@ -47533,7 +47574,7 @@ const Button$1 = ({
47533
47574
  ...props
47534
47575
  }) => {
47535
47576
  const componentProps = {
47536
- className: classNames$2(styles$2g["btn"], styles$2g[`btn--${mode}`], styles$2g[`btn--${size}`], "mz-btn", className),
47577
+ className: classNames$2(styles$2h["btn"], styles$2h[`btn--${mode}`], styles$2h[`btn--${size}`], "mz-btn", className),
47537
47578
  ...props
47538
47579
  };
47539
47580
  const IconBtn = icon2 ? /* @__PURE__ */ jsx$1(Icon, {
@@ -47558,25 +47599,25 @@ const Button$1 = ({
47558
47599
  });
47559
47600
  };
47560
47601
  const sronly = "_sronly_1n9bw_1";
47561
- const styles$2f = {
47602
+ const styles$2g = {
47562
47603
  sronly
47563
47604
  };
47564
47605
  const SrOnly = ({
47565
47606
  children
47566
47607
  }) => {
47567
47608
  return /* @__PURE__ */ jsx$1("span", {
47568
- className: styles$2f.sronly,
47609
+ className: styles$2g.sronly,
47569
47610
  children
47570
47611
  });
47571
47612
  };
47572
47613
  const label$5 = "_label_wrsfp_1";
47573
- const styles$2e = {
47614
+ const styles$2f = {
47574
47615
  label: label$5
47575
47616
  };
47576
47617
  const tooltipContainer = "_tooltipContainer_13ux5_1";
47577
47618
  const tooltipBox = "_tooltipBox_13ux5_5";
47578
47619
  const isVisible = "_isVisible_13ux5_26";
47579
- const styles$2d = {
47620
+ const styles$2e = {
47580
47621
  tooltipContainer,
47581
47622
  tooltipBox,
47582
47623
  isVisible,
@@ -47596,14 +47637,14 @@ const Tooltip$1 = ({
47596
47637
  const showTooltip = () => setIsVisible(true);
47597
47638
  const hideTooltip = () => setIsVisible(false);
47598
47639
  return /* @__PURE__ */ jsxs("div", {
47599
- className: styles$2d.tooltipContainer,
47640
+ className: styles$2e.tooltipContainer,
47600
47641
  onMouseEnter: showTooltip,
47601
47642
  onMouseLeave: hideTooltip,
47602
47643
  onFocus: showTooltip,
47603
47644
  onBlur: hideTooltip,
47604
47645
  tabIndex: 0,
47605
47646
  children: [children, /* @__PURE__ */ jsx$1("div", {
47606
- className: classNames$2(styles$2d.tooltipBox, styles$2d[`tooltip--${position2}`], isVisible2 ? styles$2d.isVisible : "", className),
47647
+ className: classNames$2(styles$2e.tooltipBox, styles$2e[`tooltip--${position2}`], isVisible2 ? styles$2e.isVisible : "", className),
47607
47648
  ...props,
47608
47649
  children: message2 ?? ""
47609
47650
  })]
@@ -47617,7 +47658,7 @@ const Label$1 = ({
47617
47658
  ...props
47618
47659
  }) => {
47619
47660
  const label2 = /* @__PURE__ */ jsxs("label", {
47620
- className: styles$2e.label,
47661
+ className: styles$2f.label,
47621
47662
  ...props,
47622
47663
  children: [children, tooltip2 && /* @__PURE__ */ jsx$1(Tooltip$1, {
47623
47664
  message: tooltip2,
@@ -49548,23 +49589,23 @@ function o(o2, n, a2) {
49548
49589
  }
49549
49590
  };
49550
49591
  }
49551
- const text$2 = "_text_1f1l5_1";
49552
- const styles$2c = {
49553
- text: text$2
49592
+ const text$3 = "_text_1f1l5_1";
49593
+ const styles$2d = {
49594
+ text: text$3
49554
49595
  };
49555
49596
  const FieldError$1 = ({
49556
49597
  error: error3
49557
49598
  }) => {
49558
49599
  if (error3) {
49559
49600
  return /* @__PURE__ */ jsx$1("div", {
49560
- className: styles$2c.text,
49601
+ className: styles$2d.text,
49561
49602
  children: error3.message
49562
49603
  });
49563
49604
  }
49564
49605
  return null;
49565
49606
  };
49566
49607
  const input$5 = "_input_1ayrx_1";
49567
- const styles$2b = {
49608
+ const styles$2c = {
49568
49609
  input: input$5
49569
49610
  };
49570
49611
  const TextArea$1 = React__default.forwardRef(({
@@ -49596,7 +49637,7 @@ const TextArea$1 = React__default.forwardRef(({
49596
49637
  tooltip: tooltip2,
49597
49638
  children: label2
49598
49639
  }), /* @__PURE__ */ jsx$1("textarea", {
49599
- className: styles$2b.input,
49640
+ className: styles$2c.input,
49600
49641
  onChange: handleChange,
49601
49642
  id: id2,
49602
49643
  name: id2,
@@ -49738,11 +49779,11 @@ const ReplyForm = ({
49738
49779
  marginTop: 10
49739
49780
  },
49740
49781
  children: [!showTranslation && locale2 !== "en" && /* @__PURE__ */ jsx$1("span", {
49741
- className: styles$2n.translate,
49782
+ className: styles$2o.translate,
49742
49783
  onClick: () => setShowTranslation(true),
49743
49784
  children: t2("SHOWTRANSLATION")
49744
49785
  }), showTranslation && locale2 !== "en" && /* @__PURE__ */ jsx$1("span", {
49745
- className: styles$2n.translate,
49786
+ className: styles$2o.translate,
49746
49787
  onClick: () => setShowTranslation(false),
49747
49788
  children: t2("HIDETRANSLATION")
49748
49789
  })]
@@ -49791,7 +49832,7 @@ const ReplyForm = ({
49791
49832
  const label$4 = "_label_x1r40_1";
49792
49833
  const comment$1 = "_comment_x1r40_7";
49793
49834
  const date$3 = "_date_x1r40_12";
49794
- const styles$2a = {
49835
+ const styles$2b = {
49795
49836
  label: label$4,
49796
49837
  comment: comment$1,
49797
49838
  date: date$3
@@ -49805,13 +49846,13 @@ const Reply = ({
49805
49846
  return /* @__PURE__ */ jsxs("div", {
49806
49847
  children: [/* @__PURE__ */ jsx$1(Label$2, {
49807
49848
  htmlFor: "",
49808
- className: styles$2a.label,
49849
+ className: styles$2b.label,
49809
49850
  children: t2("REPLY")
49810
49851
  }), /* @__PURE__ */ jsx$1("p", {
49811
- className: styles$2a.comment,
49852
+ className: styles$2b.comment,
49812
49853
  children: reply2.comment
49813
49854
  }), /* @__PURE__ */ jsx$1("span", {
49814
- className: styles$2a.date,
49855
+ className: styles$2b.date,
49815
49856
  children: reply2.createdAt
49816
49857
  }), /* @__PURE__ */ jsx$1("br", {})]
49817
49858
  });
@@ -49898,7 +49939,7 @@ const back = "_back_ypeoh_30";
49898
49939
  const statusbar = "_statusbar_ypeoh_38";
49899
49940
  const statusbar__icons = "_statusbar__icons_ypeoh_44";
49900
49941
  const platform$1 = "_platform_ypeoh_48";
49901
- const styles$29 = {
49942
+ const styles$2a = {
49902
49943
  detail: detail$1,
49903
49944
  hidden,
49904
49945
  reviewer: reviewer$1,
@@ -49929,38 +49970,38 @@ const Comment = ({
49929
49970
  return /* @__PURE__ */ jsxs("div", {
49930
49971
  children: [/* @__PURE__ */ jsx$1(Label$2, {
49931
49972
  htmlFor: "",
49932
- className: styles$2n.label,
49973
+ className: styles$2o.label,
49933
49974
  children: t2("REVIEW")
49934
49975
  }), /* @__PURE__ */ jsx$1("p", {
49935
- className: styles$2n.comment,
49976
+ className: styles$2o.comment,
49936
49977
  dangerouslySetInnerHTML: {
49937
49978
  __html: parsedComment
49938
49979
  }
49939
49980
  }), !showTranslation && locale2 !== lang2 && /* @__PURE__ */ jsx$1("span", {
49940
- className: styles$2n.translate,
49981
+ className: styles$2o.translate,
49941
49982
  onClick: () => setShowTranslation(true),
49942
49983
  children: t2("SHOWTRANSLATION")
49943
49984
  }), showTranslation && locale2 !== lang2 && /* @__PURE__ */ jsx$1("span", {
49944
- className: styles$2n.translate,
49985
+ className: styles$2o.translate,
49945
49986
  onClick: () => setShowTranslation(false),
49946
49987
  children: t2("HIDETRANSLATION")
49947
49988
  })]
49948
49989
  });
49949
49990
  };
49950
49991
  const flag = "_flag_wd4ay_1";
49951
- const styles$28 = {
49992
+ const styles$29 = {
49952
49993
  flag
49953
49994
  };
49954
49995
  const CountryFlag = ({
49955
49996
  locale: locale2
49956
49997
  }) => {
49957
49998
  return /* @__PURE__ */ jsx$1("span", {
49958
- className: `fib fi-${locale2 === "en" ? "gb" : locale2} ${styles$28.flag}`
49999
+ className: `fib fi-${locale2 === "en" ? "gb" : locale2} ${styles$29.flag}`
49959
50000
  });
49960
50001
  };
49961
50002
  const label$3 = "_label_15hk9_1";
49962
50003
  const translation = "_translation_15hk9_6";
49963
- const styles$27 = {
50004
+ const styles$28 = {
49964
50005
  label: label$3,
49965
50006
  translation
49966
50007
  };
@@ -50003,13 +50044,13 @@ const CommentTranslation = ({
50003
50044
  children: [isLoading && /* @__PURE__ */ jsxs("span", {
50004
50045
  children: [t2("TRANSLATING"), "..."]
50005
50046
  }), !isLoading && /* @__PURE__ */ jsxs("div", {
50006
- className: styles$27.translation,
50047
+ className: styles$28.translation,
50007
50048
  children: [/* @__PURE__ */ jsx$1(Label$2, {
50008
50049
  htmlFor: "",
50009
- className: styles$27.label,
50050
+ className: styles$28.label,
50010
50051
  children: t2("TRANSLATION")
50011
50052
  }), /* @__PURE__ */ jsx$1("p", {
50012
- className: styles$27.translation,
50053
+ className: styles$28.translation,
50013
50054
  children: decodeHtmlEntities(data2 || "")
50014
50055
  })]
50015
50056
  })]
@@ -50017,7 +50058,7 @@ const CommentTranslation = ({
50017
50058
  };
50018
50059
  const label$2 = "_label_13kaz_1";
50019
50060
  const title$3 = "_title_13kaz_5";
50020
- const styles$26 = {
50061
+ const styles$27 = {
50021
50062
  label: label$2,
50022
50063
  title: title$3
50023
50064
  };
@@ -50030,10 +50071,10 @@ const Title = ({
50030
50071
  return /* @__PURE__ */ jsxs("div", {
50031
50072
  children: [/* @__PURE__ */ jsx$1(Label$2, {
50032
50073
  htmlFor: "",
50033
- className: styles$26.label,
50074
+ className: styles$27.label,
50034
50075
  children: t2("TITLE")
50035
50076
  }), /* @__PURE__ */ jsx$1("p", {
50036
- className: styles$26.title,
50077
+ className: styles$27.title,
50037
50078
  children
50038
50079
  })]
50039
50080
  });
@@ -50210,9 +50251,9 @@ const formatData$k = (data2) => {
50210
50251
  return 0;
50211
50252
  });
50212
50253
  };
50213
- const text$1 = "_text_12cto_1";
50214
- const styles$25 = {
50215
- text: text$1
50254
+ const text$2 = "_text_12cto_1";
50255
+ const styles$26 = {
50256
+ text: text$2
50216
50257
  };
50217
50258
  const tagsMap$2 = {
50218
50259
  business_name: "@Business name",
@@ -50224,7 +50265,7 @@ const TemplateText = ({
50224
50265
  text: text2
50225
50266
  }) => {
50226
50267
  return /* @__PURE__ */ jsx$1("p", {
50227
- className: styles$25.text,
50268
+ className: styles$26.text,
50228
50269
  children: text2.split("@@").map((item2, index2) => {
50229
50270
  if (tagsMap$2[item2]) {
50230
50271
  return /* @__PURE__ */ jsx$1("span", {
@@ -50236,7 +50277,7 @@ const TemplateText = ({
50236
50277
  });
50237
50278
  };
50238
50279
  const button$7 = "_button_1hbqp_1";
50239
- const styles$24 = {
50280
+ const styles$25 = {
50240
50281
  button: button$7
50241
50282
  };
50242
50283
  const Template$1 = ({
@@ -50251,7 +50292,7 @@ const Template$1 = ({
50251
50292
  children: [/* @__PURE__ */ jsx$1(TemplateText, {
50252
50293
  text: text2
50253
50294
  }), /* @__PURE__ */ jsx$1("button", {
50254
- className: styles$24.button,
50295
+ className: styles$25.button,
50255
50296
  onClick: handleClickUse,
50256
50297
  children: "Use"
50257
50298
  })]
@@ -50260,7 +50301,7 @@ const Template$1 = ({
50260
50301
  const container$z = "_container_1ej4w_1";
50261
50302
  const hide$1 = "_hide_1ej4w_8";
50262
50303
  const toolbar$3 = "_toolbar_1ej4w_12";
50263
- const styles$23 = {
50304
+ const styles$24 = {
50264
50305
  container: container$z,
50265
50306
  hide: hide$1,
50266
50307
  toolbar: toolbar$3
@@ -56340,7 +56381,7 @@ var StateManagedSelect = /* @__PURE__ */ forwardRef(function(props, ref) {
56340
56381
  });
56341
56382
  const tooltip$1 = "_tooltip_17puf_1";
56342
56383
  const tooltip__icon = "_tooltip__icon_17puf_4";
56343
- const styles$22 = {
56384
+ const styles$23 = {
56344
56385
  tooltip: tooltip$1,
56345
56386
  tooltip__icon
56346
56387
  };
@@ -56348,9 +56389,9 @@ const LockTooltip = ({
56348
56389
  children
56349
56390
  }) => {
56350
56391
  return /* @__PURE__ */ jsxs("div", {
56351
- className: styles$22.tooltip,
56392
+ className: styles$23.tooltip,
56352
56393
  children: [/* @__PURE__ */ jsx$1(Icon$1, {
56353
- className: styles$22.tooltip__icon,
56394
+ className: styles$23.tooltip__icon,
56354
56395
  icon: "lock",
56355
56396
  size: "small",
56356
56397
  "data-tip": children
@@ -56364,7 +56405,7 @@ const LockTooltip = ({
56364
56405
  };
56365
56406
  const container$y = "_container_ut3y7_1";
56366
56407
  const tooltip = "_tooltip_ut3y7_5";
56367
- const styles$21 = {
56408
+ const styles$22 = {
56368
56409
  container: container$y,
56369
56410
  tooltip
56370
56411
  };
@@ -56393,7 +56434,7 @@ const NewSelect = ({
56393
56434
  ...props
56394
56435
  }) => {
56395
56436
  return /* @__PURE__ */ jsxs("div", {
56396
- className: styles$21.container,
56437
+ className: styles$22.container,
56397
56438
  children: [label2 && /* @__PURE__ */ jsx$1(Label$2, {
56398
56439
  htmlFor: id2,
56399
56440
  children: label2
@@ -56407,7 +56448,7 @@ const NewSelect = ({
56407
56448
  id: id2,
56408
56449
  isDisabled
56409
56450
  }), isDisabled && /* @__PURE__ */ jsx$1("div", {
56410
- className: styles$21.tooltip,
56451
+ className: styles$22.tooltip,
56411
56452
  children: /* @__PURE__ */ jsx$1(LockTooltip, {
56412
56453
  children: disabledTooltip
56413
56454
  })
@@ -56483,12 +56524,12 @@ const filterTemplatesByLanguage = (templates, language) => {
56483
56524
  };
56484
56525
  const header$9 = "_header_1jmjy_1";
56485
56526
  const icon$8 = "_icon_1jmjy_11";
56486
- const styles$20 = {
56527
+ const styles$21 = {
56487
56528
  header: header$9,
56488
56529
  icon: icon$8
56489
56530
  };
56490
56531
  const heading = "_heading_1fifa_1";
56491
- const styles$1$ = {
56532
+ const styles$20 = {
56492
56533
  heading,
56493
56534
  "heading--large": "_heading--large_1fifa_7",
56494
56535
  "heading--medium": "_heading--medium_1fifa_15",
@@ -56504,7 +56545,7 @@ const Heading = ({
56504
56545
  const Tag2 = level;
56505
56546
  return /* @__PURE__ */ jsx$1(Tag2, {
56506
56547
  id: id2,
56507
- className: classNames$2(styles$1$["heading"], styles$1$[`heading--${size}`]),
56548
+ className: classNames$2(styles$20["heading"], styles$20[`heading--${size}`]),
56508
56549
  ...props,
56509
56550
  children
56510
56551
  });
@@ -56519,18 +56560,18 @@ const Header$6 = ({
56519
56560
  return header2;
56520
56561
  }
56521
56562
  return /* @__PURE__ */ jsxs("div", {
56522
- className: styles$20.header,
56563
+ className: styles$21.header,
56523
56564
  children: [/* @__PURE__ */ jsx$1(Heading, {
56524
56565
  children: header2.title
56525
56566
  }), typeof header2.icon === "string" && /* @__PURE__ */ jsx$1(Icon, {
56526
56567
  icon: header2.icon,
56527
56568
  onClick: header2.onClickIcon,
56528
- className: styles$20.icon
56569
+ className: styles$21.icon
56529
56570
  }), typeof header2.icon !== "string" && header2.icon && header2.icon]
56530
56571
  });
56531
56572
  };
56532
56573
  const container$x = "_container_pc1hp_1";
56533
- const styles$1_ = {
56574
+ const styles$1$ = {
56534
56575
  container: container$x
56535
56576
  };
56536
56577
  const Card$1 = ({
@@ -56542,12 +56583,12 @@ const Card$1 = ({
56542
56583
  }) => {
56543
56584
  return /* @__PURE__ */ jsx$1(Fragment, {
56544
56585
  children: /* @__PURE__ */ jsxs("div", {
56545
- className: classNames$2(styles$1_.container, className, "mz-card"),
56586
+ className: classNames$2(styles$1$.container, className, "mz-card"),
56546
56587
  style: style2,
56547
56588
  children: [/* @__PURE__ */ jsx$1(Header$6, {
56548
56589
  header: header2
56549
56590
  }), /* @__PURE__ */ jsx$1("div", {
56550
- className: classNames$2(styles$1_.content, classNameContent),
56591
+ className: classNames$2(styles$1$.content, classNameContent),
56551
56592
  children
56552
56593
  })]
56553
56594
  })
@@ -56619,11 +56660,11 @@ const TemplatesModal = ({
56619
56660
  icon: "close",
56620
56661
  onClickIcon: onClose2
56621
56662
  },
56622
- className: classNames$2(styles$23.container, {
56623
- [styles$23.hide]: !open
56663
+ className: classNames$2(styles$24.container, {
56664
+ [styles$24.hide]: !open
56624
56665
  }),
56625
56666
  children: [/* @__PURE__ */ jsxs("div", {
56626
- className: styles$23.toolbar,
56667
+ className: styles$24.toolbar,
56627
56668
  children: [/* @__PURE__ */ jsx$1(NewSelect, {
56628
56669
  label: t2("REPLYTEMPLATETYPE"),
56629
56670
  options: typeOptions,
@@ -56650,6 +56691,123 @@ const TemplatesModal = ({
56650
56691
  })]
56651
56692
  });
56652
56693
  };
56694
+ const Modal$1 = ({
56695
+ open,
56696
+ children,
56697
+ onClose: onClose2,
56698
+ title: title2,
56699
+ width
56700
+ }) => {
56701
+ return /* @__PURE__ */ jsx$1(Modal$2, {
56702
+ className: "resbook-modal",
56703
+ title: /* @__PURE__ */ jsxs(Fragment, {
56704
+ children: [typeof title2 === "string" && /* @__PURE__ */ jsx$1(Heading, {
56705
+ children: title2
56706
+ }), typeof title2 !== "string" && !!title2 ? title2 : /* @__PURE__ */ jsx$1("div", {})]
56707
+ }),
56708
+ open,
56709
+ onCancel: onClose2,
56710
+ width: width || 1e3,
56711
+ footer: null,
56712
+ closeIcon: /* @__PURE__ */ jsx$1(Icon, {
56713
+ icon: "close",
56714
+ size: "small"
56715
+ }),
56716
+ centered: true,
56717
+ zIndex: 1032,
56718
+ children
56719
+ });
56720
+ };
56721
+ const content$b = "_content_1dgv9_1";
56722
+ const text$1 = "_text_1dgv9_5";
56723
+ const replyBox = "_replyBox_1dgv9_9";
56724
+ const loading$3 = "_loading_1dgv9_18";
56725
+ const actions = "_actions_1dgv9_33";
56726
+ const styles$1_ = {
56727
+ content: content$b,
56728
+ text: text$1,
56729
+ replyBox,
56730
+ loading: loading$3,
56731
+ actions
56732
+ };
56733
+ const AiReplyModal = ({
56734
+ open,
56735
+ replyText,
56736
+ isLoading,
56737
+ onClose: onClose2,
56738
+ onGoToExternal,
56739
+ externalButtonLabel,
56740
+ onSuggestAnother
56741
+ }) => {
56742
+ const {
56743
+ t: t2
56744
+ } = useTranslation();
56745
+ const [copied, setCopied] = useState(false);
56746
+ const handleCopy = () => {
56747
+ if (!replyText) return;
56748
+ if (navigator && navigator.clipboard && navigator.clipboard.writeText) {
56749
+ navigator.clipboard.writeText(replyText);
56750
+ } else {
56751
+ const textarea2 = document.createElement("textarea");
56752
+ textarea2.value = replyText;
56753
+ textarea2.style.position = "fixed";
56754
+ textarea2.style.left = "-9999px";
56755
+ document.body.appendChild(textarea2);
56756
+ textarea2.select();
56757
+ document.execCommand("copy");
56758
+ document.body.removeChild(textarea2);
56759
+ }
56760
+ setCopied(true);
56761
+ };
56762
+ useEffect(() => {
56763
+ if (!copied) return;
56764
+ const timer = setTimeout(() => {
56765
+ setCopied(false);
56766
+ }, 2e3);
56767
+ return () => clearTimeout(timer);
56768
+ }, [copied]);
56769
+ return /* @__PURE__ */ jsx$1(Modal$1, {
56770
+ open,
56771
+ onClose: onClose2,
56772
+ title: t2("SUGGESTREPLY"),
56773
+ width: 600,
56774
+ children: /* @__PURE__ */ jsx$1("div", {
56775
+ className: styles$1_.content,
56776
+ children: isLoading ? /* @__PURE__ */ jsx$1("div", {
56777
+ className: styles$1_.loading,
56778
+ children: /* @__PURE__ */ jsx$1(Spinner$1, {})
56779
+ }) : /* @__PURE__ */ jsxs(Fragment, {
56780
+ children: [/* @__PURE__ */ jsx$1("div", {
56781
+ className: styles$1_.replyBox,
56782
+ children: /* @__PURE__ */ jsx$1("p", {
56783
+ className: styles$1_.text,
56784
+ children: replyText
56785
+ })
56786
+ }), /* @__PURE__ */ jsxs("div", {
56787
+ className: styles$1_.actions,
56788
+ children: [/* @__PURE__ */ jsx$1(Button$1, {
56789
+ size: "small",
56790
+ mode: "secondary",
56791
+ icon: "robot",
56792
+ onClick: onSuggestAnother,
56793
+ children: t2("SUGGESTREPLY")
56794
+ }), /* @__PURE__ */ jsx$1(Button$1, {
56795
+ size: "small",
56796
+ mode: copied ? "success" : "secondary",
56797
+ icon: copied ? "check" : "Copy",
56798
+ onClick: handleCopy,
56799
+ children: copied ? t2("Copied") : t2("Copy")
56800
+ }), /* @__PURE__ */ jsx$1(Button$1, {
56801
+ size: "small",
56802
+ mode: "primary",
56803
+ onClick: onGoToExternal,
56804
+ children: externalButtonLabel
56805
+ })]
56806
+ })]
56807
+ })
56808
+ })
56809
+ });
56810
+ };
56653
56811
  const DetailMobile = ({
56654
56812
  id: id2,
56655
56813
  reply: reply2,
@@ -56680,28 +56838,38 @@ const DetailMobile = ({
56680
56838
  const showReplyTemplates = ((_a2 = user == null ? void 0 : user.company) == null ? void 0 : _a2.replyTemplates) !== false;
56681
56839
  const [showTemplates, setShowTemplates] = useState(false);
56682
56840
  const [showTranslation, setShowTranslation] = useState(false);
56841
+ const [template] = useContext(ContextTemplate);
56842
+ const [showAiReplyModal, setShowAiReplyModal] = useState(false);
56843
+ const personalisedReply = useMemo$1(() => {
56844
+ if (!template) return "";
56845
+ return template.replaceAll("@@business_name@@", locationName).replaceAll("@@client_fullt_name@@", reviewer2.name).replaceAll("@@client_full_name@@", reviewer2.name);
56846
+ }, [template, locationName, reviewer2.name]);
56847
+ const handleOpenAiReplyModal = () => {
56848
+ setShowAiReplyModal(true);
56849
+ onSuggestTemplate();
56850
+ };
56683
56851
  const openModal = () => setShowTemplates(true);
56684
56852
  const closeModal = () => setShowTemplates(false);
56685
56853
  return /* @__PURE__ */ jsxs("div", {
56686
- className: classNames$2(styles$29.detail, {
56687
- [styles$29.hidden]: !openForm
56854
+ className: classNames$2(styles$2a.detail, {
56855
+ [styles$2a.hidden]: !openForm
56688
56856
  }),
56689
56857
  children: [/* @__PURE__ */ jsx$1("div", {
56690
56858
  onClick,
56691
- className: styles$29.back,
56859
+ className: styles$2a.back,
56692
56860
  children: /* @__PURE__ */ jsx$1(Icon, {
56693
56861
  icon: "close"
56694
56862
  })
56695
56863
  }), /* @__PURE__ */ jsxs("div", {
56696
- className: styles$29.statusbar,
56864
+ className: styles$2a.statusbar,
56697
56865
  children: [/* @__PURE__ */ jsxs("div", {
56698
- className: styles$29.statusbar__icons,
56866
+ className: styles$2a.statusbar__icons,
56699
56867
  children: [/* @__PURE__ */ jsx$1(Icon, {
56700
56868
  icon: reply2 ? "mailReplied" : "mailNotReplied"
56701
56869
  }), /* @__PURE__ */ jsx$1("img", {
56702
56870
  alt: platform2,
56703
56871
  src: module2.logo || reviewer2.profilePhoto || platformImages[platform2] || "",
56704
- className: styles$29.platform,
56872
+ className: styles$2a.platform,
56705
56873
  onError: (e) => {
56706
56874
  const target = e.target;
56707
56875
  const fallback = reviewer2.profilePhoto || platformImages[platform2] || "";
@@ -56714,7 +56882,7 @@ const DetailMobile = ({
56714
56882
  children: createdAt
56715
56883
  })]
56716
56884
  }), /* @__PURE__ */ jsxs("strong", {
56717
- className: styles$29.reviewer,
56885
+ className: styles$2a.reviewer,
56718
56886
  children: [reviewer2.name, " ", ` `, locale2 && /* @__PURE__ */ jsx$1(CountryFlag, {
56719
56887
  locale: locale2
56720
56888
  })]
@@ -56759,7 +56927,7 @@ const DetailMobile = ({
56759
56927
  commentId: id2
56760
56928
  })]
56761
56929
  }), platform2 !== "tripadvisor" && platform2 !== "zomato" ? /* @__PURE__ */ jsx$1("div", {
56762
- className: styles$29["container--reply"],
56930
+ className: styles$2a["container--reply"],
56763
56931
  children: reply2 && platform2 !== "facebook" && platform2 !== "google" ? /* @__PURE__ */ jsx$1(Reply, {
56764
56932
  reply: reply2
56765
56933
  }) : /* @__PURE__ */ jsx$1(ReplyForm, {
@@ -56775,7 +56943,7 @@ const DetailMobile = ({
56775
56943
  reply: reply2
56776
56944
  })
56777
56945
  }) : /* @__PURE__ */ jsx$1("div", {
56778
- className: styles$29["container--reply"],
56946
+ className: styles$2a["container--reply"],
56779
56947
  children: reply2 && /* @__PURE__ */ jsx$1(Reply, {
56780
56948
  reply: reply2
56781
56949
  })
@@ -56796,12 +56964,30 @@ const DetailMobile = ({
56796
56964
  onClick: openModal,
56797
56965
  children: t2("SHOWTEMPLATES")
56798
56966
  })]
56799
- }) : /* @__PURE__ */ jsx$1(Button$1, {
56800
- type: "submit",
56801
- size: "small",
56802
- mode: "primary",
56803
- children: platform2 === "zomato" ? t2("ZOMATOREPLY") : t2("TRIPADVISORREPLY"),
56804
- onClick: () => window.open(reviewUrl ?? (platform2 === "zomato" ? "zomato.com" : "tripadvisor.com"))
56967
+ }) : /* @__PURE__ */ jsxs(Fragment, {
56968
+ children: [!reply2 && /* @__PURE__ */ jsx$1(Button$1, {
56969
+ isLoading: isSuggesting,
56970
+ onClick: handleOpenAiReplyModal,
56971
+ style: {
56972
+ marginBottom: 10
56973
+ },
56974
+ icon: "robot",
56975
+ children: t2("SUGGESTREPLY")
56976
+ }), /* @__PURE__ */ jsx$1(Button$1, {
56977
+ type: "submit",
56978
+ size: "small",
56979
+ mode: "primary",
56980
+ children: platform2 === "zomato" ? t2("ZOMATOREPLY") : t2("TRIPADVISORREPLY"),
56981
+ onClick: () => window.open(reviewUrl ?? (platform2 === "zomato" ? "zomato.com" : "tripadvisor.com"))
56982
+ }), /* @__PURE__ */ jsx$1(AiReplyModal, {
56983
+ open: showAiReplyModal,
56984
+ onClose: () => setShowAiReplyModal(false),
56985
+ replyText: personalisedReply,
56986
+ isLoading: isSuggesting,
56987
+ onGoToExternal: () => window.open(reviewUrl ?? (platform2 === "zomato" ? "zomato.com" : "tripadvisor.com")),
56988
+ externalButtonLabel: platform2 === "zomato" ? t2("ZOMATOREPLY") : t2("TRIPADVISORREPLY"),
56989
+ onSuggestAnother: onSuggestTemplate
56990
+ })]
56805
56991
  })]
56806
56992
  });
56807
56993
  };
@@ -56890,6 +57076,16 @@ const DetailDesktop = ({
56890
57076
  t: t2
56891
57077
  } = useTranslation();
56892
57078
  const [showTranslation, setShowTranslation] = useState(false);
57079
+ const [template] = useContext(ContextTemplate);
57080
+ const [showAiReplyModal, setShowAiReplyModal] = useState(false);
57081
+ const personalisedReply = useMemo$1(() => {
57082
+ if (!template) return "";
57083
+ return template.replaceAll("@@business_name@@", locationName).replaceAll("@@client_fullt_name@@", reviewer2.name).replaceAll("@@client_full_name@@", reviewer2.name);
57084
+ }, [template, locationName, reviewer2.name]);
57085
+ const handleOpenAiReplyModal = () => {
57086
+ setShowAiReplyModal(true);
57087
+ onSuggestTemplate();
57088
+ };
56893
57089
  const shouldShowReply = reply2 && (platform2 !== "facebook" && platform2 !== "google" || platform2 === "facebook" && (!reply2.replyExternalId || reply2.replyExternalId === ""));
56894
57090
  return /* @__PURE__ */ jsxs("div", {
56895
57091
  className: classNames$2(styles$1Z.detail, {
@@ -56953,18 +57149,35 @@ const DetailDesktop = ({
56953
57149
  className: styles$1Z.reply,
56954
57150
  children: reply2 ? /* @__PURE__ */ jsx$1(Reply, {
56955
57151
  reply: reply2
56956
- }) : /* @__PURE__ */ jsx$1("div", {
56957
- style: {
56958
- display: "flex",
56959
- justifyContent: "flex-end"
56960
- },
56961
- children: /* @__PURE__ */ jsx$1(Button, {
56962
- type: "submit",
56963
- size: "small",
56964
- mode: "primary",
56965
- children: platform2 === "zomato" ? t2("ZOMATOREPLY") : t2("TRIPADVISORREPLY"),
56966
- onClick: () => window.open(reviewUrl ?? (platform2 === "zomato" ? "zomato.com" : "tripadvisor.com"))
56967
- })
57152
+ }) : /* @__PURE__ */ jsxs(Fragment, {
57153
+ children: [/* @__PURE__ */ jsxs("div", {
57154
+ style: {
57155
+ display: "flex",
57156
+ justifyContent: "flex-end",
57157
+ gap: 8
57158
+ },
57159
+ children: [/* @__PURE__ */ jsx$1(Button, {
57160
+ isLoading: isSuggesting,
57161
+ size: "small",
57162
+ icon: "robot",
57163
+ children: t2("SUGGESTREPLY"),
57164
+ onClick: handleOpenAiReplyModal
57165
+ }), /* @__PURE__ */ jsx$1(Button, {
57166
+ type: "submit",
57167
+ size: "small",
57168
+ mode: "primary",
57169
+ children: platform2 === "zomato" ? t2("ZOMATOREPLY") : t2("TRIPADVISORREPLY"),
57170
+ onClick: () => window.open(reviewUrl ?? (platform2 === "zomato" ? "zomato.com" : "tripadvisor.com"))
57171
+ })]
57172
+ }), /* @__PURE__ */ jsx$1(AiReplyModal, {
57173
+ open: showAiReplyModal,
57174
+ onClose: () => setShowAiReplyModal(false),
57175
+ replyText: personalisedReply,
57176
+ isLoading: isSuggesting,
57177
+ onGoToExternal: () => window.open(reviewUrl ?? (platform2 === "zomato" ? "zomato.com" : "tripadvisor.com")),
57178
+ externalButtonLabel: platform2 === "zomato" ? t2("ZOMATOREPLY") : t2("TRIPADVISORREPLY"),
57179
+ onSuggestAnother: onSuggestTemplate
57180
+ })]
56968
57181
  })
56969
57182
  })]
56970
57183
  });
@@ -59415,12 +59628,12 @@ function requireLodash() {
59415
59628
  }
59416
59629
  return isDrop ? baseSlice(array4, fromRight ? 0 : index2, fromRight ? index2 + 1 : length2) : baseSlice(array4, fromRight ? index2 + 1 : 0, fromRight ? length2 : index2);
59417
59630
  }
59418
- function baseWrapperValue(value2, actions) {
59631
+ function baseWrapperValue(value2, actions2) {
59419
59632
  var result2 = value2;
59420
59633
  if (result2 instanceof LazyWrapper) {
59421
59634
  result2 = result2.value();
59422
59635
  }
59423
- return arrayReduce(actions, function(result3, action) {
59636
+ return arrayReduce(actions2, function(result3, action) {
59424
59637
  return action.func.apply(action.thisArg, arrayPush2([result3], action.args));
59425
59638
  }, result2);
59426
59639
  }
@@ -62343,8 +62556,8 @@ function requireLodash() {
62343
62556
  object4.prototype[methodName] = function() {
62344
62557
  var chainAll = this.__chain__;
62345
62558
  if (chain2 || chainAll) {
62346
- var result2 = object4(this.__wrapped__), actions = result2.__actions__ = copyArray2(this.__actions__);
62347
- actions.push({ "func": func, "args": arguments, "thisArg": object4 });
62559
+ var result2 = object4(this.__wrapped__), actions2 = result2.__actions__ = copyArray2(this.__actions__);
62560
+ actions2.push({ "func": func, "args": arguments, "thisArg": object4 });
62348
62561
  result2.__chain__ = chainAll;
62349
62562
  return result2;
62350
62563
  }
@@ -62969,33 +63182,6 @@ const getReplyTemplateLanguage = () => _23.find(replyLanguages, { "id": getLocal
62969
63182
  const isLocaleSupported = (locale2) => {
62970
63183
  return ["ar", "cs", "da", "de", "el", "en", "es", "et", "fi", "fr", "hi", "hr", "hu", "it", "ja", "ko", "nl", "pl", "pt", "ro", "ru", "sl", "sk", "th", "tr", "uk", "vi", "lt", "zh-CN", "zh-TW"].includes(locale2);
62971
63184
  };
62972
- const Modal$1 = ({
62973
- open,
62974
- children,
62975
- onClose: onClose2,
62976
- title: title2,
62977
- width
62978
- }) => {
62979
- return /* @__PURE__ */ jsx$1(Modal$2, {
62980
- className: "resbook-modal",
62981
- title: /* @__PURE__ */ jsxs(Fragment, {
62982
- children: [typeof title2 === "string" && /* @__PURE__ */ jsx$1(Heading, {
62983
- children: title2
62984
- }), typeof title2 !== "string" && !!title2 ? title2 : /* @__PURE__ */ jsx$1("div", {})]
62985
- }),
62986
- open,
62987
- onCancel: onClose2,
62988
- width: width || 1e3,
62989
- footer: null,
62990
- closeIcon: /* @__PURE__ */ jsx$1(Icon, {
62991
- icon: "close",
62992
- size: "small"
62993
- }),
62994
- centered: true,
62995
- zIndex: 1032,
62996
- children
62997
- });
62998
- };
62999
63185
  const container$s = "_container_vuyk0_1";
63000
63186
  const fullWidth = "_fullWidth_vuyk0_6";
63001
63187
  const styles$1P = {
@@ -152033,55 +152219,55 @@ const ReservationsAnalytics = ({
152033
152219
  })]
152034
152220
  });
152035
152221
  };
152036
- const mainWrapper = "_mainWrapper_fujtq_2";
152037
- const mainConatiner$1 = "_mainConatiner_fujtq_9";
152038
- const mainTableContainer = "_mainTableContainer_fujtq_20";
152039
- const mainSidebarContainer = "_mainSidebarContainer_fujtq_28";
152040
- const sidebarContent = "_sidebarContent_fujtq_36";
152041
- const sidebarHeader = "_sidebarHeader_fujtq_41";
152042
- const sidebarMainContent = "_sidebarMainContent_fujtq_46";
152043
- const sidebarFooter = "_sidebarFooter_fujtq_54";
152044
- const headerReferece = "_headerReferece_fujtq_59";
152045
- const sidebarCloseIcon = "_sidebarCloseIcon_fujtq_62";
152046
- const headerContainer = "_headerContainer_fujtq_125";
152047
- const searchContainer = "_searchContainer_fujtq_131";
152048
- const buttonList = "_buttonList_fujtq_142";
152049
- const buttonItem = "_buttonItem_fujtq_147";
152050
- const addReservationButton = "_addReservationButton_fujtq_156";
152051
- const hideCancellationsContainer = "_hideCancellationsContainer_fujtq_165";
152052
- const customerVisitContainer = "_customerVisitContainer_fujtq_173";
152053
- const multipleVisits = "_multipleVisits_fujtq_184";
152054
- const singleVisit = "_singleVisit_fujtq_187";
152055
- const loading$2 = "_loading_fujtq_190";
152056
- const tableTopHeader = "_tableTopHeader_fujtq_201";
152057
- const tableTopHeaderContent = "_tableTopHeaderContent_fujtq_215";
152058
- const tableTopHeaderContentText = "_tableTopHeaderContentText_fujtq_222";
152059
- const tableRowContainer = "_tableRowContainer_fujtq_231";
152060
- const tableRowCard = "_tableRowCard_fujtq_237";
152061
- const fadeInX = "_fadeInX_fujtq_1";
152062
- const canceled = "_canceled_fujtq_245";
152063
- const noData = "_noData_fujtq_248";
152064
- const tableRowHour = "_tableRowHour_fujtq_255";
152065
- const tableRowHourText = "_tableRowHourText_fujtq_271";
152066
- const hours = "_hours_fujtq_279";
152067
- const tableRowContent = "_tableRowContent_fujtq_285";
152068
- const rowImage = "_rowImage_fujtq_300";
152069
- const rowContactContainer = "_rowContactContainer_fujtq_314";
152070
- const rowContactText = "_rowContactText_fujtq_326";
152071
- const rowContactPhone = "_rowContactPhone_fujtq_332";
152072
- const rowSectionContainer = "_rowSectionContainer_fujtq_339";
152073
- const rowSection = "_rowSection_fujtq_339";
152074
- const rowSectionText = "_rowSectionText_fujtq_352";
152075
- const rowSectionSecText = "_rowSectionSecText_fujtq_358";
152076
- const rowActionButton = "_rowActionButton_fujtq_365";
152077
- const bookingInfoContainer = "_bookingInfoContainer_fujtq_378";
152078
- const bookingInfoCardColumn = "_bookingInfoCardColumn_fujtq_383";
152079
- const bookingInfoCardContainer = "_bookingInfoCardContainer_fujtq_391";
152080
- const bookingInfoCard = "_bookingInfoCard_fujtq_383";
152081
- const bookingInfoCardContent = "_bookingInfoCardContent_fujtq_403";
152082
- const bookingInfoCardTitle = "_bookingInfoCardTitle_fujtq_409";
152083
- const bookingInfoCardText = "_bookingInfoCardText_fujtq_412";
152084
- const enableOnboardingContainer = "_enableOnboardingContainer_fujtq_416";
152222
+ const mainWrapper = "_mainWrapper_qcpcl_2";
152223
+ const mainConatiner$1 = "_mainConatiner_qcpcl_9";
152224
+ const mainTableContainer = "_mainTableContainer_qcpcl_20";
152225
+ const mainSidebarContainer = "_mainSidebarContainer_qcpcl_28";
152226
+ const sidebarContent = "_sidebarContent_qcpcl_37";
152227
+ const sidebarHeader = "_sidebarHeader_qcpcl_42";
152228
+ const sidebarMainContent = "_sidebarMainContent_qcpcl_47";
152229
+ const sidebarFooter = "_sidebarFooter_qcpcl_55";
152230
+ const headerReferece = "_headerReferece_qcpcl_60";
152231
+ const sidebarCloseIcon = "_sidebarCloseIcon_qcpcl_63";
152232
+ const headerContainer = "_headerContainer_qcpcl_126";
152233
+ const searchContainer = "_searchContainer_qcpcl_132";
152234
+ const buttonList = "_buttonList_qcpcl_143";
152235
+ const buttonItem = "_buttonItem_qcpcl_148";
152236
+ const addReservationButton = "_addReservationButton_qcpcl_157";
152237
+ const hideCancellationsContainer = "_hideCancellationsContainer_qcpcl_166";
152238
+ const customerVisitContainer = "_customerVisitContainer_qcpcl_174";
152239
+ const multipleVisits = "_multipleVisits_qcpcl_185";
152240
+ const singleVisit = "_singleVisit_qcpcl_188";
152241
+ const loading$2 = "_loading_qcpcl_191";
152242
+ const tableTopHeader = "_tableTopHeader_qcpcl_202";
152243
+ const tableTopHeaderContent = "_tableTopHeaderContent_qcpcl_216";
152244
+ const tableTopHeaderContentText = "_tableTopHeaderContentText_qcpcl_223";
152245
+ const tableRowContainer = "_tableRowContainer_qcpcl_232";
152246
+ const tableRowCard = "_tableRowCard_qcpcl_238";
152247
+ const fadeInX = "_fadeInX_qcpcl_1";
152248
+ const canceled = "_canceled_qcpcl_246";
152249
+ const noData = "_noData_qcpcl_249";
152250
+ const tableRowHour = "_tableRowHour_qcpcl_256";
152251
+ const tableRowHourText = "_tableRowHourText_qcpcl_272";
152252
+ const hours = "_hours_qcpcl_280";
152253
+ const tableRowContent = "_tableRowContent_qcpcl_286";
152254
+ const rowImage = "_rowImage_qcpcl_301";
152255
+ const rowContactContainer = "_rowContactContainer_qcpcl_315";
152256
+ const rowContactText = "_rowContactText_qcpcl_327";
152257
+ const rowContactPhone = "_rowContactPhone_qcpcl_333";
152258
+ const rowSectionContainer = "_rowSectionContainer_qcpcl_340";
152259
+ const rowSection = "_rowSection_qcpcl_340";
152260
+ const rowSectionText = "_rowSectionText_qcpcl_353";
152261
+ const rowSectionSecText = "_rowSectionSecText_qcpcl_359";
152262
+ const rowActionButton = "_rowActionButton_qcpcl_366";
152263
+ const bookingInfoContainer = "_bookingInfoContainer_qcpcl_379";
152264
+ const bookingInfoCardColumn = "_bookingInfoCardColumn_qcpcl_384";
152265
+ const bookingInfoCardContainer = "_bookingInfoCardContainer_qcpcl_392";
152266
+ const bookingInfoCard = "_bookingInfoCard_qcpcl_384";
152267
+ const bookingInfoCardContent = "_bookingInfoCardContent_qcpcl_404";
152268
+ const bookingInfoCardTitle = "_bookingInfoCardTitle_qcpcl_410";
152269
+ const bookingInfoCardText = "_bookingInfoCardText_qcpcl_413";
152270
+ const enableOnboardingContainer = "_enableOnboardingContainer_qcpcl_417";
152085
152271
  const styles$u = {
152086
152272
  mainWrapper,
152087
152273
  mainConatiner: mainConatiner$1,
@@ -152093,9 +152279,9 @@ const styles$u = {
152093
152279
  sidebarFooter,
152094
152280
  headerReferece,
152095
152281
  sidebarCloseIcon,
152096
- "mainSidebarContainer--open": "_mainSidebarContainer--open_fujtq_73",
152097
- "mainSidebarContainer--close": "_mainSidebarContainer--close_fujtq_79",
152098
- "sidebarCloseIcon--show": "_sidebarCloseIcon--show_fujtq_87",
152282
+ "mainSidebarContainer--open": "_mainSidebarContainer--open_qcpcl_74",
152283
+ "mainSidebarContainer--close": "_mainSidebarContainer--close_qcpcl_80",
152284
+ "sidebarCloseIcon--show": "_sidebarCloseIcon--show_qcpcl_88",
152099
152285
  headerContainer,
152100
152286
  searchContainer,
152101
152287
  buttonList,
@@ -153103,6 +153289,22 @@ const GetTableAvailability = async ({
153103
153289
  }
153104
153290
  return [];
153105
153291
  };
153292
+ const GetTableWalkInAvailability = async ({
153293
+ venue_id,
153294
+ params
153295
+ }) => {
153296
+ if (params && params.startSec) {
153297
+ const responseData = await instance$1.get(`/resbook/venue/${venue_id}/table-availablity/walk-in`, {
153298
+ params: {
153299
+ ...params,
153300
+ limit: 100
153301
+ }
153302
+ });
153303
+ const data2 = responseData ?? [];
153304
+ return data2;
153305
+ }
153306
+ return [];
153307
+ };
153106
153308
  var momentTimezone$2 = { exports: {} };
153107
153309
  var momentTimezone$1 = { exports: {} };
153108
153310
  const require$$0 = /* @__PURE__ */ getAugmentedNamespace(moment$1);
@@ -154072,18 +154274,30 @@ const index$7 = ({
154072
154274
  phone: "",
154073
154275
  notes: ""
154074
154276
  };
154075
- const bookingSchema = () => create$2().shape({
154076
- source: create$6().test("is-valid-partySize", "Source is required", (value2) => value2 !== null && typeof value2 === "object" && !!value2.value).required(),
154077
- date: create$4().required(),
154078
- time: create$6().test("is-valid-time", "Time is required", (value2) => value2 !== null && typeof value2 === "object" && !!value2.value).required(),
154079
- partySize: create$6().test("is-valid-partySize", "Party Size is required", (value2) => value2 !== null && typeof value2 === "object" && !!value2.value).required(),
154080
- table: create$6().test("is-valid-table", "Table is required", (value2) => value2 !== null && typeof value2 === "object" && !!value2.value).required(),
154081
- firstName: create$4(),
154082
- lastName: create$4(),
154083
- email: create$4().email(t2("errors.email")),
154084
- phone: create$4().nullable().notRequired().test("is-valid-phone", t2("errors.phone"), (value2) => !value2 || new RegExp(/^\+?[1-9]\d{1,14}$/).test(value2)),
154085
- notes: create$4()
154086
- });
154277
+ const isWalkInRef = useRef(false);
154278
+ const [, setSchemaTick] = useState(0);
154279
+ const bookingSchema = () => {
154280
+ const base = {
154281
+ source: create$6().test("is-valid-source", "Source is required", (value2) => value2 !== null && typeof value2 === "object" && !!value2.value).required(),
154282
+ partySize: create$6().test("is-valid-partySize", "Party Size is required", (value2) => value2 !== null && typeof value2 === "object" && !!value2.value).required(),
154283
+ table: create$6().test("is-valid-table", "Table is required", (value2) => value2 !== null && typeof value2 === "object" && !!value2.value).required()
154284
+ };
154285
+ if (isWalkInRef.current) {
154286
+ return create$2().shape({
154287
+ ...base
154288
+ });
154289
+ }
154290
+ return create$2().shape({
154291
+ ...base,
154292
+ date: create$4().required(),
154293
+ time: create$6().test("is-valid-time", "Time is required", (value2) => value2 !== null && typeof value2 === "object" && !!value2.value).required(),
154294
+ firstName: create$4(),
154295
+ lastName: create$4(),
154296
+ email: create$4().email(t2("errors.email")),
154297
+ phone: create$4().nullable().notRequired().test("is-valid-phone", t2("errors.phone"), (value2) => !value2 || new RegExp(/^\+?[1-9]\d{1,14}$/).test(value2)),
154298
+ notes: create$4()
154299
+ });
154300
+ };
154087
154301
  const {
154088
154302
  control,
154089
154303
  reset,
@@ -154100,6 +154314,13 @@ const index$7 = ({
154100
154314
  control,
154101
154315
  name: "source"
154102
154316
  });
154317
+ useEffect(() => {
154318
+ const newIsWalkIn = (source2 == null ? void 0 : source2.code) === "WALK-IN";
154319
+ if (isWalkInRef.current !== newIsWalkIn) {
154320
+ isWalkInRef.current = newIsWalkIn;
154321
+ setSchemaTick((t22) => t22 + 1);
154322
+ }
154323
+ }, [source2 == null ? void 0 : source2.code]);
154103
154324
  const date4 = useWatch({
154104
154325
  control,
154105
154326
  name: "date"
@@ -154112,9 +154333,10 @@ const index$7 = ({
154112
154333
  control,
154113
154334
  name: "partySize"
154114
154335
  });
154336
+ const isWalkIn = (source2 == null ? void 0 : source2.code) === "WALK-IN";
154115
154337
  const {
154116
154338
  data: data2
154117
- } = useFetch(date4 && time2 && (time2 == null ? void 0 : time2.value) && partySize2 && (partySize2 == null ? void 0 : partySize2.value) ? GetTableAvailability : () => Promise.resolve([]), {
154339
+ } = useFetch(date4 && time2 && (time2 == null ? void 0 : time2.value) && partySize2 && (partySize2 == null ? void 0 : partySize2.value) ? isWalkIn ? GetTableWalkInAvailability : GetTableAvailability : () => Promise.resolve([]), {
154118
154340
  cacheId: "reservation0dashboard0table0availability",
154119
154341
  venue_id: venueId,
154120
154342
  params: source2 && (source2 == null ? void 0 : source2.value) ? {
@@ -154134,7 +154356,7 @@ const index$7 = ({
154134
154356
  }
154135
154357
  });
154136
154358
  const onSubmit = async () => {
154137
- var _a2, _b, _c, _d, _e2, _f, _g;
154359
+ var _a2, _b, _c, _d, _e2, _f, _g, _h, _i;
154138
154360
  const data22 = await getValues();
154139
154361
  const result = await trigger();
154140
154362
  if (!result) {
@@ -154142,17 +154364,19 @@ const index$7 = ({
154142
154364
  return;
154143
154365
  }
154144
154366
  if (!selectedBooking) {
154367
+ const isWalkInCreate = ((_a2 = data22 == null ? void 0 : data22.source) == null ? void 0 : _a2.code) === "WALK-IN";
154368
+ const startSec = isWalkInCreate ? moment.tz(moment(), currentTimeZone || void 0).valueOf() / 1e3 : data22.date && ((_b = data22.time) == null ? void 0 : _b.value) ? moment.tz(`${data22.date} ${(_c = data22.time) == null ? void 0 : _c.value}`, "DD/MM/YYYY HH:mm", currentTimeZone ? currentTimeZone : "").valueOf() / 1e3 : moment.tz(moment(), currentTimeZone ? currentTimeZone : "").valueOf() / 1e3;
154145
154369
  const toSend = {
154146
- bookingChannel: (_a2 = data22 == null ? void 0 : data22.source) == null ? void 0 : _a2.value,
154147
- partySize: (_b = data22 == null ? void 0 : data22.partySize) == null ? void 0 : _b.value,
154148
- table: (_c = data22 == null ? void 0 : data22.table) == null ? void 0 : _c.value,
154149
- date: data22.date ? moment.tz(`${data22.date} ${(_d = data22.time) == null ? void 0 : _d.value}`, "DD/MM/YYYY HH:mm", currentTimeZone ? currentTimeZone : "").valueOf() / 1e3 : moment.tz(moment(), currentTimeZone ? currentTimeZone : "").valueOf() / 1e3,
154370
+ bookingChannel: (_d = data22 == null ? void 0 : data22.source) == null ? void 0 : _d.value,
154371
+ partySize: (_e2 = data22 == null ? void 0 : data22.partySize) == null ? void 0 : _e2.value,
154372
+ table: (_f = data22 == null ? void 0 : data22.table) == null ? void 0 : _f.value,
154373
+ date: Math.floor(startSec),
154150
154374
  notes: data22 == null ? void 0 : data22.notes,
154151
154375
  contact: {
154152
- firstname: data22 == null ? void 0 : data22.firstName,
154153
- lastname: data22 == null ? void 0 : data22.lastName,
154154
- email: data22 == null ? void 0 : data22.email,
154155
- telephone: data22 == null ? void 0 : data22.phone,
154376
+ firstname: isWalkInCreate ? "" : data22 == null ? void 0 : data22.firstName,
154377
+ lastname: isWalkInCreate ? "" : data22 == null ? void 0 : data22.lastName,
154378
+ email: isWalkInCreate ? "" : data22 == null ? void 0 : data22.email,
154379
+ telephone: isWalkInCreate ? "" : data22 == null ? void 0 : data22.phone,
154156
154380
  locale: "en"
154157
154381
  }
154158
154382
  };
@@ -154162,10 +154386,11 @@ const index$7 = ({
154162
154386
  });
154163
154387
  reloadMainTable();
154164
154388
  } else {
154389
+ const dateSec = data22.date ? moment.tz(`${data22.date} ${(_g = data22.time) == null ? void 0 : _g.value}`, "DD/MM/YYYY HH:mm", currentTimeZone ? currentTimeZone : "").valueOf() / 1e3 : moment.tz(moment(), currentTimeZone ? currentTimeZone : "").valueOf() / 1e3;
154165
154390
  const toSend = {
154166
- partySize: (_e2 = data22 == null ? void 0 : data22.partySize) == null ? void 0 : _e2.value,
154167
- table: (_f = data22 == null ? void 0 : data22.table) == null ? void 0 : _f.value,
154168
- date: data22.date ? moment.tz(`${data22.date} ${(_g = data22.time) == null ? void 0 : _g.value}`, "DD/MM/YYYY HH:mm", currentTimeZone ? currentTimeZone : "").valueOf() / 1e3 : moment.tz(moment(), currentTimeZone ? currentTimeZone : "").valueOf() / 1e3,
154391
+ partySize: (_h = data22 == null ? void 0 : data22.partySize) == null ? void 0 : _h.value,
154392
+ table: (_i = data22 == null ? void 0 : data22.table) == null ? void 0 : _i.value,
154393
+ date: Math.floor(dateSec),
154169
154394
  notes: data22 == null ? void 0 : data22.notes,
154170
154395
  contact: {
154171
154396
  firstname: data22 == null ? void 0 : data22.firstName,
@@ -154184,7 +154409,8 @@ const index$7 = ({
154184
154409
  };
154185
154410
  useEffect(() => {
154186
154411
  if (data2) {
154187
- const tableOptions2 = data2.map((item2) => {
154412
+ const list = Array.isArray(data2) ? data2 : (data2 == null ? void 0 : data2.id) ? [data2] : [];
154413
+ const tableOptions2 = list.map((item2) => {
154188
154414
  var _a2, _b;
154189
154415
  return {
154190
154416
  value: item2.id,
@@ -154214,7 +154440,7 @@ const index$7 = ({
154214
154440
  if (filtersData == null ? void 0 : filtersData.hours) {
154215
154441
  setTimeByDayOptions(filtersData == null ? void 0 : filtersData.hours);
154216
154442
  }
154217
- if ((filtersData == null ? void 0 : filtersData.tables) && !selectedBooking) {
154443
+ if ((filtersData == null ? void 0 : filtersData.tables) && !selectedBooking && (source2 == null ? void 0 : source2.code) !== "WALK-IN") {
154218
154444
  setTableOptions(filtersData.tables.map((item2) => ({
154219
154445
  value: item2.id,
154220
154446
  label: item2.label
@@ -154223,7 +154449,7 @@ const index$7 = ({
154223
154449
  if (filtersData == null ? void 0 : filtersData.timeZone) {
154224
154450
  setCurrentTimeZone(filtersData.timeZone);
154225
154451
  }
154226
- }, [filtersData]);
154452
+ }, [filtersData, source2 == null ? void 0 : source2.code]);
154227
154453
  useEffect(() => {
154228
154454
  var _a2, _b;
154229
154455
  if (selectedBooking) {
@@ -154275,7 +154501,7 @@ const index$7 = ({
154275
154501
  useEffect(() => {
154276
154502
  if (source2 && source2.code === "WALK-IN") {
154277
154503
  const currentTime = moment();
154278
- setValue("date", currentTime.format("YYYY-MM-DD"));
154504
+ setValue("date", currentTime.format("DD/MM/YYYY"));
154279
154505
  if (timeOptions.length > 0) {
154280
154506
  const validFutureTimes = timeOptions.filter((option) => option.value).map((option) => ({
154281
154507
  ...option,
@@ -154309,10 +154535,11 @@ const index$7 = ({
154309
154535
  name: "source",
154310
154536
  options: sourceOptions.map((item2) => ({
154311
154537
  value: item2.value,
154312
- label: t2(item2.label)
154538
+ label: t2(item2.label),
154539
+ code: item2.code
154313
154540
  }))
154314
154541
  })
154315
- }), /* @__PURE__ */ jsxs("div", {
154542
+ }), !isWalkIn && /* @__PURE__ */ jsxs("div", {
154316
154543
  style: {
154317
154544
  display: "flex",
154318
154545
  gap: 10
@@ -154374,66 +154601,68 @@ const index$7 = ({
154374
154601
  options: tableOptions
154375
154602
  })
154376
154603
  })]
154377
- }), /* @__PURE__ */ jsxs("div", {
154378
- style: {
154379
- display: "flex",
154380
- gap: 10
154381
- },
154382
- children: [/* @__PURE__ */ jsx$1("div", {
154604
+ }), !isWalkIn && /* @__PURE__ */ jsxs(Fragment, {
154605
+ children: [/* @__PURE__ */ jsxs("div", {
154383
154606
  style: {
154384
- width: "50%"
154607
+ display: "flex",
154608
+ gap: 10
154609
+ },
154610
+ children: [/* @__PURE__ */ jsx$1("div", {
154611
+ style: {
154612
+ width: "50%"
154613
+ },
154614
+ children: /* @__PURE__ */ jsx$1(TextInputField, {
154615
+ disabled: !canEdit,
154616
+ control,
154617
+ id: "firstName",
154618
+ name: "firstName",
154619
+ placeholder: t2("firstname"),
154620
+ radius: "md",
154621
+ filled: true
154622
+ })
154623
+ }), /* @__PURE__ */ jsx$1("div", {
154624
+ style: {
154625
+ width: "50%"
154626
+ },
154627
+ children: /* @__PURE__ */ jsx$1(TextInputField, {
154628
+ disabled: !canEdit,
154629
+ control,
154630
+ id: "lastName",
154631
+ name: "lastName",
154632
+ placeholder: t2("lastname"),
154633
+ radius: "md",
154634
+ filled: true
154635
+ })
154636
+ })]
154637
+ }), /* @__PURE__ */ jsx$1(CustomerVisits, {
154638
+ venueId
154639
+ }), /* @__PURE__ */ jsx$1("div", {
154640
+ style: {
154641
+ width: "100%"
154385
154642
  },
154386
154643
  children: /* @__PURE__ */ jsx$1(TextInputField, {
154387
154644
  disabled: !canEdit,
154388
154645
  control,
154389
- id: "firstName",
154390
- name: "firstName",
154391
- placeholder: t2("firstname"),
154646
+ id: "phone",
154647
+ name: "phone",
154648
+ placeholder: t2("phone"),
154392
154649
  radius: "md",
154393
154650
  filled: true
154394
154651
  })
154395
154652
  }), /* @__PURE__ */ jsx$1("div", {
154396
154653
  style: {
154397
- width: "50%"
154654
+ width: "100%"
154398
154655
  },
154399
154656
  children: /* @__PURE__ */ jsx$1(TextInputField, {
154400
154657
  disabled: !canEdit,
154401
154658
  control,
154402
- id: "lastName",
154403
- name: "lastName",
154404
- placeholder: t2("lastname"),
154659
+ id: "email",
154660
+ name: "email",
154661
+ placeholder: t2("email"),
154405
154662
  radius: "md",
154406
154663
  filled: true
154407
154664
  })
154408
154665
  })]
154409
- }), /* @__PURE__ */ jsx$1(CustomerVisits, {
154410
- venueId
154411
- }), /* @__PURE__ */ jsx$1("div", {
154412
- style: {
154413
- width: "100%"
154414
- },
154415
- children: /* @__PURE__ */ jsx$1(TextInputField, {
154416
- disabled: !canEdit,
154417
- control,
154418
- id: "phone",
154419
- name: "phone",
154420
- placeholder: t2("phone"),
154421
- radius: "md",
154422
- filled: true
154423
- })
154424
- }), /* @__PURE__ */ jsx$1("div", {
154425
- style: {
154426
- width: "100%"
154427
- },
154428
- children: /* @__PURE__ */ jsx$1(TextInputField, {
154429
- disabled: !canEdit,
154430
- control,
154431
- id: "email",
154432
- name: "email",
154433
- placeholder: t2("email"),
154434
- radius: "md",
154435
- filled: true
154436
- })
154437
154666
  }), /* @__PURE__ */ jsx$1("div", {
154438
154667
  style: {
154439
154668
  width: "100%"
@@ -154445,7 +154674,7 @@ const index$7 = ({
154445
154674
  name: "notes",
154446
154675
  placeholder: t2("notes")
154447
154676
  })
154448
- }), /* @__PURE__ */ jsx$1("div", {
154677
+ }), !isWalkIn && /* @__PURE__ */ jsx$1("div", {
154449
154678
  style: {
154450
154679
  width: "100%"
154451
154680
  },
@@ -195682,7 +195911,8 @@ const TableFilters = ({
195682
195911
  };
195683
195912
  const BrandManagement$1 = ({
195684
195913
  userEmail,
195685
- userFullName
195914
+ userFullName,
195915
+ mode = "brand"
195686
195916
  }) => {
195687
195917
  const {
195688
195918
  t: t2
@@ -195706,11 +195936,44 @@ const BrandManagement$1 = ({
195706
195936
  const onNavigateToBrandDetail = (data22) => {
195707
195937
  navigate(`/brand-management/${data22.id}`);
195708
195938
  };
195939
+ const headerTitleKey = mode === "legal" ? "LEGAL_TEXT_MANAGEMENT" : mode === "occasion" ? "OCCASION_MANAGEMENT" : "BRAND_MANAGEMENT";
195709
195940
  const truncateText = (text2, maxLength = 50) => {
195710
195941
  if (!text2) return "---";
195711
195942
  return text2.length > maxLength ? `${text2.slice(0, maxLength)}...` : text2;
195712
195943
  };
195713
- const tableHeader = [{
195944
+ const tableHeader = mode === "occasion" ? [{
195945
+ id: "name",
195946
+ label: t2("NAME"),
195947
+ render: (value2, item2) => /* @__PURE__ */ jsx$1("div", {
195948
+ className: styles$f.brandName,
195949
+ onClick: () => onNavigateToBrandDetail(item2),
195950
+ children: value2
195951
+ })
195952
+ }, {
195953
+ id: "occasions",
195954
+ label: t2("OCCASIONS"),
195955
+ render: (_value, item2) => {
195956
+ var _a2;
195957
+ const occasions = Array.isArray((_a2 = item2 == null ? void 0 : item2.extraData) == null ? void 0 : _a2.occasions) ? item2.extraData.occasions : [];
195958
+ if (!occasions.length) {
195959
+ return /* @__PURE__ */ jsx$1("div", {
195960
+ children: "---"
195961
+ });
195962
+ }
195963
+ const lines = occasions.map((occ, index2) => {
195964
+ const occasionName = occ.occasionName || occ.occasionId || "";
195965
+ const areaName = occ.occasionAreaName || occ.occasionAreaId || "";
195966
+ const menuName = occ.occasionMenuName || occ.occasionMenuId || "";
195967
+ const parts = [occasionName, areaName, menuName].filter(Boolean);
195968
+ return /* @__PURE__ */ jsx$1("div", {
195969
+ children: parts.join(" • ")
195970
+ }, index2);
195971
+ });
195972
+ return /* @__PURE__ */ jsx$1("div", {
195973
+ children: lines
195974
+ });
195975
+ }
195976
+ }] : [{
195714
195977
  id: "name",
195715
195978
  label: t2("NAME"),
195716
195979
  render: (value2, item2) => /* @__PURE__ */ jsx$1("div", {
@@ -195756,7 +196019,7 @@ const BrandManagement$1 = ({
195756
196019
  };
195757
196020
  return /* @__PURE__ */ jsx$1(LayoutPage$1, {
195758
196021
  header: /* @__PURE__ */ jsx$1("h1", {
195759
- children: t2("BRAND_MANAGEMENT")
196022
+ children: t2(headerTitleKey)
195760
196023
  }),
195761
196024
  children: /* @__PURE__ */ jsxs("div", {
195762
196025
  children: [/* @__PURE__ */ jsx$1(TableFilters, {
@@ -195878,7 +196141,9 @@ const OccasionsField = ({
195878
196141
  })]
195879
196142
  });
195880
196143
  };
195881
- const BrandDetail = () => {
196144
+ const BrandDetail = ({
196145
+ mode = "brand"
196146
+ }) => {
195882
196147
  const {
195883
196148
  t: t2
195884
196149
  } = useTranslation();
@@ -195886,6 +196151,7 @@ const BrandDetail = () => {
195886
196151
  const {
195887
196152
  brandId
195888
196153
  } = useParams();
196154
+ const backPath = "/brand-management";
195889
196155
  const {
195890
196156
  data: data2,
195891
196157
  isLoading,
@@ -196022,11 +196288,14 @@ const BrandDetail = () => {
196022
196288
  }, [data2, occasionsData, occasionOptions, reset]);
196023
196289
  const onSubmit = (formData) => {
196024
196290
  const occasionsList = (formData.occasions || []).map((row) => {
196025
- var _a2, _b, _c;
196291
+ var _a2, _b, _c, _d, _e2, _f;
196026
196292
  return {
196027
196293
  occasionId: ((_a2 = row.occasionId) == null ? void 0 : _a2.value) ?? null,
196028
- occasionAreaId: ((_b = row.occasionAreaId) == null ? void 0 : _b.value) ?? null,
196029
- occasionMenuId: ((_c = row.occasionMenuId) == null ? void 0 : _c.value) ?? null
196294
+ occasionName: ((_b = row.occasionId) == null ? void 0 : _b.label) ?? null,
196295
+ occasionAreaId: ((_c = row.occasionAreaId) == null ? void 0 : _c.value) ?? null,
196296
+ occasionAreaName: ((_d = row.occasionAreaId) == null ? void 0 : _d.label) ?? null,
196297
+ occasionMenuId: ((_e2 = row.occasionMenuId) == null ? void 0 : _e2.value) ?? null,
196298
+ occasionMenuName: ((_f = row.occasionMenuId) == null ? void 0 : _f.label) ?? null
196030
196299
  };
196031
196300
  });
196032
196301
  const submitData = {
@@ -196048,7 +196317,7 @@ const BrandDetail = () => {
196048
196317
  className: styles$e.brandDetailHeader,
196049
196318
  children: [/* @__PURE__ */ jsx$1(Button$1, {
196050
196319
  mode: "tertiary",
196051
- onClick: () => navigate("/brand-management"),
196320
+ onClick: () => navigate(backPath),
196052
196321
  icon: "arrowLeft"
196053
196322
  }), /* @__PURE__ */ jsx$1("h1", {
196054
196323
  children: t2("BRAND_DETAIL")
@@ -196064,7 +196333,7 @@ const BrandDetail = () => {
196064
196333
  className: styles$e.brandDetailHeader,
196065
196334
  children: [/* @__PURE__ */ jsx$1(Button$1, {
196066
196335
  mode: "tertiary",
196067
- onClick: () => navigate("/brand-management"),
196336
+ onClick: () => navigate(backPath),
196068
196337
  icon: "arrowLeft"
196069
196338
  }), /* @__PURE__ */ jsx$1("h1", {
196070
196339
  children: (data2 == null ? void 0 : data2.name) ?? t2("BRAND_DETAIL")
@@ -196077,38 +196346,40 @@ const BrandDetail = () => {
196077
196346
  onSubmit: handleSubmit(onSubmit),
196078
196347
  children: /* @__PURE__ */ jsxs("div", {
196079
196348
  className: styles$e.brandDetailContent,
196080
- children: [/* @__PURE__ */ jsxs("div", {
196081
- className: styles$e.brandDetailContentItem,
196349
+ children: [(mode === "legal" || mode === "brand") && /* @__PURE__ */ jsxs(Fragment, {
196082
196350
  children: [/* @__PURE__ */ jsxs("div", {
196083
- className: styles$e.brandDetailContentItemTitle,
196084
- children: [/* @__PURE__ */ jsx$1(Icon, {
196085
- icon: "clipBoardList"
196086
- }), /* @__PURE__ */ jsxs("h3", {
196087
- children: [t2("IMPORTANT_NOTICE"), ":"]
196351
+ className: styles$e.brandDetailContentItem,
196352
+ children: [/* @__PURE__ */ jsxs("div", {
196353
+ className: styles$e.brandDetailContentItemTitle,
196354
+ children: [/* @__PURE__ */ jsx$1(Icon, {
196355
+ icon: "clipBoardList"
196356
+ }), /* @__PURE__ */ jsxs("h3", {
196357
+ children: [t2("IMPORTANT_NOTICE"), ":"]
196358
+ })]
196359
+ }), /* @__PURE__ */ jsx$1(TextAreaField$1, {
196360
+ control,
196361
+ id: "rwgTc",
196362
+ name: "rwgTc",
196363
+ label: ""
196088
196364
  })]
196089
- }), /* @__PURE__ */ jsx$1(TextAreaField$1, {
196090
- control,
196091
- id: "rwgTc",
196092
- name: "rwgTc",
196093
- label: ""
196094
- })]
196095
- }), /* @__PURE__ */ jsxs("div", {
196096
- className: styles$e.brandDetailContentItem,
196097
- children: [/* @__PURE__ */ jsxs("div", {
196098
- className: styles$e.brandDetailContentItemTitle,
196099
- children: [/* @__PURE__ */ jsx$1(Icon, {
196100
- icon: "link"
196101
- }), /* @__PURE__ */ jsxs("h3", {
196102
- children: [t2("TERMS_CONDITIONS_LINK"), ":"]
196365
+ }), /* @__PURE__ */ jsxs("div", {
196366
+ className: styles$e.brandDetailContentItem,
196367
+ children: [/* @__PURE__ */ jsxs("div", {
196368
+ className: styles$e.brandDetailContentItemTitle,
196369
+ children: [/* @__PURE__ */ jsx$1(Icon, {
196370
+ icon: "link"
196371
+ }), /* @__PURE__ */ jsxs("h3", {
196372
+ children: [t2("TERMS_CONDITIONS_LINK"), ":"]
196373
+ })]
196374
+ }), /* @__PURE__ */ jsx$1(TextInputField, {
196375
+ control,
196376
+ id: "rwgTcLink",
196377
+ name: "rwgTcLink",
196378
+ label: "",
196379
+ radius: "md"
196103
196380
  })]
196104
- }), /* @__PURE__ */ jsx$1(TextInputField, {
196105
- control,
196106
- id: "rwgTcLink",
196107
- name: "rwgTcLink",
196108
- label: "",
196109
- radius: "md"
196110
196381
  })]
196111
- }), /* @__PURE__ */ jsxs("div", {
196382
+ }), (mode === "occasion" || mode === "brand") && /* @__PURE__ */ jsxs("div", {
196112
196383
  className: styles$e.brandDetailContentContainer,
196113
196384
  children: [/* @__PURE__ */ jsxs("div", {
196114
196385
  className: styles$e.brandDetailContentItemTitle,
@@ -196146,31 +196417,26 @@ const BrandDetail = () => {
196146
196417
  };
196147
196418
  const BrandManagement = ({
196148
196419
  userEmail,
196149
- userFullName
196420
+ userFullName,
196421
+ page
196150
196422
  }) => {
196151
- useEffect(() => {
196152
- const script = document.createElement("script");
196153
- script.src = "https://cdn.paddle.com/paddle/paddle.js";
196154
- script.async = true;
196155
- script.onload = () => {
196156
- };
196157
- document.body.appendChild(script);
196158
- return () => {
196159
- document.body.removeChild(script);
196160
- };
196161
- }, []);
196423
+ const mode = page === "LegalTextManagement" ? "legal" : page === "OccasionManagement" ? "occasion" : "brand";
196424
+ const basePath = "/brand-management";
196162
196425
  return /* @__PURE__ */ jsx$1(MemoryRouter, {
196163
- initialEntries: ["/brand-management"],
196426
+ initialEntries: [basePath],
196164
196427
  children: /* @__PURE__ */ jsxs(Routes, {
196165
196428
  children: [/* @__PURE__ */ jsx$1(Route, {
196166
- path: "/brand-management",
196429
+ path: basePath,
196167
196430
  element: /* @__PURE__ */ jsx$1(BrandManagement$1, {
196168
196431
  userEmail,
196169
- userFullName
196432
+ userFullName,
196433
+ mode
196170
196434
  })
196171
196435
  }), /* @__PURE__ */ jsx$1(Route, {
196172
- path: "/brand-management/:brandId",
196173
- element: /* @__PURE__ */ jsx$1(BrandDetail, {})
196436
+ path: `${basePath}/:brandId`,
196437
+ element: /* @__PURE__ */ jsx$1(BrandDetail, {
196438
+ mode
196439
+ })
196174
196440
  }), /* @__PURE__ */ jsx$1(Route, {
196175
196441
  path: "*",
196176
196442
  element: /* @__PURE__ */ jsx$1(WorkingPage, {})
@@ -199717,7 +199983,9 @@ const pages = {
199717
199983
  BrandManagement,
199718
199984
  PosNotifications,
199719
199985
  PosTableMatching,
199720
- PosCheckMatching
199986
+ PosCheckMatching,
199987
+ LegalTextManagement: BrandManagement,
199988
+ OccasionManagement: BrandManagement
199721
199989
  };
199722
199990
  console.log("Initializing Sentry...");
199723
199991
  init2({
@@ -199732,6 +200000,7 @@ const ComponentFactory = ({
199732
200000
  return /* @__PURE__ */ jsx$1(Provider, {
199733
200001
  children: Page,
199734
200002
  lang: props.lang,
200003
+ page,
199735
200004
  ...props
199736
200005
  });
199737
200006
  };