@nylas/react 2.0.0 → 2.0.1

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 (169) hide show
  1. package/dist/abstract-provider-efe136bd-2041bdce.js +187 -0
  2. package/dist/abstract-provider-efe136bd-b4663c02.cjs +1 -0
  3. package/dist/add-circle-icon_2.entry-5204c48a.cjs +1 -0
  4. package/dist/add-circle-icon_2.entry-ea1692a4.js +26 -0
  5. package/dist/archive-icon.entry-0b585dff.js +16 -0
  6. package/dist/archive-icon.entry-c2c66bca.cjs +1 -0
  7. package/dist/{arrow-icon.entry-9414299f.js → arrow-icon.entry-2e61394e.js} +5 -5
  8. package/dist/arrow-icon.entry-9d471162.cjs +1 -0
  9. package/dist/{bold-icon.entry-c781e9c1.cjs → bold-icon.entry-5c37622f.cjs} +1 -1
  10. package/dist/{bold-icon.entry-b72aed9f.js → bold-icon.entry-8ef1b653.js} +2 -2
  11. package/dist/{button-component_2.entry-73f76545.cjs → button-component_2.entry-8335ee1e.cjs} +1 -1
  12. package/dist/{button-component_2.entry-36e49459.js → button-component_2.entry-c906230f.js} +9 -9
  13. package/dist/calendar-agenda-fill-icon_36.entry-59c0a997.cjs +6 -0
  14. package/dist/{calendar-agenda-fill-icon_36.entry-efa7ad26.js → calendar-agenda-fill-icon_36.entry-5f184433.js} +900 -881
  15. package/dist/{calendar-cancel-icon.entry-01c388eb.cjs → calendar-cancel-icon.entry-65a4a34e.cjs} +1 -1
  16. package/dist/{calendar-cancel-icon.entry-0f739a8a.js → calendar-cancel-icon.entry-dd6ac4db.js} +5 -5
  17. package/dist/{calendar-check-icon_2.entry-5febbadf.cjs → calendar-check-icon_2.entry-ded15038.cjs} +1 -1
  18. package/dist/{calendar-check-icon_2.entry-dfb0036d.js → calendar-check-icon_2.entry-f9b50bb8.js} +3 -3
  19. package/dist/{calendar-icon.entry-f197396d.js → calendar-icon.entry-a2a1ddbc.js} +2 -2
  20. package/dist/{calendar-icon.entry-9743e0b7.cjs → calendar-icon.entry-ca512dd6.cjs} +1 -1
  21. package/dist/checkbox-component_2.entry-d6128246.js +115 -0
  22. package/dist/checkbox-component_2.entry-d79b5d1d.cjs +1 -0
  23. package/dist/checkbox-group_4.entry-2946c7ef.cjs +28 -0
  24. package/dist/{nylas-event-calendar_3.entry-9abd46c2.js → checkbox-group_4.entry-e5145451.js} +1038 -923
  25. package/dist/{checkmark-icon_15.entry-5c09cff5.js → checkmark-icon_15.entry-6e92e93e.js} +19 -19
  26. package/dist/{checkmark-icon_15.entry-35dd97b7.cjs → checkmark-icon_15.entry-a75a1825.cjs} +2 -2
  27. package/dist/{chevron-icon_3.entry-4a72f211.js → chevron-icon_3.entry-6eaa3513.js} +16 -16
  28. package/dist/{chevron-icon_3.entry-e0608b7c.cjs → chevron-icon_3.entry-9193a885.cjs} +1 -1
  29. package/dist/{clock-icon_4.entry-0afe79c2.js → clock-icon_4.entry-2c93270e.js} +8 -8
  30. package/dist/{clock-icon_4.entry-202ce025.cjs → clock-icon_4.entry-ae2272f4.cjs} +1 -1
  31. package/dist/{customParseFormat-d1de5ed0-c0ef002d.js → customParseFormat-edc38d83-b3722499.js} +1 -1
  32. package/dist/{customParseFormat-d1de5ed0-65a0bba3.cjs → customParseFormat-edc38d83-fa9c77d9.cjs} +1 -1
  33. package/dist/{delete-icon.entry-580bfcc9.js → delete-icon.entry-6684eba6.js} +2 -2
  34. package/dist/{delete-icon.entry-762ac892.cjs → delete-icon.entry-b9e4f2c7.cjs} +1 -1
  35. package/dist/{document-refresh-icon.entry-4e0f0c61.cjs → document-refresh-icon.entry-7afe6163.cjs} +1 -1
  36. package/dist/document-refresh-icon.entry-fba9f60b.js +16 -0
  37. package/dist/{feedbackSync-172f942c-42124493.js → feedbackSync-e4378c0b-23289195.js} +811 -798
  38. package/dist/{feedbackSync-172f942c-62f72bd2.cjs → feedbackSync-e4378c0b-7876d067.cjs} +26 -26
  39. package/dist/{folder-icon.entry-54c3cc66.js → folder-icon.entry-430c6b47.js} +4 -4
  40. package/dist/{folder-icon.entry-2694e253.cjs → folder-icon.entry-b1632bf3.cjs} +1 -1
  41. package/dist/{forward-icon.entry-5e540f05.js → forward-icon.entry-5e53da76.js} +2 -2
  42. package/dist/{forward-icon.entry-f07102d8.cjs → forward-icon.entry-7626dcca.cjs} +1 -1
  43. package/dist/{globe-icon_2.entry-aaceb196.js → globe-icon_2.entry-646eae41.js} +20 -20
  44. package/dist/{globe-icon_2.entry-14a4c168.cjs → globe-icon_2.entry-bbb0a6ce.cjs} +1 -1
  45. package/dist/{google-logo-icon_6.entry-00d40db2.js → google-logo-icon_6.entry-5951a546.js} +682 -488
  46. package/dist/google-logo-icon_6.entry-e39dd9cb.cjs +2 -0
  47. package/dist/{google-meet-icon_5.entry-f1f05903.js → google-meet-icon_5.entry-a54c83da.js} +14 -14
  48. package/dist/{google-meet-icon_5.entry-6c20e149.cjs → google-meet-icon_5.entry-c13e0738.cjs} +1 -1
  49. package/dist/inbox-icon.entry-7bee82b3.js +16 -0
  50. package/dist/inbox-icon.entry-911b047a.cjs +1 -0
  51. package/dist/index-71f61ea9.js +24544 -0
  52. package/dist/index-f769bc2a.cjs +118 -0
  53. package/dist/index.d.ts +1 -4
  54. package/dist/index.es-6a9d55cf-122c27e0.js +2724 -0
  55. package/dist/index.es-6a9d55cf-458ba0e0.cjs +7 -0
  56. package/dist/{info-icon_2.entry-bbcefb9a.cjs → info-icon_2.entry-471b836b.cjs} +1 -1
  57. package/dist/{info-icon_2.entry-b3b313ab.js → info-icon_2.entry-6ff2f004.js} +3 -3
  58. package/dist/{input-component.entry-401b9ba5.js → input-component.entry-781b584c.js} +12 -12
  59. package/dist/{input-component.entry-ec8e8e7c.cjs → input-component.entry-b6a9b4cb.cjs} +1 -1
  60. package/dist/{input-dropdown_2.entry-c37f392c.js → input-dropdown_2.entry-1feebcba.js} +3 -3
  61. package/dist/{input-dropdown_2.entry-8cb11601.cjs → input-dropdown_2.entry-c71d14ff.cjs} +1 -1
  62. package/dist/{italic-icon.entry-6675558a.cjs → italic-icon.entry-16debde5.cjs} +1 -1
  63. package/dist/italic-icon.entry-9ef7f4a2.js +16 -0
  64. package/dist/{elements → lib/elements}/index.d.ts +1 -1
  65. package/dist/lib/index.d.ts +5 -0
  66. package/dist/lib/main.d.ts +0 -0
  67. package/dist/lib/notetaker/CalendarSync/CalendarSync.d.ts +37 -0
  68. package/dist/lib/notetaker/CalendarSync/CalendarSync.spec.d.ts +0 -0
  69. package/dist/lib/notetaker/SendNotetaker/SendNotetaker.d.ts +31 -0
  70. package/dist/lib/notetaker/SendNotetaker/SendNotetaker.spec.d.ts +1 -0
  71. package/dist/lib/notetaker/Transcript/Transcript.d.ts +23 -0
  72. package/dist/lib/notetaker/Transcript/Transcript.spec.d.ts +0 -0
  73. package/dist/lib/notetaker/VideoPlayer/VideoPlayer.d.ts +22 -0
  74. package/dist/lib/notetaker/VideoPlayer/VideoPlayer.spec.d.ts +1 -0
  75. package/dist/lib/notetaker/index.d.ts +9 -0
  76. package/dist/lib/notetaker/lib/constants.d.ts +12 -0
  77. package/dist/lib/notetaker/lib/http-client.d.ts +2 -0
  78. package/dist/lib/notetaker/lib/primitives.d.ts +66 -0
  79. package/dist/lib/notetaker/lib/store.d.ts +7 -0
  80. package/dist/lib/notetaker/types.d.ts +42 -0
  81. package/dist/multi-select-dropdown.entry-0a6f9417.cjs +1 -0
  82. package/dist/multi-select-dropdown.entry-1b27c746.js +121 -0
  83. package/dist/nylas-booked-event-card_11.entry-74fba802.cjs +1 -0
  84. package/dist/{nylas-booked-event-card_12.entry-e7464ae7.js → nylas-booked-event-card_11.entry-802671ee.js} +469 -534
  85. package/dist/{nylas-form-card.entry-cbb00fba.cjs → nylas-form-card.entry-59a837c9.cjs} +1 -1
  86. package/dist/{nylas-form-card.entry-a3186807.js → nylas-form-card.entry-7da9a312.js} +3 -3
  87. package/dist/nylas-notification_2.entry-8f8bad34.cjs +1 -0
  88. package/dist/nylas-notification_2.entry-b16bb805.js +85 -0
  89. package/dist/{nylas-scheduler-editor.entry-7b188a38.js → nylas-scheduler-editor.entry-cbe3e1e3.js} +160 -136
  90. package/dist/nylas-scheduler-editor.entry-e33e11fb.cjs +2 -0
  91. package/dist/nylas-scheduling.entry-4223e50b.cjs +1 -0
  92. package/dist/{nylas-scheduling.entry-e9929b03.js → nylas-scheduling.entry-6fb094a8.js} +295 -295
  93. package/dist/{person-icon.entry-d2856f08.js → person-icon.entry-6232e6fd.js} +7 -7
  94. package/dist/{person-icon.entry-8998fdb8.cjs → person-icon.entry-beb26b48.cjs} +1 -1
  95. package/dist/play-icon.entry-16a1c1ac.js +16 -0
  96. package/dist/{play-icon.entry-99eb969b.cjs → play-icon.entry-9060d0d8.cjs} +1 -1
  97. package/dist/{radio-button-group.entry-bc3b12fd.js → radio-button-group.entry-5a3728cd.js} +2 -2
  98. package/dist/{radio-button-group.entry-d66edd04.cjs → radio-button-group.entry-6935c39d.cjs} +1 -1
  99. package/dist/react.cjs +1 -1
  100. package/dist/react.js +135 -126
  101. package/dist/{refresh-icon.entry-99d1982d.cjs → refresh-icon.entry-2411b2e1.cjs} +1 -1
  102. package/dist/{refresh-icon.entry-d6df8b1c.js → refresh-icon.entry-4f56e72b.js} +2 -2
  103. package/dist/{register-component-62d792d4-448b6a43.js → register-component-a1c3d7b4-774feacc.js} +1 -1
  104. package/dist/{register-component-62d792d4-c6e7d129.cjs → register-component-a1c3d7b4-97d7a6f5.cjs} +1 -1
  105. package/dist/{reply-all-icon.entry-d7c44139.cjs → reply-all-icon.entry-b4b6926b.cjs} +1 -1
  106. package/dist/{reply-all-icon.entry-7ebf01a0.js → reply-all-icon.entry-b4b917ec.js} +2 -2
  107. package/dist/{reply-icon.entry-d1622d85.js → reply-icon.entry-24f6f4c6.js} +5 -5
  108. package/dist/{reply-icon.entry-058c00e8.cjs → reply-icon.entry-454545ed.cjs} +1 -1
  109. package/dist/sent-icon.entry-d9a79336.cjs +1 -0
  110. package/dist/sent-icon.entry-fa59ce85.js +16 -0
  111. package/dist/spam-icon.entry-da39987e.cjs +1 -0
  112. package/dist/spam-icon.entry-fb18a08b.js +16 -0
  113. package/dist/{star-icon.entry-98b80645.js → star-icon.entry-406472c1.js} +4 -4
  114. package/dist/{star-icon.entry-4db13fdb.cjs → star-icon.entry-833f35a7.cjs} +1 -1
  115. package/dist/{stop-icon.entry-0290fd30.js → stop-icon.entry-1b6ae838.js} +2 -2
  116. package/dist/{stop-icon.entry-9d7b53fd.cjs → stop-icon.entry-3258db59.cjs} +1 -1
  117. package/dist/style.css +1 -0
  118. package/dist/test/vitest.setup.d.ts +0 -0
  119. package/dist/{textarea-component.entry-9b474ab5.cjs → textarea-component.entry-0ae18897.cjs} +1 -1
  120. package/dist/{textarea-component.entry-a62c257b.js → textarea-component.entry-569a281e.js} +2 -2
  121. package/dist/{toggle-switch.entry-5dbfcd48.cjs → toggle-switch.entry-60d75f16.cjs} +1 -1
  122. package/dist/{toggle-switch.entry-e423b793.js → toggle-switch.entry-dc3f796b.js} +4 -4
  123. package/dist/{translate-icon.entry-60c55a2e.js → translate-icon.entry-297cf20f.js} +4 -4
  124. package/dist/{translate-icon.entry-f82fa6fc.cjs → translate-icon.entry-c183ecb5.cjs} +1 -1
  125. package/dist/trash-fill-icon.entry-3d8a2e5e.js +16 -0
  126. package/dist/trash-fill-icon.entry-94d4f66c.cjs +1 -0
  127. package/dist/{underline-icon.entry-40028bc6.js → underline-icon.entry-4a9105c7.js} +2 -2
  128. package/dist/{underline-icon.entry-0807a43d.cjs → underline-icon.entry-50d1e766.cjs} +1 -1
  129. package/package.json +41 -17
  130. package/dist/add-circle-icon_2.entry-8a1c55bc.cjs +0 -1
  131. package/dist/add-circle-icon_2.entry-b4bbcfee.js +0 -26
  132. package/dist/archive-icon.entry-a2492cf3.js +0 -16
  133. package/dist/archive-icon.entry-e48d2356.cjs +0 -1
  134. package/dist/arrow-icon.entry-b1ecb2aa.cjs +0 -1
  135. package/dist/calendar-agenda-fill-icon_36.entry-e9b92e0e.cjs +0 -6
  136. package/dist/checkbox-component.entry-1aa5782f.cjs +0 -1
  137. package/dist/checkbox-component.entry-72a6aa72.js +0 -43
  138. package/dist/document-refresh-icon.entry-e500b4e3.js +0 -16
  139. package/dist/google-logo-icon_6.entry-fa76ffe3.cjs +0 -2
  140. package/dist/inbox-icon.entry-9a4628f2.cjs +0 -1
  141. package/dist/inbox-icon.entry-aa78ba8c.js +0 -16
  142. package/dist/index-1e75512f.cjs +0 -57
  143. package/dist/index-e8380973.js +0 -18492
  144. package/dist/index.es-fc8588de-034ead51.cjs +0 -7
  145. package/dist/index.es-fc8588de-c943eef6.js +0 -2908
  146. package/dist/italic-icon.entry-0e85d0d9.js +0 -16
  147. package/dist/multi-select-dropdown_2.entry-3eecf18a.js +0 -193
  148. package/dist/multi-select-dropdown_2.entry-e37c501d.cjs +0 -1
  149. package/dist/nylas-booked-event-card_12.entry-fddc9ab8.cjs +0 -1
  150. package/dist/nylas-event-calendar_3.entry-e6669bbf.cjs +0 -11
  151. package/dist/nylas-scheduler-editor.entry-5c92901a.cjs +0 -2
  152. package/dist/nylas-scheduling.entry-970240f6.cjs +0 -1
  153. package/dist/play-icon.entry-f949a80f.js +0 -16
  154. package/dist/sent-icon.entry-6c604512.cjs +0 -1
  155. package/dist/sent-icon.entry-fe12bc2f.js +0 -16
  156. package/dist/spam-icon.entry-45e5292e.cjs +0 -1
  157. package/dist/spam-icon.entry-b97c7709.js +0 -16
  158. package/dist/trash-fill-icon.entry-095caae3.cjs +0 -1
  159. package/dist/trash-fill-icon.entry-825055fd.js +0 -16
  160. package/dist/warning-icon.entry-24e37759.js +0 -16
  161. package/dist/warning-icon.entry-fce7c14f.cjs +0 -1
  162. /package/dist/{elements → lib/elements}/react-component-lib/createComponent.d.ts +0 -0
  163. /package/dist/{elements → lib/elements}/react-component-lib/createOverlayComponent.d.ts +0 -0
  164. /package/dist/{elements → lib/elements}/react-component-lib/index.d.ts +0 -0
  165. /package/dist/{elements → lib/elements}/react-component-lib/interfaces.d.ts +0 -0
  166. /package/dist/{elements → lib/elements}/react-component-lib/utils/attachProps.d.ts +0 -0
  167. /package/dist/{elements → lib/elements}/react-component-lib/utils/case.d.ts +0 -0
  168. /package/dist/{elements → lib/elements}/react-component-lib/utils/dev.d.ts +0 -0
  169. /package/dist/{elements → lib/elements}/react-component-lib/utils/index.d.ts +0 -0
@@ -1,35 +1,36 @@
1
- import { r as X, h as n, a as _, b, i as d, s as ge, v as re, H as le, g as de, F as ie, j as et } from "./index-e8380973.js";
2
- import { R as ce } from "./register-component-62d792d4-448b6a43.js";
3
- import { C as H, D as je, e as tt, b as nt } from "./constants-f51538ef-e0a5f026.js";
4
- import { i as Ae, a as $e, c as Je, b as Ve, f as Ze } from "./feedbackSync-172f942c-42124493.js";
1
+ import { r as te, h as n, a as _, b, i, q as _e, s as le, H as ce, g as pe, F as de, j as nt } from "./index-71f61ea9.js";
2
+ import { R as be } from "./register-component-a1c3d7b4-774feacc.js";
3
+ import { n as v } from "./index.es-6a9d55cf-122c27e0.js";
4
+ import { C as z, D as $e, e as at, b as ot } from "./constants-f51538ef-e0a5f026.js";
5
+ import { E as w, i as Je, a as Ve, c as Ze, b as We, f as qe } from "./feedbackSync-e4378c0b-23289195.js";
5
6
  import "react";
6
7
  import "react/jsx-runtime";
7
8
  import "react-dom";
8
- const at = ".sc-google-logo-icon-h{display:flex}", ot = at, st = class {
9
+ const st = ".sc-google-logo-icon-h{display:flex}", rt = st, it = class {
9
10
  constructor(e) {
10
- X(this, e), this.width = "24", this.height = "24";
11
+ te(this, e), this.width = "24", this.height = "24";
11
12
  }
12
13
  render() {
13
- return n("svg", { key: "497d96edf36fb0a0da5dcfd9ad2fe71b3b7ea9a8", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, n("g", { key: "ff34b10d048568e1f4a7534c71c4a184a7a201e3", "clip-path": "url(#clip0_959_12452)" }, n("path", { key: "d04cbd5dadb80fb04a3f97f6cff28ee64d474183", d: "M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z", fill: "#4285F4" }), n("path", { key: "8d9769691ac47af4bf7a0549162136ee23d2ae2f", d: "M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z", fill: "#34A853" }), n("path", { key: "8851626c907a3bb240e2acbd897964953da1c3c1", d: "M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z", fill: "#FBBC05" }), n("path", { key: "52f0ae0c024656288107ed29c0e0e0d3bf25c534", d: "M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z", fill: "#EA4335" })), n("defs", { key: "2a70dda1a292a31a96ca67b97f17eb9492aa27f0" }, n("clipPath", { key: "fd1204014da069fad95527bb6878bb2639321f7f", id: "clip0_959_12452" }, n("rect", { key: "eb697d55080f8fc14d5f388d30c0f8fb562d1cfb", width: 24, height: 24, fill: "white" }))));
14
+ return n("svg", { key: "eb0615e5875a4d560edb09dd85fcf0b8bbeb5458", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, n("g", { key: "7d040d5b5bc8cf89eabff2ed2695f99bea692b4e", "clip-path": "url(#clip0_959_12452)" }, n("path", { key: "4ddc28c0799291a0c23538444f1c7f5a35959cac", d: "M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z", fill: "#4285F4" }), n("path", { key: "d5b051bacfa0110b66c99273ba6fd591a68237d1", d: "M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z", fill: "#34A853" }), n("path", { key: "6fc0685305b1c96ce35fbf87ccab73f161d648c0", d: "M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z", fill: "#FBBC05" }), n("path", { key: "5946c791195dd03d48b4938d8698ba8e01a7a0b3", d: "M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z", fill: "#EA4335" })), n("defs", { key: "9d33e98420dbd0f952496686fd02f41894ab49f4" }, n("clipPath", { key: "dd192b07d7651bbd74375c1a31e0f3027d9b9a10", id: "clip0_959_12452" }, n("rect", { key: "98c2344df7d506d2579cd793d89fb42feeace8fd", width: 24, height: 24, fill: "white" }))));
14
15
  }
15
16
  };
16
- st.style = ot;
17
- const rt = ".sc-microsoft-logo-icon-h{display:flex}", it = rt, lt = class {
17
+ it.style = rt;
18
+ const lt = ".sc-microsoft-logo-icon-h{display:flex}", dt = lt, ct = class {
18
19
  constructor(e) {
19
- X(this, e), this.width = "22", this.height = "22";
20
+ te(this, e), this.width = "22", this.height = "22";
20
21
  }
21
22
  render() {
22
- return n("svg", { key: "fad699e59d1015d5f6458a851ef64c15d50a11da", width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, n("path", { key: "8a2ec941750b125fd8dc9476b65afae9715e4378", d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), n("path", { key: "085645c16519805acf94427915e6651bb041d022", d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), n("path", { key: "a90f655243dc66642ef28597ee770dc5bd3f7d7d", d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), n("path", { key: "5ea3f196243b29bb0f291f08f7253547a8b574c0", d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" }));
23
+ return n("svg", { key: "a6a6af29ed81710f3f493d849c90871991e0be0f", width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, n("path", { key: "025c40cab8337a37897481fb47580f219b3ad528", d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), n("path", { key: "d7e67a46de5217cfa54f8973616616a9fd4fb474", d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), n("path", { key: "2f4162db32fb29afb4f88c3070e59e8dc574a732", d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), n("path", { key: "4ec074b89f50e66765e199ae112d063ca21b541a", d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" }));
23
24
  }
24
25
  };
25
- lt.style = it;
26
+ ct.style = dt;
26
27
  var u;
27
28
  (function(e) {
28
29
  e.EventInfo = "eventInfo", e.Availability = "availability", e.BookingOptions = "bookingOptions", e.Communications = "communications", e.Participants = "participants", e.BookingForm = "bookingForm", e.PageStyles = "pageStyles";
29
30
  })(u || (u = {}));
30
- function dt({ id: e, formState: t, activeTab: a }, o) {
31
+ function pt({ id: e, formState: t, activeTab: a }, s) {
31
32
  return n(
32
- ie,
33
+ de,
33
34
  null,
34
35
  n(
35
36
  "div",
@@ -89,7 +90,7 @@ function dt({ id: e, formState: t, activeTab: a }, o) {
89
90
  { key: `communications-${e}`, class: { hide: a !== u.Communications } },
90
91
  n("nylas-disable-emails", { name: "disable-emails", exportparts: "nde, nde__toggle-label, nde_toggle-input, nde_toggle-slider" }),
91
92
  !(t != null && t.disableEmails) && n(
92
- ie,
93
+ de,
93
94
  null,
94
95
  n("nylas-confirmation-email", { name: "confirmation-email-template", exportparts: "nce, nce__tab-heading, nce__header, nce__body, nce__confirmation-email-toggle--container, nce__summary, nce__reminder-input_dropdown, nce__reminder-input_dropdown-input, nce__reminder-input_dropdown-content" }),
95
96
  n("nylas-reminder-emails", { name: "reminder-overrides", exportparts: "nre, nre__tab-heading, nre__header, nre__body, nre__confirmation-email-toggle--container, nre__summary, nrt, nrt__number-dropdown, nrt__number-dropdown-button, nrt__number-dropdown-content, nrt__period-dropdown, nrt__period-dropdown-button, nrt__period-dropdown-content, nrt__time-period-selector" })
@@ -106,7 +107,7 @@ function dt({ id: e, formState: t, activeTab: a }, o) {
106
107
  { key: `page-styles-${e}`, class: { hide: a !== u.PageStyles } },
107
108
  n("nylas-custom-event-slug", { name: "custom-event-slug", exportparts: "nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield" }),
108
109
  n("nylas-page-name", { name: "page-name", exportparts: "npn, npn__body, npn__header, npn__drawer-toggle--container, npn__input-textfield" }),
109
- n("nylas-page-styling", { name: "page-styling", exportparts: "nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea" }, o)
110
+ n("nylas-page-styling", { name: "page-styling", exportparts: "nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea" }, s)
110
111
  ),
111
112
  n(
112
113
  "div",
@@ -115,36 +116,41 @@ function dt({ id: e, formState: t, activeTab: a }, o) {
115
116
  )
116
117
  );
117
118
  }
118
- const ct = '.sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column;height:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:calc(100% - 80px);display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group;height:auto}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{border-right:none}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;text-align:left;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:last-of-type{margin-bottom:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px;overflow-y:auto;overflow-x:hidden}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs{width:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs h3.sc-nylas-editor-tabs{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{margin:0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}button-component#report-issue.sc-nylas-editor-tabs{width:auto}nylas-feedback-form.sc-nylas-editor-tabs{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}', pt = ct;
119
- var bt = function(e, t, a, o) {
120
- var r = arguments.length, s = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, a) : o, l;
119
+ const bt = '.sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column;height:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:calc(100% - 80px);display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group;height:auto}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{border-right:none}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;text-align:left;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:last-of-type{margin-bottom:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px;overflow-y:auto;overflow-x:hidden}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs{width:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs h3.sc-nylas-editor-tabs{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{margin:0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.save-changes.sc-nylas-editor-tabs{min-width:140px}button-component#report-issue.sc-nylas-editor-tabs{width:auto}nylas-feedback-form.sc-nylas-editor-tabs{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}', ut = bt;
120
+ var ht = function(e, t, a, s) {
121
+ var l = arguments.length, r = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, o;
121
122
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
122
- s = Reflect.decorate(e, t, a, o);
123
+ r = Reflect.decorate(e, t, a, s);
123
124
  else
124
- for (var i = e.length - 1; i >= 0; i--)
125
- (l = e[i]) && (s = (r < 3 ? l(s) : r > 3 ? l(t, a, s) : l(t, a)) || s);
126
- return r > 3 && s && Object.defineProperty(t, a, s), s;
127
- }, ue = function(e, t) {
125
+ for (var d = e.length - 1; d >= 0; d--)
126
+ (o = e[d]) && (r = (l < 3 ? o(r) : l > 3 ? o(t, a, r) : o(t, a)) || r);
127
+ return l > 3 && r && Object.defineProperty(t, a, r), r;
128
+ }, ye = function(e, t) {
128
129
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
129
130
  return Reflect.metadata(e, t);
130
131
  };
131
- const We = class {
132
+ const Ke = class {
132
133
  constructor(e) {
133
- X(this, e), this.schedulerConfigChanged = _(this, "schedulerConfigChanged", 7), this.schedulerConfigCreated = _(this, "schedulerConfigCreated", 7), this.cancelButtonClick = _(this, "cancelButtonClick", 7), this.formSubmitted = _(this, "formSubmitted", 7), this.previewButtonClicked = _(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = _(this, "schedulerEditorFormUpdated", 7), this.formSubmissionHandler = async (t) => {
134
- var me, _e, ve, we, ke, Ce, xe, Se, Ee, Te, Fe, Le, Oe, Pe, Be, He, ze;
134
+ te(this, e), this.schedulerConfigChanged = _(this, "schedulerConfigChanged", 7), this.schedulerConfigCreated = _(this, "schedulerConfigCreated", 7), this.cancelButtonClick = _(this, "cancelButtonClick", 7), this.formSubmitted = _(this, "formSubmitted", 7), this.previewButtonClicked = _(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = _(this, "schedulerEditorFormUpdated", 7), this.nylasSchedulerError = _(this, "nylasSchedulerError", 6), this.dismissNotification = _(this, "dismissNotification", 7), this.formSubmissionHandler = async (t) => {
135
+ var ve, we, ke, Ce, xe, Ee, Se, Te, Le, Fe, Oe, Be, Pe, He, Ne, ze, Ie;
135
136
  t.preventDefault();
136
137
  const a = await this.formSubmitted.emit();
137
138
  if (b("[nylas-editor-tabs]", "formSubmissionHandler", a), !this.formRef.checkValidity() || a.defaultPrevented) {
138
- this.error = this.formRef.validationMessage || d.t("fixFormErrors");
139
+ this.setError({
140
+ message: this.formRef.validationMessage || i.t("fixFormErrors"),
141
+ type: v.Error,
142
+ category: w.Component,
143
+ title: i.t("nylasEditorTabs.formErrorTitle")
144
+ });
139
145
  return;
140
146
  }
141
147
  this.isLoading = !0, this.hasUnsavedChanges = !1;
142
- const r = this.updateFormState();
143
- b("[nylas-editor-tabs]", "formState", r);
144
- const { title: s, description: l, duration: i, availability: c, bookingCalendar: p, location: f, bookingType: m, buffer: w, availableDaysInFuture: x, minCancellationNotice: T, minBookingNotice: z, cancellationPolicy: O, timeslotInterval: S, additionalGuestsHidden: P, hideCancellationOptions: N, hideReschedulingOptions: R, participants: E, participantOpenHours: k, additionalFields: M, participantCalendars: h, conferencing: U, participantBookingCalendars: v, reminders: j, emailTemplate: I, redirectUrl: A, availabilityMethod: B, slug: $, appearance: J, name: K, disableEmails: V, organizerLocale: Y } = r, C = ((_e = (me = this.selectedConfiguration) == null ? void 0 : me.participants) == null ? void 0 : _e.find((g) => g.is_organizer)) || (E == null ? void 0 : E.find((g) => g.is_organizer)), G = h && (C != null && C.email) ? h[C == null ? void 0 : C.email] : [], W = ((ve = C == null ? void 0 : C.booking) == null ? void 0 : ve.calendar_id) || p, F = i ? parseInt(i) : 30, L = E && (E == null ? void 0 : E.length) > 0 ? E : [
148
+ const l = this.updateFormState();
149
+ b("[nylas-editor-tabs]", "formState", l);
150
+ const { title: r, description: o, duration: d, availability: c, bookingCalendar: p, location: h, bookingType: m, buffer: k, availableDaysInFuture: S, minCancellationNotice: F, minBookingNotice: I, cancellationPolicy: P, timeslotInterval: T, additionalGuestsHidden: H, hideCancellationOptions: G, hideReschedulingOptions: j, participants: L, participantOpenHours: x, additionalFields: M, participantCalendars: y, conferencing: U, participantBookingCalendars: C, reminders: $, emailTemplate: D, redirectUrl: J, availabilityMethod: N, slug: V, appearance: Z, name: Q, disableEmails: W, organizerLocale: X } = l, E = ((we = (ve = this.selectedConfiguration) == null ? void 0 : ve.participants) == null ? void 0 : we.find((f) => f.is_organizer)) || (L == null ? void 0 : L.find((f) => f.is_organizer)), A = y && (E != null && E.email) ? y[E == null ? void 0 : E.email] : [], K = ((ke = E == null ? void 0 : E.booking) == null ? void 0 : ke.calendar_id) || p, O = d ? parseInt(d) : 30, B = L && (L == null ? void 0 : L.length) > 0 ? L : [
145
151
  {
146
- name: (C == null ? void 0 : C.name) ?? ((we = this.currentUser) == null ? void 0 : we.name) ?? "",
147
- email: (C == null ? void 0 : C.email) ?? ((ke = this.currentUser) == null ? void 0 : ke.email) ?? "",
152
+ name: (E == null ? void 0 : E.name) ?? ((Ce = this.currentUser) == null ? void 0 : Ce.name) ?? "",
153
+ email: (E == null ? void 0 : E.email) ?? ((xe = this.currentUser) == null ? void 0 : xe.email) ?? "",
148
154
  is_organizer: !0,
149
155
  timezone: (c == null ? void 0 : c.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
150
156
  availability: {
@@ -156,121 +162,136 @@ const We = class {
156
162
  }
157
163
  }
158
164
  ];
159
- let D = B || (((Se = (xe = (Ce = this.selectedConfiguration) == null ? void 0 : Ce.availability) == null ? void 0 : xe.availability_rules) == null ? void 0 : Se.availability_method) ?? "collective");
160
- this.selectedEventType && this.selectedEventType !== H.group && (D = this.selectedEventType === H.one_on_one ? H.collective : this.selectedEventType), console.log("availabilityMethodSelected", D);
161
- const q = {
162
- ...((Ee = this.selectedConfiguration) == null ? void 0 : Ee.id) && { id: this.selectedConfiguration.id },
163
- version: ((Te = this.selectedConfiguration) == null ? void 0 : Te.version) ?? "1.0.0",
164
- slug: $,
165
- name: K,
165
+ let R = N || (((Te = (Se = (Ee = this.selectedConfiguration) == null ? void 0 : Ee.availability) == null ? void 0 : Se.availability_rules) == null ? void 0 : Te.availability_method) ?? "collective");
166
+ this.selectedEventType && this.selectedEventType !== z.group && (R = this.selectedEventType === z.one_on_one ? z.collective : this.selectedEventType), console.log("availabilityMethodSelected", R);
167
+ const Y = {
168
+ ...((Le = this.selectedConfiguration) == null ? void 0 : Le.id) && { id: this.selectedConfiguration.id },
169
+ version: ((Fe = this.selectedConfiguration) == null ? void 0 : Fe.version) ?? "1.0.0",
170
+ slug: V,
171
+ name: Q,
166
172
  availability: {
167
- duration_minutes: F,
168
- interval_minutes: (S == null ? void 0 : S.interval) ?? F,
169
- round_to: S == null ? void 0 : S.roundTo,
173
+ duration_minutes: O,
174
+ interval_minutes: (T == null ? void 0 : T.interval) ?? O,
175
+ round_to: T == null ? void 0 : T.roundTo,
170
176
  availability_rules: {
171
- availability_method: D,
172
- buffer: w || { before: 0, after: 0 },
173
- default_open_hours: (c == null ? void 0 : c.openHours) ?? ((Oe = (Le = (Fe = this.selectedConfiguration) == null ? void 0 : Fe.availability) == null ? void 0 : Le.availability_rules) == null ? void 0 : Oe.default_open_hours) ?? je,
174
- round_robin_group_id: ((He = (Be = (Pe = this.selectedConfiguration) == null ? void 0 : Pe.availability) == null ? void 0 : Be.availability_rules) == null ? void 0 : He.round_robin_group_id) ?? ""
177
+ availability_method: R,
178
+ buffer: k || { before: 0, after: 0 },
179
+ default_open_hours: (c == null ? void 0 : c.openHours) ?? ((Pe = (Be = (Oe = this.selectedConfiguration) == null ? void 0 : Oe.availability) == null ? void 0 : Be.availability_rules) == null ? void 0 : Pe.default_open_hours) ?? $e,
180
+ round_robin_group_id: ((ze = (Ne = (He = this.selectedConfiguration) == null ? void 0 : He.availability) == null ? void 0 : Ne.availability_rules) == null ? void 0 : ze.round_robin_group_id) ?? ""
175
181
  }
176
182
  },
177
183
  participants: [
178
- ...L ? L.map((g) => {
179
- var Ne, Ue, Ie, De, Re, Me;
180
- let Q = (c == null ? void 0 : c.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
181
- if ((Ne = k == null ? void 0 : k[g.email]) != null && Ne.length && (Q = (Ie = (Ue = k == null ? void 0 : k[g.email]) == null ? void 0 : Ue[0]) == null ? void 0 : Ie.timezone), g.is_organizer) {
182
- const Ge = v != null && v[g.email] ? v == null ? void 0 : v[g.email] : W || "primary", be = h != null && h[g.email] ? h == null ? void 0 : h[g.email] : G != null && G.length ? G : ["primary"], Xe = be.length === 1 && be[0] === "primary";
184
+ ...B ? B.map((f) => {
185
+ var Ge, Ue, De, Re, je, Me;
186
+ let ee = (c == null ? void 0 : c.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
187
+ if ((Ge = x == null ? void 0 : x[f.email]) != null && Ge.length && (ee = (De = (Ue = x == null ? void 0 : x[f.email]) == null ? void 0 : Ue[0]) == null ? void 0 : De.timezone), f.is_organizer) {
188
+ const Ae = C != null && C[f.email] ? C == null ? void 0 : C[f.email] : K || "primary", he = y != null && y[f.email] ? y == null ? void 0 : y[f.email] : A != null && A.length ? A : ["primary"], tt = he.length === 1 && he[0] === "primary";
183
189
  return {
184
- name: g.name ?? "",
185
- email: g.email,
190
+ name: f.name ?? "",
191
+ email: f.email,
186
192
  is_organizer: !0,
187
- timezone: Q,
193
+ timezone: ee,
188
194
  availability: {
189
- calendar_ids: Xe ? [Ge] : be,
190
- open_hours: (k == null ? void 0 : k[g.email]) ?? ((De = g.availability) == null ? void 0 : De.open_hours) ?? []
195
+ calendar_ids: tt ? [Ae] : he,
196
+ open_hours: (x == null ? void 0 : x[f.email]) ?? ((Re = f.availability) == null ? void 0 : Re.open_hours) ?? []
191
197
  },
192
198
  booking: {
193
- calendar_id: Ge
199
+ calendar_id: Ae
194
200
  }
195
201
  };
196
202
  }
197
- const ee = v != null && v[g.email] ? { calendar_id: v == null ? void 0 : v[g.email] } : (g == null ? void 0 : g.booking) ?? void 0, pe = (h == null ? void 0 : h[g.email]) ?? ((Re = g.availability) == null ? void 0 : Re.calendar_ids) ?? ["primary"], Qe = pe.length === 1 && pe[0] === "primary";
203
+ const ne = C != null && C[f.email] ? { calendar_id: C == null ? void 0 : C[f.email] } : (f == null ? void 0 : f.booking) ?? void 0, ue = (y == null ? void 0 : y[f.email]) ?? ((je = f.availability) == null ? void 0 : je.calendar_ids) ?? ["primary"], et = ue.length === 1 && ue[0] === "primary";
198
204
  return {
199
- ...g,
200
- timezone: Q,
201
- availability: g.availability ? {
202
- calendar_ids: Qe && typeof ee < "u" ? [ee == null ? void 0 : ee.calendar_id] : pe,
203
- open_hours: (k == null ? void 0 : k[g.email]) ?? ((Me = g.availability) == null ? void 0 : Me.open_hours) ?? []
205
+ ...f,
206
+ timezone: ee,
207
+ availability: f.availability ? {
208
+ calendar_ids: et && typeof ne < "u" ? [ne == null ? void 0 : ne.calendar_id] : ue,
209
+ open_hours: (x == null ? void 0 : x[f.email]) ?? ((Me = f.availability) == null ? void 0 : Me.open_hours) ?? []
204
210
  } : void 0,
205
- booking: ee
211
+ booking: ne
206
212
  };
207
213
  }) : []
208
214
  ],
209
215
  event_booking: {
210
- title: (s == null ? void 0 : s.toString()) ?? "",
211
- description: (l == null ? void 0 : l.toString()) ?? "",
212
- location: (f == null ? void 0 : f.toString()) ?? "",
216
+ title: (r == null ? void 0 : r.toString()) ?? "",
217
+ description: (o == null ? void 0 : o.toString()) ?? "",
218
+ location: (h == null ? void 0 : h.toString()) ?? "",
213
219
  booking_type: (m == null ? void 0 : m.toString()) ?? "booking",
214
220
  timezone: (c == null ? void 0 : c.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
215
221
  conferencing: U,
216
- reminders: j,
217
- disable_emails: typeof V == "boolean" ? V : !1
222
+ reminders: $,
223
+ disable_emails: typeof W == "boolean" ? W : !1
218
224
  },
219
225
  scheduler: {
220
- cancellation_policy: O ?? "",
221
- available_days_in_future: x ?? 30,
222
- min_cancellation_notice: T ?? 0,
223
- min_booking_notice: z ?? 60,
224
- hide_additional_guests: P ?? !1,
225
- hide_cancellation_options: N ?? !1,
226
- hide_rescheduling_options: R ?? !1,
226
+ cancellation_policy: P ?? "",
227
+ available_days_in_future: S ?? 30,
228
+ min_cancellation_notice: F ?? 0,
229
+ min_booking_notice: I ?? 60,
230
+ hide_additional_guests: H ?? !1,
231
+ hide_cancellation_options: G ?? !1,
232
+ hide_rescheduling_options: j ?? !1,
227
233
  additional_fields: M,
228
- email_template: I ? {
229
- ...I,
230
- organizer_locale: Y || "en",
231
- logo: I.logo || ""
234
+ email_template: D ? {
235
+ ...D,
236
+ organizer_locale: X || "en",
237
+ logo: D.logo || ""
232
238
  } : void 0,
233
- confirmation_redirect_url: A
239
+ confirmation_redirect_url: J
234
240
  },
235
- appearance: J
236
- }, te = ge(this.selectedConfiguration, q || {}), Z = this.action === "create" ? te : q;
237
- this.isConfigRoundRobin(Z) && (Z.participants = Z.participants.map((g) => ({ ...g, is_organizer: void 0 })));
238
- const ne = (g) => {
241
+ appearance: Z
242
+ }, ae = _e(this.selectedConfiguration, Y || {}), q = this.action === "create" ? ae : Y;
243
+ this.isConfigRoundRobin(q) && (q.participants = q.participants.map((f) => ({ ...f, is_organizer: void 0 })));
244
+ const oe = (f) => {
239
245
  this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
240
246
  this.changesSaved = !1;
241
247
  }, 5e3);
242
- }, ae = this.checkForBookingFormErrors(Z), oe = ((ze = this.configurations) == null ? void 0 : ze.find((g) => {
243
- var Q;
244
- return g.id === ((Q = this.selectedConfiguration) == null ? void 0 : Q.id);
245
- })) || {}, se = this.checkForOrganizerConfirmationError(ge(Z, oe));
246
- ae || se || this.schedulerConfigChanged.emit({ config: Z, resetLoadingState: ne, action: this.action, host: this.host });
248
+ }, se = this.checkForBookingFormErrors(q), re = ((Ie = this.configurations) == null ? void 0 : Ie.find((f) => {
249
+ var ee;
250
+ return f.id === ((ee = this.selectedConfiguration) == null ? void 0 : ee.id);
251
+ })) || {}, ie = this.checkForOrganizerConfirmationError(_e(q, re));
252
+ se || ie || this.schedulerConfigChanged.emit({ config: q, resetLoadingState: oe, action: this.action, host: this.host });
247
253
  }, this.isConfigRoundRobin = (t) => {
248
- var a, o, r, s;
249
- return ((o = (a = t == null ? void 0 : t.availability) == null ? void 0 : a.availability_rules) == null ? void 0 : o.availability_method) === "max-availability" || ((s = (r = t.availability) == null ? void 0 : r.availability_rules) == null ? void 0 : s.availability_method) === "max-fairness";
254
+ var a, s, l, r;
255
+ return ((s = (a = t == null ? void 0 : t.availability) == null ? void 0 : a.availability_rules) == null ? void 0 : s.availability_method) === "max-availability" || ((r = (l = t.availability) == null ? void 0 : l.availability_rules) == null ? void 0 : r.availability_method) === "max-fairness";
250
256
  }, this.checkForOrganizerConfirmationError = (t) => {
251
- var l, i;
252
- let a = !1, o = "";
253
- const r = ((l = t.event_booking) == null ? void 0 : l.booking_type) === "organizer-confirmation", s = (i = t.scheduler) == null ? void 0 : i.organizer_confirmation_url;
254
- return r && !s && (o += "Organizer confirmation URL is required when using organizer confirmation booking type.", a = !0), a && (this.isLoading = !1, this.host.setError(new Error(o))), a;
257
+ var o, d;
258
+ let a = !1, s = "";
259
+ const l = ((o = t.event_booking) == null ? void 0 : o.booking_type) === "organizer-confirmation", r = (d = t.scheduler) == null ? void 0 : d.organizer_confirmation_url;
260
+ return l && !r && (s += "Organizer confirmation URL is required when using organizer confirmation booking type.", a = !0), a && (this.isLoading = !1, this.host.setError({
261
+ message: s,
262
+ type: v.Error,
263
+ category: w.Component,
264
+ title: "Error:"
265
+ })), a;
255
266
  }, this.checkForBookingFormErrors = (t) => {
256
- var s;
257
- let a = !1, o = "";
258
- const r = (s = t.scheduler) == null ? void 0 : s.additional_fields;
259
- return r && (o = d.t("nylasEditorTabs.bookingFormError"), Object.entries(r).forEach((l) => {
260
- const i = l[1];
261
- if (i.label === "") {
262
- o += d.t("nylasEditorTabs.bookingFormError_label", { type: i.type }), a = !0;
267
+ var r;
268
+ let a = !1, s = "";
269
+ const l = (r = t.scheduler) == null ? void 0 : r.additional_fields;
270
+ return l && (s = "", Object.entries(l).forEach((o) => {
271
+ const d = o[1];
272
+ if (d.label === "") {
273
+ s += i.t("nylasEditorTabs.bookingFormError_label", { type: d.type }), a = !0;
263
274
  return;
264
275
  }
265
- if (i.options) {
266
- for (const c of i.options)
276
+ if (d.options) {
277
+ for (const c of d.options)
267
278
  if (c.trim() === "") {
268
- o += d.t("nylasEditorTabs.bookingFormError_option", { label: i.label, type: i.type }), a = !0;
279
+ s += i.t("nylasEditorTabs.bookingFormError_option", { label: d.label, type: d.type }), a = !0;
269
280
  break;
270
281
  }
271
282
  }
272
- })), a && (this.isLoading = !1, this.host.setError(new Error(o))), a;
273
- }, this.calendars = void 0, this.selectedConfiguration = void 0, this.configurations = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.enableUserFeedback = !0, this.selectedLanguage = void 0, this.selectedEventType = void 0, this.action = "create", this.showFeedbackModal = !1, this.activeTab = u.EventInfo, this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = "";
283
+ })), a && (this.isLoading = !1, this.host.setError({
284
+ message: s,
285
+ type: v.Error,
286
+ category: w.Component,
287
+ title: i.t("nylasEditorTabs.bookingFormError")
288
+ })), a;
289
+ }, this.calendars = void 0, this.selectedConfiguration = void 0, this.configurations = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.enableUserFeedback = !0, this.selectedLanguage = void 0, this.selectedEventType = void 0, this.action = "create", this.showFeedbackModal = !1, this.activeTab = u.EventInfo, this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = {
290
+ message: "",
291
+ type: v.Error,
292
+ category: w.Component,
293
+ title: ""
294
+ };
274
295
  }
275
296
  configChangedHandler(e) {
276
297
  b("[nylas-editor-tabs]", "configChangedHandler", e, this.selectedConfiguration), this.formState = {
@@ -283,13 +304,31 @@ const We = class {
283
304
  });
284
305
  }
285
306
  selectedLanguageChangedHandler(e, t) {
286
- e !== t && (d.changeLanguage(e), this.error && (this.error = d.t("fixFormErrors")));
307
+ e !== t && (i.changeLanguage(e), this.error && this.error.message && (this.error = {
308
+ ...this.error,
309
+ message: i.t("fixFormErrors")
310
+ }, this.showErrorNotification(this.error)));
287
311
  }
288
312
  async schedulerConfigCreatedEventHandler(e) {
289
313
  return this.schedulerConfigCreated.emit(e);
290
314
  }
291
315
  async setError(e) {
292
- this.error = e.message;
316
+ var t;
317
+ this.error = {
318
+ message: e.message,
319
+ type: e.type,
320
+ category: e.category,
321
+ title: e.title || i.t("genericErrorTitle")
322
+ }, (t = this.error) != null && t.message && this.showErrorNotification(this.error);
323
+ }
324
+ async resetError() {
325
+ var e, t;
326
+ (e = this.error) != null && e.message && this.dismissNotification.emit({ id: (t = this.error) == null ? void 0 : t.message.split(" ").join("-"), host: this.host }), this.error = {
327
+ message: "",
328
+ type: v.Error,
329
+ category: w.Component,
330
+ title: ""
331
+ };
293
332
  }
294
333
  connectedCallback() {
295
334
  b("[nylas-editor-tabs]", "connectedCallback");
@@ -299,12 +338,12 @@ const We = class {
299
338
  }
300
339
  componentDidLoad() {
301
340
  var t, a;
302
- b("[nylas-editor-tabs]", "componentDidLoad"), this.enableUserFeedback && !Ae() && $e({
341
+ b("[nylas-editor-tabs]", "componentDidLoad"), this.enableUserFeedback && !Je() && Ve({
303
342
  dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
304
- release: "2.0.0",
305
- integrations: (o) => [
306
- ...o.filter((r) => !1),
307
- Ze({
343
+ release: "2.0.1",
344
+ integrations: (s) => [
345
+ ...s.filter((l) => !1),
346
+ qe({
308
347
  colorScheme: "system",
309
348
  autoInject: !1
310
349
  })
@@ -321,7 +360,7 @@ const We = class {
321
360
  handleValueChanged(e) {
322
361
  b("[nylas-editor-tabs]", "handleValueChanged", e);
323
362
  const { name: t, value: a } = e.detail;
324
- console.log("name", t, "value", a), this.setFormState(a, t), this.formState = { ...this.formState }, this.error = "", tt.includes(t) && (this.hasUnsavedChanges = !0), this.schedulerEditorFormUpdated.emit({
363
+ console.log("name", t, "value", a), this.setFormState(a, t), this.formState = { ...this.formState }, this.resetError(), at.includes(t) && (this.hasUnsavedChanges = !0), this.schedulerEditorFormUpdated.emit({
325
364
  value: e.detail.value,
326
365
  name: e.detail.name
327
366
  });
@@ -330,82 +369,95 @@ const We = class {
330
369
  this.showFeedbackModal = !1;
331
370
  }
332
371
  feedbackSubmittedHandler(e) {
333
- var o, r, s, l, i, c;
372
+ var s, l, r, o, d, c;
334
373
  const a = {
335
- eventId: Je("Scheduler Editor User Feedback", {
374
+ eventId: Ze("Scheduler Editor User Feedback", {
336
375
  extra: {
337
- configId: (o = this.selectedConfiguration) == null ? void 0 : o.id,
338
- slug: (r = this.selectedConfiguration) == null ? void 0 : r.slug
376
+ configId: (s = this.selectedConfiguration) == null ? void 0 : s.id,
377
+ slug: (l = this.selectedConfiguration) == null ? void 0 : l.slug
339
378
  }
340
379
  }),
341
380
  message: e.detail.feedback
342
381
  };
343
- Ve(a, {
382
+ We(a, {
344
383
  includeReplay: !0,
345
384
  captureContext: {
346
385
  tags: {
347
386
  "nylas-web-element": "nylas-scheduler-editor",
348
- "nylas-web-element-version": "2.0.0",
349
- "nylas-config-id": (s = this.selectedConfiguration) == null ? void 0 : s.id,
350
- "nylas-slug": (l = this.selectedConfiguration) == null ? void 0 : l.slug,
387
+ "nylas-web-element-version": "2.0.1",
388
+ "nylas-config-id": (r = this.selectedConfiguration) == null ? void 0 : r.id,
389
+ "nylas-slug": (o = this.selectedConfiguration) == null ? void 0 : o.slug,
351
390
  "host-url": window.location.href
352
391
  },
353
392
  extra: {
354
- configId: (i = this.selectedConfiguration) == null ? void 0 : i.id,
393
+ configId: (d = this.selectedConfiguration) == null ? void 0 : d.id,
355
394
  slug: (c = this.selectedConfiguration) == null ? void 0 : c.slug
356
395
  }
357
396
  }
358
397
  }), this.showFeedbackModal = !1;
359
398
  }
399
+ showErrorNotification(e) {
400
+ e.message && this.nylasSchedulerError.emit({
401
+ notification: {
402
+ title: e.title,
403
+ category: e.category || w.Component,
404
+ type: e.type || v.Error,
405
+ description: e.message,
406
+ id: e.message.split(" ").join("-"),
407
+ ttl: "none"
408
+ },
409
+ host: this.host
410
+ });
411
+ }
360
412
  getFormStateFromConfig(e) {
361
- var a, o, r, s, l, i, c, p, f, m, w, x, T, z, O, S, P, N, R, E, k, M, h, U, v, j, I, A, B, $, J, K, V, Y, C, G, W;
362
- let t = (a = e == null ? void 0 : e.participants) == null ? void 0 : a.find((F) => F.is_organizer);
363
- return !t && ((r = (o = e == null ? void 0 : e.availability) == null ? void 0 : o.availability_rules) == null ? void 0 : r.availability_method) !== "collective" && (t = (s = e == null ? void 0 : e.participants) == null ? void 0 : s.find((F) => {
364
- var L;
365
- return F.email === ((L = this.currentUser) == null ? void 0 : L.email);
413
+ var a, s, l, r, o, d, c, p, h, m, k, S, F, I, P, T, H, G, j, L, x, M, y, U, C, $, D, J, N, V, Z, Q, W, X, E, A, K;
414
+ let t = (a = e == null ? void 0 : e.participants) == null ? void 0 : a.find((O) => O.is_organizer);
415
+ return !t && ((l = (s = e == null ? void 0 : e.availability) == null ? void 0 : s.availability_rules) == null ? void 0 : l.availability_method) !== "collective" && (t = (r = e == null ? void 0 : e.participants) == null ? void 0 : r.find((O) => {
416
+ var B;
417
+ return O.email === ((B = this.currentUser) == null ? void 0 : B.email);
366
418
  }), t && (t.is_organizer = !0)), e != null && e.appearance && console.info("Appearance settings have been returned from the given configuration; please remember to grab them from the configSettingsLoaded event and apply them as desired."), {
367
- title: ((l = e == null ? void 0 : e.event_booking) == null ? void 0 : l.title) ?? "",
368
- description: ((i = e == null ? void 0 : e.event_booking) == null ? void 0 : i.description) ?? "",
419
+ title: ((o = e == null ? void 0 : e.event_booking) == null ? void 0 : o.title) ?? "",
420
+ description: ((d = e == null ? void 0 : e.event_booking) == null ? void 0 : d.description) ?? "",
369
421
  duration: ((p = (c = e == null ? void 0 : e.availability) == null ? void 0 : c.duration_minutes) == null ? void 0 : p.toString()) ?? "30",
370
422
  availability: {
371
- timezone: ((f = e == null ? void 0 : e.event_booking) == null ? void 0 : f.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
372
- openHours: ((w = (m = e == null ? void 0 : e.availability) == null ? void 0 : m.availability_rules) == null ? void 0 : w.default_open_hours) ?? je
423
+ timezone: ((h = e == null ? void 0 : e.event_booking) == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
424
+ openHours: ((k = (m = e == null ? void 0 : e.availability) == null ? void 0 : m.availability_rules) == null ? void 0 : k.default_open_hours) ?? $e
373
425
  },
374
- additionalFields: ((x = e == null ? void 0 : e.scheduler) == null ? void 0 : x.additional_fields) ?? {},
375
- conferencing: ((T = e == null ? void 0 : e.event_booking) == null ? void 0 : T.conferencing) ?? {},
376
- calendarIds: ((z = t == null ? void 0 : t.availability) == null ? void 0 : z.calendar_ids) ?? [],
426
+ additionalFields: ((S = e == null ? void 0 : e.scheduler) == null ? void 0 : S.additional_fields) ?? {},
427
+ conferencing: ((F = e == null ? void 0 : e.event_booking) == null ? void 0 : F.conferencing) ?? {},
428
+ calendarIds: ((I = t == null ? void 0 : t.availability) == null ? void 0 : I.calendar_ids) ?? [],
377
429
  participants: (e == null ? void 0 : e.participants) ?? [],
378
- bookingCalendar: ((O = t == null ? void 0 : t.booking) == null ? void 0 : O.calendar_id) ?? (t == null ? void 0 : t.email) ?? "",
379
- location: ((S = e == null ? void 0 : e.event_booking) == null ? void 0 : S.location) ?? "",
380
- bookingType: ((P = e == null ? void 0 : e.event_booking) == null ? void 0 : P.booking_type) ?? "booking",
381
- buffer: ((R = (N = e == null ? void 0 : e.availability) == null ? void 0 : N.availability_rules) == null ? void 0 : R.buffer) ?? { before: 0, after: 0 },
382
- cancellationPolicy: ((E = e == null ? void 0 : e.scheduler) == null ? void 0 : E.cancellation_policy) ?? "",
383
- availableDaysInFuture: ((k = e == null ? void 0 : e.scheduler) == null ? void 0 : k.available_days_in_future) ?? 30,
430
+ bookingCalendar: ((P = t == null ? void 0 : t.booking) == null ? void 0 : P.calendar_id) ?? (t == null ? void 0 : t.email) ?? "",
431
+ location: ((T = e == null ? void 0 : e.event_booking) == null ? void 0 : T.location) ?? "",
432
+ bookingType: ((H = e == null ? void 0 : e.event_booking) == null ? void 0 : H.booking_type) ?? "booking",
433
+ buffer: ((j = (G = e == null ? void 0 : e.availability) == null ? void 0 : G.availability_rules) == null ? void 0 : j.buffer) ?? { before: 0, after: 0 },
434
+ cancellationPolicy: ((L = e == null ? void 0 : e.scheduler) == null ? void 0 : L.cancellation_policy) ?? "",
435
+ availableDaysInFuture: ((x = e == null ? void 0 : e.scheduler) == null ? void 0 : x.available_days_in_future) ?? 30,
384
436
  minCancellationNotice: ((M = e == null ? void 0 : e.scheduler) == null ? void 0 : M.min_cancellation_notice) ?? 0,
385
- minBookingNotice: ((h = e == null ? void 0 : e.scheduler) == null ? void 0 : h.min_booking_notice) ?? 60,
437
+ minBookingNotice: ((y = e == null ? void 0 : e.scheduler) == null ? void 0 : y.min_booking_notice) ?? 60,
386
438
  timeslotInterval: {
387
- interval: ((U = e == null ? void 0 : e.availability) == null ? void 0 : U.interval_minutes) ?? ((v = e == null ? void 0 : e.availability) == null ? void 0 : v.duration_minutes),
388
- roundTo: (j = e == null ? void 0 : e.availability) == null ? void 0 : j.round_to
439
+ interval: ((U = e == null ? void 0 : e.availability) == null ? void 0 : U.interval_minutes) ?? ((C = e == null ? void 0 : e.availability) == null ? void 0 : C.duration_minutes),
440
+ roundTo: ($ = e == null ? void 0 : e.availability) == null ? void 0 : $.round_to
389
441
  },
390
- additionalGuestsHidden: ((I = e == null ? void 0 : e.scheduler) == null ? void 0 : I.hide_additional_guests) ?? !1,
391
- hideCancellationOptions: ((A = e == null ? void 0 : e.scheduler) == null ? void 0 : A.hide_cancellation_options) ?? !1,
392
- hideReschedulingOptions: ((B = e == null ? void 0 : e.scheduler) == null ? void 0 : B.hide_rescheduling_options) ?? !1,
393
- participantBookingCalendars: (($ = e == null ? void 0 : e.participants) == null ? void 0 : $.reduce((F, L) => {
394
- var D, q;
395
- return (D = L.booking) != null && D.calendar_id && (F[L.email] = (q = L.booking) == null ? void 0 : q.calendar_id), F;
442
+ additionalGuestsHidden: ((D = e == null ? void 0 : e.scheduler) == null ? void 0 : D.hide_additional_guests) ?? !1,
443
+ hideCancellationOptions: ((J = e == null ? void 0 : e.scheduler) == null ? void 0 : J.hide_cancellation_options) ?? !1,
444
+ hideReschedulingOptions: ((N = e == null ? void 0 : e.scheduler) == null ? void 0 : N.hide_rescheduling_options) ?? !1,
445
+ participantBookingCalendars: ((V = e == null ? void 0 : e.participants) == null ? void 0 : V.reduce((O, B) => {
446
+ var R, Y;
447
+ return (R = B.booking) != null && R.calendar_id && (O[B.email] = (Y = B.booking) == null ? void 0 : Y.calendar_id), O;
396
448
  })) ?? {},
397
- participantCalendars: ((J = e == null ? void 0 : e.participants) == null ? void 0 : J.reduce((F, L) => {
398
- var D;
399
- return F[L.email] = (D = L.availability) == null ? void 0 : D.calendar_ids, F;
449
+ participantCalendars: ((Z = e == null ? void 0 : e.participants) == null ? void 0 : Z.reduce((O, B) => {
450
+ var R;
451
+ return O[B.email] = (R = B.availability) == null ? void 0 : R.calendar_ids, O;
400
452
  }, {})) ?? {},
401
- reminders: (K = e == null ? void 0 : e.event_booking) == null ? void 0 : K.reminders,
402
- emailTemplate: (V = e == null ? void 0 : e.scheduler) == null ? void 0 : V.email_template,
403
- redirectUrl: (Y = e == null ? void 0 : e.scheduler) == null ? void 0 : Y.confirmation_redirect_url,
453
+ reminders: (Q = e == null ? void 0 : e.event_booking) == null ? void 0 : Q.reminders,
454
+ emailTemplate: (W = e == null ? void 0 : e.scheduler) == null ? void 0 : W.email_template,
455
+ redirectUrl: (X = e == null ? void 0 : e.scheduler) == null ? void 0 : X.confirmation_redirect_url,
404
456
  slug: e == null ? void 0 : e.slug,
405
457
  appearance: e == null ? void 0 : e.appearance,
406
458
  name: e == null ? void 0 : e.name,
407
- disableEmails: (C = e == null ? void 0 : e.event_booking) == null ? void 0 : C.disable_emails,
408
- organizerLocale: (W = (G = e == null ? void 0 : e.scheduler) == null ? void 0 : G.email_template) == null ? void 0 : W.organizer_locale
459
+ disableEmails: (E = e == null ? void 0 : e.event_booking) == null ? void 0 : E.disable_emails,
460
+ organizerLocale: (K = (A = e == null ? void 0 : e.scheduler) == null ? void 0 : A.email_template) == null ? void 0 : K.organizer_locale
409
461
  };
410
462
  }
411
463
  setFormState(e, t) {
@@ -478,8 +530,8 @@ const We = class {
478
530
  this.formState.emailTemplate = JSON.parse(e.toString());
479
531
  break;
480
532
  case "disable-emails": {
481
- const { disableEmails: a, organizerLocale: o } = JSON.parse(e.toString());
482
- this.formState.disableEmails = a, this.formState.organizerLocale = o;
533
+ const { disableEmails: a, organizerLocale: s } = JSON.parse(e.toString());
534
+ this.formState.disableEmails = a, this.formState.organizerLocale = s;
483
535
  break;
484
536
  }
485
537
  case "reminder-overrides":
@@ -522,20 +574,20 @@ const We = class {
522
574
  e.preventDefault(), this.showFeedbackModal = !0;
523
575
  }
524
576
  render() {
525
- var e, t;
526
- return b("[nylas-editor-tabs]", "render", this.formState), n(le, { key: "520498cc06164904f9272efc548fbbc3d6fa9436" }, n("form", { key: "345b225d6c2c4b4e9a687e4fcf6b502d4c5270fc", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (a) => this.formRef = a, noValidate: !0 }, this.mode === "app" ? n("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, n("div", { class: "tabs", part: "editor__tabs net__tabs" }, n("button", { name: u.EventInfo, class: { tab: !0, active: this.activeTab == u.EventInfo, hide: this.hideTab(u.EventInfo) }, part: "editortab__event-info net__tab-event-info", onClick: (a) => this.setActiveTab(a, u.EventInfo) }, n("calendar-info-icon", { width: "16", height: "16" }), d.t("eventInfoTab")), n("button", { name: u.Availability, class: { tab: !0, active: this.activeTab == u.Availability, hide: this.hideTab(u.Availability) }, part: "editortab__availability net__tab-availability", onClick: (a) => this.setActiveTab(a, u.Availability) }, n("calendar-patterns-icon", { width: "16", height: "16" }), d.t("availabilityTab")), n("button", { name: u.Participants, class: { tab: !0, active: this.activeTab == u.Participants, hide: this.hideTab(u.Participants) }, part: "editortab__participants net__tab-participants", onClick: (a) => this.setActiveTab(a, u.Participants) }, n("people-icon", { width: "16", height: "16" }), d.t("participantsTab")), n("button", { name: u.BookingOptions, class: { tab: !0, active: this.activeTab == u.BookingOptions, hide: this.hideTab(u.BookingOptions) }, part: "editortab__booking-options net__tab-booking-options", onClick: (a) => this.setActiveTab(a, u.BookingOptions) }, n("flow-icon", { width: "16", height: "16" }), d.t("bookingOptionsTab")), n("button", { name: u.BookingForm, class: { tab: !0, active: this.activeTab == "bookingForm", hide: this.hideTab(u.BookingForm) }, part: "editortab__booking-form net__tab-booking-form", onClick: (a) => this.setActiveTab(a, u.BookingForm) }, this.activeTab == u.BookingForm ? n("calendar-agenda-fill-icon", { width: "16", height: "16" }) : n("calendar-agenda-icon", { width: "16", height: "16" }), d.t("bookingFormTab")), n("button", { name: u.Communications, class: { tab: !0, active: this.activeTab == "communications", hide: this.hideTab(u.Communications) }, onClick: (a) => this.setActiveTab(a, u.Communications), part: "editortab__communications net__tab-communications" }, this.activeTab == u.Communications ? n("envelope-fill-icon", { width: "16", height: "16" }) : n("envelope-icon", { width: "16", height: "16" }), d.t("communicationsTab")), n("button", { name: u.PageStyles, class: { tab: !0, active: this.activeTab == "pageStyles", hide: this.hideTab(u.PageStyles) }, onClick: (a) => this.setActiveTab(a, u.PageStyles), part: "editortab__page-styles net__tab-page-styles" }, this.activeTab == u.PageStyles ? n("paintbrush-fill-icon", { width: "16", height: "16" }) : n("paintbrush-icon", { width: "16", height: "16" }), d.t("pageStylesTab"))), n("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, n(dt, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((e = this.selectedConfiguration) == null ? void 0 : e.id) ?? "new", i18next: d }))) : n("div", { class: "composable", key: (t = this.selectedConfiguration) == null ? void 0 : t.id }, n("slot", null)), n("div", { key: "338321713b0f06ea47004f0e1e15a4236819e9db", class: "footer", part: "editor__footer net__footer" }, n("div", { key: "76e1844d8c78a547c69417c13f789f9c25bb7aa1", class: "preview", part: "editor__footer-preview net__footer-preview" }, this.enableUserFeedback && n("button-component", { title: "Share your feedback", id: "report-issue", variant: "basic", onClick: (a) => this.onFeedbackClick(a) }, n("feedback-icon", null))), n("div", { key: "c0fdc46cafb3e6dabaef1a05757d03b92a120b48", class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, n("p", { key: "09c7bde4256d60ac2e161750aa2d5b0e140508d3", class: {
577
+ var e, t, a, s, l, r;
578
+ return b("[nylas-editor-tabs]", "render", this.formState), n(ce, { key: "f0b2f93d4dfabf59fa928e870e7af76570ac6336" }, n("nylas-notification", { key: "7e37ff4917cafd361b25e07e856d7b0453929eb2" }), n("form", { key: "bd3ca664b062446e6093c7a197ddcdd398fbd58c", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (o) => this.formRef = o, noValidate: !0 }, this.mode === "app" ? n("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, n("div", { class: "tabs", part: "editor__tabs net__tabs" }, n("button", { name: u.EventInfo, class: { tab: !0, active: this.activeTab == u.EventInfo, hide: this.hideTab(u.EventInfo) }, part: "editortab__event-info net__tab-event-info", onClick: (o) => this.setActiveTab(o, u.EventInfo) }, n("calendar-info-icon", { width: "16", height: "16" }), i.t("eventInfoTab")), n("button", { name: u.Availability, class: { tab: !0, active: this.activeTab == u.Availability, hide: this.hideTab(u.Availability) }, part: "editortab__availability net__tab-availability", onClick: (o) => this.setActiveTab(o, u.Availability) }, n("calendar-patterns-icon", { width: "16", height: "16" }), i.t("availabilityTab")), n("button", { name: u.Participants, class: { tab: !0, active: this.activeTab == u.Participants, hide: this.hideTab(u.Participants) }, part: "editortab__participants net__tab-participants", onClick: (o) => this.setActiveTab(o, u.Participants) }, n("people-icon", { width: "16", height: "16" }), i.t("participantsTab")), n("button", { name: u.BookingOptions, class: { tab: !0, active: this.activeTab == u.BookingOptions, hide: this.hideTab(u.BookingOptions) }, part: "editortab__booking-options net__tab-booking-options", onClick: (o) => this.setActiveTab(o, u.BookingOptions) }, n("flow-icon", { width: "16", height: "16" }), i.t("bookingOptionsTab")), n("button", { name: u.BookingForm, class: { tab: !0, active: this.activeTab == "bookingForm", hide: this.hideTab(u.BookingForm) }, part: "editortab__booking-form net__tab-booking-form", onClick: (o) => this.setActiveTab(o, u.BookingForm) }, this.activeTab == u.BookingForm ? n("calendar-agenda-fill-icon", { width: "16", height: "16" }) : n("calendar-agenda-icon", { width: "16", height: "16" }), i.t("bookingFormTab")), n("button", { name: u.Communications, class: { tab: !0, active: this.activeTab == "communications", hide: this.hideTab(u.Communications) }, onClick: (o) => this.setActiveTab(o, u.Communications), part: "editortab__communications net__tab-communications" }, this.activeTab == u.Communications ? n("envelope-fill-icon", { width: "16", height: "16" }) : n("envelope-icon", { width: "16", height: "16" }), i.t("communicationsTab")), n("button", { name: u.PageStyles, class: { tab: !0, active: this.activeTab == "pageStyles", hide: this.hideTab(u.PageStyles) }, onClick: (o) => this.setActiveTab(o, u.PageStyles), part: "editortab__page-styles net__tab-page-styles" }, this.activeTab == u.PageStyles ? n("paintbrush-fill-icon", { width: "16", height: "16" }) : n("paintbrush-icon", { width: "16", height: "16" }), i.t("pageStylesTab"))), n("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, n(pt, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((e = this.selectedConfiguration) == null ? void 0 : e.id) ?? "new", i18next: i }))) : n("div", { class: "composable", key: (t = this.selectedConfiguration) == null ? void 0 : t.id }, n("slot", null)), n("div", { key: "9e8d7e5aa02656528d7038968d0cf6032c8ed8c1", class: "footer", part: "editor__footer net__footer" }, n("div", { key: "b4222c7530033584fdb945cd006f75b3dba1afa9", class: "preview", part: "editor__footer-preview net__footer-preview" }, this.enableUserFeedback && n("button-component", { title: "Share your feedback", id: "report-issue", variant: "basic", onClick: (o) => this.onFeedbackClick(o) }, n("feedback-icon", null))), n("div", { key: "1c04acfb85e835a4335c3998422cb43d102ef2f0", class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, n("p", { key: "303c5d952f4f8e96c54d133f20fffcc77cd2a2ef", class: {
527
579
  "unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
528
580
  "saved-changes": this.changesSaved,
529
- error: this.error !== "",
530
- "error-full-width": this.error !== "" && this.action === "create"
531
- } }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved ? d.t("unsavedChangesLabel") : this.error == "" && this.changesSaved ? `${d.t("changesSavedLabel")}!` : ""), this.schedulerPreviewLink !== "" && this.action === "edit" && n("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: (a) => {
532
- a.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(re(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
533
- }, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "227d2a0f91074a802be81f12247bc5bca4245d22", type: "button", disabled: this.isLoading, clickHandler: (a) => {
534
- a.preventDefault(), this.cancelButtonClick.emit(), this.error = "";
535
- }, variant: "basic", part: "editor__footer-cancel net__footer-cancel" }, d.t("backButton")), n("button-component", { key: "65fe1b45c389c6b6d3406ab07521ea1640677778", type: "submit", disabled: this.isLoading, part: "editor__footer-cta, net__footer-cta" }, this.isLoading ? n("span", null, d.t("savingButtonText"), n("loading-icon", null), " ") : this.action === "create" ? `${d.t("createButtonText")}` : `${d.t("saveChangesButtonText")}`)))), this.showFeedbackModal && n("nylas-feedback-form", null));
581
+ error: ((a = this.error) == null ? void 0 : a.message) !== "",
582
+ "error-full-width": ((s = this.error) == null ? void 0 : s.message) !== "" && this.action === "create"
583
+ } }, ((l = this.error) == null ? void 0 : l.message) == "" && this.hasUnsavedChanges && !this.changesSaved ? i.t("unsavedChangesLabel") : ((r = this.error) == null ? void 0 : r.message) == "" && this.changesSaved ? `${i.t("changesSavedLabel")}!` : ""), this.schedulerPreviewLink !== "" && this.action === "edit" && n("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: (o) => {
584
+ o.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(le(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
585
+ }, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "ceabbc710e864739e6049334c99c8f9210824e27", type: "button", disabled: this.isLoading, clickHandler: (o) => {
586
+ o.preventDefault(), this.cancelButtonClick.emit(), this.host.resetError();
587
+ }, variant: "basic", part: "editor__footer-cancel net__footer-cancel" }, i.t("backButton")), n("button-component", { key: "890a200707328b747773e99b2f6bc07f7a1d5db9", class: { "save-changes": this.action === "edit" }, type: "submit", disabled: this.isLoading, part: "editor__footer-cta, net__footer-cta" }, this.isLoading ? n("span", null, i.t("savingButtonText"), n("loading-icon", null), " ") : this.action === "create" ? `${i.t("createButtonText")}` : `${i.t("saveChangesButtonText")}`)))), this.showFeedbackModal && n("nylas-feedback-form", null));
536
588
  }
537
589
  get host() {
538
- return de(this);
590
+ return pe(this);
539
591
  }
540
592
  static get watchers() {
541
593
  return {
@@ -545,8 +597,8 @@ const We = class {
545
597
  };
546
598
  }
547
599
  };
548
- bt([
549
- ce({
600
+ ht([
601
+ be({
550
602
  name: "nylas-editor-tabs",
551
603
  stateToProps: /* @__PURE__ */ new Map([
552
604
  ["schedulerConfig.calendars", "calendars"],
@@ -558,16 +610,21 @@ bt([
558
610
  ]),
559
611
  eventToProps: {
560
612
  schedulerConfigChanged: async (e, t) => {
561
- const { resetLoadingState: a, host: o, action: r, config: s } = e.detail, l = (i) => {
562
- const [c, p] = i;
563
- !c && p ? o.setError(p) : c && !p && r === "create" && (o.schedulerConfigCreatedEventHandler({ config: c, action: r, host: o }), t.schedulerConfigStore.set("selectedEventType", void 0)), a && a(e);
613
+ const { resetLoadingState: a, host: s, action: l, config: r } = e.detail, o = (d, c) => {
614
+ const [p, h] = d;
615
+ !p && h ? s.setError({
616
+ message: h.message || i.t("genericErrorTitle"),
617
+ type: v.Error,
618
+ category: w.Component,
619
+ title: c
620
+ }) : p && !h && l === "create" && (s.schedulerConfigCreatedEventHandler({ config: p, action: l, host: s }), t.schedulerConfigStore.set("selectedEventType", void 0)), a && a(e);
564
621
  };
565
- if (r === "edit") {
566
- const i = await t.schedulerConfig.updateConfiguration(s);
567
- l(i);
622
+ if (l === "edit") {
623
+ const d = await t.schedulerConfig.updateConfiguration(r);
624
+ o(d, i.t("nylasEditorTabs.updateConfigError"));
568
625
  } else {
569
- const i = await t.schedulerConfig.createConfiguration(s);
570
- l(i);
626
+ const d = await t.schedulerConfig.createConfiguration(r);
627
+ o(d, i.t("nylasEditorTabs.createConfigError"));
571
628
  }
572
629
  },
573
630
  cancelButtonClick: async (e, t) => {
@@ -593,27 +650,27 @@ bt([
593
650
  ]),
594
651
  fireRegisterEvent: !0
595
652
  }),
596
- ue("design:type", Function),
597
- ue("design:paramtypes", []),
598
- ue("design:returntype", void 0)
599
- ], We.prototype, "render", null);
600
- We.style = pt;
601
- var y;
653
+ ye("design:type", Function),
654
+ ye("design:paramtypes", []),
655
+ ye("design:returntype", void 0)
656
+ ], Ke.prototype, "render", null);
657
+ Ke.style = ut;
658
+ var g;
602
659
  (function(e) {
603
660
  e.BookingOptions = "bookingOptions", e.Communications = "communications", e.BookingForm = "bookingForm", e.PageStyles = "pageStyles", e.CalendarView = "calendarView";
604
- })(y || (y = {}));
605
- function ut({ id: e, formState: t, activeTab: a }, o) {
661
+ })(g || (g = {}));
662
+ function yt({ id: e, formState: t, activeTab: a }, s) {
606
663
  return n(
607
- ie,
664
+ de,
608
665
  null,
609
- a === y.CalendarView && n(
666
+ a === g.CalendarView && n(
610
667
  "div",
611
- { key: `calendar-view-${e}`, class: { hide: a !== y.CalendarView, "calendar-view": !0 } },
668
+ { key: `calendar-view-${e}`, class: { hide: a !== g.CalendarView, "calendar-view": !0 } },
612
669
  n("nylas-event-calendar", null)
613
670
  ),
614
671
  n(
615
672
  "div",
616
- { key: `booking-options-${e}`, class: { hide: a !== y.BookingOptions } },
673
+ { key: `booking-options-${e}`, class: { hide: a !== g.BookingOptions } },
617
674
  n("nylas-scheduling-method", { name: "availability-method", readOnly: !0, exportparts: "nsm, nsm__header, nsm__input-label, nsm__dropdown, nsm__dropdown-button, nsm__dropdown-content" }),
618
675
  n(
619
676
  "nylas-custom-booking-flow",
@@ -640,10 +697,10 @@ function ut({ id: e, formState: t, activeTab: a }, o) {
640
697
  ),
641
698
  n(
642
699
  "div",
643
- { key: `communications-${e}`, class: { hide: a !== y.Communications } },
700
+ { key: `communications-${e}`, class: { hide: a !== g.Communications } },
644
701
  n("nylas-disable-emails", { name: "disable-emails", exportparts: "nde, nde__toggle-label, nde_toggle-input, nde_toggle-slider" }),
645
702
  !(t != null && t.disableEmails) && n(
646
- ie,
703
+ de,
647
704
  null,
648
705
  n("nylas-confirmation-email", { name: "confirmation-email-template", exportparts: "nce, nce__tab-heading, nce__header, nce__body, nce__confirmation-email-toggle--container, nce__summary, nce__reminder-input_dropdown, nce__reminder-input_dropdown-input, nce__reminder-input_dropdown-content" }),
649
706
  n("nylas-reminder-emails", { name: "reminder-overrides", exportparts: "nre, nre__tab-heading, nre__header, nre__body, nre__confirmation-email-toggle--container, nre__summary, nrt, nrt__number-dropdown, nrt__number-dropdown-button, nrt__number-dropdown-content, nrt__period-dropdown, nrt__period-dropdown-button, nrt__period-dropdown-content, nrt__time-period-selector" })
@@ -651,121 +708,136 @@ function ut({ id: e, formState: t, activeTab: a }, o) {
651
708
  ),
652
709
  n(
653
710
  "div",
654
- { key: `page-styles-${e}`, class: { hide: a !== y.PageStyles } },
711
+ { key: `page-styles-${e}`, class: { hide: a !== g.PageStyles } },
655
712
  n("nylas-custom-event-slug", { name: "custom-event-slug", exportparts: "nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield" }),
656
713
  n("nylas-page-name", { name: "page-name", requirePageName: !0, exportparts: "npn, npn__body, npn__header, npn__drawer-toggle--container, npn__input-textfield" }),
657
- n("nylas-page-styling", { name: "page-styling", exportparts: "nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea" }, o)
714
+ n("nylas-page-styling", { name: "page-styling", exportparts: "nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea" }, s)
658
715
  ),
659
716
  n(
660
717
  "div",
661
- { key: `booking-form-${e}`, class: { hide: a !== y.BookingForm } },
718
+ { key: `booking-form-${e}`, class: { hide: a !== g.BookingForm } },
662
719
  n("nylas-booking-form-config", { name: "additional-fields", exportparts: "nbfc, nbfc__header, nbfc__add_field, nbfc__add_field-button, nbfc__add_field-content, nbfc__static_fields, nbfc__additional_fields, nbfc__form-field, nbfc__form-field-header, nbfc__form-field-content" })
663
720
  )
664
721
  );
665
722
  }
666
- const ht = '.sc-nylas-editor-tabs-group-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.scheduler-editor.sc-nylas-editor-tabs-group{display:flex;flex-direction:column;height:inherit;position:relative}.scheduler-editor.sc-nylas-editor-tabs-group div.return-to-calendar-view.sc-nylas-editor-tabs-group{display:flex;border-bottom:1px solid var(--nylas-base-200)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group{display:grid;grid-template-columns:minmax(224px, 25%) 1fr;height:auto;overflow-y:auto;min-height:calc(100% - 80px - 48px)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group{display:table-column-group;height:auto;min-height:calc(100% - 80px - 196px - 48px)}}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group{border-right:none}}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group{display:flex;align-items:center;text-align:left;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group:last-of-type{margin-bottom:0.25rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.active.sc-nylas-editor-tabs-group{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.hide.sc-nylas-editor-tabs-group{display:none}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group{max-width:692px;overflow-y:auto;overflow-x:hidden}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .hide.sc-nylas-editor-tabs-group{display:none}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .calendar-view.sc-nylas-editor-tabs-group{position:absolute;top:0;left:0;height:calc(100% - 80px);width:-webkit-fill-available;background:var(--nylas-base-0)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-info.sc-nylas-editor-tabs-group,.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-limits.sc-nylas-editor-tabs-group{width:inherit}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-info.sc-nylas-editor-tabs-group div[slot=inputs].sc-nylas-editor-tabs-group,.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-limits.sc-nylas-editor-tabs-group div[slot=inputs].sc-nylas-editor-tabs-group{display:flex;flex-direction:column;gap:1rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group h3.sc-nylas-editor-tabs-group{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group p.sc-nylas-editor-tabs-group{margin:0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.footer.sc-nylas-editor-tabs-group{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group{flex-direction:column;height:auto;z-index:2}}.footer.sc-nylas-editor-tabs-group .preview.sc-nylas-editor-tabs-group{display:flex;gap:16px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .preview.sc-nylas-editor-tabs-group{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group{display:flex;gap:16px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group{width:100%}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group button-component[title=Preview].sc-nylas-editor-tabs-group{width:48px}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.sc-nylas-editor-tabs-group{max-width:524px}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.unsaved-changes.sc-nylas-editor-tabs-group{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.saved-changes.sc-nylas-editor-tabs-group{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.error.sc-nylas-editor-tabs-group{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.error-full-width.sc-nylas-editor-tabs-group{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button-component.sc-nylas-editor-tabs-group{width:100%}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group span.sc-nylas-editor-tabs-group{display:flex;align-items:center;justify-content:center;gap:0.5rem}button-component#report-issue.sc-nylas-editor-tabs-group{width:auto}nylas-feedback-form.sc-nylas-editor-tabs-group{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}', yt = ht;
667
- var ft = function(e, t, a, o) {
668
- var r = arguments.length, s = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, a) : o, l;
723
+ const gt = '.sc-nylas-editor-tabs-group-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.scheduler-editor.sc-nylas-editor-tabs-group{display:flex;flex-direction:column;height:inherit;position:relative}.scheduler-editor.sc-nylas-editor-tabs-group div.return-to-calendar-view.sc-nylas-editor-tabs-group{display:flex;border-bottom:1px solid var(--nylas-base-200)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group{display:grid;grid-template-columns:minmax(224px, 25%) 1fr;height:auto;overflow-y:auto;min-height:calc(100% - 80px - 48px)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group{display:table-column-group;height:auto;min-height:calc(100% - 80px - 196px - 48px)}}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group{border-right:none}}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group{display:flex;align-items:center;text-align:left;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group:last-of-type{margin-bottom:0.25rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.active.sc-nylas-editor-tabs-group{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.hide.sc-nylas-editor-tabs-group{display:none}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group{max-width:692px;overflow-y:auto;overflow-x:hidden}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .hide.sc-nylas-editor-tabs-group{display:none}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .calendar-view.sc-nylas-editor-tabs-group{position:absolute;top:0;left:0;height:calc(100% - 80px);width:-webkit-fill-available;background:var(--nylas-base-0)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-info.sc-nylas-editor-tabs-group,.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-limits.sc-nylas-editor-tabs-group{width:inherit}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-info.sc-nylas-editor-tabs-group div[slot=inputs].sc-nylas-editor-tabs-group,.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-limits.sc-nylas-editor-tabs-group div[slot=inputs].sc-nylas-editor-tabs-group{display:flex;flex-direction:column;gap:1rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group h3.sc-nylas-editor-tabs-group{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group p.sc-nylas-editor-tabs-group{margin:0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.footer.sc-nylas-editor-tabs-group{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group{flex-direction:column;height:auto;z-index:2}}.footer.sc-nylas-editor-tabs-group .preview.sc-nylas-editor-tabs-group{display:flex;gap:16px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .preview.sc-nylas-editor-tabs-group{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs-group .preview.sc-nylas-editor-tabs-group button-component.page-settings-button.sc-nylas-editor-tabs-group{min-width:140px}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group{display:flex;gap:16px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group{width:100%}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group button-component[title=Preview].sc-nylas-editor-tabs-group{width:48px}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.sc-nylas-editor-tabs-group{max-width:524px}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.unsaved-changes.sc-nylas-editor-tabs-group{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.saved-changes.sc-nylas-editor-tabs-group{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.error.sc-nylas-editor-tabs-group{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.error-full-width.sc-nylas-editor-tabs-group{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button-component.sc-nylas-editor-tabs-group{width:100%}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group span.sc-nylas-editor-tabs-group{display:flex;align-items:center;justify-content:center;gap:0.5rem}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button-component.save-changes.sc-nylas-editor-tabs-group{min-width:140px}button-component#report-issue.sc-nylas-editor-tabs-group{width:auto}nylas-feedback-form.sc-nylas-editor-tabs-group{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}', ft = gt;
724
+ var mt = function(e, t, a, s) {
725
+ var l = arguments.length, r = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, o;
669
726
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
670
- s = Reflect.decorate(e, t, a, o);
727
+ r = Reflect.decorate(e, t, a, s);
671
728
  else
672
- for (var i = e.length - 1; i >= 0; i--)
673
- (l = e[i]) && (s = (r < 3 ? l(s) : r > 3 ? l(t, a, s) : l(t, a)) || s);
674
- return r > 3 && s && Object.defineProperty(t, a, s), s;
675
- }, he = function(e, t) {
729
+ for (var d = e.length - 1; d >= 0; d--)
730
+ (o = e[d]) && (r = (l < 3 ? o(r) : l > 3 ? o(t, a, r) : o(t, a)) || r);
731
+ return l > 3 && r && Object.defineProperty(t, a, r), r;
732
+ }, ge = function(e, t) {
676
733
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
677
734
  return Reflect.metadata(e, t);
678
735
  };
679
- const qe = class {
736
+ const Ye = class {
680
737
  constructor(e) {
681
- X(this, e), this.schedulerConfigChanged = _(this, "schedulerConfigChanged", 7), this.schedulerConfigCreated = _(this, "schedulerConfigCreated", 7), this.cancelButtonClick = _(this, "cancelButtonClick", 7), this.formSubmitted = _(this, "formSubmitted", 7), this.previewButtonClicked = _(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = _(this, "schedulerEditorFormUpdated", 7), this.groupEventCreateTriggered = _(this, "groupEventCreateTriggered", 7), this.groupEventUpdateTriggered = _(this, "groupEventUpdateTriggered", 7), this.groupEventDeleteTriggered = _(this, "groupEventDeleteTriggered", 7), this.groupEventImportTriggered = _(this, "groupEventImportTriggered", 7), this.saveGroupEventChangesError = _(this, "saveGroupEventChangesError", 7), this.formSubmissionHandler = async (t) => {
682
- var G, W, F, L, D, q, te, Z, ne, ae, oe;
738
+ te(this, e), this.schedulerConfigChanged = _(this, "schedulerConfigChanged", 7), this.schedulerConfigCreated = _(this, "schedulerConfigCreated", 7), this.cancelButtonClick = _(this, "cancelButtonClick", 7), this.formSubmitted = _(this, "formSubmitted", 7), this.previewButtonClicked = _(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = _(this, "schedulerEditorFormUpdated", 7), this.groupEventCreateTriggered = _(this, "groupEventCreateTriggered", 7), this.groupEventUpdateTriggered = _(this, "groupEventUpdateTriggered", 7), this.groupEventDeleteTriggered = _(this, "groupEventDeleteTriggered", 7), this.groupEventImportTriggered = _(this, "groupEventImportTriggered", 7), this.saveGroupEventChangesError = _(this, "saveGroupEventChangesError", 7), this.nylasSchedulerError = _(this, "nylasSchedulerError", 6), this.dismissNotification = _(this, "dismissNotification", 6), this.formSubmissionHandler = async (t) => {
739
+ var A, K, O, B, R, Y, ae, q, oe, se, re;
683
740
  t.preventDefault();
684
741
  const a = await this.formSubmitted.emit();
685
742
  if (b("[nylas-editor-tabs-group]", "formSubmissionHandler", a), !this.formRef.checkValidity() || a.defaultPrevented) {
686
- this.error = this.formRef.validationMessage || "Please fix the form errors.";
743
+ await this.host.setError({
744
+ message: this.formRef.validationMessage || i.t("fixFormErrors"),
745
+ type: v.Error,
746
+ category: w.Component,
747
+ title: i.t("nylasEditorTabs.formErrorTitle")
748
+ });
687
749
  return;
688
750
  }
689
751
  this.isLoading = !0, this.hasUnsavedChanges = !1;
690
- const r = this.updateFormState();
691
- b("[nylas-editor-tabs-group]", "formState", r);
692
- const { title: s, description: l, bookingCalendar: i, location: c, bookingType: p, minCancellationNotice: f, minBookingNotice: m, cancellationPolicy: w, hideCancellationOptions: x, hideReschedulingOptions: T, additionalFields: z, conferencing: O, reminders: S, emailTemplate: P, redirectUrl: N, slug: R, appearance: E, name: k, eventCapacity: M, eventTimeslot: h, participants: U, disableEmails: v, organizerLocale: j } = r, I = {
693
- ...((G = this.selectedConfiguration) == null ? void 0 : G.id) && { id: this.selectedConfiguration.id },
694
- slug: R,
695
- name: k,
696
- type: this.selectedEventType === H.group ? H.group : void 0,
752
+ const l = this.updateFormState();
753
+ b("[nylas-editor-tabs-group]", "formState", l);
754
+ const { title: r, description: o, bookingCalendar: d, location: c, bookingType: p, minCancellationNotice: h, minBookingNotice: m, cancellationPolicy: k, hideCancellationOptions: S, hideReschedulingOptions: F, additionalFields: I, conferencing: P, reminders: T, emailTemplate: H, redirectUrl: G, slug: j, appearance: L, name: x, eventCapacity: M, eventTimeslot: y, participants: U, disableEmails: C, organizerLocale: $ } = l, D = {
755
+ ...((A = this.selectedConfiguration) == null ? void 0 : A.id) && { id: this.selectedConfiguration.id },
756
+ slug: j,
757
+ name: x,
758
+ type: this.selectedEventType === z.group ? z.group : void 0,
697
759
  scheduler: {
698
- cancellation_policy: w ?? "",
699
- min_cancellation_notice: f ?? 0,
760
+ cancellation_policy: k ?? "",
761
+ min_cancellation_notice: h ?? 0,
700
762
  min_booking_notice: m ?? 60,
701
- hide_cancellation_options: x ?? !1,
702
- hide_rescheduling_options: T ?? !1,
703
- additional_fields: z,
704
- email_template: P ? {
705
- ...P,
706
- organizer_locale: j || "en",
707
- logo: P.logo || ""
763
+ hide_cancellation_options: S ?? !1,
764
+ hide_rescheduling_options: F ?? !1,
765
+ additional_fields: I,
766
+ email_template: H ? {
767
+ ...H,
768
+ organizer_locale: $ || "en",
769
+ logo: H.logo || ""
708
770
  } : void 0,
709
- confirmation_redirect_url: N
771
+ confirmation_redirect_url: G
710
772
  },
711
- appearance: E,
773
+ appearance: L,
712
774
  group_booking: {
713
775
  booking_type: p || "booking",
714
- disable_emails: typeof v == "boolean" ? v : !1,
715
- reminders: S,
716
- conferencing: O,
717
- calendar_id: i || "primary",
776
+ disable_emails: typeof C == "boolean" ? C : !1,
777
+ reminders: T,
778
+ conferencing: P,
779
+ calendar_id: d || "primary",
718
780
  default_capacity: M || 10
719
781
  }
720
- }, A = ge(this.selectedConfiguration, I || {}), B = this.action === "create" ? A : I;
721
- delete B.availability, delete B.participants, delete B.event_booking;
722
- const $ = (se) => {
782
+ }, J = _e(this.selectedConfiguration, D || {}), N = this.action === "create" ? J : D;
783
+ delete N.availability, delete N.participants, delete N.event_booking;
784
+ const V = (ie) => {
723
785
  this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
724
786
  this.changesSaved = !1;
725
787
  }, 3e3);
726
788
  };
727
- if (this.checkForBookingFormErrors(B))
789
+ if (this.checkForBookingFormErrors(N))
728
790
  return;
729
- const K = {
730
- name: ((W = this.currentUser) == null ? void 0 : W.name) ?? ((F = this.currentUser) == null ? void 0 : F.email) ?? "",
731
- email: ((L = this.currentUser) == null ? void 0 : L.email) ?? ""
732
- }, V = ((D = this.calendars) == null ? void 0 : D.find((se) => se.is_primary)) ?? ((q = this.calendars) == null ? void 0 : q[0]), Y = [{ ...K, is_organizer: !0 }], C = (te = this.selectedConfiguration) != null && te.id ? void 0 : {
733
- title: s,
734
- description: l,
735
- location: O ? void 0 : c,
736
- conferencing: c ? void 0 : O,
791
+ const Q = {
792
+ name: ((K = this.currentUser) == null ? void 0 : K.name) ?? ((O = this.currentUser) == null ? void 0 : O.email) ?? "",
793
+ email: ((B = this.currentUser) == null ? void 0 : B.email) ?? ""
794
+ }, W = ((R = this.calendars) == null ? void 0 : R.find((ie) => ie.is_primary)) ?? ((Y = this.calendars) == null ? void 0 : Y[0]), X = [{ ...Q, is_organizer: !0 }], E = (ae = this.selectedConfiguration) != null && ae.id ? void 0 : {
795
+ title: r,
796
+ description: o,
797
+ location: P ? void 0 : c,
798
+ conferencing: c ? void 0 : P,
737
799
  when: {
738
- start_time: ((Z = h == null ? void 0 : h.when) == null ? void 0 : Z.start_time) ?? 0,
739
- end_time: ((ne = h == null ? void 0 : h.when) == null ? void 0 : ne.end_time) ?? 0,
740
- start_timezone: ((ae = h == null ? void 0 : h.when) == null ? void 0 : ae.start_timezone) ?? "",
741
- end_timezone: ((oe = h == null ? void 0 : h.when) == null ? void 0 : oe.end_timezone) ?? ""
800
+ start_time: ((q = y == null ? void 0 : y.when) == null ? void 0 : q.start_time) ?? 0,
801
+ end_time: ((oe = y == null ? void 0 : y.when) == null ? void 0 : oe.end_time) ?? 0,
802
+ start_timezone: ((se = y == null ? void 0 : y.when) == null ? void 0 : se.start_timezone) ?? "",
803
+ end_timezone: ((re = y == null ? void 0 : y.when) == null ? void 0 : re.end_timezone) ?? ""
742
804
  },
743
- recurrence: (h == null ? void 0 : h.recurrence) ?? [],
744
- calendar_id: i || (V == null ? void 0 : V.id) || "primary",
745
- participants: U != null && U.length ? U : Y,
746
- organizer: K,
805
+ recurrence: (y == null ? void 0 : y.recurrence) ?? [],
806
+ calendar_id: d || (W == null ? void 0 : W.id) || "primary",
807
+ participants: U != null && U.length ? U : X,
808
+ organizer: Q,
747
809
  capacity: M || 10
748
810
  };
749
- this.schedulerConfigChanged.emit({ groupEvent: C || void 0, config: B, resetLoadingState: $, action: this.action, host: this.host });
811
+ this.schedulerConfigChanged.emit({ groupEvent: E || void 0, config: N, resetLoadingState: V, action: this.action, host: this.host });
750
812
  }, this.checkForBookingFormErrors = (t) => {
751
- var s;
752
- let a = !1, o = "";
753
- const r = (s = t.scheduler) == null ? void 0 : s.additional_fields;
754
- return r && (o = d.t("nylasEditorTabs.bookingFormError"), Object.entries(r).forEach((l) => {
755
- const i = l[1];
756
- if (i.label === "") {
757
- o += d.t("nylasEditorTabs.bookingFormError_label", { type: i.type }), a = !0;
813
+ var r;
814
+ let a = !1, s = "";
815
+ const l = (r = t.scheduler) == null ? void 0 : r.additional_fields;
816
+ return l && (s = "", Object.entries(l).forEach((o) => {
817
+ const d = o[1];
818
+ if (d.label === "") {
819
+ s += i.t("nylasEditorTabs.bookingFormError_label", { type: d.type }), a = !0;
758
820
  return;
759
821
  }
760
- if (i.options) {
761
- for (const c of i.options)
822
+ if (d.options) {
823
+ for (const c of d.options)
762
824
  if (c.trim() === "") {
763
- o += d.t("nylasEditorTabs.bookingFormError_option", { label: i.label, type: i.type }), a = !0;
825
+ s += i.t("nylasEditorTabs.bookingFormError_option", { label: d.label, type: d.type }), a = !0;
764
826
  break;
765
827
  }
766
828
  }
767
- })), a && (this.isLoading = !1, this.host.setError(new Error(o))), a;
768
- }, this.calendars = void 0, this.selectedConfiguration = void 0, this.configurations = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.enableUserFeedback = !0, this.selectedLanguage = void 0, this.selectedEventType = void 0, this.selectedGroupEvent = void 0, this.action = "create", this.showFeedbackModal = !1, this.activeTab = y.CalendarView, this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = "";
829
+ })), a && (this.isLoading = !1, this.host.setError({
830
+ message: s,
831
+ type: v.Error,
832
+ category: w.Component,
833
+ title: i.t("nylasEditorTabs.bookingFormError")
834
+ })), a;
835
+ }, this.calendars = void 0, this.selectedConfiguration = void 0, this.configurations = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.enableUserFeedback = !0, this.selectedLanguage = void 0, this.selectedEventType = void 0, this.selectedGroupEvent = void 0, this.action = "create", this.showFeedbackModal = !1, this.activeTab = g.CalendarView, this.isLoading = !1, this.componentLoaded = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = {
836
+ message: "",
837
+ type: v.Error,
838
+ category: w.Component,
839
+ title: ""
840
+ };
769
841
  }
770
842
  configChangedHandler(e) {
771
843
  b("[nylas-editor-tabs-group]", "configChangedHandler", e, this.selectedConfiguration), this.formState = {
@@ -773,27 +845,27 @@ const qe = class {
773
845
  }, e != null && e.id ? this.action = "edit" : this.action = "create";
774
846
  }
775
847
  selectedGroupEventChangedHandler(e) {
776
- var t, a, o, r, s, l, i, c, p, f, m, w, x, T, z, O, S, P, N, R, E, k, M, h, U, v, j, I, A, B, $;
848
+ var t, a, s, l, r, o, d, c, p, h, m, k, S, F, I, P, T, H, G, j, L, x, M, y, U, C, $, D, J, N, V;
777
849
  b("[nylas-editor-tabs-group]", "selectedGroupEventChangedHandler", e, this.selectedConfiguration), this.formState = {
778
850
  ...this.formState,
779
851
  title: (a = (t = this.selectedGroupEvent) == null ? void 0 : t.event) == null ? void 0 : a.title,
780
- description: (r = (o = this.selectedGroupEvent) == null ? void 0 : o.event) == null ? void 0 : r.description,
781
- location: (l = (s = this.selectedGroupEvent) == null ? void 0 : s.event) == null ? void 0 : l.location,
782
- conferencing: (c = (i = this.selectedGroupEvent) == null ? void 0 : i.event) == null ? void 0 : c.conferencing,
783
- eventCapacity: (f = (p = this.selectedGroupEvent) == null ? void 0 : p.group_event_info) == null ? void 0 : f.capacity,
784
- participants: (x = (w = (m = this.selectedGroupEvent) == null ? void 0 : m.group_event_info) == null ? void 0 : w.participants) == null ? void 0 : x.map((J) => ({
785
- name: J.name,
786
- email: J.email,
787
- is_organizer: !!J.is_organizer
852
+ description: (l = (s = this.selectedGroupEvent) == null ? void 0 : s.event) == null ? void 0 : l.description,
853
+ location: (o = (r = this.selectedGroupEvent) == null ? void 0 : r.event) == null ? void 0 : o.location,
854
+ conferencing: (c = (d = this.selectedGroupEvent) == null ? void 0 : d.event) == null ? void 0 : c.conferencing,
855
+ eventCapacity: (h = (p = this.selectedGroupEvent) == null ? void 0 : p.group_event_info) == null ? void 0 : h.capacity,
856
+ participants: (S = (k = (m = this.selectedGroupEvent) == null ? void 0 : m.group_event_info) == null ? void 0 : k.participants) == null ? void 0 : S.map((Z) => ({
857
+ name: Z.name,
858
+ email: Z.email,
859
+ is_organizer: !!Z.is_organizer
788
860
  })),
789
- eventTimeslot: (z = (T = this.selectedGroupEvent) == null ? void 0 : T.event) != null && z.when ? {
861
+ eventTimeslot: (I = (F = this.selectedGroupEvent) == null ? void 0 : F.event) != null && I.when ? {
790
862
  when: {
791
- start_time: (P = (S = (O = this.selectedGroupEvent) == null ? void 0 : O.event) == null ? void 0 : S.when) == null ? void 0 : P.start_time,
792
- end_time: (E = (R = (N = this.selectedGroupEvent) == null ? void 0 : N.event) == null ? void 0 : R.when) == null ? void 0 : E.end_time,
793
- start_timezone: (h = (M = (k = this.selectedGroupEvent) == null ? void 0 : k.event) == null ? void 0 : M.when) == null ? void 0 : h.start_timezone,
794
- end_timezone: (j = (v = (U = this.selectedGroupEvent) == null ? void 0 : U.event) == null ? void 0 : v.when) == null ? void 0 : j.end_timezone
863
+ start_time: (H = (T = (P = this.selectedGroupEvent) == null ? void 0 : P.event) == null ? void 0 : T.when) == null ? void 0 : H.start_time,
864
+ end_time: (L = (j = (G = this.selectedGroupEvent) == null ? void 0 : G.event) == null ? void 0 : j.when) == null ? void 0 : L.end_time,
865
+ start_timezone: (y = (M = (x = this.selectedGroupEvent) == null ? void 0 : x.event) == null ? void 0 : M.when) == null ? void 0 : y.start_timezone,
866
+ end_timezone: ($ = (C = (U = this.selectedGroupEvent) == null ? void 0 : U.event) == null ? void 0 : C.when) == null ? void 0 : $.end_timezone
795
867
  },
796
- recurrence: (A = (I = this.selectedGroupEvent) == null ? void 0 : I.group_event_info) != null && A.rrule ? ($ = (B = this.selectedGroupEvent) == null ? void 0 : B.group_event_info) == null ? void 0 : $.rrule : []
868
+ recurrence: (J = (D = this.selectedGroupEvent) == null ? void 0 : D.group_event_info) != null && J.rrule ? (V = (N = this.selectedGroupEvent) == null ? void 0 : N.group_event_info) == null ? void 0 : V.rrule : []
797
869
  } : void 0
798
870
  };
799
871
  }
@@ -803,16 +875,31 @@ const qe = class {
803
875
  });
804
876
  }
805
877
  selectedLanguageChangedHandler(e, t) {
806
- e !== t && d.changeLanguage(e);
878
+ e !== t && (i.changeLanguage(e), this.error && this.error.message && (this.error = {
879
+ ...this.error,
880
+ message: i.t("fixFormErrors")
881
+ }, this.showErrorNotification(this.error)));
807
882
  }
808
883
  async schedulerConfigCreatedEventHandler(e) {
809
884
  return this.schedulerConfigCreated.emit(e);
810
885
  }
811
886
  async setError(e) {
812
- this.error = e.message;
887
+ var t;
888
+ this.error = {
889
+ message: e.message,
890
+ type: e.type,
891
+ category: e.category,
892
+ title: e.title || i.t("genericErrorTitle")
893
+ }, (t = this.error) != null && t.message && this.showErrorNotification(this.error);
813
894
  }
814
895
  async resetError() {
815
- this.error = "";
896
+ var e, t;
897
+ (e = this.error) != null && e.message && this.dismissNotification.emit({ id: (t = this.error) == null ? void 0 : t.message.split(" ").join("-"), host: this.host }), this.error = {
898
+ message: "",
899
+ type: v.Error,
900
+ category: w.Component,
901
+ title: ""
902
+ };
816
903
  }
817
904
  connectedCallback() {
818
905
  b("[nylas-editor-tabs-group]", "connectedCallback");
@@ -821,13 +908,13 @@ const qe = class {
821
908
  b("[nylas-editor-tabs-group]", "componentWillLoad"), this.formState = this.getFormStateFromConfig(this.selectedConfiguration);
822
909
  }
823
910
  componentDidLoad() {
824
- var t, a, o;
825
- b("[nylas-editor-tabs-group]", "componentDidLoad"), this.enableUserFeedback && !Ae() && $e({
911
+ var t, a, s;
912
+ b("[nylas-editor-tabs-group]", "componentDidLoad"), this.enableUserFeedback && !Je() && Ve({
826
913
  dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
827
- release: "2.0.0",
828
- integrations: (r) => [
829
- ...r.filter((s) => !1),
830
- Ze({
914
+ release: "2.0.1",
915
+ integrations: (l) => [
916
+ ...l.filter((r) => !1),
917
+ qe({
831
918
  colorScheme: "system",
832
919
  autoInject: !1
833
920
  })
@@ -836,7 +923,7 @@ const qe = class {
836
923
  beforeSend: () => null
837
924
  }), (t = this.selectedConfiguration) != null && t.id && this.configChangedHandler(this.selectedConfiguration);
838
925
  const e = (a = this.host.querySelector("button.tab:not(.hide)")) == null ? void 0 : a.name;
839
- e && ((o = this.hideEditorTabs) != null && o.includes(this.activeTab)) && (this.activeTab = e), this.updateFormState();
926
+ e && ((s = this.hideEditorTabs) != null && s.includes(this.activeTab)) && (this.activeTab = e), this.updateFormState(), this.componentLoaded = !0;
840
927
  }
841
928
  disconnectedCallback() {
842
929
  b("[nylas-editor-tabs-group]", "disconnectedCallback");
@@ -844,7 +931,7 @@ const qe = class {
844
931
  handleValueChanged(e) {
845
932
  b("[nylas-editor-tabs-group]", "handleValueChanged", e);
846
933
  const { name: t, value: a } = e.detail;
847
- console.log("name", t, "value", a), this.setFormState(a, t), this.formState = { ...this.formState }, nt.includes(t) && (this.hasUnsavedChanges = !0), this.error = "", this.schedulerEditorFormUpdated.emit({
934
+ console.log("name", t, "value", a), this.setFormState(a, t), this.formState = { ...this.formState }, ot.includes(t) && (this.hasUnsavedChanges = !0), this.host.resetError(), this.schedulerEditorFormUpdated.emit({
848
935
  value: e.detail.value,
849
936
  name: e.detail.name
850
937
  });
@@ -853,21 +940,21 @@ const qe = class {
853
940
  this.showFeedbackModal = !1;
854
941
  }
855
942
  feedbackSubmittedHandler(e) {
856
- var o, r;
943
+ var s, l;
857
944
  const a = {
858
- eventId: Je("Scheduler Editor User Feedback"),
945
+ eventId: Ze("Scheduler Editor User Feedback"),
859
946
  message: e.detail.feedback
860
947
  };
861
- Ve(a, {
948
+ We(a, {
862
949
  includeReplay: !0,
863
950
  captureContext: {
864
951
  tags: {
865
952
  "nylas-web-element": "nylas-scheduler-editor",
866
- "nylas-web-element-version": "2.0.0"
953
+ "nylas-web-element-version": "2.0.1"
867
954
  },
868
955
  extra: {
869
- configId: (o = this.selectedConfiguration) == null ? void 0 : o.id,
870
- slug: (r = this.selectedConfiguration) == null ? void 0 : r.slug
956
+ configId: (s = this.selectedConfiguration) == null ? void 0 : s.id,
957
+ slug: (l = this.selectedConfiguration) == null ? void 0 : l.slug
871
958
  }
872
959
  }
873
960
  }), this.showFeedbackModal = !1;
@@ -877,13 +964,33 @@ const qe = class {
877
964
  this.groupEventImportTriggered.emit({ groupEvent: e.detail, configId: ((t = this.selectedConfiguration) == null ? void 0 : t.id) ?? "", host: this.host });
878
965
  }
879
966
  saveGroupEventChangesHandler(e) {
880
- var o, r, s, l, i, c, p;
967
+ var s, l, r, o, d, c, p, h, m;
881
968
  b("saveGroupEventChangesHandler", e.detail, this.selectedGroupEvent);
882
969
  const t = this.formRef.checkValidity(), a = this.getGroupEventDetailsFromFormState();
883
- if (this.resetError(), a.title || this.setError(new Error("Event title is required.")), (!((o = a.when) != null && o.start_time) || !((r = a.when) != null && r.end_time)) && this.setError(new Error("Event time is required.")), (s = a.participants) != null && s.length || this.setError(new Error("Participants are required.")), (l = a.participants) != null && l.length && ((i = a.participants) != null && i.some((f) => !f.email)) && this.setError(new Error("Participant email is required.")), this.error !== "" || !t) {
970
+ if (this.resetError(), a.title || this.setError({
971
+ message: i.t("nylasEditorTabsGroup.eventTitleRequired"),
972
+ type: v.Error,
973
+ category: w.Component,
974
+ title: i.t("nylasEditorTabs.formErrorTitle")
975
+ }), (!((s = a.when) != null && s.start_time) || !((l = a.when) != null && l.end_time)) && this.setError({
976
+ message: i.t("nylasEditorTabsGroup.eventTimeRequired"),
977
+ type: v.Error,
978
+ category: w.Component,
979
+ title: i.t("nylasEditorTabs.formErrorTitle")
980
+ }), (r = a.participants) != null && r.length || this.setError({
981
+ message: i.t("nylasEditorTabsGroup.participantsRequired"),
982
+ type: v.Error,
983
+ category: w.Component,
984
+ title: i.t("nylasEditorTabs.formErrorTitle")
985
+ }), (o = a.participants) != null && o.length && ((d = a.participants) != null && d.some((k) => !k.email)) && this.setError({
986
+ message: i.t("nylasEditorTabsGroup.participantEmailRequired"),
987
+ type: v.Error,
988
+ category: w.Component,
989
+ title: i.t("nylasEditorTabs.formErrorTitle")
990
+ }), ((c = this.error) == null ? void 0 : c.message) !== "" || !t) {
884
991
  this.saveGroupEventChangesError.emit({
885
- error: this.error ?? "An error occurred while saving changes.",
886
- configId: ((c = this.selectedConfiguration) == null ? void 0 : c.id) ?? "",
992
+ error: ((p = this.error) == null ? void 0 : p.message) ?? i.t("nylasEditorTabsGroup.errorOccured"),
993
+ configId: ((h = this.selectedConfiguration) == null ? void 0 : h.id) ?? "",
887
994
  host: this.host
888
995
  });
889
996
  return;
@@ -891,7 +998,7 @@ const qe = class {
891
998
  this.groupEventUpdateTriggered.emit({
892
999
  groupEvent: a,
893
1000
  chosenOption: e.detail.action,
894
- configId: ((p = this.selectedConfiguration) == null ? void 0 : p.id) ?? "",
1001
+ configId: ((m = this.selectedConfiguration) == null ? void 0 : m.id) ?? "",
895
1002
  host: this.host
896
1003
  });
897
1004
  }
@@ -907,67 +1014,80 @@ const qe = class {
907
1014
  });
908
1015
  }
909
1016
  createGroupEventHandler(e) {
910
- var l, i, c, p, f, m, w;
1017
+ var o, d, c, p, h, m, k;
911
1018
  const t = e.detail, a = {
912
- name: ((l = this.currentUser) == null ? void 0 : l.name) ?? ((i = this.currentUser) == null ? void 0 : i.email) ?? "",
1019
+ name: ((o = this.currentUser) == null ? void 0 : o.name) ?? ((d = this.currentUser) == null ? void 0 : d.email) ?? "",
913
1020
  email: ((c = this.currentUser) == null ? void 0 : c.email) ?? ""
914
- }, o = ((p = this.calendars) == null ? void 0 : p.find((x) => x.is_primary)) ?? ((f = this.calendars) == null ? void 0 : f[0]), r = ((m = this.formState) == null ? void 0 : m.conferencing) || t.conferencing, s = {
1021
+ }, s = ((p = this.calendars) == null ? void 0 : p.find((S) => S.is_primary)) ?? ((h = this.calendars) == null ? void 0 : h[0]), l = ((m = this.formState) == null ? void 0 : m.conferencing) || t.conferencing, r = {
915
1022
  title: t.title,
916
1023
  description: t.description,
917
- location: r ? void 0 : t.location,
1024
+ location: l ? void 0 : t.location,
918
1025
  participants: t.participants,
919
1026
  organizer: a,
920
- conferencing: t.location ? {} : r,
1027
+ conferencing: t.location ? {} : l,
921
1028
  when: t.eventTimeslot.when,
922
1029
  recurrence: t.eventTimeslot.recurrence,
923
- calendar_id: (o == null ? void 0 : o.id) || "primary",
1030
+ calendar_id: (s == null ? void 0 : s.id) || "primary",
924
1031
  capacity: t.eventCapacity
925
1032
  };
926
- this.groupEventCreateTriggered.emit({ groupEvent: s, configId: ((w = this.selectedConfiguration) == null ? void 0 : w.id) ?? "", host: this.host });
1033
+ this.groupEventCreateTriggered.emit({ groupEvent: r, configId: ((k = this.selectedConfiguration) == null ? void 0 : k.id) ?? "", host: this.host });
1034
+ }
1035
+ showErrorNotification(e) {
1036
+ this.nylasSchedulerError.emit({
1037
+ notification: {
1038
+ title: e.title,
1039
+ category: e.category || w.Component,
1040
+ type: e.type || v.Error,
1041
+ description: e.message,
1042
+ id: e.message.split(" ").join("-"),
1043
+ ttl: "none"
1044
+ },
1045
+ host: this.host
1046
+ });
927
1047
  }
928
1048
  getGroupEventDetailsFromFormState() {
929
- var m, w, x, T, z, O, S, P, N;
930
- const e = ((m = this.calendars) == null ? void 0 : m.find((R) => R.is_primary)) ?? ((w = this.calendars) == null ? void 0 : w[0]), t = {
931
- name: ((x = this.currentUser) == null ? void 0 : x.name) ?? ((T = this.currentUser) == null ? void 0 : T.email) ?? "",
932
- email: ((z = this.currentUser) == null ? void 0 : z.email) ?? ""
933
- }, a = [{ ...t, is_organizer: !0 }], { title: o, description: r, bookingCalendar: s, location: l, conferencing: i, eventCapacity: c, eventTimeslot: p, participants: f } = this.formState;
1049
+ var m, k, S, F, I, P, T, H, G;
1050
+ const e = ((m = this.calendars) == null ? void 0 : m.find((j) => j.is_primary)) ?? ((k = this.calendars) == null ? void 0 : k[0]), t = {
1051
+ name: ((S = this.currentUser) == null ? void 0 : S.name) ?? ((F = this.currentUser) == null ? void 0 : F.email) ?? "",
1052
+ email: ((I = this.currentUser) == null ? void 0 : I.email) ?? ""
1053
+ }, a = [{ ...t, is_organizer: !0 }], { title: s, description: l, bookingCalendar: r, location: o, conferencing: d, eventCapacity: c, eventTimeslot: p, participants: h } = this.formState;
934
1054
  return {
935
- title: o,
936
- description: r,
937
- location: i ? void 0 : l,
938
- conferencing: l ? void 0 : i,
1055
+ title: s,
1056
+ description: l,
1057
+ location: d ? void 0 : o,
1058
+ conferencing: o ? void 0 : d,
939
1059
  when: {
940
- start_time: ((O = p == null ? void 0 : p.when) == null ? void 0 : O.start_time) ?? 0,
941
- end_time: ((S = p == null ? void 0 : p.when) == null ? void 0 : S.end_time) ?? 0,
942
- start_timezone: ((P = p == null ? void 0 : p.when) == null ? void 0 : P.start_timezone) ?? "",
943
- end_timezone: ((N = p == null ? void 0 : p.when) == null ? void 0 : N.end_timezone) ?? ""
1060
+ start_time: ((P = p == null ? void 0 : p.when) == null ? void 0 : P.start_time) ?? 0,
1061
+ end_time: ((T = p == null ? void 0 : p.when) == null ? void 0 : T.end_time) ?? 0,
1062
+ start_timezone: ((H = p == null ? void 0 : p.when) == null ? void 0 : H.start_timezone) ?? "",
1063
+ end_timezone: ((G = p == null ? void 0 : p.when) == null ? void 0 : G.end_timezone) ?? ""
944
1064
  },
945
1065
  recurrence: (p == null ? void 0 : p.recurrence) ?? [],
946
- calendar_id: s || (e == null ? void 0 : e.id) || "primary",
947
- participants: f != null && f.length ? f : a,
1066
+ calendar_id: r || (e == null ? void 0 : e.id) || "primary",
1067
+ participants: h != null && h.length ? h : a,
948
1068
  organizer: t,
949
1069
  capacity: c || 10
950
1070
  };
951
1071
  }
952
1072
  getFormStateFromConfig(e) {
953
- var t, a, o, r, s, l, i, c, p, f, m, w, x, T;
1073
+ var t, a, s, l, r, o, d, c, p, h, m, k, S, F;
954
1074
  return e != null && e.appearance && console.info("Appearance settings have been returned from the given configuration; please remember to grab them from the configSettingsLoaded event and apply them as desired."), {
955
1075
  additionalFields: ((t = e == null ? void 0 : e.scheduler) == null ? void 0 : t.additional_fields) ?? {},
956
1076
  bookingType: ((a = e == null ? void 0 : e.group_booking) == null ? void 0 : a.booking_type) ?? "booking",
957
- cancellationPolicy: ((o = e == null ? void 0 : e.scheduler) == null ? void 0 : o.cancellation_policy) ?? "",
958
- minCancellationNotice: ((r = e == null ? void 0 : e.scheduler) == null ? void 0 : r.min_cancellation_notice) ?? 0,
959
- minBookingNotice: ((s = e == null ? void 0 : e.scheduler) == null ? void 0 : s.min_booking_notice) ?? 60,
960
- hideCancellationOptions: ((l = e == null ? void 0 : e.scheduler) == null ? void 0 : l.hide_cancellation_options) ?? !1,
961
- hideReschedulingOptions: ((i = e == null ? void 0 : e.scheduler) == null ? void 0 : i.hide_rescheduling_options) ?? !1,
1077
+ cancellationPolicy: ((s = e == null ? void 0 : e.scheduler) == null ? void 0 : s.cancellation_policy) ?? "",
1078
+ minCancellationNotice: ((l = e == null ? void 0 : e.scheduler) == null ? void 0 : l.min_cancellation_notice) ?? 0,
1079
+ minBookingNotice: ((r = e == null ? void 0 : e.scheduler) == null ? void 0 : r.min_booking_notice) ?? 60,
1080
+ hideCancellationOptions: ((o = e == null ? void 0 : e.scheduler) == null ? void 0 : o.hide_cancellation_options) ?? !1,
1081
+ hideReschedulingOptions: ((d = e == null ? void 0 : e.scheduler) == null ? void 0 : d.hide_rescheduling_options) ?? !1,
962
1082
  reminders: (c = e == null ? void 0 : e.group_booking) == null ? void 0 : c.reminders,
963
1083
  emailTemplate: (p = e == null ? void 0 : e.scheduler) == null ? void 0 : p.email_template,
964
- redirectUrl: (f = e == null ? void 0 : e.scheduler) == null ? void 0 : f.confirmation_redirect_url,
1084
+ redirectUrl: (h = e == null ? void 0 : e.scheduler) == null ? void 0 : h.confirmation_redirect_url,
965
1085
  slug: e == null ? void 0 : e.slug,
966
1086
  appearance: e == null ? void 0 : e.appearance,
967
1087
  name: e == null ? void 0 : e.name,
968
1088
  bookingCalendar: (m = e == null ? void 0 : e.group_booking) == null ? void 0 : m.calendar_id,
969
- disableEmails: (w = e == null ? void 0 : e.group_booking) == null ? void 0 : w.disable_emails,
970
- organizerLocale: (T = (x = e == null ? void 0 : e.scheduler) == null ? void 0 : x.email_template) == null ? void 0 : T.organizer_locale
1089
+ disableEmails: (k = e == null ? void 0 : e.group_booking) == null ? void 0 : k.disable_emails,
1090
+ organizerLocale: (F = (S = e == null ? void 0 : e.scheduler) == null ? void 0 : S.email_template) == null ? void 0 : F.organizer_locale
971
1091
  };
972
1092
  }
973
1093
  setFormState(e, t) {
@@ -1030,10 +1150,10 @@ const qe = class {
1030
1150
  break;
1031
1151
  case "participants": {
1032
1152
  const a = JSON.parse(e.toString());
1033
- this.formState.participants = a.map((o) => ({
1034
- name: o.name,
1035
- email: o.email,
1036
- is_organizer: o.is_organizer
1153
+ this.formState.participants = a.map((s) => ({
1154
+ name: s.name,
1155
+ email: s.email,
1156
+ is_organizer: s.is_organizer
1037
1157
  }));
1038
1158
  break;
1039
1159
  }
@@ -1041,8 +1161,8 @@ const qe = class {
1041
1161
  this.formState.eventTimeslot = JSON.parse(e.toString());
1042
1162
  break;
1043
1163
  case "disable-emails": {
1044
- const { disableEmails: a, organizerLocale: o } = JSON.parse(e.toString());
1045
- this.formState.disableEmails = a, this.formState.organizerLocale = o;
1164
+ const { disableEmails: a, organizerLocale: s } = JSON.parse(e.toString());
1165
+ this.formState.disableEmails = a, this.formState.organizerLocale = s;
1046
1166
  break;
1047
1167
  }
1048
1168
  }
@@ -1067,22 +1187,22 @@ const qe = class {
1067
1187
  e.preventDefault(), this.showFeedbackModal = !0;
1068
1188
  }
1069
1189
  render() {
1070
- var e, t;
1071
- return b("[nylas-editor-tabs-group]", "render", this.formState), n(le, { key: "2f1b119172917fda91ffa866f37a14355f2828c0" }, n("form", { key: "103788b60f9351f7b20bcb06e1e93f89a29a9332", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (a) => this.formRef = a, noValidate: !0 }, this.mode === "app" ? n("div", { class: "return-to-calendar-view", part: "editor__return-to-calendar-view net__return-to-calendar-view" }, n("button-component", { id: "return-to-calendar-view-button", variant: "invisible", part: "nset__header__back-button", type: "button", onClick: (a) => {
1072
- this.setActiveTab(a, y.CalendarView);
1073
- } }, n("chevron-icon", { width: "16", height: "16" }), n("span", null, d.t("returnToCalendarView")))) : null, this.mode === "app" ? n("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, n("div", { class: "tabs", part: "editor__tabs net__tabs" }, n("button", { name: y.BookingOptions, class: { tab: !0, active: this.activeTab == y.BookingOptions, hide: this.hideTab(y.BookingOptions) }, part: "editortab__booking-options net__tab-booking-options", onClick: (a) => this.setActiveTab(a, y.BookingOptions) }, n("flow-icon", { width: "16", height: "16" }), d.t("bookingOptionsTab")), n("button", { name: y.BookingForm, class: { tab: !0, active: this.activeTab == y.BookingForm, hide: this.hideTab(y.BookingForm) }, part: "editortab__booking-form net__tab-booking-form", onClick: (a) => this.setActiveTab(a, y.BookingForm) }, this.activeTab == y.BookingForm ? n("calendar-agenda-fill-icon", { width: "16", height: "16" }) : n("calendar-agenda-icon", { width: "16", height: "16" }), d.t("bookingFormTab")), n("button", { name: y.Communications, class: { tab: !0, active: this.activeTab == y.Communications, hide: this.hideTab(y.Communications) }, onClick: (a) => this.setActiveTab(a, y.Communications), part: "editortab__communications net__tab-communications" }, this.activeTab == y.Communications ? n("envelope-fill-icon", { width: "16", height: "16" }) : n("envelope-icon", { width: "16", height: "16" }), d.t("communicationsTab")), n("button", { name: y.PageStyles, class: { tab: !0, active: this.activeTab == y.PageStyles, hide: this.hideTab(y.PageStyles) }, onClick: (a) => this.setActiveTab(a, y.PageStyles), part: "editortab__page-styles net__tab-page-styles" }, this.activeTab == y.PageStyles ? n("paintbrush-fill-icon", { width: "16", height: "16" }) : n("paintbrush-icon", { width: "16", height: "16" }), d.t("pageStylesTab"))), n("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, n(ut, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((e = this.selectedConfiguration) == null ? void 0 : e.id) ?? "new", i18next: d }))) : n("div", { class: "composable", key: (t = this.selectedConfiguration) == null ? void 0 : t.id }, n("slot", null)), n("div", { key: "5c98656ec4f4b3bb61f675dbfe43121b1cf230cf", class: "footer", part: "editor__footer net__footer" }, n("div", { key: "cca7ec210ba25fd6e8d6f090871bd03acd86f3b2", class: "preview", part: "editor__footer-preview net__footer-preview" }, this.enableUserFeedback && n("button-component", { title: "Share your feedback", id: "report-issue", variant: "basic", onClick: (a) => this.onFeedbackClick(a) }, n("feedback-icon", null)), this.activeTab === y.CalendarView && n("button-component", { title: "Go to page settings", id: "page-settings", variant: "basic", onClick: (a) => this.setActiveTab(a, y.BookingOptions) }, d.t("pageSettingsButton"))), n("div", { key: "53bf5ccc9597574dade9a81c08a4b316ebbb8f1e", class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, n("p", { key: "a3acb4bbfb391483d9d8914ff5f07922c05e7dbd", class: {
1190
+ var e, t, a, s, l, r;
1191
+ return b("[nylas-editor-tabs-group]", "render", this.formState), n(ce, { key: "f1f9489924f24e9e70b03f29ca492f952447857e" }, n("nylas-notification", { key: "55313223571d2279f7371dee53422b682484a8f0" }), n("form", { key: "127ab3460883730d9519df3995e12a29375cf3c5", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (o) => this.formRef = o, noValidate: !0 }, this.mode === "app" ? n("div", { class: "return-to-calendar-view", part: "editor__return-to-calendar-view net__return-to-calendar-view" }, n("button-component", { id: "return-to-calendar-view-button", variant: "invisible", part: "nset__header__back-button", type: "button", onClick: (o) => {
1192
+ this.setActiveTab(o, g.CalendarView);
1193
+ } }, n("chevron-icon", { width: "16", height: "16" }), n("span", null, i.t("returnToCalendarView")))) : null, this.mode === "app" ? n("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, n("div", { class: "tabs", part: "editor__tabs net__tabs" }, n("button", { name: g.BookingOptions, class: { tab: !0, active: this.activeTab == g.BookingOptions, hide: this.hideTab(g.BookingOptions) }, part: "editortab__booking-options net__tab-booking-options", onClick: (o) => this.setActiveTab(o, g.BookingOptions) }, n("flow-icon", { width: "16", height: "16" }), i.t("bookingOptionsTab")), n("button", { name: g.BookingForm, class: { tab: !0, active: this.activeTab == g.BookingForm, hide: this.hideTab(g.BookingForm) }, part: "editortab__booking-form net__tab-booking-form", onClick: (o) => this.setActiveTab(o, g.BookingForm) }, this.activeTab == g.BookingForm ? n("calendar-agenda-fill-icon", { width: "16", height: "16" }) : n("calendar-agenda-icon", { width: "16", height: "16" }), i.t("bookingFormTab")), n("button", { name: g.Communications, class: { tab: !0, active: this.activeTab == g.Communications, hide: this.hideTab(g.Communications) }, onClick: (o) => this.setActiveTab(o, g.Communications), part: "editortab__communications net__tab-communications" }, this.activeTab == g.Communications ? n("envelope-fill-icon", { width: "16", height: "16" }) : n("envelope-icon", { width: "16", height: "16" }), i.t("communicationsTab")), n("button", { name: g.PageStyles, class: { tab: !0, active: this.activeTab == g.PageStyles, hide: this.hideTab(g.PageStyles) }, onClick: (o) => this.setActiveTab(o, g.PageStyles), part: "editortab__page-styles net__tab-page-styles" }, this.activeTab == g.PageStyles ? n("paintbrush-fill-icon", { width: "16", height: "16" }) : n("paintbrush-icon", { width: "16", height: "16" }), i.t("pageStylesTab"))), n("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, n(yt, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((e = this.selectedConfiguration) == null ? void 0 : e.id) ?? "new", i18next: i }))) : n("div", { class: "composable", key: (t = this.selectedConfiguration) == null ? void 0 : t.id }, n("slot", null)), n("div", { key: "58a9ed32c7fde8663e25a05461e7dbbe8bc3d879", class: "footer", part: "editor__footer net__footer" }, n("div", { key: "dddf1ddc9b444fc7f8f8f965d1a84a87678a9fa8", class: "preview", part: "editor__footer-preview net__footer-preview" }, this.enableUserFeedback && n("button-component", { title: "Share your feedback", id: "report-issue", variant: "basic", onClick: (o) => this.onFeedbackClick(o) }, n("feedback-icon", null)), this.activeTab === g.CalendarView && n("button-component", { class: "page-settings-button", title: "Go to page settings", id: "page-settings", variant: "basic", onClick: (o) => this.setActiveTab(o, g.BookingOptions) }, i.t("pageSettingsButton"))), n("div", { key: "be3ea7e9a341b7495d32c076505462b5845b1c66", class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, n("p", { key: "42bf3aaae3eb30d443d4b45b1be81100eb95ac23", class: {
1074
1194
  "unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
1075
1195
  "saved-changes": this.changesSaved,
1076
- error: this.error !== "",
1077
- "error-full-width": this.error !== "" && this.action === "create"
1078
- } }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved && this.activeTab !== y.CalendarView ? d.t("unsavedChangesLabel") : this.error == "" && this.changesSaved ? `${d.t("changesSavedLabel")}!` : ""), n("div", { key: "81e083f0560967f3d8b68f1e0cafef645c7ae288", class: "footer-buttons__row" }, this.schedulerPreviewLink !== "" && this.action === "edit" && n("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: (a) => {
1079
- a.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(re(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
1080
- }, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "59a4f7e7238f88a4a07e0bc1ab79bed788da74c9", type: "button", disabled: this.isLoading, clickHandler: (a) => {
1081
- a.preventDefault(), this.cancelButtonClick.emit(), this.error = "";
1082
- }, variant: "basic", part: "editor__footer-cancel net__footer-cancel" }, d.t("backButton")), n("button-component", { key: "3ed3bc81b39988173e13f2c3346defed31b96148", type: "submit", disabled: this.isLoading, part: "editor__footer-cta, net__footer-cta" }, this.isLoading ? n("span", null, d.t("savingButtonText"), n("loading-icon", null), " ") : this.action === "create" ? `${d.t("createButtonText")}` : `${d.t("saveChangesButtonText")}`))))), this.showFeedbackModal && n("nylas-feedback-form", null));
1196
+ error: ((a = this.error) == null ? void 0 : a.message) !== "",
1197
+ "error-full-width": ((s = this.error) == null ? void 0 : s.message) !== "" && this.action === "create"
1198
+ } }, ((l = this.error) == null ? void 0 : l.message) == "" && this.hasUnsavedChanges && !this.changesSaved && this.activeTab !== g.CalendarView ? i.t("unsavedChangesLabel") : ((r = this.error) == null ? void 0 : r.message) == "" && this.changesSaved ? `${i.t("changesSavedLabel")}!` : ""), n("div", { key: "6380b051bd4bc445092fd71be43e949c12629cd7", class: "footer-buttons__row" }, this.schedulerPreviewLink !== "" && this.action === "edit" && n("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: (o) => {
1199
+ o.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(le(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
1200
+ }, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "b78b23bc721251da33f803a46e23b66cea112095", type: "button", disabled: this.isLoading, clickHandler: (o) => {
1201
+ o.preventDefault(), this.cancelButtonClick.emit(), this.host.resetError();
1202
+ }, variant: "basic", part: "editor__footer-cancel net__footer-cancel" }, i.t("backButton")), n("button-component", { key: "aaefcecf3c7247c085813831066bf79298b17263", class: { "save-changes": this.action === "edit" }, type: "submit", disabled: this.isLoading, part: "editor__footer-cta, net__footer-cta" }, this.componentLoaded ? this.isLoading ? n("span", null, i.t("savingButtonText"), n("loading-icon", null), " ") : this.action === "create" ? `${i.t("createButtonText")}` : `${i.t("saveChangesButtonText")}` : n("span", null, n("loading-icon", null), " ")))))), this.showFeedbackModal && n("nylas-feedback-form", null));
1083
1203
  }
1084
1204
  get host() {
1085
- return de(this);
1205
+ return pe(this);
1086
1206
  }
1087
1207
  static get watchers() {
1088
1208
  return {
@@ -1093,8 +1213,8 @@ const qe = class {
1093
1213
  };
1094
1214
  }
1095
1215
  };
1096
- ft([
1097
- ce({
1216
+ mt([
1217
+ be({
1098
1218
  name: "nylas-editor-tabs-group",
1099
1219
  stateToProps: /* @__PURE__ */ new Map([
1100
1220
  ["schedulerConfig.calendars", "calendars"],
@@ -1107,20 +1227,25 @@ ft([
1107
1227
  ]),
1108
1228
  eventToProps: {
1109
1229
  schedulerConfigChanged: async (e, t) => {
1110
- const { resetLoadingState: a, host: o, action: r, config: s, groupEvent: l } = e.detail, i = (c) => {
1111
- const [p, f] = c;
1112
- !p && f ? o.setError(f) : p && !f && r === "create" && o.schedulerConfigCreatedEventHandler({ config: p, action: r, host: o });
1230
+ const { resetLoadingState: a, host: s, action: l, config: r, groupEvent: o } = e.detail, d = (c, p) => {
1231
+ const [h, m] = c;
1232
+ !h && m ? s.setError({
1233
+ message: m.message || i.t("genericErrorTitle"),
1234
+ type: v.Error,
1235
+ category: w.Component,
1236
+ title: p
1237
+ }) : h && !m && l === "create" && s.schedulerConfigCreatedEventHandler({ config: h, action: l, host: s });
1113
1238
  };
1114
- if (r === "edit") {
1115
- const c = await t.schedulerConfig.updateConfiguration(s);
1116
- i(c), a && a(e);
1239
+ if (l === "edit") {
1240
+ const c = await t.schedulerConfig.updateConfiguration(r);
1241
+ d(c, i.t("nylasEditorTabs.updateConfigurationError")), a && a(e);
1117
1242
  } else {
1118
- const c = await t.schedulerConfig.createConfiguration(s);
1119
- i(c);
1120
- const [p, f] = c, m = p == null ? void 0 : p.id;
1121
- if (m && l) {
1122
- const w = await t.schedulerConfig.createGroupEvent(l, m);
1123
- i(w);
1243
+ const c = await t.schedulerConfig.createConfiguration(r);
1244
+ d(c, i.t("nylasEditorTabs.createConfigurationError"));
1245
+ const [p, h] = c, m = p == null ? void 0 : p.id;
1246
+ if (m && o) {
1247
+ const k = await t.schedulerConfig.createGroupEvent(o, m);
1248
+ d(k, i.t("nylasEditorTabsGroup.createGroupEventError"));
1124
1249
  }
1125
1250
  a && a(e);
1126
1251
  }
@@ -1141,30 +1266,55 @@ ft([
1141
1266
  b("[nylas-editor-tabs-group]", "schedulerConfigCreated", e);
1142
1267
  },
1143
1268
  groupEventUpdateTriggered: async (e, t) => {
1144
- const { groupEvent: a, host: o, chosenOption: r, configId: s } = e.detail, l = await t.schedulerConfig.updateGroupEvent(a, r, s), [i, c] = l;
1145
- !i && c && o.setError(c);
1269
+ const { groupEvent: a, host: s, chosenOption: l, configId: r } = e.detail, o = await t.schedulerConfig.updateGroupEvent(a, l, r), [d, c] = o;
1270
+ !d && c && s.setError({
1271
+ message: c.message || i.t("genericErrorTitle"),
1272
+ type: v.Error,
1273
+ category: w.Component,
1274
+ title: i.t("nylasEditorTabsGroup.updateGroupEventError")
1275
+ });
1146
1276
  },
1147
1277
  groupEventDeleteTriggered: async (e, t) => {
1148
- const { groupEvent: a, chosenOption: o, configId: r, host: s } = e.detail, l = await t.schedulerConfig.deleteGroupEvent(a, o, r), [i, c] = l;
1149
- !i && c && s.setError(c);
1278
+ const { groupEvent: a, chosenOption: s, configId: l, host: r } = e.detail, o = await t.schedulerConfig.deleteGroupEvent(a, s, l), [d, c] = o;
1279
+ !d && c && r.setError({
1280
+ message: c.message || i.t("genericErrorTitle"),
1281
+ type: v.Error,
1282
+ category: w.Component,
1283
+ title: i.t("nylasEditorTabsGroup.deleteGroupEventError")
1284
+ });
1150
1285
  },
1151
1286
  groupEventCreateTriggered: async (e, t) => {
1152
- const { groupEvent: a, configId: o, host: r } = e.detail, s = await t.schedulerConfig.createGroupEvent(a, o), [l, i] = s;
1153
- !l && i && r.setError(i);
1287
+ const { groupEvent: a, configId: s, host: l } = e.detail, r = await t.schedulerConfig.createGroupEvent(a, s), [o, d] = r;
1288
+ !o && d && l.setError({
1289
+ message: d.message || i.t("genericErrorTitle"),
1290
+ type: v.Error,
1291
+ category: w.Component,
1292
+ title: i.t("nylasEditorTabsGroup.createGroupEventError")
1293
+ });
1154
1294
  },
1155
1295
  groupEventImportTriggered: async (e, t) => {
1156
- const { groupEvent: a, configId: o, host: r } = e.detail, s = await t.schedulerConfig.importGroupEvent([a], o), [l, i] = s;
1157
- if (!l && i && r.setError(i), l && l.import_failed && l.import_failed.length > 0) {
1158
- const c = l.import_failed.map((p) => p.reason).join(`
1296
+ const { groupEvent: a, configId: s, host: l } = e.detail, r = await t.schedulerConfig.importGroupEvent([a], s), [o, d] = r;
1297
+ if (!o && d && l.setError({
1298
+ message: d.message || i.t("genericErrorTitle"),
1299
+ type: v.Error,
1300
+ category: w.Component,
1301
+ title: i.t("nylasEditorTabsGroup.importGroupEventError")
1302
+ }), o && o.import_failed && o.import_failed.length > 0) {
1303
+ const c = o.import_failed.map((p) => p.reason).join(`
1159
1304
  `);
1160
- r.setError(new Error(c)), setTimeout(() => {
1161
- r.resetError();
1305
+ l.setError({
1306
+ message: c,
1307
+ type: v.Error,
1308
+ category: w.Component,
1309
+ title: i.t("nylasEditorTabsGroup.importGroupEventError")
1310
+ }), setTimeout(() => {
1311
+ l.resetError();
1162
1312
  }, 5e3);
1163
1313
  }
1164
1314
  },
1165
1315
  saveGroupEventChangesError: async (e, t) => {
1166
- const { error: a, host: o } = e.detail;
1167
- b("[nylas-editor-tabs-group]", "saveGroupEventChangesError", a, o);
1316
+ const { error: a, host: s } = e.detail;
1317
+ b("[nylas-editor-tabs-group]", "saveGroupEventChangesError", a, s);
1168
1318
  }
1169
1319
  },
1170
1320
  localPropsToProp: /* @__PURE__ */ new Map([
@@ -1174,27 +1324,32 @@ ft([
1174
1324
  ]),
1175
1325
  fireRegisterEvent: !0
1176
1326
  }),
1177
- he("design:type", Function),
1178
- he("design:paramtypes", []),
1179
- he("design:returntype", void 0)
1180
- ], qe.prototype, "render", null);
1181
- qe.style = yt;
1182
- const gt = ':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column;gap:0.5rem;align-items:unset}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:16px;color:var(--nylas-base-700)}.header .actions{justify-self:end}@media screen and (max-width: 768px){.header .actions{width:100%}}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-0);height:100%;display:flex;flex-direction:column;position:relative;overflow-y:hidden}.configurations .table-container{overflow-y:auto;flex:1}@media screen and (max-width: 768px){.configurations .table-container{min-height:624px}}.configurations .table-container table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations .table-container table.no-configurations{height:100%}.configurations .table-container table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations .table-container table tr.hide{display:none}.configurations .table-container table th{font-weight:600;text-transform:uppercase;font-size:14px;line-height:20px}.configurations .table-container table tr.no-configurations td>div{display:flex;height:100%;justify-content:center;align-items:center;flex-direction:column;padding:var(--nylas-border-radius-3x)}.configurations .table-container table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations .table-container table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations .table-container table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations .table-container table th,.configurations .table-container table td{text-align:left;padding:1rem;font-family:inherit}.configurations .table-container table .actions{display:flex;justify-content:flex-end;gap:1rem;text-align:right}@media screen and (max-width: 768px){.configurations .table-container table .actions{flex-direction:column;gap:0.5rem}}.configurations .table-container table .actions select-dropdown.last::part(sd_dropdown-content){bottom:54px}.configurations .table-container table .title{width:100%;max-width:300px}@media screen and (max-width: 768px){.configurations .table-container table .title{max-width:96px}}.configurations .table-container table .title div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.configurations .table-container table .title div.config-event-title{font-weight:600}.configurations .table-container table .title div.config-event-description{font-size:0.75rem}.configurations .pagination{padding:1rem;position:sticky;top:100%;display:flex;justify-content:flex-end;gap:0.5rem;background:white;width:calc(100% - 2rem);z-index:2}.configurations .pagination td.arrows{display:flex;justify-content:flex-end;gap:0.5rem}.configurations .pagination button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background-color:transparent;color:var(--nylas-base-800);cursor:pointer}.configurations .pagination button:hover:not(:disabled){border:1px solid var(--nylas-primary)}.configurations .pagination button:active{border:1px solid var(--nylas-base-800)}.configurations .pagination button:disabled{border:1px solid var(--nylas-base-100);background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.configurations .pagination button.right{transform:rotate(180deg)}.error-container{margin-top:1.5rem}.error-container .error{color:var(--nylas-error);padding:0.5rem 0;margin:1rem 0 0}button-component#copy button{width:108px}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){display:block;height:48px;padding:0px 16px 8px}@media screen and (max-width: 768px){select-dropdown::part(sd_dropdown-button){width:92px}}select-dropdown::part(sd_dropdown-content){width:120px;right:0}select-dropdown::part(sd_dropdown-labelhtml){display:flex;gap:0.5rem;align-items:center;color:var(--nylas-base-900)}select-dropdown::part(sd_dropdown-labelhtml):hover{color:var(--nylas-primary)}.card-wrapper{position:absolute;top:0;left:0;height:calc(100% + 4rem);width:-webkit-fill-available;width:-moz-available;width:fill-available;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.card-wrapper{justify-content:start;height:100%}}.card-modal{background:var(--nylas-base-0);display:flex;flex-direction:column;font-family:var(--nylas-font-family);background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);padding:32px;width:562px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.card-modal{width:auto;border-radius:0px}}.description.title-desc{margin-bottom:2rem}.description p{margin:0;font-size:18px;color:var(--nylas-base-600)}.footer{margin-top:1rem;padding-top:1rem;display:flex;justify-content:flex-end;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.close-button{width:100%;display:flex;justify-content:flex-end}.close-button button-component button{padding:0;height:auto}.close-button button-component button:hover{background-color:transparent !important}button-component{--dot-color:var(--nylas-base-700)}', mt = gt;
1183
- var _t = function(e, t, a, o) {
1184
- var r = arguments.length, s = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, a) : o, l;
1327
+ ge("design:type", Function),
1328
+ ge("design:paramtypes", []),
1329
+ ge("design:returntype", void 0)
1330
+ ], Ye.prototype, "render", null);
1331
+ Ye.style = ft;
1332
+ const _t = ':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column;gap:0.5rem;align-items:unset}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:16px;color:var(--nylas-base-700)}.header .actions{justify-self:end}@media screen and (max-width: 768px){.header .actions{width:100%}}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-0);height:100%;display:flex;flex-direction:column;position:relative;overflow-y:hidden}.configurations .table-container{overflow-y:auto;flex:1}@media screen and (max-width: 768px){.configurations .table-container{min-height:624px}}.configurations .table-container table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations .table-container table.no-configurations{height:100%}.configurations .table-container table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations .table-container table tr.hide{display:none}.configurations .table-container table th{font-weight:600;text-transform:uppercase;font-size:14px;line-height:20px}.configurations .table-container table tr.no-configurations td>div{display:flex;height:100%;justify-content:center;align-items:center;flex-direction:column;padding:var(--nylas-border-radius-3x)}.configurations .table-container table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations .table-container table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations .table-container table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations .table-container table th,.configurations .table-container table td{text-align:left;padding:1rem;font-family:inherit}.configurations .table-container table .actions{display:flex;justify-content:flex-end;gap:1rem;text-align:right}.configurations .table-container table .actions button-component.edit-button{min-width:98px}@media screen and (max-width: 768px){.configurations .table-container table .actions{flex-direction:column;gap:0.5rem}}.configurations .table-container table .actions select-dropdown.last::part(sd_dropdown-content){bottom:54px}.configurations .table-container table .title{width:100%;max-width:300px}@media screen and (max-width: 768px){.configurations .table-container table .title{max-width:96px}}.configurations .table-container table .title div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.configurations .table-container table .title div.config-event-title{font-weight:600}.configurations .table-container table .title div.config-event-description{font-size:0.75rem}.configurations .pagination{padding:1rem;position:sticky;top:100%;display:flex;justify-content:flex-end;gap:0.5rem;background:white;width:calc(100% - 2rem);z-index:2}.configurations .pagination td.arrows{display:flex;justify-content:flex-end;gap:0.5rem}.configurations .pagination button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background-color:transparent;color:var(--nylas-base-800);cursor:pointer}.configurations .pagination button:hover:not(:disabled){border:1px solid var(--nylas-primary)}.configurations .pagination button:active{border:1px solid var(--nylas-base-800)}.configurations .pagination button:disabled{border:1px solid var(--nylas-base-100);background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.configurations .pagination button.right{transform:rotate(180deg)}.error-container{margin-top:1.5rem}.error-container .error{color:var(--nylas-error);padding:0.5rem 0;margin:1rem 0 0}button-component#copy button{width:108px}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){display:block;height:48px;padding:0px 16px 8px}@media screen and (max-width: 768px){select-dropdown::part(sd_dropdown-button){width:92px}}select-dropdown::part(sd_dropdown-content){width:120px;right:0}select-dropdown::part(sd_dropdown-labelhtml){display:flex;gap:0.5rem;align-items:center;color:var(--nylas-base-900)}select-dropdown::part(sd_dropdown-labelhtml):hover{color:var(--nylas-primary)}.card-wrapper{position:absolute;top:0;left:0;height:calc(100% + 4rem);width:-webkit-fill-available;width:-moz-available;width:fill-available;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.card-wrapper{justify-content:start;height:100%}}.card-modal{background:var(--nylas-base-0);display:flex;flex-direction:column;font-family:var(--nylas-font-family);background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);padding:32px;width:562px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.card-modal{width:auto;border-radius:0px}}.description.title-desc{margin-bottom:2rem}.description p{margin:0;font-size:18px;color:var(--nylas-base-600)}.footer{margin-top:1rem;padding-top:1rem;display:flex;justify-content:flex-end;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.close-button{width:100%;display:flex;justify-content:flex-end}.close-button button-component button{padding:0;height:auto}.close-button button-component button:hover{background-color:transparent !important}button-component{--dot-color:var(--nylas-base-700)}', vt = _t;
1333
+ var wt = function(e, t, a, s) {
1334
+ var l = arguments.length, r = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, o;
1185
1335
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
1186
- s = Reflect.decorate(e, t, a, o);
1336
+ r = Reflect.decorate(e, t, a, s);
1187
1337
  else
1188
- for (var i = e.length - 1; i >= 0; i--)
1189
- (l = e[i]) && (s = (r < 3 ? l(s) : r > 3 ? l(t, a, s) : l(t, a)) || s);
1190
- return r > 3 && s && Object.defineProperty(t, a, s), s;
1191
- }, ye = function(e, t) {
1338
+ for (var d = e.length - 1; d >= 0; d--)
1339
+ (o = e[d]) && (r = (l < 3 ? o(r) : l > 3 ? o(t, a, r) : o(t, a)) || r);
1340
+ return l > 3 && r && Object.defineProperty(t, a, r), r;
1341
+ }, fe = function(e, t) {
1192
1342
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
1193
1343
  return Reflect.metadata(e, t);
1194
1344
  };
1195
- const Ke = class {
1345
+ const Qe = class {
1196
1346
  constructor(e) {
1197
- X(this, e), this.initListConfigurations = _(this, "initListConfigurations", 7), this.createButtonClick = _(this, "createButtonClick", 7), this.editButtonClick = _(this, "editButtonClick", 7), this.deleteButtonClick = _(this, "deleteButtonClick", 7), this.configurations = [], this.selectedLanguage = void 0, this.schedulerPreviewLink = "", this.listConfigurationsNextCursor = void 0, this.state = "loading", this.error = "", this.currentCursor = null, this.previousCursors = [], this.disableNextPageButton = !1, this.deleteConfigurationId = "", this.showDeleteButtonLoading = !1;
1347
+ te(this, e), this.initListConfigurations = _(this, "initListConfigurations", 7), this.createButtonClick = _(this, "createButtonClick", 7), this.editButtonClick = _(this, "editButtonClick", 7), this.deleteButtonClick = _(this, "deleteButtonClick", 7), this.nylasSchedulerError = _(this, "nylasSchedulerError", 6), this.dismissNotification = _(this, "dismissNotification", 6), this.configurations = [], this.selectedLanguage = void 0, this.schedulerPreviewLink = "", this.listConfigurationsNextCursor = void 0, this.state = "loading", this.error = {
1348
+ message: "",
1349
+ type: v.Error,
1350
+ category: w.Component,
1351
+ title: ""
1352
+ }, this.currentCursor = null, this.previousCursors = [], this.disableNextPageButton = !1, this.deleteConfigurationId = "", this.showDeleteButtonLoading = !1, this.editButtonLoadingId = "";
1198
1353
  }
1199
1354
  listConfigurationsNextCursorChangedHandler(e, t) {
1200
1355
  if (!e || e === t) {
@@ -1204,7 +1359,7 @@ const Ke = class {
1204
1359
  this.disableNextPageButton = !1, this.currentCursor = e;
1205
1360
  }
1206
1361
  selectedLanguageChangedHandler(e, t) {
1207
- e !== t && d.changeLanguage(e);
1362
+ e !== t && i.changeLanguage(e);
1208
1363
  }
1209
1364
  connectedCallback() {
1210
1365
  b("[nylas-list-configurations]", "connectedCallback");
@@ -1221,18 +1376,18 @@ const Ke = class {
1221
1376
  b("[nylas-list-configurations]", "disconnectedCallback");
1222
1377
  }
1223
1378
  async handleNylasFormDropdownChanged(e) {
1224
- var r;
1379
+ var l;
1225
1380
  b("[nylas-list-configurations]", "handleNylasFormDropdownChanged", e.detail);
1226
- const { value: t } = e.detail, [a, o] = t.split("-");
1381
+ const { value: t } = e.detail, [a, s] = t.split("-");
1227
1382
  switch (e.preventDefault(), a) {
1228
1383
  case "delete":
1229
- this.deleteConfigurationId = (r = this.configurations[o]) == null ? void 0 : r.id;
1384
+ this.deleteConfigurationId = (l = this.configurations[s]) == null ? void 0 : l.id;
1230
1385
  break;
1231
1386
  case "preview":
1232
- window.open(re(this.schedulerPreviewLink, this.configurations[o]), "_blank");
1387
+ window.open(le(this.schedulerPreviewLink, this.configurations[s]), "_blank");
1233
1388
  break;
1234
1389
  case "copy":
1235
- await navigator.clipboard.writeText(re(this.schedulerPreviewLink, this.configurations[o]));
1390
+ await navigator.clipboard.writeText(le(this.schedulerPreviewLink, this.configurations[s]));
1236
1391
  break;
1237
1392
  }
1238
1393
  }
@@ -1248,11 +1403,33 @@ const Ke = class {
1248
1403
  this.state = e;
1249
1404
  }
1250
1405
  async setError(e) {
1251
- this.error = e;
1406
+ var t;
1407
+ this.error = {
1408
+ message: e.message,
1409
+ type: e.type,
1410
+ category: e.category,
1411
+ title: e.title || i.t("genericErrorTitle")
1412
+ }, (t = this.error) != null && t.message && this.showErrorNotification(this.error);
1252
1413
  }
1253
1414
  async hideDeleteConfirmation() {
1254
1415
  this.deleteConfigurationId = "", this.showDeleteButtonLoading = !1;
1255
1416
  }
1417
+ async hideEditButtonLoading() {
1418
+ this.editButtonLoadingId = "";
1419
+ }
1420
+ showErrorNotification(e) {
1421
+ this.nylasSchedulerError.emit({
1422
+ notification: {
1423
+ id: e.message.split(" ").join("-"),
1424
+ type: e.type || v.Error,
1425
+ title: e.title,
1426
+ category: e.category || w.Component,
1427
+ description: e.message,
1428
+ ttl: "none"
1429
+ },
1430
+ host: this.host
1431
+ });
1432
+ }
1256
1433
  closeModal(e) {
1257
1434
  e.preventDefault(), this.deleteConfigurationId = "";
1258
1435
  }
@@ -1277,11 +1454,11 @@ const Ke = class {
1277
1454
  };
1278
1455
  switch (e) {
1279
1456
  case "preview":
1280
- return n("span", { style: t }, n("eye-icon", { width: "16", height: "16" }), d.t("nylasListConfigurations.previewButtonText"));
1457
+ return n("span", { style: t }, n("eye-icon", { width: "16", height: "16" }), i.t("nylasListConfigurations.previewButtonText"));
1281
1458
  case "copy":
1282
- return n("span", { style: t }, n("copy-icon", { width: "16", height: "16" }), d.t("nylasListConfigurations.copyLinkButtonText"));
1459
+ return n("span", { style: t }, n("copy-icon", { width: "16", height: "16" }), i.t("nylasListConfigurations.copyLinkButtonText"));
1283
1460
  case "delete":
1284
- return n("span", { style: { ...t, ...a } }, n("delete-icon", { width: "15", height: "17" }), d.t("nylasListConfigurations.deleteButtonText"));
1461
+ return n("span", { style: { ...t, ...a } }, n("delete-icon", { width: "15", height: "17" }), i.t("nylasListConfigurations.deleteButtonText"));
1285
1462
  default:
1286
1463
  return "";
1287
1464
  }
@@ -1304,32 +1481,32 @@ const Ke = class {
1304
1481
  }
1305
1482
  render() {
1306
1483
  var e;
1307
- return n(le, null, n("div", { class: "header" }, n("div", { class: "description" }, n("h2", null, d.t("allSchedulingPages")), n("p", null, d.t("createAndManageSchedulingPages"))), this.configurations && this.configurations.length > 0 && n("div", { class: "actions" }, n("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
1484
+ return n(ce, null, n("nylas-notification", null), n("div", { class: "header" }, n("div", { class: "description" }, n("h2", null, i.t("allSchedulingPages")), n("p", null, i.t("createAndManageSchedulingPages"))), this.configurations && this.configurations.length > 0 && n("div", { class: "actions" }, n("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
1308
1485
  this.createButtonClick.emit(this.host);
1309
- } }, d.t("createNewSchedulingPageButtonText")))), n("div", { class: "configurations" }, n("div", { class: "table-container" }, n("table", { class: {
1486
+ } }, i.t("createNewSchedulingPageButtonText")))), n("div", { class: "configurations" }, n("div", { class: "table-container" }, n("table", { class: {
1310
1487
  "no-configurations": this.state !== "loading" && (!this.configurations || this.configurations.length === 0)
1311
1488
  } }, n("tr", { class: {
1312
1489
  hide: this.state === "loading" || this.configurations && this.configurations.length === 0
1313
- } }, n("th", null, d.t("pageTitle")), n("th", null, d.t("durationTitle")), n("th", null)), this.state === "loading" && n("tr", { class: "no-configurations" }, n("td", { colSpan: 3 }, n("div", null, n("h3", null, d.t("loading"), "..."), n("p", null, d.t("loadingPagesDescription"))))), this.state !== "loading" && (!this.configurations || this.configurations.length === 0) && n("tr", { class: "no-configurations" }, n("td", { colSpan: 3 }, n("div", null, n("calendar-icon", { width: "48", height: "48" }), n("h3", null, d.t("noSchedulingPages")), n("p", null, d.t("createFirstSchedulingPage")), n("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
1490
+ } }, n("th", null, i.t("pageTitle")), n("th", null, i.t("durationTitle")), n("th", null)), this.state === "loading" && n("tr", { class: "no-configurations" }, n("td", { colSpan: 3 }, n("div", null, n("h3", null, i.t("loading"), "..."), n("p", null, i.t("loadingPagesDescription"))))), this.state !== "loading" && (!this.configurations || this.configurations.length === 0) && n("tr", { class: "no-configurations" }, n("td", { colSpan: 3 }, n("div", null, n("calendar-icon", { width: "48", height: "48" }), n("h3", null, i.t("noSchedulingPages")), n("p", null, i.t("createFirstSchedulingPage")), n("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
1314
1491
  this.createButtonClick.emit(this.host);
1315
- } }, d.t("createNewSchedulingPageButtonText"))))), this.state !== "loading" && ((e = this.configurations) == null ? void 0 : e.map((t, a) => {
1316
- var l, i, c, p;
1317
- const o = (a === this.configurations.length - 1 || a === this.configurations.length - 2) && this.configurations.length > 3, r = t, s = t;
1318
- return n("tr", { key: t == null ? void 0 : t.id }, n("td", null, n("div", { class: "title" }, n("div", { class: "config-event-title", title: (l = s == null ? void 0 : s.event_booking) == null ? void 0 : l.title }, ((i = s == null ? void 0 : s.event_booking) == null ? void 0 : i.title) || (r == null ? void 0 : r.name)), n("div", { class: "config-event-description" }, (c = s == null ? void 0 : s.event_booking) == null ? void 0 : c.description))), n("td", null, n("div", { class: "duration" }, this.getDurationString((p = s == null ? void 0 : s.availability) == null ? void 0 : p.duration_minutes))), n("td", null, n("div", { class: "actions" }, n("button-component", { variant: "basic", key: `edit-${a}`, clickHandler: (f) => {
1319
- f.preventDefault(), this.editButtonClick.emit({ host: this.host, configuration: t });
1320
- } }, n("edit-icon", { width: "16", height: "16" }), d.t("editSchedulingPageButtonText")), n("select-dropdown", { class: {
1321
- last: o
1492
+ } }, i.t("createNewSchedulingPageButtonText"))))), this.state !== "loading" && ((e = this.configurations) == null ? void 0 : e.map((t, a) => {
1493
+ var o, d, c, p;
1494
+ const s = (a === this.configurations.length - 1 || a === this.configurations.length - 2) && this.configurations.length > 3, l = t, r = t;
1495
+ return n("tr", { key: t == null ? void 0 : t.id }, n("td", null, n("div", { class: "title" }, n("div", { class: "config-event-title", title: (o = r == null ? void 0 : r.event_booking) == null ? void 0 : o.title }, ((d = r == null ? void 0 : r.event_booking) == null ? void 0 : d.title) || (l == null ? void 0 : l.name)), n("div", { class: "config-event-description" }, (c = r == null ? void 0 : r.event_booking) == null ? void 0 : c.description))), n("td", null, n("div", { class: "duration" }, this.getDurationString((p = r == null ? void 0 : r.availability) == null ? void 0 : p.duration_minutes))), n("td", null, n("div", { class: "actions" }, n("button-component", { class: "edit-button", variant: "basic", key: `edit-${a}`, disabled: this.editButtonLoadingId === `edit-${a}`, isLoading: this.editButtonLoadingId === `edit-${a}`, clickHandler: (h) => {
1496
+ h.preventDefault(), this.editButtonLoadingId = `edit-${a}`, this.editButtonClick.emit({ host: this.host, configuration: t });
1497
+ } }, this.editButtonLoadingId === `edit-${a}` ? null : n("edit-icon", { width: "16", height: "16" }), i.t("editSchedulingPageButtonText")), n("select-dropdown", { class: {
1498
+ last: s
1322
1499
  }, name: "actions", options: [
1323
1500
  { value: `preview-${a}`, label: "Preview", labelHTML: this.getActionLabelHTML("preview") },
1324
1501
  { value: `copy-${a}`, label: "Copy link", labelHTML: this.getActionLabelHTML("copy") },
1325
1502
  { value: `delete-${a}`, label: "Delete", labelHTML: this.getActionLabelHTML("delete") }
1326
1503
  ], defaultSelectedOption: { value: "", label: "" }, dropdownButtonText: "...", withSearch: !1, withChevron: !1, exportparts: "sd_dropdown: actions__dropdown, sd_dropdown-button: actions__dropdown-button, sd_dropdown-content: actions__dropdown-content, actions-Copy, actions-Preview, actions-Delete" }))));
1327
- })))), n("div", { class: "pagination" }, n("button", { class: "arrow left", onClick: () => this.previousPageClickedHandler(), disabled: this.previousCursors.length <= 0 }, n("chevron-icon", null)), n("button", { class: "arrow right", onClick: () => this.nextPageClickedHandler(), disabled: this.disableNextPageButton }, n("chevron-icon", null)))), this.state === "error" && n("div", { class: "error-container" }, n("p", { class: "error" }, this.error)), !!this.deleteConfigurationId && n("div", { class: "card-wrapper" }, n("div", { class: "card-modal" }, n("div", { class: "close-button" }, n("button-component", { tooltip: "Close", id: "close", variant: "invisible", onClick: (t) => this.closeModal(t), part: "nfbf__close-button" }, n("close-icon", null))), n("div", { class: "header" }, n("h2", { slot: "card-title", part: "nfbf__title" }, d.t("deleteSchedulingPageTitle"))), n("div", { class: "description title-desc" }, n("p", null, d.t("deleteSchedulingPageDescription"))), n("div", { class: {
1504
+ })))), n("div", { class: "pagination" }, n("button", { class: "arrow left", onClick: () => this.previousPageClickedHandler(), disabled: this.previousCursors.length <= 0 }, n("chevron-icon", null)), n("button", { class: "arrow right", onClick: () => this.nextPageClickedHandler(), disabled: this.disableNextPageButton }, n("chevron-icon", null)))), !!this.deleteConfigurationId && n("div", { class: "card-wrapper" }, n("div", { class: "card-modal" }, n("div", { class: "close-button" }, n("button-component", { tooltip: "Close", id: "close", variant: "invisible", onClick: (t) => this.closeModal(t), part: "nfbf__close-button" }, n("close-icon", null))), n("div", { class: "header" }, n("h2", { slot: "card-title", part: "nfbf__title" }, i.t("deleteSchedulingPageTitle"))), n("div", { class: "description title-desc" }, n("p", null, i.t("deleteSchedulingPageDescription"))), n("div", { class: {
1328
1505
  footer: !0
1329
- } }, n("button-component", { variant: "basic", onClick: (t) => this.closeModal(t), part: "nfbf__button-outline nfbf__cancel-cta" }, `${d.t("deleteSchedulingPageCancelButton")}`), n("button-component", { variant: "destructive", onClick: (t) => this.handleConfirmDeleteButtonClicked(t), disabled: this.showDeleteButtonLoading, isLoading: this.showDeleteButtonLoading, part: "nfbf__button-outline nfbf__reschedule-cta" }, `${d.t("deleteSchedulingPageConfirmButton")}`)))));
1506
+ } }, n("button-component", { variant: "basic", onClick: (t) => this.closeModal(t), part: "nfbf__button-outline nfbf__cancel-cta" }, `${i.t("deleteSchedulingPageCancelButton")}`), n("button-component", { variant: "destructive", onClick: (t) => this.handleConfirmDeleteButtonClicked(t), disabled: this.showDeleteButtonLoading, isLoading: this.showDeleteButtonLoading, part: "nfbf__button-outline nfbf__reschedule-cta" }, `${i.t("deleteSchedulingPageConfirmButton")}`)))));
1330
1507
  }
1331
1508
  get host() {
1332
- return de(this);
1509
+ return pe(this);
1333
1510
  }
1334
1511
  static get watchers() {
1335
1512
  return {
@@ -1338,8 +1515,8 @@ const Ke = class {
1338
1515
  };
1339
1516
  }
1340
1517
  };
1341
- _t([
1342
- ce({
1518
+ wt([
1519
+ be({
1343
1520
  name: "nylas-list-configurations",
1344
1521
  stateToProps: /* @__PURE__ */ new Map([
1345
1522
  ["schedulerConfig.configurations", "configurations"],
@@ -1349,62 +1526,79 @@ _t([
1349
1526
  localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
1350
1527
  eventToProps: {
1351
1528
  initListConfigurations: async (e, t) => {
1352
- const { host: a, cursor: o } = e.detail;
1529
+ const { host: a, cursor: s } = e.detail;
1353
1530
  await a.setState("loading");
1354
- const [r, s] = await t.schedulerConfig.getConfigurations(o);
1355
- if (!r && s && s.message) {
1356
- await a.setState("error"), await a.setError(s.message);
1531
+ const [l, r] = await t.schedulerConfig.getConfigurations(s);
1532
+ if (!l && r && r.message) {
1533
+ await a.setState("error"), await a.setError({
1534
+ message: r.message,
1535
+ type: v.Error,
1536
+ category: w.Component,
1537
+ title: i.t("nylasEditorTabs.getConfigsError")
1538
+ });
1357
1539
  return;
1358
1540
  }
1359
1541
  await a.setState("loaded");
1360
1542
  },
1361
1543
  createButtonClick: async (e, t) => {
1362
1544
  t.schedulerConfigStore.resetSelectedConfiguration();
1363
- const a = Object.entries(t.schedulerConfigStore.state.enableEventTypes || {}).filter(([o, r]) => r);
1364
- a.length === 1 ? (t.schedulerConfigStore.state.action = "create", t.schedulerConfigStore.state.selectedEventType = H[a[0][0]]) : t.schedulerConfigStore.state.action = "create-select";
1545
+ const a = Object.entries(t.schedulerConfigStore.state.enableEventTypes || {}).filter(([s, l]) => l);
1546
+ a.length === 1 ? (t.schedulerConfigStore.state.action = "create", t.schedulerConfigStore.state.selectedEventType = z[a[0][0]]) : t.schedulerConfigStore.state.action = "create-select";
1365
1547
  },
1366
1548
  deleteButtonClick: async (e, t) => {
1367
- const { host: a, configuration: o } = e.detail, [r, s] = await t.schedulerConfig.deleteConfiguration(o.id);
1368
- !r && s && s.message && (await a.setState("error"), await a.setError(s.message)), await a.hideDeleteConfirmation();
1549
+ const { host: a, configuration: s } = e.detail, [l, r] = await t.schedulerConfig.deleteConfiguration(s.id);
1550
+ !l && r && r.message && (await a.setState("error"), await a.setError({
1551
+ message: r.message,
1552
+ type: v.Error,
1553
+ category: w.Component,
1554
+ title: i.t("nylasEditorTabs.deleteConfigError")
1555
+ })), await a.hideDeleteConfirmation();
1369
1556
  },
1370
1557
  editButtonClick: async (e, t) => {
1371
- const { configuration: a } = e.detail;
1372
- if (t.schedulerConfigStore.state.selectedConfiguration = a, a.type === "group") {
1373
- const { startTime: o, endTime: r } = et((/* @__PURE__ */ new Date()).toISOString(), "week");
1558
+ const { host: a, configuration: s } = e.detail;
1559
+ if (s.type === "group") {
1560
+ const { startTime: l, endTime: r } = nt((/* @__PURE__ */ new Date()).toISOString(), "week");
1374
1561
  t.schedulerConfigStore.state.calendarViewDateRange = {
1375
- start_time: o.toString(),
1562
+ start_time: l.toString(),
1376
1563
  end_time: r.toString()
1377
1564
  };
1378
- const [s, l] = await t.schedulerConfig.getGroupEvents(a.id);
1379
- if (!s && l && l.message)
1565
+ const [o, d] = await t.schedulerConfig.getGroupEvents(s.id, s);
1566
+ if (!o && d && d.message) {
1567
+ await a.setError({
1568
+ message: d.message,
1569
+ type: v.Error,
1570
+ category: w.Component,
1571
+ title: i.t("nylasEditorTabsGroup.getGroupEventsError")
1572
+ }), a.hideEditButtonLoading();
1380
1573
  return;
1574
+ }
1381
1575
  }
1382
- t.schedulerConfigStore.state.action = "edit";
1576
+ t.schedulerConfigStore.state.action = "edit", t.schedulerConfigStore.state.selectedConfiguration = s, a.hideEditButtonLoading();
1383
1577
  }
1384
1578
  },
1385
1579
  fireRegisterEvent: !0
1386
1580
  }),
1387
- ye("design:type", Function),
1388
- ye("design:paramtypes", []),
1389
- ye("design:returntype", void 0)
1390
- ], Ke.prototype, "render", null);
1391
- Ke.style = mt;
1392
- const vt = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-select-event-type{height:inherit;overflow-y:auto}.nylas-select-event-type div.header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--nylas-base-200)}.nylas-select-event-type div.header h2{font-size:18px;padding:0 24px;line-height:24px;margin:0;font-weight:600;color:var(--nylas-base-800)}.nylas-select-event-type div.header button-component button{background:transparent;border:none;cursor:pointer}.nylas-select-event-type div.header button-component button:hover,.nylas-select-event-type div.header button-component button:active{color:var(--nylas-primary);background-color:transparent}.nylas-select-event-type div.header button-component button:disabled{cursor:not-allowed}.nylas-select-event-type div.content{padding:40px}.nylas-select-event-type div.content h3{margin:0 0 32px 0;font-size:18px;line-height:24px;font-weight:600}.nylas-select-event-type div.content div.event-type{display:flex;flex-direction:column;gap:8px}.nylas-select-event-type div.content div.event-type div.event-type-option{padding:16px;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-3x);width:inherit;cursor:pointer;display:flex;flex-direction:column;gap:8px}.nylas-select-event-type div.content div.event-type div.event-type-option h4{margin:0;font-size:16px;line-height:24px;font-weight:600;color:var(--nylas-base-900)}.nylas-select-event-type div.content div.event-type div.event-type-option p{margin:0;font-size:14px;line-height:21px;font-weight:400;color:var(--nylas-base-800)}', wt = vt;
1393
- var kt = function(e, t, a, o) {
1394
- var r = arguments.length, s = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, a) : o, l;
1581
+ fe("design:type", Function),
1582
+ fe("design:paramtypes", []),
1583
+ fe("design:returntype", void 0)
1584
+ ], Qe.prototype, "render", null);
1585
+ Qe.style = vt;
1586
+ const kt = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-select-event-type{height:inherit;overflow-y:auto}.nylas-select-event-type div.header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--nylas-base-200)}.nylas-select-event-type div.header h2{font-size:18px;padding:0 24px;line-height:24px;margin:0;font-weight:600;color:var(--nylas-base-800)}.nylas-select-event-type div.header button-component button{background:transparent;border:none;cursor:pointer}.nylas-select-event-type div.header button-component button:hover,.nylas-select-event-type div.header button-component button:active{color:var(--nylas-primary);background-color:transparent}.nylas-select-event-type div.header button-component button:disabled{cursor:not-allowed}.nylas-select-event-type div.content{padding:40px}.nylas-select-event-type div.content h3{margin:0 0 32px 0;font-size:18px;line-height:24px;font-weight:600}.nylas-select-event-type div.content div.event-type{display:flex;flex-direction:column;gap:8px}.nylas-select-event-type div.content div.event-type div.event-type-option{padding:16px;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-3x);width:inherit;cursor:pointer;display:flex;flex-direction:column;gap:8px}.nylas-select-event-type div.content div.event-type div.event-type-option h4{margin:0;font-size:16px;line-height:24px;font-weight:600;color:var(--nylas-base-900)}.nylas-select-event-type div.content div.event-type div.event-type-option p{margin:0;font-size:14px;line-height:21px;font-weight:400;color:var(--nylas-base-800)}', Ct = kt;
1587
+ var xt = function(e, t, a, s) {
1588
+ var l = arguments.length, r = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, o;
1395
1589
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
1396
- s = Reflect.decorate(e, t, a, o);
1590
+ r = Reflect.decorate(e, t, a, s);
1397
1591
  else
1398
- for (var i = e.length - 1; i >= 0; i--)
1399
- (l = e[i]) && (s = (r < 3 ? l(s) : r > 3 ? l(t, a, s) : l(t, a)) || s);
1400
- return r > 3 && s && Object.defineProperty(t, a, s), s;
1401
- }, fe = function(e, t) {
1592
+ for (var d = e.length - 1; d >= 0; d--)
1593
+ (o = e[d]) && (r = (l < 3 ? o(r) : l > 3 ? o(t, a, r) : o(t, a)) || r);
1594
+ return l > 3 && r && Object.defineProperty(t, a, r), r;
1595
+ }, me = function(e, t) {
1402
1596
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
1403
1597
  return Reflect.metadata(e, t);
1404
1598
  };
1405
- const Ye = class {
1599
+ const Xe = class {
1406
1600
  constructor(e) {
1407
- X(this, e), this.returnToAllSchedulingPagesEvent = _(this, "returnToAllSchedulingPagesEvent", 7), this.createEventTypeSelected = _(this, "createEventTypeSelected", 7), this.participantOptions = void 0, this.name = "select-event-type", this.selectedLanguage = void 0, this.enableEventTypes = {
1601
+ te(this, e), this.returnToAllSchedulingPagesEvent = _(this, "returnToAllSchedulingPagesEvent", 7), this.createEventTypeSelected = _(this, "createEventTypeSelected", 7), this.participantOptions = void 0, this.name = "select-event-type", this.selectedLanguage = void 0, this.enableEventTypes = {
1408
1602
  one_on_one: !0,
1409
1603
  collective: !0,
1410
1604
  max_fairness: !0,
@@ -1428,10 +1622,10 @@ const Ye = class {
1428
1622
  b("nylas-select-event-type", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
1429
1623
  }
1430
1624
  selectedLanguageChangedHandler(e, t) {
1431
- e !== t && d.changeLanguage(e);
1625
+ e !== t && i.changeLanguage(e);
1432
1626
  }
1433
1627
  render() {
1434
- var s;
1628
+ var r;
1435
1629
  const e = {
1436
1630
  "one-on-one": "one_on_one",
1437
1631
  collective: "collective",
@@ -1440,42 +1634,42 @@ const Ye = class {
1440
1634
  group: "group"
1441
1635
  }, t = [
1442
1636
  {
1443
- label: d.t("nylasSelectEventType.eventTypeOptions.oneOnOne.label"),
1444
- value: H.one_on_one,
1445
- description: d.t("nylasSelectEventType.eventTypeOptions.oneOnOne.desc")
1637
+ label: i.t("nylasSelectEventType.eventTypeOptions.oneOnOne.label"),
1638
+ value: z.one_on_one,
1639
+ description: i.t("nylasSelectEventType.eventTypeOptions.oneOnOne.desc")
1446
1640
  },
1447
1641
  {
1448
- label: d.t("nylasSelectEventType.eventTypeOptions.collective.label"),
1449
- value: H.collective,
1450
- description: d.t("nylasSelectEventType.eventTypeOptions.collective.desc")
1642
+ label: i.t("nylasSelectEventType.eventTypeOptions.collective.label"),
1643
+ value: z.collective,
1644
+ description: i.t("nylasSelectEventType.eventTypeOptions.collective.desc")
1451
1645
  },
1452
1646
  {
1453
- label: d.t("nylasSelectEventType.eventTypeOptions.maxFairness.label"),
1454
- value: H.max_fairness,
1455
- description: d.t("nylasSelectEventType.eventTypeOptions.maxFairness.desc")
1647
+ label: i.t("nylasSelectEventType.eventTypeOptions.maxFairness.label"),
1648
+ value: z.max_fairness,
1649
+ description: i.t("nylasSelectEventType.eventTypeOptions.maxFairness.desc")
1456
1650
  },
1457
1651
  {
1458
- label: d.t("nylasSelectEventType.eventTypeOptions.maxAvailability.label"),
1459
- value: H.max_availability,
1460
- description: d.t("nylasSelectEventType.eventTypeOptions.maxAvailability.desc")
1652
+ label: i.t("nylasSelectEventType.eventTypeOptions.maxAvailability.label"),
1653
+ value: z.max_availability,
1654
+ description: i.t("nylasSelectEventType.eventTypeOptions.maxAvailability.desc")
1461
1655
  },
1462
1656
  {
1463
- label: d.t("nylasSelectEventType.eventTypeOptions.group.label"),
1464
- value: H.group,
1465
- description: d.t("nylasSelectEventType.eventTypeOptions.group.desc")
1657
+ label: i.t("nylasSelectEventType.eventTypeOptions.group.label"),
1658
+ value: z.group,
1659
+ description: i.t("nylasSelectEventType.eventTypeOptions.group.desc")
1466
1660
  }
1467
- ], a = [H.collective, H.max_availability, H.max_fairness], o = this.participantOptions && ((s = this.participantOptions) == null ? void 0 : s.length) > 0 && !!this.participantOptions[0].email && !!this.participantOptions[0].name && !!this.participantOptions[0].calendars && this.participantOptions[0].calendars.length > 0, r = this.enableEventTypes ? t.filter((l) => {
1468
- const i = l.value, c = e[i];
1469
- return console.log("key", i, this.enableEventTypes ? this.enableEventTypes[c] : "no enableEventTypes"), a.includes(i) && !o ? !1 : this.enableEventTypes && this.enableEventTypes[c];
1661
+ ], a = [z.collective, z.max_availability, z.max_fairness], s = this.participantOptions && ((r = this.participantOptions) == null ? void 0 : r.length) > 0 && !!this.participantOptions[0].email && !!this.participantOptions[0].name && !!this.participantOptions[0].calendars && this.participantOptions[0].calendars.length > 0, l = this.enableEventTypes ? t.filter((o) => {
1662
+ const d = o.value, c = e[d];
1663
+ return console.log("key", d, this.enableEventTypes ? this.enableEventTypes[c] : "no enableEventTypes"), a.includes(d) && !s ? !1 : this.enableEventTypes && this.enableEventTypes[c];
1470
1664
  }) : t;
1471
- return n(le, null, n("div", { class: "nylas-select-event-type", part: "nset" }, n("div", { class: "header", part: "nset__header" }, n("h2", null, d.t("nylasSelectEventType.createEventHeaderTitle")), n("button-component", { variant: "invisible", part: "nset__header__back-button", onClick: (l) => {
1665
+ return n(ce, null, n("div", { class: "nylas-select-event-type", part: "nset" }, n("div", { class: "header", part: "nset__header" }, n("h2", null, i.t("nylasSelectEventType.createEventHeaderTitle")), n("button-component", { variant: "invisible", part: "nset__header__back-button", onClick: (o) => {
1472
1666
  this.returnToAllSchedulingPagesEvent.emit();
1473
- } }, n("chevron-icon", { width: "16", height: "16" }), n("span", null, d.t("nylasSelectEventType.returnToAllSchedulingPages")))), n("div", { class: "content", part: "nset__content" }, n("h3", null, d.t("nylasSelectEventType.eventTypeHeaderTitle")), n("div", { class: "event-type", part: "nset__content__event-type" }, r.length === 0 && n("p", null, d.t("nylasSelectEventType.noEventTypesEnabled")), r.map((l) => n("div", { class: "event-type-option", onClick: (i) => {
1474
- this.createEventTypeSelected.emit({ eventType: l.value });
1475
- }, part: `nset__content__event-type-option-${l.value}` }, n("h4", null, l.label), n("p", null, l.description)))))));
1667
+ } }, n("chevron-icon", { width: "16", height: "16" }), n("span", null, i.t("nylasSelectEventType.returnToAllSchedulingPages")))), n("div", { class: "content", part: "nset__content" }, n("h3", null, i.t("nylasSelectEventType.eventTypeHeaderTitle")), n("div", { class: "event-type", part: "nset__content__event-type" }, l.length === 0 && n("p", null, i.t("nylasSelectEventType.noEventTypesEnabled")), l.map((o) => n("div", { class: "event-type-option", onClick: (d) => {
1668
+ this.createEventTypeSelected.emit({ eventType: o.value });
1669
+ }, part: `nset__content__event-type-option-${o.value}` }, n("h4", null, o.label), n("p", null, o.description)))))));
1476
1670
  }
1477
1671
  get host() {
1478
- return de(this);
1672
+ return pe(this);
1479
1673
  }
1480
1674
  static get watchers() {
1481
1675
  return {
@@ -1484,8 +1678,8 @@ const Ye = class {
1484
1678
  };
1485
1679
  }
1486
1680
  };
1487
- kt([
1488
- ce({
1681
+ xt([
1682
+ be({
1489
1683
  name: "nylas-select-event-type",
1490
1684
  stateToProps: /* @__PURE__ */ new Map([
1491
1685
  ["schedulerConfig.selectedLanguage", "selectedLanguage"],
@@ -1503,16 +1697,16 @@ kt([
1503
1697
  },
1504
1698
  fireRegisterEvent: !0
1505
1699
  }),
1506
- fe("design:type", Function),
1507
- fe("design:paramtypes", []),
1508
- fe("design:returntype", void 0)
1509
- ], Ye.prototype, "render", null);
1510
- Ye.style = wt;
1700
+ me("design:type", Function),
1701
+ me("design:paramtypes", []),
1702
+ me("design:returntype", void 0)
1703
+ ], Xe.prototype, "render", null);
1704
+ Xe.style = Ct;
1511
1705
  export {
1512
- st as google_logo_icon,
1513
- lt as microsoft_logo_icon,
1514
- We as nylas_editor_tabs,
1515
- qe as nylas_editor_tabs_group,
1516
- Ke as nylas_list_configurations,
1517
- Ye as nylas_select_event_type
1706
+ it as google_logo_icon,
1707
+ ct as microsoft_logo_icon,
1708
+ Ke as nylas_editor_tabs,
1709
+ Ye as nylas_editor_tabs_group,
1710
+ Qe as nylas_list_configurations,
1711
+ Xe as nylas_select_event_type
1518
1712
  };