@nylas/react 1.4.5 → 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 (173) 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-5bb183c1.js → arrow-icon.entry-2e61394e.js} +5 -5
  8. package/dist/arrow-icon.entry-9d471162.cjs +1 -0
  9. package/dist/{bold-icon.entry-c919c71d.cjs → bold-icon.entry-5c37622f.cjs} +1 -1
  10. package/dist/{bold-icon.entry-e0010c60.js → bold-icon.entry-8ef1b653.js} +2 -2
  11. package/dist/{button-component_2.entry-078ee06a.cjs → button-component_2.entry-8335ee1e.cjs} +1 -1
  12. package/dist/{button-component_2.entry-1dd1b8d6.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-772a70d7.js → calendar-agenda-fill-icon_36.entry-5f184433.js} +900 -881
  15. package/dist/{calendar-cancel-icon.entry-b791b6b1.cjs → calendar-cancel-icon.entry-65a4a34e.cjs} +1 -1
  16. package/dist/{calendar-cancel-icon.entry-7d1a7cea.js → calendar-cancel-icon.entry-dd6ac4db.js} +5 -5
  17. package/dist/{calendar-check-icon_2.entry-2380a4e6.cjs → calendar-check-icon_2.entry-ded15038.cjs} +1 -1
  18. package/dist/{calendar-check-icon_2.entry-2b5711fd.js → calendar-check-icon_2.entry-f9b50bb8.js} +3 -3
  19. package/dist/{calendar-icon.entry-9b23c994.js → calendar-icon.entry-a2a1ddbc.js} +2 -2
  20. package/dist/{calendar-icon.entry-f88c8b09.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-cc428f95.js → checkbox-group_4.entry-e5145451.js} +1038 -923
  25. package/dist/{checkmark-icon_15.entry-3ddf90df.js → checkmark-icon_15.entry-6e92e93e.js} +21 -21
  26. package/dist/checkmark-icon_15.entry-a75a1825.cjs +5 -0
  27. package/dist/{chevron-icon_3.entry-af195326.js → chevron-icon_3.entry-6eaa3513.js} +16 -16
  28. package/dist/{chevron-icon_3.entry-a492d340.cjs → chevron-icon_3.entry-9193a885.cjs} +1 -1
  29. package/dist/{clock-icon_4.entry-7dc4324b.js → clock-icon_4.entry-2c93270e.js} +8 -8
  30. package/dist/{clock-icon_4.entry-530cd13b.cjs → clock-icon_4.entry-ae2272f4.cjs} +1 -1
  31. package/dist/constants-f51538ef-cd2a67c4.cjs +1 -0
  32. package/dist/{constants-3d8016e3-3c080f00.js → constants-f51538ef-e0a5f026.js} +27 -32
  33. package/dist/{customParseFormat-129be926-36eabae2.js → customParseFormat-edc38d83-b3722499.js} +1 -1
  34. package/dist/{customParseFormat-129be926-30b2af24.cjs → customParseFormat-edc38d83-fa9c77d9.cjs} +1 -1
  35. package/dist/{delete-icon.entry-3328484a.js → delete-icon.entry-6684eba6.js} +2 -2
  36. package/dist/{delete-icon.entry-9369bf78.cjs → delete-icon.entry-b9e4f2c7.cjs} +1 -1
  37. package/dist/{document-refresh-icon.entry-f45be1c4.cjs → document-refresh-icon.entry-7afe6163.cjs} +1 -1
  38. package/dist/document-refresh-icon.entry-fba9f60b.js +16 -0
  39. package/dist/{feedbackSync-d943ffc7-d1e98ba0.js → feedbackSync-e4378c0b-23289195.js} +811 -798
  40. package/dist/{feedbackSync-d943ffc7-13f01c1f.cjs → feedbackSync-e4378c0b-7876d067.cjs} +26 -26
  41. package/dist/{folder-icon.entry-c4ffba45.js → folder-icon.entry-430c6b47.js} +4 -4
  42. package/dist/{folder-icon.entry-48cfa8d0.cjs → folder-icon.entry-b1632bf3.cjs} +1 -1
  43. package/dist/{forward-icon.entry-dd036273.js → forward-icon.entry-5e53da76.js} +2 -2
  44. package/dist/{forward-icon.entry-146f3318.cjs → forward-icon.entry-7626dcca.cjs} +1 -1
  45. package/dist/{globe-icon_2.entry-d6a95f6e.js → globe-icon_2.entry-646eae41.js} +21 -21
  46. package/dist/{globe-icon_2.entry-049fbca2.cjs → globe-icon_2.entry-bbb0a6ce.cjs} +1 -1
  47. package/dist/{google-logo-icon_6.entry-e26385cc.js → google-logo-icon_6.entry-5951a546.js} +665 -455
  48. package/dist/google-logo-icon_6.entry-e39dd9cb.cjs +2 -0
  49. package/dist/{google-meet-icon_5.entry-c0129f58.js → google-meet-icon_5.entry-a54c83da.js} +14 -14
  50. package/dist/{google-meet-icon_5.entry-94112d7e.cjs → google-meet-icon_5.entry-c13e0738.cjs} +1 -1
  51. package/dist/inbox-icon.entry-7bee82b3.js +16 -0
  52. package/dist/inbox-icon.entry-911b047a.cjs +1 -0
  53. package/dist/index-71f61ea9.js +24544 -0
  54. package/dist/index-f769bc2a.cjs +118 -0
  55. package/dist/index.d.ts +1 -4
  56. package/dist/index.es-6a9d55cf-122c27e0.js +2724 -0
  57. package/dist/index.es-6a9d55cf-458ba0e0.cjs +7 -0
  58. package/dist/{info-icon_2.entry-8bcd39dc.cjs → info-icon_2.entry-471b836b.cjs} +1 -1
  59. package/dist/{info-icon_2.entry-ef5dbccc.js → info-icon_2.entry-6ff2f004.js} +3 -3
  60. package/dist/{input-component.entry-922063d5.js → input-component.entry-781b584c.js} +12 -12
  61. package/dist/{input-component.entry-cc1fb2fa.cjs → input-component.entry-b6a9b4cb.cjs} +1 -1
  62. package/dist/{input-dropdown_2.entry-4041c294.js → input-dropdown_2.entry-1feebcba.js} +4 -4
  63. package/dist/{input-dropdown_2.entry-f3750e99.cjs → input-dropdown_2.entry-c71d14ff.cjs} +1 -1
  64. package/dist/{italic-icon.entry-63b6943f.cjs → italic-icon.entry-16debde5.cjs} +1 -1
  65. package/dist/italic-icon.entry-9ef7f4a2.js +16 -0
  66. package/dist/{elements → lib/elements}/index.d.ts +1 -1
  67. package/dist/lib/index.d.ts +5 -0
  68. package/dist/lib/main.d.ts +0 -0
  69. package/dist/lib/notetaker/CalendarSync/CalendarSync.d.ts +37 -0
  70. package/dist/lib/notetaker/CalendarSync/CalendarSync.spec.d.ts +0 -0
  71. package/dist/lib/notetaker/SendNotetaker/SendNotetaker.d.ts +31 -0
  72. package/dist/lib/notetaker/SendNotetaker/SendNotetaker.spec.d.ts +1 -0
  73. package/dist/lib/notetaker/Transcript/Transcript.d.ts +23 -0
  74. package/dist/lib/notetaker/Transcript/Transcript.spec.d.ts +0 -0
  75. package/dist/lib/notetaker/VideoPlayer/VideoPlayer.d.ts +22 -0
  76. package/dist/lib/notetaker/VideoPlayer/VideoPlayer.spec.d.ts +1 -0
  77. package/dist/lib/notetaker/index.d.ts +9 -0
  78. package/dist/lib/notetaker/lib/constants.d.ts +12 -0
  79. package/dist/lib/notetaker/lib/http-client.d.ts +2 -0
  80. package/dist/lib/notetaker/lib/primitives.d.ts +66 -0
  81. package/dist/lib/notetaker/lib/store.d.ts +7 -0
  82. package/dist/lib/notetaker/types.d.ts +42 -0
  83. package/dist/multi-select-dropdown.entry-0a6f9417.cjs +1 -0
  84. package/dist/multi-select-dropdown.entry-1b27c746.js +121 -0
  85. package/dist/nylas-booked-event-card_11.entry-74fba802.cjs +1 -0
  86. package/dist/{nylas-booked-event-card_12.entry-7eceb6b6.js → nylas-booked-event-card_11.entry-802671ee.js} +469 -534
  87. package/dist/{nylas-form-card.entry-984be5f9.cjs → nylas-form-card.entry-59a837c9.cjs} +1 -1
  88. package/dist/{nylas-form-card.entry-dd3f240a.js → nylas-form-card.entry-7da9a312.js} +3 -3
  89. package/dist/nylas-notification_2.entry-8f8bad34.cjs +1 -0
  90. package/dist/nylas-notification_2.entry-b16bb805.js +85 -0
  91. package/dist/{nylas-scheduler-editor.entry-623da747.js → nylas-scheduler-editor.entry-cbe3e1e3.js} +201 -168
  92. package/dist/nylas-scheduler-editor.entry-e33e11fb.cjs +2 -0
  93. package/dist/nylas-scheduling.entry-4223e50b.cjs +1 -0
  94. package/dist/{nylas-scheduling.entry-6608aa36.js → nylas-scheduling.entry-6fb094a8.js} +295 -295
  95. package/dist/{person-icon.entry-9f0233cd.js → person-icon.entry-6232e6fd.js} +7 -7
  96. package/dist/{person-icon.entry-168ba481.cjs → person-icon.entry-beb26b48.cjs} +1 -1
  97. package/dist/play-icon.entry-16a1c1ac.js +16 -0
  98. package/dist/{play-icon.entry-4115845d.cjs → play-icon.entry-9060d0d8.cjs} +1 -1
  99. package/dist/{radio-button-group.entry-da3f23ac.js → radio-button-group.entry-5a3728cd.js} +2 -2
  100. package/dist/{radio-button-group.entry-3ae5f246.cjs → radio-button-group.entry-6935c39d.cjs} +1 -1
  101. package/dist/react.cjs +1 -1
  102. package/dist/react.js +135 -126
  103. package/dist/{refresh-icon.entry-13742bb5.cjs → refresh-icon.entry-2411b2e1.cjs} +1 -1
  104. package/dist/{refresh-icon.entry-e1db3ca5.js → refresh-icon.entry-4f56e72b.js} +2 -2
  105. package/dist/{register-component-083eb961-763c87e9.js → register-component-a1c3d7b4-774feacc.js} +1 -1
  106. package/dist/{register-component-083eb961-c5c48a1b.cjs → register-component-a1c3d7b4-97d7a6f5.cjs} +1 -1
  107. package/dist/{reply-all-icon.entry-9446c2d0.cjs → reply-all-icon.entry-b4b6926b.cjs} +1 -1
  108. package/dist/{reply-all-icon.entry-ded706c7.js → reply-all-icon.entry-b4b917ec.js} +2 -2
  109. package/dist/{reply-icon.entry-7c5c0fd9.js → reply-icon.entry-24f6f4c6.js} +5 -5
  110. package/dist/{reply-icon.entry-0d362c63.cjs → reply-icon.entry-454545ed.cjs} +1 -1
  111. package/dist/sent-icon.entry-d9a79336.cjs +1 -0
  112. package/dist/sent-icon.entry-fa59ce85.js +16 -0
  113. package/dist/spam-icon.entry-da39987e.cjs +1 -0
  114. package/dist/spam-icon.entry-fb18a08b.js +16 -0
  115. package/dist/{star-icon.entry-3a81207c.js → star-icon.entry-406472c1.js} +4 -4
  116. package/dist/{star-icon.entry-87823b56.cjs → star-icon.entry-833f35a7.cjs} +1 -1
  117. package/dist/{stop-icon.entry-472a11dc.js → stop-icon.entry-1b6ae838.js} +2 -2
  118. package/dist/{stop-icon.entry-ddf9242a.cjs → stop-icon.entry-3258db59.cjs} +1 -1
  119. package/dist/style.css +1 -0
  120. package/dist/test/vitest.setup.d.ts +0 -0
  121. package/dist/{textarea-component.entry-2c6c0c7e.cjs → textarea-component.entry-0ae18897.cjs} +1 -1
  122. package/dist/{textarea-component.entry-f9797150.js → textarea-component.entry-569a281e.js} +2 -2
  123. package/dist/{toggle-switch.entry-fbef6918.cjs → toggle-switch.entry-60d75f16.cjs} +1 -1
  124. package/dist/{toggle-switch.entry-a7cbc256.js → toggle-switch.entry-dc3f796b.js} +4 -4
  125. package/dist/{translate-icon.entry-0ab604fe.js → translate-icon.entry-297cf20f.js} +4 -4
  126. package/dist/{translate-icon.entry-2fe4868f.cjs → translate-icon.entry-c183ecb5.cjs} +1 -1
  127. package/dist/trash-fill-icon.entry-3d8a2e5e.js +16 -0
  128. package/dist/trash-fill-icon.entry-94d4f66c.cjs +1 -0
  129. package/dist/{underline-icon.entry-29366789.js → underline-icon.entry-4a9105c7.js} +2 -2
  130. package/dist/{underline-icon.entry-6a2ca451.cjs → underline-icon.entry-50d1e766.cjs} +1 -1
  131. package/package.json +41 -17
  132. package/dist/add-circle-icon_2.entry-55361a03.js +0 -26
  133. package/dist/add-circle-icon_2.entry-75a3df95.cjs +0 -1
  134. package/dist/archive-icon.entry-3c4e4b28.js +0 -16
  135. package/dist/archive-icon.entry-8aa151fd.cjs +0 -1
  136. package/dist/arrow-icon.entry-2cef5ca1.cjs +0 -1
  137. package/dist/calendar-agenda-fill-icon_36.entry-9b694a33.cjs +0 -6
  138. package/dist/checkbox-component.entry-94fd68e7.js +0 -43
  139. package/dist/checkbox-component.entry-af77c4fa.cjs +0 -1
  140. package/dist/checkmark-icon_15.entry-de65b967.cjs +0 -5
  141. package/dist/constants-3d8016e3-fd6c3848.cjs +0 -1
  142. package/dist/document-refresh-icon.entry-902ead30.js +0 -16
  143. package/dist/google-logo-icon_6.entry-4d9e06be.cjs +0 -2
  144. package/dist/inbox-icon.entry-74d7a10d.js +0 -16
  145. package/dist/inbox-icon.entry-94683ba9.cjs +0 -1
  146. package/dist/index-3b0366ac.cjs +0 -57
  147. package/dist/index-6e735f92.js +0 -18483
  148. package/dist/index.es-4615d47c-9156501b.js +0 -2908
  149. package/dist/index.es-4615d47c-b7c254fe.cjs +0 -7
  150. package/dist/italic-icon.entry-6706da64.js +0 -16
  151. package/dist/multi-select-dropdown_2.entry-1096321d.cjs +0 -1
  152. package/dist/multi-select-dropdown_2.entry-e10a9439.js +0 -193
  153. package/dist/nylas-booked-event-card_12.entry-38f37135.cjs +0 -1
  154. package/dist/nylas-event-calendar_3.entry-7dad0f2f.cjs +0 -11
  155. package/dist/nylas-scheduler-editor.entry-8fb56081.cjs +0 -2
  156. package/dist/nylas-scheduling.entry-472ef577.cjs +0 -1
  157. package/dist/play-icon.entry-5fbfabb5.js +0 -16
  158. package/dist/sent-icon.entry-92434496.cjs +0 -1
  159. package/dist/sent-icon.entry-bc9d1b35.js +0 -16
  160. package/dist/spam-icon.entry-11370b68.js +0 -16
  161. package/dist/spam-icon.entry-e0313c63.cjs +0 -1
  162. package/dist/trash-fill-icon.entry-1904e8d6.cjs +0 -1
  163. package/dist/trash-fill-icon.entry-4bdfb061.js +0 -16
  164. package/dist/warning-icon.entry-1649ffe7.js +0 -16
  165. package/dist/warning-icon.entry-3f848ed6.cjs +0 -1
  166. /package/dist/{elements → lib/elements}/react-component-lib/createComponent.d.ts +0 -0
  167. /package/dist/{elements → lib/elements}/react-component-lib/createOverlayComponent.d.ts +0 -0
  168. /package/dist/{elements → lib/elements}/react-component-lib/index.d.ts +0 -0
  169. /package/dist/{elements → lib/elements}/react-component-lib/interfaces.d.ts +0 -0
  170. /package/dist/{elements → lib/elements}/react-component-lib/utils/attachProps.d.ts +0 -0
  171. /package/dist/{elements → lib/elements}/react-component-lib/utils/case.d.ts +0 -0
  172. /package/dist/{elements → lib/elements}/react-component-lib/utils/dev.d.ts +0 -0
  173. /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-6e735f92.js";
2
- import { R as ce } from "./register-component-083eb961-763c87e9.js";
3
- import { C as O, D as Ae, e as tt, b as nt } from "./constants-3d8016e3-3c080f00.js";
4
- import { i as je, a as $e, c as Je, b as Ve, f as Ze } from "./feedbackSync-d943ffc7-d1e98ba0.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 }, s) {
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 }, s) {
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" })
@@ -115,36 +116,41 @@ function dt({ id: e, formState: t, activeTab: a }, s) {
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, s) {
120
- var r = arguments.length, o = r < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, 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
- o = Reflect.decorate(e, t, a, s);
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]) && (o = (r < 3 ? l(o) : r > 3 ? l(t, a, o) : l(t, a)) || o);
126
- return r > 3 && o && Object.defineProperty(t, a, o), o;
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: o, description: l, duration: i, availability: c, bookingCalendar: p, location: f, bookingType: m, buffer: w, availableDaysInFuture: x, minCancellationNotice: T, minBookingNotice: z, cancellationPolicy: P, timeslotInterval: S, additionalGuestsHidden: B, hideCancellationOptions: N, hideReschedulingOptions: R, participants: E, participantOpenHours: k, additionalFields: M, participantCalendars: h, conferencing: U, participantBookingCalendars: v, reminders: A, emailTemplate: I, redirectUrl: j, availabilityMethod: H, slug: $, appearance: J, name: Y, disableEmails: V, organizerLocale: K } = 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 = H || (((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 !== O.group && (D = this.selectedEventType === O.one_on_one ? O.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: Y,
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) ?? Ae,
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: (o == null ? void 0 : o.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: A,
217
- disable_emails: typeof V == "boolean" ? V : !1
222
+ reminders: $,
223
+ disable_emails: typeof W == "boolean" ? W : !1
218
224
  },
219
225
  scheduler: {
220
226
  cancellation_policy: P ?? "",
221
- available_days_in_future: x ?? 30,
222
- min_cancellation_notice: T ?? 0,
223
- min_booking_notice: z ?? 60,
224
- hide_additional_guests: B ?? !1,
225
- hide_cancellation_options: N ?? !1,
226
- hide_rescheduling_options: R ?? !1,
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: K || "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: j
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, s, r, o;
249
- return ((s = (a = t == null ? void 0 : t.availability) == null ? void 0 : a.availability_rules) == null ? void 0 : s.availability_method) === "max-availability" || ((o = (r = t.availability) == null ? void 0 : r.availability_rules) == null ? void 0 : o.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;
257
+ var o, d;
252
258
  let a = !1, s = "";
253
- const r = ((l = t.event_booking) == null ? void 0 : l.booking_type) === "organizer-confirmation", o = (i = t.scheduler) == null ? void 0 : i.organizer_confirmation_url;
254
- return r && !o && (s += "Organizer confirmation URL is required when using organizer confirmation booking type.", a = !0), a && (this.isLoading = !1, this.host.setError(new Error(s))), a;
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 o;
267
+ var r;
257
268
  let a = !1, s = "";
258
- const r = (o = t.scheduler) == null ? void 0 : o.additional_fields;
259
- return r && (s = d.t("nylasEditorTabs.bookingFormError"), Object.entries(r).forEach((l) => {
260
- const i = l[1];
261
- if (i.label === "") {
262
- s += d.t("nylasEditorTabs.bookingFormError_label", { type: i.type }), a = !0;
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
- s += 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(s))), 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 && !je() && $e({
341
+ b("[nylas-editor-tabs]", "componentDidLoad"), this.enableUserFeedback && !Je() && Ve({
303
342
  dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
304
- release: "1.4.5",
343
+ release: "2.0.1",
305
344
  integrations: (s) => [
306
- ...s.filter((r) => !1),
307
- Ze({
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 s, r, o, 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
376
  configId: (s = this.selectedConfiguration) == null ? void 0 : s.id,
338
- slug: (r = this.selectedConfiguration) == null ? void 0 : r.slug
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": "1.4.5",
349
- "nylas-config-id": (o = this.selectedConfiguration) == null ? void 0 : o.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, s, r, o, l, i, c, p, f, m, w, x, T, z, P, S, B, N, R, E, k, M, h, U, v, A, I, j, H, $, J, Y, V, K, 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 = (s = e == null ? void 0 : e.availability) == null ? void 0 : s.availability_rules) == null ? void 0 : r.availability_method) !== "collective" && (t = (o = e == null ? void 0 : e.participants) == null ? void 0 : o.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) ?? Ae
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
430
  bookingCalendar: ((P = t == null ? void 0 : t.booking) == null ? void 0 : P.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: ((B = e == null ? void 0 : e.event_booking) == null ? void 0 : B.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,
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: (A = e == null ? void 0 : e.availability) == null ? void 0 : A.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: ((j = e == null ? void 0 : e.scheduler) == null ? void 0 : j.hide_cancellation_options) ?? !1,
392
- hideReschedulingOptions: ((H = e == null ? void 0 : e.scheduler) == null ? void 0 : H.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: (Y = e == null ? void 0 : e.event_booking) == null ? void 0 : Y.reminders,
402
- emailTemplate: (V = e == null ? void 0 : e.scheduler) == null ? void 0 : V.email_template,
403
- redirectUrl: (K = e == null ? void 0 : e.scheduler) == null ? void 0 : K.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) {
@@ -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: s, action: r, config: o } = e.detail, l = (i) => {
562
- const [c, p] = i;
563
- !c && p ? s.setError(p) : c && !p && r === "create" && (s.schedulerConfigCreatedEventHandler({ config: c, action: r, host: s }), 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(o);
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(o);
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 }, s) {
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 }, s) {
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 }, s) {
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
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, s) {
668
- var r = arguments.length, o = r < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, 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
- o = Reflect.decorate(e, t, a, s);
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]) && (o = (r < 3 ? l(o) : r > 3 ? l(t, a, o) : l(t, a)) || o);
674
- return r > 3 && o && Object.defineProperty(t, a, o), o;
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: o, description: l, bookingCalendar: i, location: c, bookingType: p, minCancellationNotice: f, minBookingNotice: m, cancellationPolicy: w, hideCancellationOptions: x, hideReschedulingOptions: T, additionalFields: z, conferencing: P, reminders: S, emailTemplate: B, redirectUrl: N, slug: R, appearance: E, name: k, eventCapacity: M, eventTimeslot: h, participants: U, disableEmails: v, organizerLocale: A } = 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 === O.group ? O.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: B ? {
705
- ...B,
706
- organizer_locale: A || "en",
707
- logo: B.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,
776
+ disable_emails: typeof C == "boolean" ? C : !1,
777
+ reminders: T,
716
778
  conferencing: P,
717
- calendar_id: i || "primary",
779
+ calendar_id: d || "primary",
718
780
  default_capacity: M || 10
719
781
  }
720
- }, j = ge(this.selectedConfiguration, I || {}), H = this.action === "create" ? j : I;
721
- delete H.availability, delete H.participants, delete H.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(H))
789
+ if (this.checkForBookingFormErrors(N))
728
790
  return;
729
- const Y = {
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]), K = [{ ...Y, is_organizer: !0 }], C = (te = this.selectedConfiguration) != null && te.id ? void 0 : {
733
- title: o,
734
- description: l,
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,
735
797
  location: P ? void 0 : c,
736
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 : K,
746
- organizer: Y,
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: H, 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 o;
813
+ var r;
752
814
  let a = !1, s = "";
753
- const r = (o = t.scheduler) == null ? void 0 : o.additional_fields;
754
- return r && (s = d.t("nylasEditorTabs.bookingFormError"), Object.entries(r).forEach((l) => {
755
- const i = l[1];
756
- if (i.label === "") {
757
- s += d.t("nylasEditorTabs.bookingFormError_label", { type: i.type }), a = !0;
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
- s += 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(s))), 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,28 +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, s, r, o, l, i, c, p, f, m, w, x, T, z, P, S, B, N, R, E, k, M, h, U, v, A, I, j, H, $;
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 = (s = this.selectedGroupEvent) == null ? void 0 : s.event) == null ? void 0 : r.description,
781
- location: (l = (o = this.selectedGroupEvent) == null ? void 0 : o.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,
788
- timezone: ""
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
789
860
  })),
790
- 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 ? {
791
862
  when: {
792
- start_time: (B = (S = (P = this.selectedGroupEvent) == null ? void 0 : P.event) == null ? void 0 : S.when) == null ? void 0 : B.start_time,
793
- end_time: (E = (R = (N = this.selectedGroupEvent) == null ? void 0 : N.event) == null ? void 0 : R.when) == null ? void 0 : E.end_time,
794
- start_timezone: (h = (M = (k = this.selectedGroupEvent) == null ? void 0 : k.event) == null ? void 0 : M.when) == null ? void 0 : h.start_timezone,
795
- end_timezone: (A = (v = (U = this.selectedGroupEvent) == null ? void 0 : U.event) == null ? void 0 : v.when) == null ? void 0 : A.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
796
867
  },
797
- recurrence: (j = (I = this.selectedGroupEvent) == null ? void 0 : I.group_event_info) != null && j.rrule ? ($ = (H = this.selectedGroupEvent) == null ? void 0 : H.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 : []
798
869
  } : void 0
799
870
  };
800
871
  }
@@ -804,16 +875,31 @@ const qe = class {
804
875
  });
805
876
  }
806
877
  selectedLanguageChangedHandler(e, t) {
807
- 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)));
808
882
  }
809
883
  async schedulerConfigCreatedEventHandler(e) {
810
884
  return this.schedulerConfigCreated.emit(e);
811
885
  }
812
886
  async setError(e) {
813
- 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);
814
894
  }
815
895
  async resetError() {
816
- 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
+ };
817
903
  }
818
904
  connectedCallback() {
819
905
  b("[nylas-editor-tabs-group]", "connectedCallback");
@@ -823,12 +909,12 @@ const qe = class {
823
909
  }
824
910
  componentDidLoad() {
825
911
  var t, a, s;
826
- b("[nylas-editor-tabs-group]", "componentDidLoad"), this.enableUserFeedback && !je() && $e({
912
+ b("[nylas-editor-tabs-group]", "componentDidLoad"), this.enableUserFeedback && !Je() && Ve({
827
913
  dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
828
- release: "1.4.5",
829
- integrations: (r) => [
830
- ...r.filter((o) => !1),
831
- Ze({
914
+ release: "2.0.1",
915
+ integrations: (l) => [
916
+ ...l.filter((r) => !1),
917
+ qe({
832
918
  colorScheme: "system",
833
919
  autoInject: !1
834
920
  })
@@ -837,7 +923,7 @@ const qe = class {
837
923
  beforeSend: () => null
838
924
  }), (t = this.selectedConfiguration) != null && t.id && this.configChangedHandler(this.selectedConfiguration);
839
925
  const e = (a = this.host.querySelector("button.tab:not(.hide)")) == null ? void 0 : a.name;
840
- e && ((s = this.hideEditorTabs) != null && s.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;
841
927
  }
842
928
  disconnectedCallback() {
843
929
  b("[nylas-editor-tabs-group]", "disconnectedCallback");
@@ -845,7 +931,7 @@ const qe = class {
845
931
  handleValueChanged(e) {
846
932
  b("[nylas-editor-tabs-group]", "handleValueChanged", e);
847
933
  const { name: t, value: a } = e.detail;
848
- 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({
849
935
  value: e.detail.value,
850
936
  name: e.detail.name
851
937
  });
@@ -854,21 +940,21 @@ const qe = class {
854
940
  this.showFeedbackModal = !1;
855
941
  }
856
942
  feedbackSubmittedHandler(e) {
857
- var s, r;
943
+ var s, l;
858
944
  const a = {
859
- eventId: Je("Scheduler Editor User Feedback"),
945
+ eventId: Ze("Scheduler Editor User Feedback"),
860
946
  message: e.detail.feedback
861
947
  };
862
- Ve(a, {
948
+ We(a, {
863
949
  includeReplay: !0,
864
950
  captureContext: {
865
951
  tags: {
866
952
  "nylas-web-element": "nylas-scheduler-editor",
867
- "nylas-web-element-version": "1.4.5"
953
+ "nylas-web-element-version": "2.0.1"
868
954
  },
869
955
  extra: {
870
956
  configId: (s = this.selectedConfiguration) == null ? void 0 : s.id,
871
- slug: (r = this.selectedConfiguration) == null ? void 0 : r.slug
957
+ slug: (l = this.selectedConfiguration) == null ? void 0 : l.slug
872
958
  }
873
959
  }
874
960
  }), this.showFeedbackModal = !1;
@@ -878,13 +964,33 @@ const qe = class {
878
964
  this.groupEventImportTriggered.emit({ groupEvent: e.detail, configId: ((t = this.selectedConfiguration) == null ? void 0 : t.id) ?? "", host: this.host });
879
965
  }
880
966
  saveGroupEventChangesHandler(e) {
881
- var s, r, o, l, i, c, p;
967
+ var s, l, r, o, d, c, p, h, m;
882
968
  b("saveGroupEventChangesHandler", e.detail, this.selectedGroupEvent);
883
969
  const t = this.formRef.checkValidity(), a = this.getGroupEventDetailsFromFormState();
884
- if (this.resetError(), a.title || this.setError(new Error("Event title is required.")), (!((s = a.when) != null && s.start_time) || !((r = a.when) != null && r.end_time)) && this.setError(new Error("Event time is required.")), (o = a.participants) != null && o.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) {
885
991
  this.saveGroupEventChangesError.emit({
886
- error: this.error ?? "An error occurred while saving changes.",
887
- 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) ?? "",
888
994
  host: this.host
889
995
  });
890
996
  return;
@@ -892,7 +998,7 @@ const qe = class {
892
998
  this.groupEventUpdateTriggered.emit({
893
999
  groupEvent: a,
894
1000
  chosenOption: e.detail.action,
895
- configId: ((p = this.selectedConfiguration) == null ? void 0 : p.id) ?? "",
1001
+ configId: ((m = this.selectedConfiguration) == null ? void 0 : m.id) ?? "",
896
1002
  host: this.host
897
1003
  });
898
1004
  }
@@ -908,67 +1014,80 @@ const qe = class {
908
1014
  });
909
1015
  }
910
1016
  createGroupEventHandler(e) {
911
- var l, i, c, p, f, m, w;
1017
+ var o, d, c, p, h, m, k;
912
1018
  const t = e.detail, a = {
913
- 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) ?? "",
914
1020
  email: ((c = this.currentUser) == null ? void 0 : c.email) ?? ""
915
- }, s = ((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, o = {
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 = {
916
1022
  title: t.title,
917
1023
  description: t.description,
918
- location: r ? void 0 : t.location,
1024
+ location: l ? void 0 : t.location,
919
1025
  participants: t.participants,
920
1026
  organizer: a,
921
- conferencing: t.location ? void 0 : r,
1027
+ conferencing: t.location ? {} : l,
922
1028
  when: t.eventTimeslot.when,
923
1029
  recurrence: t.eventTimeslot.recurrence,
924
1030
  calendar_id: (s == null ? void 0 : s.id) || "primary",
925
1031
  capacity: t.eventCapacity
926
1032
  };
927
- this.groupEventCreateTriggered.emit({ groupEvent: o, 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
+ });
928
1047
  }
929
1048
  getGroupEventDetailsFromFormState() {
930
- var m, w, x, T, z, P, S, B, N;
931
- const e = ((m = this.calendars) == null ? void 0 : m.find((R) => R.is_primary)) ?? ((w = this.calendars) == null ? void 0 : w[0]), t = {
932
- name: ((x = this.currentUser) == null ? void 0 : x.name) ?? ((T = this.currentUser) == null ? void 0 : T.email) ?? "",
933
- email: ((z = this.currentUser) == null ? void 0 : z.email) ?? ""
934
- }, a = [{ ...t, is_organizer: !0 }], { title: s, description: r, bookingCalendar: o, 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;
935
1054
  return {
936
1055
  title: s,
937
- description: r,
938
- location: i ? void 0 : l,
939
- conferencing: l ? void 0 : i,
1056
+ description: l,
1057
+ location: d ? void 0 : o,
1058
+ conferencing: o ? void 0 : d,
940
1059
  when: {
941
1060
  start_time: ((P = p == null ? void 0 : p.when) == null ? void 0 : P.start_time) ?? 0,
942
- end_time: ((S = p == null ? void 0 : p.when) == null ? void 0 : S.end_time) ?? 0,
943
- start_timezone: ((B = p == null ? void 0 : p.when) == null ? void 0 : B.start_timezone) ?? "",
944
- end_timezone: ((N = p == null ? void 0 : p.when) == null ? void 0 : N.end_timezone) ?? ""
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) ?? ""
945
1064
  },
946
1065
  recurrence: (p == null ? void 0 : p.recurrence) ?? [],
947
- calendar_id: o || (e == null ? void 0 : e.id) || "primary",
948
- 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,
949
1068
  organizer: t,
950
1069
  capacity: c || 10
951
1070
  };
952
1071
  }
953
1072
  getFormStateFromConfig(e) {
954
- var t, a, s, r, o, 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;
955
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."), {
956
1075
  additionalFields: ((t = e == null ? void 0 : e.scheduler) == null ? void 0 : t.additional_fields) ?? {},
957
1076
  bookingType: ((a = e == null ? void 0 : e.group_booking) == null ? void 0 : a.booking_type) ?? "booking",
958
1077
  cancellationPolicy: ((s = e == null ? void 0 : e.scheduler) == null ? void 0 : s.cancellation_policy) ?? "",
959
- minCancellationNotice: ((r = e == null ? void 0 : e.scheduler) == null ? void 0 : r.min_cancellation_notice) ?? 0,
960
- minBookingNotice: ((o = e == null ? void 0 : e.scheduler) == null ? void 0 : o.min_booking_notice) ?? 60,
961
- hideCancellationOptions: ((l = e == null ? void 0 : e.scheduler) == null ? void 0 : l.hide_cancellation_options) ?? !1,
962
- hideReschedulingOptions: ((i = e == null ? void 0 : e.scheduler) == null ? void 0 : i.hide_rescheduling_options) ?? !1,
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,
963
1082
  reminders: (c = e == null ? void 0 : e.group_booking) == null ? void 0 : c.reminders,
964
1083
  emailTemplate: (p = e == null ? void 0 : e.scheduler) == null ? void 0 : p.email_template,
965
- 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,
966
1085
  slug: e == null ? void 0 : e.slug,
967
1086
  appearance: e == null ? void 0 : e.appearance,
968
1087
  name: e == null ? void 0 : e.name,
969
1088
  bookingCalendar: (m = e == null ? void 0 : e.group_booking) == null ? void 0 : m.calendar_id,
970
- disableEmails: (w = e == null ? void 0 : e.group_booking) == null ? void 0 : w.disable_emails,
971
- 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
972
1091
  };
973
1092
  }
974
1093
  setFormState(e, t) {
@@ -1068,22 +1187,22 @@ const qe = class {
1068
1187
  e.preventDefault(), this.showFeedbackModal = !0;
1069
1188
  }
1070
1189
  render() {
1071
- var e, t;
1072
- return b("[nylas-editor-tabs-group]", "render", this.formState), n(le, { key: "9b79ba6f8696d5c7bcc9eb1d8c4b3cebddc6e4a9" }, n("form", { key: "e70dade70b4bf2a9a5974e70a335b6f04ea24ed6", 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) => {
1073
- this.setActiveTab(a, y.CalendarView);
1074
- } }, 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: "3e14a9cecdd8200a4a388595c69450fc1fc2d024", class: "footer", part: "editor__footer net__footer" }, n("div", { key: "fa88541076507a351a9189d3937e380b042adb2a", 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: "5c2436da8cc3deb362e42ba4ff8ac228b89263dc", class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, n("p", { key: "132875a26da363e4b402879b8344fce6311c1702", 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: {
1075
1194
  "unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
1076
1195
  "saved-changes": this.changesSaved,
1077
- error: this.error !== "",
1078
- "error-full-width": this.error !== "" && this.action === "create"
1079
- } }, 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: "f30fa484009f4d4729551014e86ec4a0d2ae7824", class: "footer-buttons__row" }, this.schedulerPreviewLink !== "" && this.action === "edit" && n("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: (a) => {
1080
- a.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(re(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
1081
- }, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "de0c92614c21e3d7ad2d1e982186df2858e99981", type: "button", disabled: this.isLoading, clickHandler: (a) => {
1082
- a.preventDefault(), this.cancelButtonClick.emit(), this.error = "";
1083
- }, variant: "basic", part: "editor__footer-cancel net__footer-cancel" }, d.t("backButton")), n("button-component", { key: "5edfb977d8feed310347b968cdb7505f9bc7eb1f", 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));
1084
1203
  }
1085
1204
  get host() {
1086
- return de(this);
1205
+ return pe(this);
1087
1206
  }
1088
1207
  static get watchers() {
1089
1208
  return {
@@ -1094,8 +1213,8 @@ const qe = class {
1094
1213
  };
1095
1214
  }
1096
1215
  };
1097
- ft([
1098
- ce({
1216
+ mt([
1217
+ be({
1099
1218
  name: "nylas-editor-tabs-group",
1100
1219
  stateToProps: /* @__PURE__ */ new Map([
1101
1220
  ["schedulerConfig.calendars", "calendars"],
@@ -1108,20 +1227,25 @@ ft([
1108
1227
  ]),
1109
1228
  eventToProps: {
1110
1229
  schedulerConfigChanged: async (e, t) => {
1111
- const { resetLoadingState: a, host: s, action: r, config: o, groupEvent: l } = e.detail, i = (c) => {
1112
- const [p, f] = c;
1113
- !p && f ? s.setError(f) : p && !f && r === "create" && s.schedulerConfigCreatedEventHandler({ config: p, action: r, host: s });
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 });
1114
1238
  };
1115
- if (r === "edit") {
1116
- const c = await t.schedulerConfig.updateConfiguration(o);
1117
- 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);
1118
1242
  } else {
1119
- const c = await t.schedulerConfig.createConfiguration(o);
1120
- i(c);
1121
- const [p, f] = c, m = p == null ? void 0 : p.id;
1122
- if (m && l) {
1123
- const w = await t.schedulerConfig.createGroupEvent(l, m);
1124
- 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"));
1125
1249
  }
1126
1250
  a && a(e);
1127
1251
  }
@@ -1142,24 +1266,49 @@ ft([
1142
1266
  b("[nylas-editor-tabs-group]", "schedulerConfigCreated", e);
1143
1267
  },
1144
1268
  groupEventUpdateTriggered: async (e, t) => {
1145
- const { groupEvent: a, host: s, chosenOption: r, configId: o } = e.detail, l = await t.schedulerConfig.updateGroupEvent(a, r, o), [i, c] = l;
1146
- !i && c && s.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
+ });
1147
1276
  },
1148
1277
  groupEventDeleteTriggered: async (e, t) => {
1149
- const { groupEvent: a, chosenOption: s, configId: r, host: o } = e.detail, l = await t.schedulerConfig.deleteGroupEvent(a, s, r), [i, c] = l;
1150
- !i && c && o.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
+ });
1151
1285
  },
1152
1286
  groupEventCreateTriggered: async (e, t) => {
1153
- const { groupEvent: a, configId: s, host: r } = e.detail, o = await t.schedulerConfig.createGroupEvent(a, s), [l, i] = o;
1154
- !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
+ });
1155
1294
  },
1156
1295
  groupEventImportTriggered: async (e, t) => {
1157
- const { groupEvent: a, configId: s, host: r } = e.detail, o = await t.schedulerConfig.importGroupEvent([a], s), [l, i] = o;
1158
- if (!l && i && r.setError(i), l && l.import_failed && l.import_failed.length > 0) {
1159
- 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(`
1160
1304
  `);
1161
- r.setError(new Error(c)), setTimeout(() => {
1162
- 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();
1163
1312
  }, 5e3);
1164
1313
  }
1165
1314
  },
@@ -1175,27 +1324,32 @@ ft([
1175
1324
  ]),
1176
1325
  fireRegisterEvent: !0
1177
1326
  }),
1178
- he("design:type", Function),
1179
- he("design:paramtypes", []),
1180
- he("design:returntype", void 0)
1181
- ], qe.prototype, "render", null);
1182
- qe.style = yt;
1183
- 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;
1184
- var _t = function(e, t, a, s) {
1185
- var r = arguments.length, o = r < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, 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;
1186
1335
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
1187
- o = Reflect.decorate(e, t, a, s);
1336
+ r = Reflect.decorate(e, t, a, s);
1188
1337
  else
1189
- for (var i = e.length - 1; i >= 0; i--)
1190
- (l = e[i]) && (o = (r < 3 ? l(o) : r > 3 ? l(t, a, o) : l(t, a)) || o);
1191
- return r > 3 && o && Object.defineProperty(t, a, o), o;
1192
- }, 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) {
1193
1342
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
1194
1343
  return Reflect.metadata(e, t);
1195
1344
  };
1196
- const Ye = class {
1345
+ const Qe = class {
1197
1346
  constructor(e) {
1198
- 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 = "";
1199
1353
  }
1200
1354
  listConfigurationsNextCursorChangedHandler(e, t) {
1201
1355
  if (!e || e === t) {
@@ -1205,7 +1359,7 @@ const Ye = class {
1205
1359
  this.disableNextPageButton = !1, this.currentCursor = e;
1206
1360
  }
1207
1361
  selectedLanguageChangedHandler(e, t) {
1208
- e !== t && d.changeLanguage(e);
1362
+ e !== t && i.changeLanguage(e);
1209
1363
  }
1210
1364
  connectedCallback() {
1211
1365
  b("[nylas-list-configurations]", "connectedCallback");
@@ -1222,18 +1376,18 @@ const Ye = class {
1222
1376
  b("[nylas-list-configurations]", "disconnectedCallback");
1223
1377
  }
1224
1378
  async handleNylasFormDropdownChanged(e) {
1225
- var r;
1379
+ var l;
1226
1380
  b("[nylas-list-configurations]", "handleNylasFormDropdownChanged", e.detail);
1227
1381
  const { value: t } = e.detail, [a, s] = t.split("-");
1228
1382
  switch (e.preventDefault(), a) {
1229
1383
  case "delete":
1230
- this.deleteConfigurationId = (r = this.configurations[s]) == null ? void 0 : r.id;
1384
+ this.deleteConfigurationId = (l = this.configurations[s]) == null ? void 0 : l.id;
1231
1385
  break;
1232
1386
  case "preview":
1233
- window.open(re(this.schedulerPreviewLink, this.configurations[s]), "_blank");
1387
+ window.open(le(this.schedulerPreviewLink, this.configurations[s]), "_blank");
1234
1388
  break;
1235
1389
  case "copy":
1236
- await navigator.clipboard.writeText(re(this.schedulerPreviewLink, this.configurations[s]));
1390
+ await navigator.clipboard.writeText(le(this.schedulerPreviewLink, this.configurations[s]));
1237
1391
  break;
1238
1392
  }
1239
1393
  }
@@ -1249,11 +1403,33 @@ const Ye = class {
1249
1403
  this.state = e;
1250
1404
  }
1251
1405
  async setError(e) {
1252
- 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);
1253
1413
  }
1254
1414
  async hideDeleteConfirmation() {
1255
1415
  this.deleteConfigurationId = "", this.showDeleteButtonLoading = !1;
1256
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
+ }
1257
1433
  closeModal(e) {
1258
1434
  e.preventDefault(), this.deleteConfigurationId = "";
1259
1435
  }
@@ -1278,11 +1454,11 @@ const Ye = class {
1278
1454
  };
1279
1455
  switch (e) {
1280
1456
  case "preview":
1281
- 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"));
1282
1458
  case "copy":
1283
- 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"));
1284
1460
  case "delete":
1285
- 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"));
1286
1462
  default:
1287
1463
  return "";
1288
1464
  }
@@ -1305,32 +1481,32 @@ const Ye = class {
1305
1481
  }
1306
1482
  render() {
1307
1483
  var e;
1308
- 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: () => {
1309
1485
  this.createButtonClick.emit(this.host);
1310
- } }, 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: {
1311
1487
  "no-configurations": this.state !== "loading" && (!this.configurations || this.configurations.length === 0)
1312
1488
  } }, n("tr", { class: {
1313
1489
  hide: this.state === "loading" || this.configurations && this.configurations.length === 0
1314
- } }, 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: () => {
1315
1491
  this.createButtonClick.emit(this.host);
1316
- } }, d.t("createNewSchedulingPageButtonText"))))), this.state !== "loading" && ((e = this.configurations) == null ? void 0 : e.map((t, a) => {
1317
- var l, i, c, p;
1318
- const s = (a === this.configurations.length - 1 || a === this.configurations.length - 2) && this.configurations.length > 3, r = t, o = t;
1319
- 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 = o == null ? void 0 : o.event_booking) == null ? void 0 : l.title }, ((i = o == null ? void 0 : o.event_booking) == null ? void 0 : i.title) || (r == null ? void 0 : r.name)), n("div", { class: "config-event-description" }, (c = o == null ? void 0 : o.event_booking) == null ? void 0 : c.description))), n("td", null, n("div", { class: "duration" }, this.getDurationString((p = o == null ? void 0 : o.availability) == null ? void 0 : p.duration_minutes))), n("td", null, n("div", { class: "actions" }, n("button-component", { variant: "basic", key: `edit-${a}`, clickHandler: (f) => {
1320
- f.preventDefault(), this.editButtonClick.emit({ host: this.host, configuration: t });
1321
- } }, n("edit-icon", { width: "16", height: "16" }), d.t("editSchedulingPageButtonText")), n("select-dropdown", { class: {
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: {
1322
1498
  last: s
1323
1499
  }, name: "actions", options: [
1324
1500
  { value: `preview-${a}`, label: "Preview", labelHTML: this.getActionLabelHTML("preview") },
1325
1501
  { value: `copy-${a}`, label: "Copy link", labelHTML: this.getActionLabelHTML("copy") },
1326
1502
  { value: `delete-${a}`, label: "Delete", labelHTML: this.getActionLabelHTML("delete") }
1327
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" }))));
1328
- })))), 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: {
1329
1505
  footer: !0
1330
- } }, 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")}`)))));
1331
1507
  }
1332
1508
  get host() {
1333
- return de(this);
1509
+ return pe(this);
1334
1510
  }
1335
1511
  static get watchers() {
1336
1512
  return {
@@ -1339,8 +1515,8 @@ const Ye = class {
1339
1515
  };
1340
1516
  }
1341
1517
  };
1342
- _t([
1343
- ce({
1518
+ wt([
1519
+ be({
1344
1520
  name: "nylas-list-configurations",
1345
1521
  stateToProps: /* @__PURE__ */ new Map([
1346
1522
  ["schedulerConfig.configurations", "configurations"],
@@ -1352,59 +1528,83 @@ _t([
1352
1528
  initListConfigurations: async (e, t) => {
1353
1529
  const { host: a, cursor: s } = e.detail;
1354
1530
  await a.setState("loading");
1355
- const [r, o] = await t.schedulerConfig.getConfigurations(s);
1356
- if (!r && o && o.message) {
1357
- await a.setState("error"), await a.setError(o.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
+ });
1358
1539
  return;
1359
1540
  }
1360
1541
  await a.setState("loaded");
1361
1542
  },
1362
1543
  createButtonClick: async (e, t) => {
1363
- var a;
1364
- t.schedulerConfigStore.resetSelectedConfiguration(), (a = t.schedulerConfigStore.state.experimentalFeatures) != null && a.group_events ? t.schedulerConfigStore.state.action = "create-select" : t.schedulerConfigStore.state.action = "create";
1544
+ t.schedulerConfigStore.resetSelectedConfiguration();
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: s } = e.detail, [r, o] = await t.schedulerConfig.deleteConfiguration(s.id);
1368
- !r && o && o.message && (await a.setState("error"), await a.setError(o.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: s, 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: s.toString(),
1562
+ start_time: l.toString(),
1376
1563
  end_time: r.toString()
1377
1564
  };
1378
- const [o, l] = await t.schedulerConfig.getGroupEvents(a.id);
1379
- if (!o && 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
- ], Ye.prototype, "render", null);
1391
- Ye.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, s) {
1394
- var r = arguments.length, o = r < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, 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
- o = Reflect.decorate(e, t, a, s);
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]) && (o = (r < 3 ? l(o) : r > 3 ? l(t, a, o) : l(t, a)) || o);
1400
- return r > 3 && o && Object.defineProperty(t, a, o), o;
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 Ke = 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;
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 = {
1602
+ one_on_one: !0,
1603
+ collective: !0,
1604
+ max_fairness: !0,
1605
+ max_availability: !0,
1606
+ group: !0
1607
+ };
1408
1608
  }
1409
1609
  connectedCallback() {
1410
1610
  b("nylas-select-event-type", "connectedCallback");
@@ -1422,45 +1622,54 @@ const Ke = class {
1422
1622
  b("nylas-select-event-type", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
1423
1623
  }
1424
1624
  selectedLanguageChangedHandler(e, t) {
1425
- e !== t && d.changeLanguage(e);
1625
+ e !== t && i.changeLanguage(e);
1426
1626
  }
1427
1627
  render() {
1428
1628
  var r;
1429
- const e = [
1629
+ const e = {
1630
+ "one-on-one": "one_on_one",
1631
+ collective: "collective",
1632
+ "max-fairness": "max_fairness",
1633
+ "max-availability": "max_availability",
1634
+ group: "group"
1635
+ }, t = [
1430
1636
  {
1431
- label: d.t("nylasSelectEventType.eventTypeOptions.oneOnOne.label"),
1432
- value: O.one_on_one,
1433
- 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")
1434
1640
  },
1435
1641
  {
1436
- label: d.t("nylasSelectEventType.eventTypeOptions.collective.label"),
1437
- value: O.collective,
1438
- 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")
1439
1645
  },
1440
1646
  {
1441
- label: d.t("nylasSelectEventType.eventTypeOptions.maxFairness.label"),
1442
- value: O.max_fairness,
1443
- 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")
1444
1650
  },
1445
1651
  {
1446
- label: d.t("nylasSelectEventType.eventTypeOptions.maxAvailability.label"),
1447
- value: O.max_availability,
1448
- 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")
1449
1655
  },
1450
1656
  {
1451
- label: d.t("nylasSelectEventType.eventTypeOptions.group.label"),
1452
- value: O.group,
1453
- 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")
1454
1660
  }
1455
- ], t = 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, a = [O.collective, O.max_availability, O.max_fairness], s = [O.one_on_one, O.group];
1456
- return n(le, { key: "4cd1ea6564b67ff7547499e504214684a61350c3" }, n("div", { key: "2e591b78dcbd4e832ed63a837d0e03edde75e97c", class: "nylas-select-event-type", part: "nset" }, n("div", { key: "9b866ca6a3e3bc025ba13d8f023e825c4c042d14", class: "header", part: "nset__header" }, n("h2", { key: "0a8390189a308bb1ef7c51ca3efa0b5b8d2aa165" }, d.t("nylasSelectEventType.createEventHeaderTitle")), n("button-component", { key: "0a7d6503aa2ea9c137aa59f4a211a88f816844cd", variant: "invisible", part: "nset__header__back-button", onClick: (o) => {
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];
1664
+ }) : t;
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) => {
1457
1666
  this.returnToAllSchedulingPagesEvent.emit();
1458
- } }, n("chevron-icon", { key: "5a81b33f22799f77657f9a8196ec1d72e255865c", width: "16", height: "16" }), n("span", { key: "df5b805d76b1040bacae5e68eebd2ff7a74b2810" }, d.t("nylasSelectEventType.returnToAllSchedulingPages")))), n("div", { key: "ff48e355eb9baac896bf6e3de2dafbfbd91f57c0", class: "content", part: "nset__content" }, n("h3", { key: "d387519b40557886ece52327429e6e58aa133689" }, d.t("nylasSelectEventType.eventTypeHeaderTitle")), n("div", { key: "a3384ed668259f02114efd375cfcaad125f1efe7", class: "event-type", part: "nset__content__event-type" }, e.filter((o) => s.includes(o.value) || t && a.includes(o.value)).map((o) => n("div", { class: "event-type-option", onClick: (l) => {
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) => {
1459
1668
  this.createEventTypeSelected.emit({ eventType: o.value });
1460
1669
  }, part: `nset__content__event-type-option-${o.value}` }, n("h4", null, o.label), n("p", null, o.description)))))));
1461
1670
  }
1462
1671
  get host() {
1463
- return de(this);
1672
+ return pe(this);
1464
1673
  }
1465
1674
  static get watchers() {
1466
1675
  return {
@@ -1469,12 +1678,13 @@ const Ke = class {
1469
1678
  };
1470
1679
  }
1471
1680
  };
1472
- kt([
1473
- ce({
1681
+ xt([
1682
+ be({
1474
1683
  name: "nylas-select-event-type",
1475
1684
  stateToProps: /* @__PURE__ */ new Map([
1476
1685
  ["schedulerConfig.selectedLanguage", "selectedLanguage"],
1477
- ["schedulerConfig.additionalParticipants", "participantOptions"]
1686
+ ["schedulerConfig.additionalParticipants", "participantOptions"],
1687
+ ["schedulerConfig.enableEventTypes", "enableEventTypes"]
1478
1688
  ]),
1479
1689
  eventToProps: {
1480
1690
  returnToAllSchedulingPagesEvent: async (e, t) => {
@@ -1487,16 +1697,16 @@ kt([
1487
1697
  },
1488
1698
  fireRegisterEvent: !0
1489
1699
  }),
1490
- fe("design:type", Function),
1491
- fe("design:paramtypes", []),
1492
- fe("design:returntype", void 0)
1493
- ], Ke.prototype, "render", null);
1494
- Ke.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;
1495
1705
  export {
1496
- st as google_logo_icon,
1497
- lt as microsoft_logo_icon,
1498
- We as nylas_editor_tabs,
1499
- qe as nylas_editor_tabs_group,
1500
- Ye as nylas_list_configurations,
1501
- Ke 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
1502
1712
  };