@nylas/react 1.1.0-canary.20 → 1.1.0-canary.21

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 (145) hide show
  1. package/dist/add-circle-icon_2.entry-29cc2385.cjs +1 -0
  2. package/dist/add-circle-icon_2.entry-b8d6df60.js +69 -0
  3. package/dist/{archive-icon_7.entry-2f418a3e.js → archive-icon_7.entry-3830776a.js} +18 -18
  4. package/dist/{archive-icon_7.entry-eb90a353.cjs → archive-icon_7.entry-afaef817.cjs} +1 -1
  5. package/dist/{arrow-icon.entry-753eb942.js → arrow-icon.entry-19f00716.js} +1 -1
  6. package/dist/{arrow-icon.entry-ac5e1a47.cjs → arrow-icon.entry-460cdd9f.cjs} +1 -1
  7. package/dist/{bold-icon_3.entry-4fff7400.cjs → bold-icon_3.entry-1893eeec.cjs} +1 -1
  8. package/dist/{bold-icon_3.entry-18507c82.js → bold-icon_3.entry-80abafbb.js} +3 -3
  9. package/dist/button-component.entry-36137536.js +16 -0
  10. package/dist/button-component.entry-b78dc39e.cjs +1 -0
  11. package/dist/calendar-agenda-fill-icon_40.entry-62c66fce.cjs +10 -0
  12. package/dist/{calendar-agenda-fill-icon_35.entry-db989ce0.js → calendar-agenda-fill-icon_40.entry-f19d6ad7.js} +1469 -1076
  13. package/dist/{calendar-cancel-icon.entry-d2e10dfc.cjs → calendar-cancel-icon.entry-0d83ee82.cjs} +1 -1
  14. package/dist/{calendar-cancel-icon.entry-31caeae1.js → calendar-cancel-icon.entry-1fae00c5.js} +1 -1
  15. package/dist/{calendar-check-icon_2.entry-7f67c003.js → calendar-check-icon_2.entry-159c38af.js} +1 -1
  16. package/dist/{calendar-check-icon_2.entry-d32551e9.cjs → calendar-check-icon_2.entry-e01c9028.cjs} +1 -1
  17. package/dist/{calendar-icon.entry-f3f1c623.cjs → calendar-icon.entry-2e701aab.cjs} +1 -1
  18. package/dist/{calendar-icon.entry-6e89816b.js → calendar-icon.entry-3af9cb76.js} +1 -1
  19. package/dist/checkbox-component_2.entry-5eee51f6.js +56 -0
  20. package/dist/checkbox-component_2.entry-9ff2c85b.cjs +1 -0
  21. package/dist/checkmark-icon.entry-0749b942.js +15 -0
  22. package/dist/checkmark-icon.entry-f96f1117.cjs +1 -0
  23. package/dist/{chevron-icon_3.entry-2e20a83e.js → chevron-icon_3.entry-2e9eebbc.js} +10 -10
  24. package/dist/{chevron-icon_3.entry-3be68846.cjs → chevron-icon_3.entry-c3989df2.cjs} +1 -1
  25. package/dist/clock-icon_4.entry-9395d0cb.js +45 -0
  26. package/dist/clock-icon_4.entry-d4563931.cjs +1 -0
  27. package/dist/close-icon.entry-cf9f0a69.js +15 -0
  28. package/dist/close-icon.entry-e24af309.cjs +1 -0
  29. package/dist/{constants-7ce66b44-3952e81c.js → constants-67de2eec-b17f5b96.js} +37 -17
  30. package/dist/{constants-7ce66b44-a6b777d4.cjs → constants-67de2eec-e3b50fc6.cjs} +5 -5
  31. package/dist/{copy-icon_4.entry-187edab9.js → copy-icon_3.entry-7b276fa2.js} +9 -19
  32. package/dist/copy-icon_3.entry-7de3667f.cjs +1 -0
  33. package/dist/document-refresh-icon.entry-582ac233.cjs +1 -0
  34. package/dist/{document-refresh-icon.entry-9d7900d7.js → document-refresh-icon.entry-6dd65cb6.js} +2 -2
  35. package/dist/elements/index.d.ts +8 -0
  36. package/dist/{elements-dc5b338e-edf63aa6.cjs → elements-dc5b338e-158dce67.cjs} +1 -1
  37. package/dist/{elements-dc5b338e-e6271e48.js → elements-dc5b338e-5e8a704b.js} +1 -1
  38. package/dist/{focus-visible-e8093c16-84e41b3b.cjs → focus-visible-e8093c16-5883a317.cjs} +1 -1
  39. package/dist/{focus-visible-e8093c16-4c45967c.js → focus-visible-e8093c16-9d88e8ee.js} +1 -1
  40. package/dist/{forward-icon_6.entry-4cb6eb63.cjs → forward-icon_6.entry-a59dada5.cjs} +3 -3
  41. package/dist/{forward-icon_6.entry-949d0cfb.js → forward-icon_6.entry-acdf04ad.js} +7 -7
  42. package/dist/{globe-icon.entry-04b35395.js → globe-icon.entry-389c0391.js} +2 -2
  43. package/dist/{globe-icon.entry-741f8ad4.cjs → globe-icon.entry-eef27331.cjs} +1 -1
  44. package/dist/google-logo-icon_4.entry-e9be320c.cjs +1 -0
  45. package/dist/google-logo-icon_4.entry-eae19fc8.js +637 -0
  46. package/dist/index-53420959-82a5306f.cjs +1 -0
  47. package/dist/index-53420959-9b1699ec.js +5 -0
  48. package/dist/{index-6d9eeb53-8b16e3b5.cjs → index-6d9eeb53-15c69801.cjs} +1 -1
  49. package/dist/{index-6d9eeb53-b15263de.js → index-6d9eeb53-c70fc8a7.js} +2 -2
  50. package/dist/index-db48e0b6.cjs +42 -0
  51. package/dist/index-f8317a8e.js +7638 -0
  52. package/dist/{index.es-9cc0eb3c-e6c5dd2d.js → index.es-b16d0cf5-386496a9.js} +1 -1
  53. package/dist/{index.es-9cc0eb3c-2e0f7d11.cjs → index.es-b16d0cf5-d7f30c4a.cjs} +1 -1
  54. package/dist/{info-icon_2.entry-c3468951.cjs → info-icon_2.entry-63914227.cjs} +1 -1
  55. package/dist/{info-icon_2.entry-d0270899.js → info-icon_2.entry-97d75550.js} +5 -5
  56. package/dist/input-dropdown.entry-4d29246a.js +132 -0
  57. package/dist/input-dropdown.entry-629d7b54.cjs +1 -0
  58. package/dist/loading-icon.entry-2f15a09f.cjs +1 -0
  59. package/dist/loading-icon.entry-fc9bc740.js +15 -0
  60. package/dist/{mailbox-store-64b4ef7c-c609ac6d.cjs → mailbox-store-f11de360-02a6de93.cjs} +1 -1
  61. package/dist/{mailbox-store-64b4ef7c-7c793d9a.js → mailbox-store-f11de360-d781fd36.js} +2 -2
  62. package/dist/{multi-select-dropdown.entry-f298ca2c.cjs → multi-select-dropdown.entry-68fcca98.cjs} +1 -1
  63. package/dist/{multi-select-dropdown.entry-2ca73c71.js → multi-select-dropdown.entry-8e14e9af.js} +2 -2
  64. package/dist/nylas-booked-event-card_10.entry-4da23b61.cjs +1 -0
  65. package/dist/{nylas-booked-event-card_10.entry-2b01df7e.js → nylas-booked-event-card_10.entry-9487941d.js} +357 -316
  66. package/dist/{nylas-custom-booking-flow.entry-66beff43.js → nylas-custom-booking-flow.entry-0e16973b.js} +32 -32
  67. package/dist/{nylas-custom-booking-flow.entry-05b9522a.cjs → nylas-custom-booking-flow.entry-338b0a8f.cjs} +1 -1
  68. package/dist/nylas-form-card.entry-ca669dea.cjs +1 -0
  69. package/dist/{nylas-form-card.entry-3de9f477.js → nylas-form-card.entry-ccfa5692.js} +10 -10
  70. package/dist/{nylas-if-state.entry-a0689083.js → nylas-if-state.entry-93935670.js} +2 -2
  71. package/dist/{nylas-if-state.entry-a734df46.cjs → nylas-if-state.entry-faa11bb6.cjs} +1 -1
  72. package/dist/{nylas-list-folders.entry-4fb9d4c2.js → nylas-list-folders.entry-14fc1fe8.js} +4 -4
  73. package/dist/{nylas-list-folders.entry-74a56187.cjs → nylas-list-folders.entry-e7e179ea.cjs} +1 -1
  74. package/dist/{nylas-list-threads.entry-9a6d4c33.js → nylas-list-threads.entry-2118b146.js} +3 -3
  75. package/dist/{nylas-list-threads.entry-0addc621.cjs → nylas-list-threads.entry-3f52fc06.cjs} +1 -1
  76. package/dist/{nylas-login.entry-beb6e0d9.js → nylas-login.entry-87a902d6.js} +7 -7
  77. package/dist/{nylas-login.entry-bdac29c0.cjs → nylas-login.entry-915f0284.cjs} +1 -1
  78. package/dist/{nylas-mailbox-pagination.entry-c5d07bbe.cjs → nylas-mailbox-pagination.entry-9aa8a606.cjs} +1 -1
  79. package/dist/{nylas-mailbox-pagination.entry-1d71850a.js → nylas-mailbox-pagination.entry-eedbf796.js} +2 -2
  80. package/dist/{nylas-mailbox-toolbar-button.entry-882c97a0.js → nylas-mailbox-toolbar-button.entry-40b75810.js} +2 -2
  81. package/dist/{nylas-mailbox-toolbar-button.entry-7d9d6293.cjs → nylas-mailbox-toolbar-button.entry-ba5b826e.cjs} +1 -1
  82. package/dist/{nylas-mailbox.entry-d810adba.js → nylas-mailbox.entry-179e5a5c.js} +3 -3
  83. package/dist/{nylas-mailbox.entry-94eb97ec.cjs → nylas-mailbox.entry-31de7f8f.cjs} +1 -1
  84. package/dist/{nylas-provider.entry-5a4bb86e.cjs → nylas-provider.entry-46fe01b6.cjs} +1 -1
  85. package/dist/{nylas-provider.entry-fcaf9e1c.js → nylas-provider.entry-7b70bbdc.js} +36 -36
  86. package/dist/{nylas-scheduler-editor.entry-30597812.cjs → nylas-scheduler-editor.entry-76b68f66.cjs} +2 -2
  87. package/dist/{nylas-scheduler-editor.entry-1ca566d3.js → nylas-scheduler-editor.entry-f1f80de1.js} +7 -10
  88. package/dist/{nylas-scheduling.entry-aefefe3d.js → nylas-scheduling.entry-31d13205.js} +83 -70
  89. package/dist/nylas-scheduling.entry-3ce8c52f.cjs +1 -0
  90. package/dist/{nylas-threads-refresh.entry-a85222e2.js → nylas-threads-refresh.entry-a3ea46aa.js} +2 -2
  91. package/dist/{nylas-threads-refresh.entry-f3b9fdf2.cjs → nylas-threads-refresh.entry-c9f9db8c.cjs} +1 -1
  92. package/dist/{nylas-threads-search.entry-b1bf455b.js → nylas-threads-search.entry-01482ddf.js} +8 -8
  93. package/dist/{nylas-threads-search.entry-2c8ac7dc.cjs → nylas-threads-search.entry-a4ab0d47.cjs} +1 -1
  94. package/dist/{nylas-time-window-picker.entry-3a34b29b.cjs → nylas-time-window-picker.entry-5a3bb0b7.cjs} +1 -1
  95. package/dist/{nylas-time-window-picker.entry-6d664a05.js → nylas-time-window-picker.entry-5f063b2b.js} +18 -18
  96. package/dist/{nylas-view-thread.entry-bf6cab2a.cjs → nylas-view-thread.entry-82e78b82.cjs} +1 -1
  97. package/dist/{nylas-view-thread.entry-ddcb042f.js → nylas-view-thread.entry-cb057b9e.js} +6 -6
  98. package/dist/person-icon.entry-3e30c63c.js +15 -0
  99. package/dist/person-icon.entry-78cdc7f9.cjs +1 -0
  100. package/dist/play-icon_2.entry-4fb1938c.cjs +1 -0
  101. package/dist/play-icon_2.entry-71eaad5c.js +25 -0
  102. package/dist/react.cjs +1 -1
  103. package/dist/react.js +116 -108
  104. package/dist/{refresh-icon.entry-99761cb6.cjs → refresh-icon.entry-3570353d.cjs} +1 -1
  105. package/dist/{refresh-icon.entry-0fdcb7af.js → refresh-icon.entry-db85d14d.js} +4 -4
  106. package/dist/{register-component-a5a9ca5d-ddae10b3.js → register-component-b2a51b20-8a262dcf.js} +1 -1
  107. package/dist/{register-component-a5a9ca5d-4439e573.cjs → register-component-b2a51b20-9a913603.cjs} +1 -1
  108. package/dist/{scheduler-config-store-9ccfba4d-b774bfee.cjs → scheduler-config-store-9ccfba4d-6806e3cb.cjs} +1 -1
  109. package/dist/{scheduler-config-store-9ccfba4d-84025740.js → scheduler-config-store-9ccfba4d-a6745ccc.js} +1 -1
  110. package/dist/{scheduler-store-8a400448-8ab7b63e.js → scheduler-store-db06b30a-1e63b67f.js} +119 -116
  111. package/dist/scheduler-store-db06b30a-d5e6b6c3.cjs +1 -0
  112. package/dist/{textarea-component.entry-359e4665.cjs → textarea-component.entry-be870b8f.cjs} +1 -1
  113. package/dist/{textarea-component.entry-193d29fd.js → textarea-component.entry-f5f402a1.js} +4 -4
  114. package/dist/time-period-selector.entry-d1a8470b.js +93 -0
  115. package/dist/time-period-selector.entry-fc7d61c6.cjs +1 -0
  116. package/dist/{translate-icon.entry-32ec36de.cjs → translate-icon.entry-3ae0ddae.cjs} +1 -1
  117. package/dist/{translate-icon.entry-22a3e72e.js → translate-icon.entry-b91a0449.js} +2 -2
  118. package/dist/{warning-icon.entry-b8d483e1.cjs → warning-icon.entry-54127f45.cjs} +1 -1
  119. package/dist/{warning-icon.entry-8d9b59c0.js → warning-icon.entry-acdc811b.js} +5 -5
  120. package/package.json +3 -3
  121. package/dist/add-circle-icon_2.entry-5cefae99.js +0 -25
  122. package/dist/add-circle-icon_2.entry-85523420.cjs +0 -1
  123. package/dist/button-component_4.entry-3c508e3b.js +0 -115
  124. package/dist/button-component_4.entry-f8ab53dc.cjs +0 -1
  125. package/dist/calendar-agenda-fill-icon_35.entry-b56841a0.cjs +0 -7
  126. package/dist/clock-icon_2.entry-074eb053.cjs +0 -1
  127. package/dist/clock-icon_2.entry-bc938936.js +0 -25
  128. package/dist/copy-icon_4.entry-f704b2f1.cjs +0 -1
  129. package/dist/document-refresh-icon.entry-ea0e1ab9.cjs +0 -1
  130. package/dist/google-logo-icon_4.entry-8e87cf66.cjs +0 -1
  131. package/dist/google-logo-icon_4.entry-f50de25f.js +0 -598
  132. package/dist/index-53420959-507f0a27.js +0 -5
  133. package/dist/index-53420959-e6c2e510.cjs +0 -1
  134. package/dist/index-a4831dfe.cjs +0 -42
  135. package/dist/index-a68236be.js +0 -5011
  136. package/dist/input-dropdown_2.entry-2485dcc3.cjs +0 -1
  137. package/dist/input-dropdown_2.entry-2cd6cfc7.js +0 -220
  138. package/dist/loading-icon.entry-5ed52afe.cjs +0 -1
  139. package/dist/loading-icon.entry-96d9d1be.js +0 -15
  140. package/dist/nylas-booked-event-card_10.entry-97977ac7.cjs +0 -1
  141. package/dist/nylas-form-card.entry-3e1331c9.cjs +0 -1
  142. package/dist/nylas-scheduling.entry-00c418c8.cjs +0 -1
  143. package/dist/play-icon_2.entry-4f316c3d.cjs +0 -1
  144. package/dist/play-icon_2.entry-d55a018a.js +0 -25
  145. package/dist/scheduler-store-8a400448-eaa566fa.cjs +0 -1
@@ -0,0 +1,637 @@
1
+ import { r as $, h as e, c as _, z as Lt, d as b, A as J, H as kt, g as Ct } from "./index-f8317a8e.js";
2
+ import { R as xt } from "./register-component-b2a51b20-8a262dcf.js";
3
+ import { D as wt } from "./constants-67de2eec-b17f5b96.js";
4
+ import "react";
5
+ import "react-dom";
6
+ const Ft = ".sc-google-logo-icon-h{display:flex}", Ht = Ft, Dt = class {
7
+ constructor(t) {
8
+ $(this, t), this.width = "24", this.height = "24";
9
+ }
10
+ render() {
11
+ return e("svg", { key: "3b66b8f8406bb1bb2735eefb8e353f564b148d76", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, e("g", { key: "e7e6e047f7126a577be5b6e67495e091fe6a4a91", "clip-path": "url(#clip0_959_12452)" }, e("path", { key: "cafb8f5cc31f77a0e964f6809df04080225c0059", 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" }), e("path", { key: "25d96d59ba32154b37a83bbcfe2114386d462e7f", 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" }), e("path", { key: "054c72712a95610e75ccefa638bba56cfefb9dc7", 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" }), e("path", { key: "3450a383589adbdde25a2d7c3f528385746d7116", 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" })), e("defs", { key: "1c29157546a3b7c420398f2b4fa65a17b02e5010" }, e("clipPath", { key: "9e1804395e96faa50fb95a9600cee29c415216a2", id: "clip0_959_12452" }, e("rect", { key: "98fd7d191b71077f96e8b1f2bfe4c3446b01f2fa", width: 24, height: 24, fill: "white" }))));
12
+ }
13
+ };
14
+ Dt.style = Ht;
15
+ const Et = ".sc-microsoft-logo-icon-h{display:flex}", Bt = Et, Pt = class {
16
+ constructor(t) {
17
+ $(this, t), this.width = "22", this.height = "22";
18
+ }
19
+ render() {
20
+ return e("svg", { key: "b136cb884eb1d99d5673ad39651d6370de1acd32", width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, e("path", { key: "475d51fa261724499d3abb9be21e4aa256b35d7b", d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), e("path", { key: "551e2efd56295a498f300a384d8ffc7fd3766188", d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), e("path", { key: "d3f07689492b30b3494f5097db79545b5b35d69d", d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), e("path", { key: "ba3c56ed418db7603b969795e0f31e32a066fbb4", d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" }));
21
+ }
22
+ };
23
+ Pt.style = Bt;
24
+ function Nt({ id: t, formState: i, activeTab: a, calendars: s, currentUser: r }) {
25
+ var n, d, o;
26
+ switch (a) {
27
+ case "eventInfo":
28
+ const p = i.title, m = i.description, v = parseInt(i.duration), x = i.location, S = i.conferencing;
29
+ return e(
30
+ "div",
31
+ { key: t },
32
+ e(
33
+ "nylas-event-info",
34
+ null,
35
+ e(
36
+ "div",
37
+ { slot: "inputs" },
38
+ e("nylas-event-title", { name: "title", eventTitle: p, exportparts: "net, net__title, net__dropdown-content" }),
39
+ e("nylas-event-duration", { name: "duration", eventDurationMinutes: v, exportparts: "ned, ned__dropdown, ned__dropdown-button, ned__dropdown-content, ned__input_dropdown, ned__input_dropdown-input, ned__input_dropdown-content" }),
40
+ e("nylas-event-location", { name: "location", eventLocation: x, eventConferencing: S, userProvider: r.provider, exportparts: "nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content" }),
41
+ e("nylas-event-description", { name: "description", eventDescription: m, exportparts: "nedesc, nedesc__textarea" })
42
+ )
43
+ )
44
+ );
45
+ case "availability":
46
+ const T = i.availability.openHours, L = i.availability.timezone ? i.availability.timezone : Intl.DateTimeFormat().resolvedOptions().timeZone;
47
+ return e(
48
+ "div",
49
+ { key: t },
50
+ e("nylas-participant-booking-calendars", { name: "participant-booking-calendars", participants: i.participants, calendars: s }),
51
+ e("nylas-connected-calendars", { name: "connected-calendars", participants: i.participants }),
52
+ e("nylas-availability-picker", { name: "availability", openHours: T, defaultTimezone: L, exportparts: "nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times" })
53
+ );
54
+ case "bookingOptions":
55
+ return e(
56
+ "div",
57
+ { key: t },
58
+ e("nylas-buffer-time", { name: "buffer-time", buffer: i.buffer, exportparts: "nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview" }),
59
+ e(
60
+ "nylas-event-limits",
61
+ null,
62
+ e(
63
+ "div",
64
+ { slot: "inputs" },
65
+ e("nylas-min-booking-notice", { name: "min-booking-notice", minBookingNotice: i.minBookingNotice, exportparts: "nmbn, nmbn__number-dropdown, nmbn__number-dropdown-button, nmbn__number-dropdown-content, nmbn__period-dropdown, nmbn__period-dropdown-button, nmbn__period-dropdown-content" }),
66
+ e("nylas-limit-future-bookings", { name: "limit-future-bookings", availableDaysInFuture: i.availableDaysInFuture, exportparts: "nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content" }),
67
+ e("nylas-min-cancellation-notice", { name: "min-cancellation-notice", minCancellationNotice: i.minCancellationNotice, exportparts: "nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content" }),
68
+ e("nylas-cancellation-policy", { name: "cancellation-policy", cancellationPolicy: i.cancellationPolicy, exportparts: "ncpolicy, ncpolicy__textarea" })
69
+ )
70
+ ),
71
+ e("nylas-timeslot-interval", { name: "timeslot-interval", eventDurationMinutes: parseInt(i.duration), exportparts: "nti, nti__header, nti__input-label, nti__dropdown, nti__dropdown-button, nti__dropdown-content" }),
72
+ e("nylas-customize-booking-settings", { name: "customize-booking-settings", exportparts: "ncbs, ncbs__header, ncbs__settings, ncbs__settings-div, ncbs__additional_guests, ncbs__cancellation_options, ncbs__rescheduling_options" })
73
+ );
74
+ case "communications":
75
+ return e(
76
+ "div",
77
+ { key: t },
78
+ e(
79
+ "div",
80
+ { class: "tab-header" },
81
+ e("h3", null, "Event communications"),
82
+ e("p", null, "Set up automatic communications for your events.")
83
+ ),
84
+ e("nylas-confirmation-email", { name: "confirmation-email-template", confirmationEmailTemplate: i.emailTemplate, isOpen: !((d = (n = i.reminders) == null ? void 0 : n.overrides) != null && d.length), participants: i.participants, 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" }),
85
+ e("nylas-reminder-emails", { name: "reminder-emails", eventReminders: ((o = i.reminders) == null ? void 0 : o.overrides) ?? [], participants: i.participants, exportparts: "nre, nre__tab-heading, nre__header, nre__body, nre__confirmation-email-toggle--container, nre__summary, nre__reminder-input_dropdown, nre__reminder-input_dropdown-input, nre__reminder-input_dropdown-content" })
86
+ );
87
+ case "participants":
88
+ return e(
89
+ "div",
90
+ { key: t },
91
+ e("nylas-additional-participants", { name: "participants", eventParticipants: i.participants, exportparts: "nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant" }),
92
+ e("nylas-participants-custom-availability", { name: "participant-custom-availability", participants: i.participants, exportparts: "npca, npca__header, npca__content, npca__participant-container, npca__participant-title, npca__participant-toggle--container, npca__toggle-label, npca__toggle-input, npca__toggle-slider" })
93
+ );
94
+ case "bookingForm":
95
+ const F = Object.entries(i.additionalFields).map(([f, H]) => ({ key: f, ...H }));
96
+ return e(
97
+ "div",
98
+ { key: t },
99
+ e("nylas-booking-form-config", { name: "additional-fields", additonalFields: F })
100
+ );
101
+ }
102
+ }
103
+ const Ot = '.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-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:554px;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)}.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;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.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}.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:1rem;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:1rem;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}', It = Ot;
104
+ var Rt = function(t, i, a, s) {
105
+ var r = arguments.length, n = r < 3 ? i : s === null ? s = Object.getOwnPropertyDescriptor(i, a) : s, d;
106
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
107
+ n = Reflect.decorate(t, i, a, s);
108
+ else
109
+ for (var o = t.length - 1; o >= 0; o--)
110
+ (d = t[o]) && (n = (r < 3 ? d(n) : r > 3 ? d(i, a, n) : d(i, a)) || n);
111
+ return r > 3 && n && Object.defineProperty(i, a, n), n;
112
+ }, V = function(t, i) {
113
+ if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
114
+ return Reflect.metadata(t, i);
115
+ };
116
+ const St = class {
117
+ constructor(t) {
118
+ $(this, t), this.schedulerConfigChanged = _(this, "schedulerConfigChanged", 7), this.cancelButtonClick = _(this, "cancelButtonClick", 7), this.formSubmitted = _(this, "formSubmitted", 7), this.previewButtonClicked = _(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = _(this, "schedulerEditorFormUpdated", 7), this.setError = (i) => {
119
+ this.error = i.message;
120
+ }, this.formSubmissionHandler = async (i) => {
121
+ var O, G, W, q, K, Q, X, Y, tt, et, it, at, nt, st, ot, rt;
122
+ if (i.preventDefault(), this.formSubmitted.emit(), !this.formRef.checkValidity()) {
123
+ this.error = this.formRef.validationMessage || "Please fix the form errors.";
124
+ return;
125
+ }
126
+ this.isLoading = !0, this.hasUnsavedChanges = !1;
127
+ const s = this.updateFormState(), { title: r, description: n, duration: d, availability: o, bookingCalendar: p, location: m, bookingType: v, buffer: x, availableDaysInFuture: S, minCancellationNotice: T, minBookingNotice: L, cancellationPolicy: F, timeslotInterval: f, additionalGuestsHidden: H, hideCancellationOptions: I, hideReschedulingOptions: R, participants: w, participantOpenHours: h, additionalFields: z, participantCalendars: k, conferencing: M, participantBookingCalendars: g, reminders: j, emailTemplate: U } = s, c = (G = (O = this.selectedConfiguration) == null ? void 0 : O.participants) == null ? void 0 : G.find((l) => l.is_organizer), C = k && (c != null && c.email) ? k[c == null ? void 0 : c.email] : [], B = ((W = c == null ? void 0 : c.booking) == null ? void 0 : W.calendar_id) || p, P = d ? parseInt(d) : 30, D = w && (w == null ? void 0 : w.length) > 0 ? w : [
128
+ {
129
+ name: (c == null ? void 0 : c.name) ?? ((q = this.currentUser) == null ? void 0 : q.name) ?? "",
130
+ email: (c == null ? void 0 : c.email) ?? ((K = this.currentUser) == null ? void 0 : K.email) ?? "",
131
+ is_organizer: !0,
132
+ timezone: (o == null ? void 0 : o.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
133
+ availability: {
134
+ calendar_ids: C.length ? C : ["primary"],
135
+ open_hours: []
136
+ },
137
+ booking: {
138
+ calendar_id: p && p !== "" ? p : "primary"
139
+ }
140
+ }
141
+ ], N = {
142
+ ...((Q = this.selectedConfiguration) == null ? void 0 : Q.id) && { id: this.selectedConfiguration.id },
143
+ version: ((X = this.selectedConfiguration) == null ? void 0 : X.version) ?? "1.0.0",
144
+ availability: {
145
+ duration_minutes: P,
146
+ interval_minutes: (f == null ? void 0 : f.interval) ?? P,
147
+ round_to: f == null ? void 0 : f.roundTo,
148
+ availability_rules: {
149
+ availability_method: ((et = (tt = (Y = this.selectedConfiguration) == null ? void 0 : Y.availability) == null ? void 0 : tt.availability_rules) == null ? void 0 : et.availability_method) ?? "collective",
150
+ buffer: x || { before: 0, after: 0 },
151
+ default_open_hours: (o == null ? void 0 : o.openHours) ?? ((nt = (at = (it = this.selectedConfiguration) == null ? void 0 : it.availability) == null ? void 0 : at.availability_rules) == null ? void 0 : nt.default_open_hours) ?? wt,
152
+ round_robin_group_id: ((rt = (ot = (st = this.selectedConfiguration) == null ? void 0 : st.availability) == null ? void 0 : ot.availability_rules) == null ? void 0 : rt.round_robin_group_id) ?? ""
153
+ }
154
+ },
155
+ participants: [
156
+ ...D == null ? void 0 : D.map((l) => {
157
+ var lt, dt, ct, bt, ht, ut, pt, mt, ft, yt, gt, _t, vt;
158
+ return l.is_organizer ? {
159
+ name: l.name ?? "",
160
+ email: l.email,
161
+ is_organizer: !0,
162
+ timezone: ((dt = (lt = h == null ? void 0 : h[l.email]) == null ? void 0 : lt[0]) == null ? void 0 : dt.timezone) ?? ((ht = (bt = (ct = l.availability) == null ? void 0 : ct.open_hours) == null ? void 0 : bt[0]) == null ? void 0 : ht.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
163
+ availability: {
164
+ calendar_ids: C.length ? C : ["primary"],
165
+ open_hours: (h == null ? void 0 : h[l.email]) ?? ((ut = l.availability) == null ? void 0 : ut.open_hours) ?? []
166
+ },
167
+ booking: {
168
+ calendar_id: B || "primary"
169
+ }
170
+ } : {
171
+ ...l,
172
+ timezone: ((mt = (pt = h == null ? void 0 : h[l.email]) == null ? void 0 : pt[0]) == null ? void 0 : mt.timezone) ?? ((gt = (yt = (ft = l.availability) == null ? void 0 : ft.open_hours) == null ? void 0 : yt[0]) == null ? void 0 : gt.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
173
+ availability: l.availability ? {
174
+ calendar_ids: (k == null ? void 0 : k[l.email]) ?? ((_t = l.availability) == null ? void 0 : _t.calendar_ids) ?? ["primary"],
175
+ open_hours: (h == null ? void 0 : h[l.email]) ?? ((vt = l.availability) == null ? void 0 : vt.open_hours) ?? []
176
+ } : void 0,
177
+ booking: g != null && g[l.email] ? { calendar_id: g == null ? void 0 : g[l.email] } : (l == null ? void 0 : l.booking) ?? void 0
178
+ };
179
+ })
180
+ ],
181
+ event_booking: {
182
+ title: (r == null ? void 0 : r.toString()) ?? "",
183
+ description: (n == null ? void 0 : n.toString()) ?? "",
184
+ location: (m == null ? void 0 : m.toString()) ?? "",
185
+ booking_type: (v == null ? void 0 : v.toString()) ?? "booking",
186
+ timezone: (o == null ? void 0 : o.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
187
+ conferencing: M,
188
+ reminders: j
189
+ },
190
+ scheduler: {
191
+ cancellation_policy: F ?? "",
192
+ available_days_in_future: S ?? 30,
193
+ min_cancellation_notice: T ?? 0,
194
+ min_booking_notice: L ?? 60,
195
+ hide_additional_guests: H ?? !1,
196
+ hide_cancellation_options: I ?? !1,
197
+ hide_rescheduling_options: R ?? !1,
198
+ additional_fields: z,
199
+ email_template: U
200
+ }
201
+ }, A = Lt(N, this.selectedConfiguration), u = this.action === "create" ? A : N;
202
+ this.isConfigRoundRobin(u) && (u.participants = u.participants.map((l) => ({ ...l, is_organizer: void 0 })));
203
+ const y = (l) => {
204
+ this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
205
+ this.changesSaved = !1;
206
+ }, 5e3);
207
+ };
208
+ this.checkForClientSideErrors(u) || this.schedulerConfigChanged.emit({ config: u, resetLoadingState: y, setError: this.setError, action: this.action });
209
+ }, this.isConfigRoundRobin = (i) => {
210
+ var a, s, r, n;
211
+ return ((s = (a = i.availability) == null ? void 0 : a.availability_rules) == null ? void 0 : s.availability_method) === "max-availability" || ((n = (r = i.availability) == null ? void 0 : r.availability_rules) == null ? void 0 : n.availability_method) === "max-fairness";
212
+ }, this.checkForClientSideErrors = (i) => {
213
+ var n;
214
+ let a = !1, s = "";
215
+ const r = (n = i.scheduler) == null ? void 0 : n.additional_fields;
216
+ return r && (s = "Booking form error: ", Object.entries(r).forEach((d) => {
217
+ const o = d[1];
218
+ if (o.label === "") {
219
+ s += `Label is required for field of type ${o.type}.`, a = !0;
220
+ return;
221
+ }
222
+ if (o.options) {
223
+ for (const p of o.options)
224
+ if (p === "") {
225
+ s += `Empty option detected inside ${o.label} of type ${o.type}.`, a = !0;
226
+ break;
227
+ }
228
+ }
229
+ })), a && (this.isLoading = !1, this.setError(new Error(s))), a;
230
+ }, this.calendars = void 0, this.selectedConfiguration = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.action = "create", this.activeTab = "eventInfo", this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = "";
231
+ }
232
+ configChangedHandler(t) {
233
+ b("[nylas-editor-tabs]", "configChangedHandler", t, this.selectedConfiguration), this.formState = {
234
+ ...this.getFormStateFromConfig(t)
235
+ }, t.id ? this.action = "edit" : this.action = "create";
236
+ }
237
+ userChangedHandler(t) {
238
+ b("[nylas-editor-tabs]", "userChangedHandler", t), t && (this.formState = {
239
+ ...this.getFormStateFromConfig(this.selectedConfiguration)
240
+ });
241
+ }
242
+ connectedCallback() {
243
+ b("[nylas-editor-tabs]", "connectedCallback");
244
+ }
245
+ componentWillLoad() {
246
+ b("[nylas-editor-tabs]", "componentWillLoad"), this.formState = this.getFormStateFromConfig(this.selectedConfiguration);
247
+ }
248
+ componentDidLoad() {
249
+ var i;
250
+ b("[nylas-editor-tabs]", "componentDidLoad");
251
+ const t = (i = this.host.querySelector("button.tab:not(.hide)")) == null ? void 0 : i.name;
252
+ t && (this.activeTab = t);
253
+ }
254
+ disconnectedCallback() {
255
+ b("[nylas-editor-tabs]", "disconnectedCallback");
256
+ }
257
+ handleValueChanged(t) {
258
+ b("[nylas-editor-tabs]", "handleValueChanged", t);
259
+ const { name: i, value: a } = t.detail;
260
+ this.setFormState(a, i), this.formState = { ...this.formState }, this.hasUnsavedChanges = !0, this.error = "", this.schedulerEditorFormUpdated.emit({
261
+ value: t.detail.value,
262
+ name: t.detail.name
263
+ });
264
+ }
265
+ getFormStateFromConfig(t) {
266
+ var a, s, r, n, d, o, p, m, v, x, S, T, L, F, f, H, I, R, w, h, z, k, M, g, j, U, c, C, B, P, D, N, A;
267
+ let i = (a = t == null ? void 0 : t.participants) == null ? void 0 : a.find((u) => u.is_organizer);
268
+ return !i && ((r = (s = t == null ? void 0 : t.availability) == null ? void 0 : s.availability_rules) == null ? void 0 : r.availability_method) !== "collective" && (i = (n = t == null ? void 0 : t.participants) == null ? void 0 : n.find((u) => {
269
+ var y;
270
+ return u.email === ((y = this.currentUser) == null ? void 0 : y.email);
271
+ }), i && (i.is_organizer = !0)), {
272
+ title: ((d = t == null ? void 0 : t.event_booking) == null ? void 0 : d.title) ?? "",
273
+ description: ((o = t == null ? void 0 : t.event_booking) == null ? void 0 : o.description) ?? "",
274
+ duration: ((m = (p = t == null ? void 0 : t.availability) == null ? void 0 : p.duration_minutes) == null ? void 0 : m.toString()) ?? "30",
275
+ availability: {
276
+ timezone: ((v = t == null ? void 0 : t.event_booking) == null ? void 0 : v.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
277
+ openHours: ((S = (x = t == null ? void 0 : t.availability) == null ? void 0 : x.availability_rules) == null ? void 0 : S.default_open_hours) ?? wt
278
+ },
279
+ additionalFields: ((T = t == null ? void 0 : t.scheduler) == null ? void 0 : T.additional_fields) ?? {},
280
+ conferencing: ((L = t == null ? void 0 : t.event_booking) == null ? void 0 : L.conferencing) ?? {},
281
+ calendarIds: ((F = i == null ? void 0 : i.availability) == null ? void 0 : F.calendar_ids) ?? [],
282
+ participants: (t == null ? void 0 : t.participants) ?? [],
283
+ bookingCalendar: ((f = i == null ? void 0 : i.booking) == null ? void 0 : f.calendar_id) ?? (i == null ? void 0 : i.email) ?? "",
284
+ location: ((H = t == null ? void 0 : t.event_booking) == null ? void 0 : H.location) ?? "",
285
+ bookingType: ((I = t == null ? void 0 : t.event_booking) == null ? void 0 : I.booking_type) ?? "booking",
286
+ buffer: ((w = (R = t == null ? void 0 : t.availability) == null ? void 0 : R.availability_rules) == null ? void 0 : w.buffer) ?? { before: 0, after: 0 },
287
+ cancellationPolicy: ((h = t == null ? void 0 : t.scheduler) == null ? void 0 : h.cancellation_policy) ?? "",
288
+ availableDaysInFuture: ((z = t == null ? void 0 : t.scheduler) == null ? void 0 : z.available_days_in_future) ?? 30,
289
+ minCancellationNotice: ((k = t == null ? void 0 : t.scheduler) == null ? void 0 : k.min_cancellation_notice) ?? 0,
290
+ minBookingNotice: ((M = t == null ? void 0 : t.scheduler) == null ? void 0 : M.min_booking_notice) ?? 60,
291
+ timeslotInterval: {
292
+ interval: ((g = t == null ? void 0 : t.availability) == null ? void 0 : g.interval_minutes) ?? ((j = t == null ? void 0 : t.availability) == null ? void 0 : j.duration_minutes),
293
+ roundTo: (U = t == null ? void 0 : t.availability) == null ? void 0 : U.round_to
294
+ },
295
+ additionalGuestsHidden: ((c = t == null ? void 0 : t.scheduler) == null ? void 0 : c.hide_additional_guests) ?? !1,
296
+ hideCancellationOptions: ((C = t == null ? void 0 : t.scheduler) == null ? void 0 : C.hide_cancellation_options) ?? !1,
297
+ hideReschedulingOptions: ((B = t == null ? void 0 : t.scheduler) == null ? void 0 : B.hide_rescheduling_options) ?? !1,
298
+ participantBookingCalendars: ((P = t == null ? void 0 : t.participants) == null ? void 0 : P.reduce((u, y) => {
299
+ var E, O;
300
+ return (E = y.booking) != null && E.calendar_id && (u[y.email] = (O = y.booking) == null ? void 0 : O.calendar_id), u;
301
+ })) ?? {},
302
+ participantCalendars: ((D = t == null ? void 0 : t.participants) == null ? void 0 : D.reduce((u, y) => {
303
+ var E;
304
+ return u[y.email] = (E = y.availability) == null ? void 0 : E.calendar_ids, u;
305
+ }, {})) ?? {},
306
+ reminders: (N = t == null ? void 0 : t.event_booking) == null ? void 0 : N.reminders,
307
+ emailTemplate: (A = t == null ? void 0 : t.scheduler) == null ? void 0 : A.email_template
308
+ };
309
+ }
310
+ setFormState(t, i) {
311
+ switch (i) {
312
+ case "title":
313
+ this.formState.title = t.toString();
314
+ break;
315
+ case "description":
316
+ this.formState.description = t.toString();
317
+ break;
318
+ case "duration":
319
+ this.formState.duration = t.toString();
320
+ break;
321
+ case "availability":
322
+ this.formState.availability = JSON.parse(t.toString());
323
+ break;
324
+ case "participants":
325
+ this.formState.participants = JSON.parse(t.toString());
326
+ break;
327
+ case "booking-calendar":
328
+ this.formState.bookingCalendar = t.toString();
329
+ break;
330
+ case "participant-booking-calendars":
331
+ this.formState.participantBookingCalendars = JSON.parse(t.toString());
332
+ break;
333
+ case "location":
334
+ this.formState.location = t.toString();
335
+ break;
336
+ case "conference":
337
+ this.formState.conferencing = JSON.parse(t.toString());
338
+ break;
339
+ case "booking-type":
340
+ this.formState.bookingType = t.toString();
341
+ break;
342
+ case "buffer-time":
343
+ this.formState.buffer = JSON.parse(t.toString());
344
+ break;
345
+ case "limit-future-bookings":
346
+ this.formState.availableDaysInFuture = parseInt(t.toString());
347
+ break;
348
+ case "min-cancellation-notice":
349
+ this.formState.minCancellationNotice = parseInt(t.toString());
350
+ break;
351
+ case "min-booking-notice":
352
+ this.formState.minBookingNotice = parseInt(t.toString());
353
+ break;
354
+ case "cancellation-policy":
355
+ this.formState.cancellationPolicy = t.toString();
356
+ break;
357
+ case "timeslot-interval":
358
+ this.formState.timeslotInterval = JSON.parse(t.toString());
359
+ break;
360
+ case "customize-booking-settings":
361
+ const a = JSON.parse(t.toString());
362
+ this.formState.additionalGuestsHidden = a.additionalGuestsHidden, this.formState.hideCancellationOptions = a.hideCancellationOptions, this.formState.hideReschedulingOptions = a.hideReschedulingOptions;
363
+ break;
364
+ case "participant-custom-availability":
365
+ const s = JSON.parse(t.toString());
366
+ this.formState.participantOpenHours = s;
367
+ break;
368
+ case "additional-fields":
369
+ this.formState.additionalFields = t;
370
+ break;
371
+ case "connected-calendars":
372
+ this.formState.participantCalendars = JSON.parse(t.toString());
373
+ break;
374
+ case "confirmation-email-template":
375
+ this.formState.emailTemplate = JSON.parse(t.toString());
376
+ break;
377
+ case "reminder-overrides":
378
+ this.formState.reminders = { overrides: JSON.parse(t.toString()) };
379
+ break;
380
+ }
381
+ this.schedulerEditorFormUpdated.emit({
382
+ value: t,
383
+ name: i
384
+ });
385
+ }
386
+ updateFormState() {
387
+ return new FormData(this.formRef).forEach((i, a) => {
388
+ this.setFormState(i, a);
389
+ }), this.formState = { ...this.formState }, this.formState;
390
+ }
391
+ setActiveTab(t, i) {
392
+ t.preventDefault(), this.updateFormState(), this.activeTab = i;
393
+ }
394
+ hideTab(t) {
395
+ var i;
396
+ return ((i = this.hideEditorTabs) == null ? void 0 : i.includes(t)) || !1;
397
+ }
398
+ render() {
399
+ var i;
400
+ b("[nylas-editor-tabs]", "render", this.formState);
401
+ const t = localStorage.getItem("nylas") === "Nylas Developer";
402
+ return e(kt, { key: "5e190ea179c30e38c254ad7ec34e3ffa53da6d2f" }, e("form", { key: "2048843017f86406f676d158f97c42283f44ea9a", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (a) => this.formRef = a, noValidate: !0 }, this.mode === "app" ? e("div", { class: "form-contents" }, e("div", { class: "tabs" }, e("button", { name: "eventInfo", class: { tab: !0, active: this.activeTab == "eventInfo", hide: this.hideTab("eventInfo") }, part: "editortab__event-info", onClick: (a) => this.setActiveTab(a, "eventInfo") }, e("calendar-info-icon", { width: "16", height: "16" }), "Event info"), e("button", { name: "availability", class: { tab: !0, active: this.activeTab == "availability", hide: this.hideTab("availability") }, part: "editortab__availability", onClick: (a) => this.setActiveTab(a, "availability") }, e("calendar-patterns-icon", { width: "16", height: "16" }), "Availability"), e("button", { name: "participants", class: { tab: !0, active: this.activeTab == "participants", hide: this.hideTab("participants") }, part: "editortab__participants", onClick: (a) => this.setActiveTab(a, "participants") }, e("people-icon", { width: "16", height: "16" }), "Participants"), e("button", { name: "bookingOptions", class: { tab: !0, active: this.activeTab == "bookingOptions", hide: this.hideTab("bookingOptions") }, part: "editortab__booking-options", onClick: (a) => this.setActiveTab(a, "bookingOptions") }, e("flow-icon", { width: "16", height: "16" }), "Booking options"), e("button", { name: "bookingForm", class: { tab: !0, active: this.activeTab == "bookingForm", hide: this.hideTab("bookingForm") }, part: "editortab__booking-form", onClick: (a) => this.setActiveTab(a, "bookingForm") }, this.activeTab == "bookingForm" ? e("calendar-agenda-fill-icon", { width: "16", height: "16" }) : e("calendar-agenda-icon", { width: "16", height: "16" }), "Booking form"), t && e("button", { name: "communications", class: { tab: !0, active: this.activeTab == "communications" }, onClick: (a) => this.setActiveTab(a, "communications") }, this.activeTab == "communications" ? e("envelope-fill-icon", { width: "16", height: "16" }) : e("envelope-icon", { width: "16", height: "16" }), "Communications")), e("div", { class: "tab-content" }, e(Nt, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((i = this.selectedConfiguration) == null ? void 0 : i.id) ?? "new" }))) : e("slot", null), e("div", { key: "88a16f2bccf874acaec34b0ad37d42313758cbb9", class: "footer", part: "editor__footer" }, e("div", { key: "17387917bc660e6e691e5d75501d4a13da2632fc", class: "preview", part: "editor__footer-preview" }, this.schedulerPreviewLink !== "" && this.action === "edit" && e("button-component", { type: "button", disabled: this.isLoading, clickHandler: (a) => {
403
+ a.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(J(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
404
+ }, variant: "basic" }, "Preview")), e("div", { key: "a4e8d02452c2ab524dc0fb010ad88f05cd46d244", class: "buttons", part: "editor__footer-buttons" }, e("p", { key: "2a04af9dc978964725eeb787b1a3f31d76e26720", class: {
405
+ "unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
406
+ "saved-changes": this.changesSaved,
407
+ error: this.error !== "",
408
+ "error-full-width": this.error !== "" && this.action === "create"
409
+ } }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved ? "Unsaved changes" : this.error == "" && this.changesSaved ? "Changes saved!" : ""), e("button-component", { key: "5997accc74ff1f73b2577923a02f50af0f613429", type: "button", disabled: this.isLoading, clickHandler: (a) => {
410
+ a.preventDefault(), this.cancelButtonClick.emit(), this.error = "";
411
+ }, variant: "basic", part: "editor__footer-cancel" }, "Back"), e("button-component", { key: "9aee416653e7648a62a4d95af171b49b9fd35cba", type: "submit", disabled: this.isLoading, part: "editor__footer-cta" }, this.isLoading ? e("span", null, "Saving", e("loading-icon", null), " ") : this.action == "create" ? "Create" : "Save changes")))));
412
+ }
413
+ get host() {
414
+ return Ct(this);
415
+ }
416
+ static get watchers() {
417
+ return {
418
+ selectedConfiguration: ["configChangedHandler"],
419
+ currentUser: ["userChangedHandler"]
420
+ };
421
+ }
422
+ };
423
+ Rt([
424
+ xt({
425
+ name: "nylas-editor-tabs",
426
+ stateToProps: /* @__PURE__ */ new Map([
427
+ ["schedulerConfig.calendars", "calendars"],
428
+ ["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
429
+ ["schedulerConfig.currentUser", "currentUser"],
430
+ ["schedulerConfig.hideEditorTabs", "hideEditorTabs"]
431
+ ]),
432
+ eventToProps: {
433
+ schedulerConfigChanged: async (t, i) => {
434
+ const { resetLoadingState: a, setError: s, action: r, config: n } = t.detail, d = (o) => {
435
+ const [p, m] = o;
436
+ !p && m && s && s(m), a && a(t);
437
+ };
438
+ if (r === "edit") {
439
+ const o = await i.schedulerConfig.updateConfiguration(n);
440
+ d(o);
441
+ } else {
442
+ const o = await i.schedulerConfig.createConfiguration(n);
443
+ d(o);
444
+ }
445
+ },
446
+ cancelButtonClick: async (t, i) => {
447
+ i.schedulerConfigStore.state.action = null;
448
+ },
449
+ previewButtonClicked: async (t, i) => {
450
+ b("[nylas-editor-tabs]", "previewButtonClicked", i);
451
+ },
452
+ formSubmitted: async (t, i) => {
453
+ b("[nylas-editor-tabs]", "formSubmitted", i);
454
+ },
455
+ schedulerEditorFormUpdated: async (t, i) => {
456
+ b("[nylas-editor-tabs]", "schedulerEditorFormUpdated", t);
457
+ }
458
+ },
459
+ localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
460
+ fireRegisterEvent: !0
461
+ }),
462
+ V("design:type", Function),
463
+ V("design:paramtypes", []),
464
+ V("design:returntype", void 0)
465
+ ], St.prototype, "render", null);
466
+ St.style = It;
467
+ const zt = ':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-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.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:1rem;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:auto}.configurations table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations table.no-configurations{height:100%}.configurations table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations table tr.hide{display:none}.configurations table th{font-weight:600;text-transform:uppercase;font-size:14px;line-height:20px}.configurations table th.actions-header{text-align:right}.configurations 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 tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations table th,.configurations table td{text-align:left;padding:1rem;font-family:inherit}.configurations table .actions{text-align:right}.configurations table .actions{display:flex;justify-content:flex-end;gap:1rem}@media screen and (max-width: 768px){.configurations table .actions{flex-direction:column;gap:0.5rem}}.configurations table .title{width:100%;max-width:300px}@media screen and (max-width: 768px){.configurations table .title{max-width:96px}}.configurations table .title div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.configurations table .title div.config-event-title{font-weight:600}.configurations 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)}', Mt = zt;
468
+ var jt = function(t, i, a, s) {
469
+ var r = arguments.length, n = r < 3 ? i : s === null ? s = Object.getOwnPropertyDescriptor(i, a) : s, d;
470
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
471
+ n = Reflect.decorate(t, i, a, s);
472
+ else
473
+ for (var o = t.length - 1; o >= 0; o--)
474
+ (d = t[o]) && (n = (r < 3 ? d(n) : r > 3 ? d(i, a, n) : d(i, a)) || n);
475
+ return r > 3 && n && Object.defineProperty(i, a, n), n;
476
+ }, Z = function(t, i) {
477
+ if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
478
+ return Reflect.metadata(t, i);
479
+ };
480
+ const Tt = class {
481
+ constructor(t) {
482
+ $(this, t), this.initListConfigurations = _(this, "initListConfigurations", 7), this.createButtonClick = _(this, "createButtonClick", 7), this.editButtonClick = _(this, "editButtonClick", 7), this.deleteButtonClick = _(this, "deleteButtonClick", 7), this.configurations = [], this.schedulerPreviewLink = "", this.listConfigurationsNextCursor = void 0, this.state = "loading", this.error = "", this.currentCursor = null, this.previousCursors = [], this.disableNextPageButton = !1;
483
+ }
484
+ listConfigurationsNextCursorChangedHandler(t, i) {
485
+ if (!t || t === i) {
486
+ t === null && (this.disableNextPageButton = !0);
487
+ return;
488
+ }
489
+ this.disableNextPageButton = !1, this.currentCursor = t;
490
+ }
491
+ connectedCallback() {
492
+ b("[nylas-list-configurations]", "connectedCallback");
493
+ }
494
+ componentWillLoad() {
495
+ b("[nylas-list-configurations]", "componentWillLoad"), this.configurations && this.configurations.length > 0 && (this.state = "loaded");
496
+ }
497
+ componentDidLoad() {
498
+ b("[nylas-list-configurations]", "componentDidLoad"), this.initListConfigurations.emit({
499
+ host: this.host
500
+ });
501
+ }
502
+ disconnectedCallback() {
503
+ b("[nylas-list-configurations]", "disconnectedCallback");
504
+ }
505
+ async handleNylasFormDropdownChanged(t) {
506
+ b("[nylas-list-configurations]", "handleNylasFormDropdownChanged", t.detail);
507
+ const { value: i } = t.detail, [a, s] = i.split("-");
508
+ switch (t.preventDefault(), a) {
509
+ case "delete":
510
+ this.deleteButtonClick.emit({ host: this.host, configuration: this.configurations[s] });
511
+ break;
512
+ case "preview":
513
+ window.open(J(this.schedulerPreviewLink, this.configurations[s]), "_blank");
514
+ break;
515
+ case "copy":
516
+ await navigator.clipboard.writeText(J(this.schedulerPreviewLink, this.configurations[s]));
517
+ break;
518
+ }
519
+ }
520
+ async getState() {
521
+ return this.state;
522
+ }
523
+ async setState(t) {
524
+ this.state = t;
525
+ }
526
+ async setError(t) {
527
+ this.error = t;
528
+ }
529
+ getDurationString(t) {
530
+ const i = Math.floor(t / 60), a = t % 60;
531
+ return `${i || ""} ${i ? `${i > 1 ? "hours" : "hour"}` : ""} ${a || ""} ${a ? `${a > 1 ? "mins" : "min"}` : ""}`;
532
+ }
533
+ getActionLabelHTML(t) {
534
+ const i = {
535
+ display: "inline-flex",
536
+ alignItems: "center",
537
+ gap: "0.5rem"
538
+ }, a = {
539
+ color: "var(--nylas-error)"
540
+ };
541
+ switch (t) {
542
+ case "preview":
543
+ return e("span", { style: i }, e("eye-icon", { width: "16", height: "16" }), "Preview");
544
+ case "copy":
545
+ return e("span", { style: i }, e("copy-icon", { width: "16", height: "16" }), "Copy");
546
+ case "delete":
547
+ return e("span", { style: { ...i, ...a } }, e("delete-icon", { width: "15", height: "17" }), "Delete");
548
+ default:
549
+ return "";
550
+ }
551
+ }
552
+ previousPageClickedHandler() {
553
+ if (this.previousCursors.length === 0)
554
+ return;
555
+ this.currentCursor = this.previousCursors.pop() || null;
556
+ const t = this.previousCursors[this.previousCursors.length - 1] || void 0;
557
+ this.initListConfigurations.emit({
558
+ host: this.host,
559
+ cursor: t
560
+ });
561
+ }
562
+ nextPageClickedHandler() {
563
+ this.currentCursor && (this.previousCursors = [...this.previousCursors, this.currentCursor], this.initListConfigurations.emit({
564
+ host: this.host,
565
+ cursor: this.currentCursor
566
+ }));
567
+ }
568
+ render() {
569
+ return e(kt, null, e("div", { class: "header" }, e("div", { class: "description" }, e("h2", null, "All scheduling pages"), e("p", null, "Create, edit and manage all your scheduling pages.")), this.configurations && this.configurations.length > 0 && e("div", { class: "actions" }, e("button-component", { clickHandler: () => {
570
+ this.createButtonClick.emit(this.host);
571
+ } }, "Create new"))), e("div", { class: "configurations" }, e("table", { class: {
572
+ "no-configurations": this.state !== "loading" && (!this.configurations || this.configurations.length === 0)
573
+ } }, e("tr", { class: {
574
+ hide: this.state === "loading" || this.configurations && this.configurations.length === 0
575
+ } }, e("th", null, "Scheduling page title"), e("th", null, "Duration"), e("th", { class: "actions-header" }, "Actions")), this.state === "loading" && e("tr", { class: "no-configurations" }, e("td", { colSpan: 3 }, e("div", null, e("h3", null, "Loading..."), e("p", null, "Please wait while we fetch the scheduling pages")))), this.state !== "loading" && (!this.configurations || this.configurations.length === 0) && e("tr", { class: "no-configurations" }, e("td", { colSpan: 3 }, e("div", null, e("calendar-icon", { width: "48", height: "48" }), e("h3", null, "No scheduling pages found"), e("p", null, "Get started with creating your first scheduling page"), e("button-component", { clickHandler: () => {
576
+ this.createButtonClick.emit(this.host);
577
+ } }, "Create new")))), this.state !== "loading" && this.configurations.map((t, i) => e("tr", { key: t.id }, e("td", null, e("div", { class: "title" }, e("div", { class: "config-event-title", title: t.event_booking.title }, t.event_booking.title), e("div", { class: "config-event-description" }, t.event_booking.description))), e("td", null, e("div", { class: "duration" }, this.getDurationString(t.availability.duration_minutes))), e("td", null, e("div", { class: "actions" }, e("button-component", { variant: "basic", key: `edit-${i}`, clickHandler: (a) => {
578
+ a.preventDefault(), this.editButtonClick.emit({ host: this.host, configuration: t });
579
+ } }, e("edit-icon", { width: "16", height: "16" }), "Edit"), e("select-dropdown", { name: "actions", options: [
580
+ { value: `preview-${i}`, label: "Preview", labelHTML: this.getActionLabelHTML("preview") },
581
+ { value: `copy-${i}`, label: "Copy link", labelHTML: this.getActionLabelHTML("copy") },
582
+ { value: `delete-${i}`, label: "Delete", labelHTML: this.getActionLabelHTML("delete") }
583
+ ], 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" })))))), e("div", { class: "pagination" }, e("button", { class: "arrow left", onClick: () => this.previousPageClickedHandler(), disabled: this.previousCursors.length <= 0 }, e("chevron-icon", null)), e("button", { class: "arrow right", onClick: () => this.nextPageClickedHandler(), disabled: this.disableNextPageButton }, e("chevron-icon", null)))), this.state === "error" && e("div", { class: "error-container" }, e("p", { class: "error" }, this.error)));
584
+ }
585
+ get host() {
586
+ return Ct(this);
587
+ }
588
+ static get watchers() {
589
+ return {
590
+ listConfigurationsNextCursor: ["listConfigurationsNextCursorChangedHandler"]
591
+ };
592
+ }
593
+ };
594
+ jt([
595
+ xt({
596
+ name: "nylas-list-configurations",
597
+ stateToProps: /* @__PURE__ */ new Map([
598
+ ["schedulerConfig.configurations", "configurations"],
599
+ ["schedulerConfig.listConfigurationsNextCursor", "listConfigurationsNextCursor"]
600
+ ]),
601
+ localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
602
+ eventToProps: {
603
+ initListConfigurations: async (t, i) => {
604
+ const { host: a, cursor: s } = t.detail;
605
+ await a.setState("loading");
606
+ const [r, n] = await i.schedulerConfig.getConfigurations(s);
607
+ if (!r && n && n.message) {
608
+ await a.setState("error"), await a.setError(n.message);
609
+ return;
610
+ }
611
+ await a.setState("loaded");
612
+ },
613
+ createButtonClick: async (t, i) => {
614
+ i.schedulerConfigStore.resetSelectedConfiguration(), i.schedulerConfigStore.state.action = "create";
615
+ },
616
+ deleteButtonClick: async (t, i) => {
617
+ const { host: a, configuration: s } = t.detail, [r, n] = await i.schedulerConfig.deleteConfiguration(s.id);
618
+ !r && n && n.message && (await a.setState("error"), await a.setError(n.message));
619
+ },
620
+ editButtonClick: async (t, i) => {
621
+ const { configuration: a } = t.detail;
622
+ i.schedulerConfigStore.state.selectedConfiguration = a, i.schedulerConfigStore.state.action = "edit";
623
+ }
624
+ },
625
+ fireRegisterEvent: !0
626
+ }),
627
+ Z("design:type", Function),
628
+ Z("design:paramtypes", []),
629
+ Z("design:returntype", void 0)
630
+ ], Tt.prototype, "render", null);
631
+ Tt.style = Mt;
632
+ export {
633
+ Dt as google_logo_icon,
634
+ Pt as microsoft_logo_icon,
635
+ St as nylas_editor_tabs,
636
+ Tt as nylas_list_configurations
637
+ };