@calcom/atoms 2.5.0 → 2.6.0

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 (139) hide show
  1. package/dist/{AddressInput-SzlQAlC_.js → AddressInput-INmIRs8-.js} +1 -1
  2. package/dist/{AlbyPriceComponent-C1NgEImf.js → AlbyPriceComponent-C_Gtm7T6.js} +1 -1
  3. package/dist/{AppCard-BWKYRAGD.js → AppCard-Jly1hUzJ.js} +9 -9
  4. package/dist/{AppListCardPlatformWrapper-BeErum54.js → AppListCardPlatformWrapper-Dfvg0jJ4.js} +1 -1
  5. package/dist/{AppListCardWebWrapper-CUxj2uOV.js → AppListCardWebWrapper-5UxMkTRD.js} +1 -1
  6. package/dist/{AppSettingsInterface-CeIgTiQ1.js → AppSettingsInterface-BW1HEirp.js} +1 -1
  7. package/dist/{AppSettingsInterface-CvA2IPl2.js → AppSettingsInterface-C_G2HEx1.js} +1 -1
  8. package/dist/{AppSettingsInterface-CQ0w0tHu.js → AppSettingsInterface-DMmIDFez.js} +1 -1
  9. package/dist/{DateRangePicker-07dsMk8U.js → DateRangePicker-DYZMYZrR.js} +502 -500
  10. package/dist/{EventTypeAppCardInterface-BkbsbnCt.js → EventTypeAppCardInterface-5SZquLGh.js} +4 -4
  11. package/dist/{EventTypeAppCardInterface-giaoJZoV.js → EventTypeAppCardInterface-AiVLQt6e.js} +4 -4
  12. package/dist/{EventTypeAppCardInterface-BE9bv-RR.js → EventTypeAppCardInterface-B04SMxB_.js} +3 -3
  13. package/dist/{EventTypeAppCardInterface-CSO8LyTO.js → EventTypeAppCardInterface-B0Id4aDq.js} +4 -4
  14. package/dist/{EventTypeAppCardInterface-b3jzwNwv.js → EventTypeAppCardInterface-BF0QRXBm.js} +4 -4
  15. package/dist/{EventTypeAppCardInterface-D-hCC4-t.js → EventTypeAppCardInterface-BFi1f8EH.js} +3 -3
  16. package/dist/{EventTypeAppCardInterface-kHv--Cpv.js → EventTypeAppCardInterface-Bz6kbQBF.js} +2 -2
  17. package/dist/EventTypeAppCardInterface-C-9q1Pgv.js +1402 -0
  18. package/dist/{EventTypeAppCardInterface-DZdzlcpQ.js → EventTypeAppCardInterface-C0B8brbX.js} +3 -3
  19. package/dist/{EventTypeAppCardInterface-DvGAyBhN.js → EventTypeAppCardInterface-CPWGyDsB.js} +4 -4
  20. package/dist/{EventTypeAppCardInterface-Gx6ePtKZ.js → EventTypeAppCardInterface-CbAAfPzI.js} +3 -3
  21. package/dist/{EventTypeAppCardInterface-DsKcwP-F.js → EventTypeAppCardInterface-CcH_pTPb.js} +3 -3
  22. package/dist/{EventTypeAppCardInterface-Daj0r2ku.js → EventTypeAppCardInterface-Ccbh0lE5.js} +4 -4
  23. package/dist/{EventTypeAppCardInterface-3Kwg6TEe.js → EventTypeAppCardInterface-CcfHXA9X.js} +4 -4
  24. package/dist/{EventTypeAppCardInterface-D6pOcMLG.js → EventTypeAppCardInterface-CgHm_UTp.js} +2 -2
  25. package/dist/{EventTypeAppCardInterface-Cv38EzOq.js → EventTypeAppCardInterface-DHNaymv9.js} +3 -3
  26. package/dist/{EventTypeAppCardInterface-D5kt0uP7.js → EventTypeAppCardInterface-DIvOvqNe.js} +3 -3
  27. package/dist/{EventTypeAppCardInterface-d7vcgrD9.js → EventTypeAppCardInterface-DNd_P6LS.js} +4 -4
  28. package/dist/{EventTypeAppCardInterface-B5ja1_Vg.js → EventTypeAppCardInterface-DOJnmkX5.js} +3 -3
  29. package/dist/{EventTypeAppCardInterface-FjY_JuGe.js → EventTypeAppCardInterface-DQOs5zow.js} +3 -3
  30. package/dist/{EventTypeAppCardInterface-C_KgiSgu.js → EventTypeAppCardInterface-DiEndqtB.js} +3 -3
  31. package/dist/{EventTypeAppCardInterface-ZF3LnJsb.js → EventTypeAppCardInterface-DzBaD2iI.js} +4 -4
  32. package/dist/{EventTypeAppCardInterface-C48fsqfF.js → EventTypeAppCardInterface-FUX1nD4I.js} +3 -3
  33. package/dist/{EventTypeAppCardInterface-DonbLPSE.js → EventTypeAppCardInterface-J1sPid30.js} +4 -4
  34. package/dist/{EventTypeAppCardInterface-DeC4kAir.js → EventTypeAppCardInterface-LlkvSyXU.js} +3 -3
  35. package/dist/{EventTypeAppCardInterface-D6vNtBPD.js → EventTypeAppCardInterface-VKJISMU_.js} +4 -4
  36. package/dist/{EventTypeAppCardInterface-Vabmi70A.js → EventTypeAppCardInterface-mSg8w4Wv.js} +23 -23
  37. package/dist/{EventTypeAppCardInterface-BeRFdmfK.js → EventTypeAppCardInterface-oELnGHj7.js} +3 -3
  38. package/dist/{EventTypeAppSettingsInterface-CRXqHbN6.js → EventTypeAppSettingsInterface--bM-v-2f.js} +1 -1
  39. package/dist/{EventTypeAppSettingsInterface-VCy8eKJk.js → EventTypeAppSettingsInterface-C2VeNfWl.js} +1 -1
  40. package/dist/{EventTypeAppSettingsInterface-4Hj3lMzG.js → EventTypeAppSettingsInterface-CcopfL0O.js} +1 -1
  41. package/dist/{EventTypeAppSettingsInterface-DCoA8H5X.js → EventTypeAppSettingsInterface-CospBDnp.js} +1 -1
  42. package/dist/{EventTypeAppSettingsInterface-3zsxRl7y.js → EventTypeAppSettingsInterface-CotkiiMf.js} +1 -1
  43. package/dist/{EventTypeAppSettingsInterface-B5Yf0xfo.js → EventTypeAppSettingsInterface-D-QGHf2b.js} +1 -1
  44. package/dist/{EventTypeAppSettingsInterface-Ckkgk7Q7.js → EventTypeAppSettingsInterface-D7zovxei.js} +1 -1
  45. package/dist/{EventTypeAppSettingsInterface-4d9Xebgk.js → EventTypeAppSettingsInterface-DEfLbYcF.js} +1 -1
  46. package/dist/{EventTypeAppSettingsInterface-BDhPoDnq.js → EventTypeAppSettingsInterface-DYHjvMy2.js} +1 -1
  47. package/dist/{EventTypeAppSettingsInterface-B2kvyWp2.js → EventTypeAppSettingsInterface-DesLYNzu.js} +1 -1
  48. package/dist/{EventTypeAppSettingsInterface-D5NT9ODg.js → EventTypeAppSettingsInterface-DoeUQnIb.js} +1 -1
  49. package/dist/{EventTypeAppSettingsInterface-CoYcsvnV.js → EventTypeAppSettingsInterface-Dq2HBfY2.js} +1 -1
  50. package/dist/{EventTypeAppSettingsInterface-DQsdtp-n.js → EventTypeAppSettingsInterface-fKNVuyJB.js} +1 -1
  51. package/dist/{EventTypeAppSettingsInterface-DWkk8IKD.js → EventTypeAppSettingsInterface-qTJxM2CJ.js} +1 -1
  52. package/dist/{InstallAppButton--g7q2vS4.js → InstallAppButton-16Gy65tx.js} +1 -1
  53. package/dist/{InstallAppButton-DRVYiUad.js → InstallAppButton-B68jfFfO.js} +6 -6
  54. package/dist/{InstallAppButton-D-eJ9IoT.js → InstallAppButton-Bqr77mlF.js} +1 -1
  55. package/dist/{PhoneInput-uLF7Y3ez.js → PhoneInput-BTpX6Hp6.js} +1 -1
  56. package/dist/{StripePaymentForm-DlIVTm9l.js → StripePaymentForm-vfC0WlVJ.js} +13 -13
  57. package/dist/cal-atoms.js +21 -21
  58. package/dist/{index-BKVtYsaK.js → index-C-6UACoM.js} +2 -2
  59. package/dist/{index-D6p17Vap.js → index-DjKXpoZ-.js} +67715 -71186
  60. package/dist/packages/features/bookings/Booker/hooks/useAvailableTimeSlots.d.ts +14 -1
  61. package/dist/packages/features/bookings/Booker/hooks/useAvailableTimeSlots.d.ts.map +1 -1
  62. package/dist/packages/features/bookings/lib/EventManager.d.ts +0 -1
  63. package/dist/packages/features/bookings/lib/EventManager.d.ts.map +1 -1
  64. package/dist/packages/features/bookings/lib/checkBookingLimits.d.ts +44 -2
  65. package/dist/packages/features/bookings/lib/checkBookingLimits.d.ts.map +1 -1
  66. package/dist/packages/features/bookings/lib/getAllUserBookings.d.ts +1 -0
  67. package/dist/packages/features/bookings/lib/getAllUserBookings.d.ts.map +1 -1
  68. package/dist/packages/features/bookings/lib/getBookingInfo.d.ts +6 -0
  69. package/dist/packages/features/bookings/lib/getBookingInfo.d.ts.map +1 -1
  70. package/dist/packages/features/bookings/lib/getUserBooking.d.ts +3 -0
  71. package/dist/packages/features/bookings/lib/getUserBooking.d.ts.map +1 -1
  72. package/dist/packages/features/bookings/lib/handleNewBooking/checkBookingAndDurationLimits.d.ts +23 -0
  73. package/dist/packages/features/bookings/lib/handleNewBooking/checkBookingAndDurationLimits.d.ts.map +1 -1
  74. package/dist/packages/features/bookings/lib/handleNewBooking/ensureAvailableUsers.d.ts +12 -0
  75. package/dist/packages/features/bookings/lib/handleNewBooking/ensureAvailableUsers.d.ts.map +1 -1
  76. package/dist/packages/features/bookings/lib/handleNewBooking/getEventType.d.ts +22 -0
  77. package/dist/packages/features/bookings/lib/handleNewBooking/getEventType.d.ts.map +1 -1
  78. package/dist/packages/features/bookings/lib/handleNewBooking/getEventTypesFromDB.d.ts +12 -0
  79. package/dist/packages/features/bookings/lib/handleNewBooking/getEventTypesFromDB.d.ts.map +1 -1
  80. package/dist/packages/features/bookings/lib/handleNewBooking/loadUsers.d.ts +12 -0
  81. package/dist/packages/features/bookings/lib/handleNewBooking/loadUsers.d.ts.map +1 -1
  82. package/dist/packages/features/bookings/lib/service/RegularBookingService.d.ts +1 -557
  83. package/dist/packages/features/bookings/lib/service/RegularBookingService.d.ts.map +1 -1
  84. package/dist/packages/features/data-table/__tests__/filterSegments/get-preference.test.d.ts +2 -0
  85. package/dist/packages/features/data-table/__tests__/filterSegments/get-preference.test.d.ts.map +1 -0
  86. package/dist/packages/features/data-table/__tests__/filterSegments/get-segments.test.d.ts +2 -0
  87. package/dist/packages/features/data-table/__tests__/filterSegments/get-segments.test.d.ts.map +1 -0
  88. package/dist/packages/features/data-table/lib/__tests__/picker-date-constraints.test.d.ts +2 -0
  89. package/dist/packages/features/data-table/lib/__tests__/picker-date-constraints.test.d.ts.map +1 -0
  90. package/dist/packages/features/data-table/lib/dateRange.d.ts +21 -0
  91. package/dist/packages/features/data-table/lib/dateRange.d.ts.map +1 -1
  92. package/dist/packages/features/data-table/lib/types.d.ts +2 -0
  93. package/dist/packages/features/data-table/lib/types.d.ts.map +1 -1
  94. package/dist/packages/features/data-table/repositories/filterSegment.d.ts +12 -16
  95. package/dist/packages/features/data-table/repositories/filterSegment.d.ts.map +1 -1
  96. package/dist/packages/features/ee/workflows/repositories/workflow-step-translation-repository.integration-test.d.ts +2 -0
  97. package/dist/packages/features/ee/workflows/repositories/workflow-step-translation-repository.integration-test.d.ts.map +1 -0
  98. package/dist/packages/features/eventtypes/components/tabs/availability/EventAvailabilityTab.d.ts +12 -4
  99. package/dist/packages/features/eventtypes/components/tabs/availability/EventAvailabilityTab.d.ts.map +1 -1
  100. package/dist/packages/features/eventtypes/components/tabs/recurring/RecurringEventController.d.ts.map +1 -1
  101. package/dist/packages/features/eventtypes/lib/defaultEvents.d.ts +30 -0
  102. package/dist/packages/features/eventtypes/lib/defaultEvents.d.ts.map +1 -1
  103. package/dist/packages/features/eventtypes/lib/getEventTypeById.d.ts +4 -0
  104. package/dist/packages/features/eventtypes/lib/getEventTypeById.d.ts.map +1 -1
  105. package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts +12 -0
  106. package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts.map +1 -1
  107. package/dist/packages/features/eventtypes/repositories/EventRepository.d.ts +8 -0
  108. package/dist/packages/features/eventtypes/repositories/EventRepository.d.ts.map +1 -1
  109. package/dist/packages/features/eventtypes/repositories/eventTypeRepository.d.ts +54 -18
  110. package/dist/packages/features/eventtypes/repositories/eventTypeRepository.d.ts.map +1 -1
  111. package/dist/packages/features/schedules/services/ScheduleService.d.ts +5 -2
  112. package/dist/packages/features/schedules/services/ScheduleService.d.ts.map +1 -1
  113. package/dist/packages/kysely/types.d.ts +12 -0
  114. package/dist/packages/kysely/types.d.ts.map +1 -1
  115. package/dist/packages/platform/atoms/event-types/hooks/use-tabs-navigations.test.d.ts +2 -0
  116. package/dist/packages/platform/atoms/event-types/hooks/use-tabs-navigations.test.d.ts.map +1 -0
  117. package/dist/packages/platform/atoms/event-types/hooks/useAtomEventTypeById.d.ts +4 -0
  118. package/dist/packages/platform/atoms/event-types/hooks/useAtomEventTypeById.d.ts.map +1 -1
  119. package/dist/packages/platform/atoms/event-types/hooks/useTabsNavigations.d.ts +1 -0
  120. package/dist/packages/platform/atoms/event-types/hooks/useTabsNavigations.d.ts.map +1 -1
  121. package/dist/packages/platform/atoms/hooks/event-types/public/useAtomGetPublicEvent.d.ts +8 -0
  122. package/dist/packages/platform/atoms/hooks/event-types/public/useAtomGetPublicEvent.d.ts.map +1 -1
  123. package/dist/packages/prisma/zod/inputTypeSchemas/BookingLimitScalarFieldEnumSchema.d.ts +4 -0
  124. package/dist/packages/prisma/zod/inputTypeSchemas/BookingLimitScalarFieldEnumSchema.d.ts.map +1 -0
  125. package/dist/packages/prisma/zod/inputTypeSchemas/WebhookTriggerEventsSchema.d.ts +1 -1
  126. package/dist/packages/prisma/zod/inputTypeSchemas/WebhookTriggerEventsSchema.d.ts.map +1 -1
  127. package/dist/packages/prisma/zod/inputTypeSchemas/index.d.ts +1 -0
  128. package/dist/packages/prisma/zod/inputTypeSchemas/index.d.ts.map +1 -1
  129. package/dist/packages/prisma/zod/modelSchema/BookingLimitSchema.d.ts +32 -0
  130. package/dist/packages/prisma/zod/modelSchema/BookingLimitSchema.d.ts.map +1 -0
  131. package/dist/packages/prisma/zod/modelSchema/WebhookSchema.d.ts +3 -3
  132. package/dist/packages/prisma/zod/modelSchema/index.d.ts +1 -0
  133. package/dist/packages/prisma/zod/modelSchema/index.d.ts.map +1 -1
  134. package/dist/{server.browser-PDSe0hK-.js → server.browser-CCvpIGE0.js} +1 -1
  135. package/dist/{useIsAppEnabled-BUlxW0Js.js → useIsAppEnabled-BGd8_8Pc.js} +1 -1
  136. package/package.json +2 -2
  137. package/dist/EventTypeAppCardInterface-D6xO3ww6.js +0 -1139
  138. package/dist/packages/features/data-table/__tests__/filterSegments/get.test.d.ts +0 -2
  139. package/dist/packages/features/data-table/__tests__/filterSegments/get.test.d.ts.map +0 -1
@@ -0,0 +1,1402 @@
1
+ import { jsxs as t, jsx as e, Fragment as I } from "react/jsx-runtime";
2
+ import { S as o, A as ze } from "./AppCard-Jly1hUzJ.js";
3
+ import { u as Ie } from "./useIsAppEnabled-BGd8_8Pc.js";
4
+ import { n as Q, ag as se, d as T, e as k, B as F, ah as N, ai as G, aj as _e, h as z, s as ke, ak as we, a1 as Ke, al as Te, am as Be, an as Le, ao as de, ap as W, aq as We, a9 as De, aa as Ge, ab as He, o as je, p as Ve, ar as A, as as Ue, W as Me, at as he, au as Xe, av as Oe, aw as Ee, ax as Ye, ay as Pe, L as oe, af as $e } from "./index-DjKXpoZ-.js";
5
+ import { useState as y, useRef as Ze, useMemo as qe } from "react";
6
+ const Je = ({
7
+ fieldRules: C,
8
+ updateFieldRules: x
9
+ }) => {
10
+ const { t: d } = Q(), R = [
11
+ { label: d("salesforce_rr_skip_field_rule_ignore"), value: se.IGNORE },
12
+ { label: d("salesforce_rr_skip_field_rule_must_include"), value: se.MUST_INCLUDE }
13
+ ], [i, c] = y({
14
+ field: "",
15
+ value: "",
16
+ action: se.IGNORE
17
+ }), [s, h] = y(null), [b, S] = y(null), w = (p) => {
18
+ const E = C[p];
19
+ h(p), S({ field: E.field, value: E.value, action: E.action });
20
+ }, O = () => {
21
+ h(null), S(null);
22
+ }, D = () => {
23
+ if (s === null || !b || !b.field.trim() || !b.value.trim()) return;
24
+ const p = [...C];
25
+ p[s] = {
26
+ field: b.field.trim(),
27
+ value: b.value.trim(),
28
+ action: b.action
29
+ }, x(p), O();
30
+ };
31
+ return /* @__PURE__ */ t(o.SubSection, { children: [
32
+ /* @__PURE__ */ e(
33
+ o.SubSectionHeader,
34
+ {
35
+ icon: "filter",
36
+ title: d("salesforce_rr_skip_field_rules"),
37
+ labelFor: "rr-skip-field-rules",
38
+ children: /* @__PURE__ */ e(I, {})
39
+ }
40
+ ),
41
+ /* @__PURE__ */ t(o.SubSectionContent, { children: [
42
+ /* @__PURE__ */ t("div", { className: "text-subtle flex gap-3 px-3 py-[6px] text-sm font-medium", children: [
43
+ /* @__PURE__ */ e("div", { className: "flex-1", children: d("field_name") }),
44
+ /* @__PURE__ */ e("div", { className: "flex-1", children: d("value") }),
45
+ /* @__PURE__ */ e("div", { className: "w-32", children: d("action") }),
46
+ /* @__PURE__ */ e("div", { className: "w-20" })
47
+ ] }),
48
+ /* @__PURE__ */ t(o.SubSectionNested, { children: [
49
+ C.map((p, E) => {
50
+ const _ = s === E;
51
+ return /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
52
+ /* @__PURE__ */ e("div", { className: "flex-1", children: _ ? /* @__PURE__ */ e(
53
+ T,
54
+ {
55
+ value: (b == null ? void 0 : b.field) || "",
56
+ onChange: (r) => S((m) => m ? { ...m, field: r.target.value } : null),
57
+ size: "sm",
58
+ className: "w-full"
59
+ }
60
+ ) : /* @__PURE__ */ e(T, { value: p.field, readOnly: !0, size: "sm", className: "w-full" }) }),
61
+ /* @__PURE__ */ e("div", { className: "flex-1", children: _ ? /* @__PURE__ */ e(
62
+ T,
63
+ {
64
+ value: (b == null ? void 0 : b.value) || "",
65
+ onChange: (r) => S((m) => m ? { ...m, value: r.target.value } : null),
66
+ size: "sm",
67
+ className: "w-full"
68
+ }
69
+ ) : /* @__PURE__ */ e(T, { value: p.value, readOnly: !0, size: "sm", className: "w-full" }) }),
70
+ /* @__PURE__ */ e("div", { className: "w-32", children: _ ? /* @__PURE__ */ e(
71
+ k,
72
+ {
73
+ size: "sm",
74
+ className: "w-full",
75
+ options: R,
76
+ value: R.find((r) => r.value === (b == null ? void 0 : b.action)),
77
+ onChange: (r) => {
78
+ r && S((m) => m ? { ...m, action: r.value } : null);
79
+ }
80
+ }
81
+ ) : /* @__PURE__ */ e(
82
+ k,
83
+ {
84
+ size: "sm",
85
+ className: "w-full",
86
+ options: R,
87
+ value: R.find((r) => r.value === p.action),
88
+ isDisabled: !0
89
+ }
90
+ ) }),
91
+ /* @__PURE__ */ e("div", { className: "flex w-20 justify-center gap-1", children: _ ? /* @__PURE__ */ t(I, { children: [
92
+ /* @__PURE__ */ e(
93
+ F,
94
+ {
95
+ size: "sm",
96
+ StartIcon: "check",
97
+ variant: "icon",
98
+ color: "primary",
99
+ onClick: () => D()
100
+ }
101
+ ),
102
+ /* @__PURE__ */ e(
103
+ F,
104
+ {
105
+ size: "sm",
106
+ StartIcon: "x",
107
+ variant: "icon",
108
+ color: "secondary",
109
+ onClick: () => O()
110
+ }
111
+ )
112
+ ] }) : /* @__PURE__ */ t(I, { children: [
113
+ /* @__PURE__ */ e(
114
+ F,
115
+ {
116
+ size: "sm",
117
+ StartIcon: "pencil",
118
+ variant: "icon",
119
+ color: "minimal",
120
+ onClick: () => w(E)
121
+ }
122
+ ),
123
+ /* @__PURE__ */ e(
124
+ F,
125
+ {
126
+ StartIcon: "x",
127
+ variant: "icon",
128
+ size: "sm",
129
+ color: "minimal",
130
+ onClick: () => {
131
+ x(C.filter((r, m) => m !== E));
132
+ }
133
+ }
134
+ )
135
+ ] }) })
136
+ ] }, `${p.field}-${E}`);
137
+ }),
138
+ /* @__PURE__ */ t("div", { className: "mt-2 flex gap-2", children: [
139
+ /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
140
+ T,
141
+ {
142
+ size: "sm",
143
+ className: "w-full",
144
+ placeholder: d("salesforce_field_name_placeholder"),
145
+ value: i.field,
146
+ onChange: (p) => c({ ...i, field: p.target.value })
147
+ }
148
+ ) }),
149
+ /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
150
+ T,
151
+ {
152
+ size: "sm",
153
+ className: "w-full",
154
+ placeholder: d("value"),
155
+ value: i.value,
156
+ onChange: (p) => c({ ...i, value: p.target.value })
157
+ }
158
+ ) }),
159
+ /* @__PURE__ */ e("div", { className: "w-32", children: /* @__PURE__ */ e(
160
+ k,
161
+ {
162
+ size: "sm",
163
+ className: "w-full",
164
+ options: R,
165
+ value: R.find((p) => p.value === i.action),
166
+ onChange: (p) => {
167
+ p && c({ ...i, action: p.value });
168
+ }
169
+ }
170
+ ) }),
171
+ /* @__PURE__ */ e("div", { className: "w-20" })
172
+ ] })
173
+ ] }),
174
+ /* @__PURE__ */ e(
175
+ F,
176
+ {
177
+ className: "text-subtle mt-2 w-fit",
178
+ StartIcon: "plus",
179
+ color: "minimal",
180
+ size: "sm",
181
+ disabled: !(i.field && i.value),
182
+ onClick: () => {
183
+ x([
184
+ ...C,
185
+ {
186
+ field: i.field.trim(),
187
+ value: i.value.trim(),
188
+ action: i.action
189
+ }
190
+ ]), c({ field: "", value: "", action: se.IGNORE });
191
+ },
192
+ children: d("add_new_rule")
193
+ }
194
+ )
195
+ ] })
196
+ ] });
197
+ };
198
+ var J = /* @__PURE__ */ ((C) => (C.ON_BOOKING = "on_booking", C.ON_CANCEL = "on_cancel", C))(J || {});
199
+ const ce = ({
200
+ bookingAction: C,
201
+ optionLabel: x,
202
+ optionEnabled: d,
203
+ optionSwitchOnChange: R,
204
+ writeToObjectData: i,
205
+ updateWriteToObjectData: c,
206
+ hideWhenToWrite: s = !1
207
+ }) => {
208
+ const { t: h } = Q(), b = [
209
+ { label: h("text"), value: N.TEXT },
210
+ { label: h("date"), value: N.DATE },
211
+ { label: h("phone").charAt(0).toUpperCase() + h("phone").slice(1), value: N.PHONE },
212
+ { label: h("checkbox"), value: N.CHECKBOX },
213
+ { label: h("picklist"), value: N.PICKLIST },
214
+ { label: h("custom"), value: N.CUSTOM }
215
+ ], S = [
216
+ { label: h("only_if_field_is_empty"), value: G.FIELD_EMPTY },
217
+ ...C === "on_cancel" ? [{ label: h("salesforce_on_every_cancellation"), value: G.EVERY_BOOKING }] : [{ label: h("on_every_booking"), value: G.EVERY_BOOKING }]
218
+ ], w = [
219
+ { label: h("true"), value: !0 },
220
+ { label: h("false"), value: !1 }
221
+ ], O = [
222
+ ...C === "on_cancel" ? [{ label: h("booking_cancel_date"), value: _e.BOOKING_CANCEL_DATE }] : [],
223
+ { label: h("booking_start_date"), value: _e.BOOKING_START_DATE },
224
+ { label: h("booking_created_date"), value: _e.BOOKING_CREATED_DATE }
225
+ ], [D, p] = y(b[0]), [E, _] = y(O[0]), [r, m] = y(
226
+ w[0]
227
+ ), [M, ee] = y(S[0]), [H, le] = y({}), [X, K] = y(
228
+ {}
229
+ ), [ae, j] = y(null), [ne, V] = y({}), [Y, P] = y(!1), [g, L] = y({
230
+ field: "",
231
+ fieldType: D.value,
232
+ value: "",
233
+ whenToWrite: s ? G.EVERY_BOOKING : M.value
234
+ }), $ = () => {
235
+ L({
236
+ field: "",
237
+ fieldType: b[0].value,
238
+ value: "",
239
+ whenToWrite: s ? G.EVERY_BOOKING : S[0].value
240
+ }), p(b[0]), _(O[0]), m(w[0]), ee(S[0]), j(null);
241
+ }, ue = () => {
242
+ if (Object.keys(i).includes(g.field.trim())) {
243
+ j("Field already exists");
244
+ return;
245
+ }
246
+ const l = we(g);
247
+ if (l) {
248
+ j(l);
249
+ return;
250
+ }
251
+ j(null), c({
252
+ ...i,
253
+ [g.field.trim()]: {
254
+ fieldType: g.fieldType,
255
+ value: g.value,
256
+ whenToWrite: s ? G.EVERY_BOOKING : g.whenToWrite
257
+ }
258
+ }), $(), P(!1);
259
+ }, te = () => {
260
+ $(), P(!1);
261
+ }, ie = (l) => {
262
+ Object.keys(H).forEach((f) => {
263
+ H[f] && f !== l && B(f);
264
+ }), le((f) => ({ ...f, [l]: !0 })), K((f) => ({
265
+ ...f,
266
+ [l]: {
267
+ field: l,
268
+ fieldType: i[l].fieldType,
269
+ value: i[l].value,
270
+ whenToWrite: i[l].whenToWrite
271
+ }
272
+ }));
273
+ }, B = (l) => {
274
+ le((f) => ({ ...f, [l]: !1 })), K((f) => {
275
+ const u = { ...f };
276
+ return delete u[l], u;
277
+ });
278
+ }, fe = (l) => {
279
+ const f = X[l];
280
+ if (!f) return;
281
+ if (!f.field.trim()) {
282
+ V((v) => ({ ...v, [l]: "Field name cannot be empty" }));
283
+ return;
284
+ }
285
+ if (f.field !== l && Object.keys(i).includes(f.field.trim())) {
286
+ V((v) => ({ ...v, [l]: "Field already exists" }));
287
+ return;
288
+ }
289
+ const u = we(f);
290
+ if (u) {
291
+ V((v) => ({ ...v, [l]: u }));
292
+ return;
293
+ }
294
+ V((v) => ({ ...v, [l]: null }));
295
+ const a = { ...i };
296
+ f.field !== l && delete a[l], a[f.field.trim()] = {
297
+ fieldType: f.fieldType,
298
+ value: f.value,
299
+ whenToWrite: s ? G.EVERY_BOOKING : f.whenToWrite
300
+ }, c(a), B(l);
301
+ };
302
+ return /* @__PURE__ */ t(I, { children: [
303
+ /* @__PURE__ */ e(o.SubSectionHeader, { icon: "star", labelFor: "write-to-object-settings", title: x, children: /* @__PURE__ */ e(
304
+ z,
305
+ {
306
+ checked: d,
307
+ onCheckedChange: R,
308
+ id: "write-to-object-settings",
309
+ size: "sm"
310
+ }
311
+ ) }),
312
+ d ? /* @__PURE__ */ t(o.SubSectionContent, { children: [
313
+ (Object.keys(i).length > 0 || Y) && /* @__PURE__ */ t(I, { children: [
314
+ /* @__PURE__ */ t("div", { className: "text-subtle flex gap-3 px-3 py-[6px] text-sm font-medium", children: [
315
+ /* @__PURE__ */ e("div", { className: "flex-1", children: h("field_name") }),
316
+ /* @__PURE__ */ e("div", { className: "flex-1", children: h("field_type") }),
317
+ /* @__PURE__ */ e("div", { className: "flex-1", children: h("value") }),
318
+ !s && /* @__PURE__ */ e("div", { className: "flex-1", children: h("when_to_write") }),
319
+ /* @__PURE__ */ e("div", { className: "w-20" })
320
+ ] }),
321
+ /* @__PURE__ */ t(o.SubSectionNested, { children: [
322
+ Object.keys(i).map((l) => {
323
+ const f = H[l], u = X[l];
324
+ return /* @__PURE__ */ t("div", { children: [
325
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
326
+ /* @__PURE__ */ e("div", { className: "flex-1", children: f ? /* @__PURE__ */ e(
327
+ T,
328
+ {
329
+ value: (u == null ? void 0 : u.field) || l,
330
+ onChange: (a) => K((v) => ({
331
+ ...v,
332
+ [l]: { ...u, field: a.target.value }
333
+ })),
334
+ size: "sm",
335
+ className: "w-full"
336
+ }
337
+ ) : /* @__PURE__ */ e(T, { value: l, readOnly: !0, size: "sm", className: "w-full" }) }),
338
+ /* @__PURE__ */ e("div", { className: "flex-1", children: f ? /* @__PURE__ */ e(
339
+ k,
340
+ {
341
+ size: "sm",
342
+ className: "w-full",
343
+ options: b,
344
+ value: b.find((a) => a.value === (u == null ? void 0 : u.fieldType)),
345
+ onChange: (a) => {
346
+ a && K((v) => ({
347
+ ...v,
348
+ [l]: {
349
+ ...u,
350
+ fieldType: a.value,
351
+ ...a.value === N.DATE && {
352
+ value: O[0].value
353
+ },
354
+ ...a.value === N.CHECKBOX && {
355
+ value: w[0].value
356
+ }
357
+ }
358
+ }));
359
+ }
360
+ }
361
+ ) : /* @__PURE__ */ e(
362
+ k,
363
+ {
364
+ size: "sm",
365
+ className: "w-full",
366
+ value: b.find(
367
+ (a) => a.value === i[l].fieldType
368
+ ),
369
+ isDisabled: !0
370
+ }
371
+ ) }),
372
+ /* @__PURE__ */ e("div", { className: "flex-1", children: f ? (u == null ? void 0 : u.fieldType) === N.DATE ? /* @__PURE__ */ e(
373
+ k,
374
+ {
375
+ size: "sm",
376
+ className: "w-full",
377
+ options: O,
378
+ value: O.find((a) => a.value === u.value),
379
+ onChange: (a) => {
380
+ a && K((v) => ({
381
+ ...v,
382
+ [l]: { ...u, value: a.value }
383
+ }));
384
+ }
385
+ }
386
+ ) : (u == null ? void 0 : u.fieldType) === N.CHECKBOX ? /* @__PURE__ */ e(
387
+ k,
388
+ {
389
+ size: "sm",
390
+ className: "w-full",
391
+ options: w,
392
+ value: w.find((a) => a.value === u.value),
393
+ onChange: (a) => {
394
+ a && K((v) => ({
395
+ ...v,
396
+ [l]: { ...u, value: a.value }
397
+ }));
398
+ }
399
+ }
400
+ ) : /* @__PURE__ */ e(
401
+ T,
402
+ {
403
+ value: (u == null ? void 0 : u.value) || "",
404
+ onChange: (a) => K((v) => ({
405
+ ...v,
406
+ [l]: { ...u, value: a.target.value }
407
+ })),
408
+ size: "sm",
409
+ className: "w-full"
410
+ }
411
+ ) : i[l].fieldType === N.DATE ? /* @__PURE__ */ e(
412
+ k,
413
+ {
414
+ size: "sm",
415
+ className: "w-full",
416
+ value: O.find(
417
+ (a) => a.value === i[l].value
418
+ ),
419
+ isDisabled: !0
420
+ }
421
+ ) : i[l].fieldType === N.CHECKBOX ? /* @__PURE__ */ e(
422
+ k,
423
+ {
424
+ size: "sm",
425
+ className: "w-full",
426
+ value: w.find(
427
+ (a) => a.value === i[l].value
428
+ ),
429
+ isDisabled: !0
430
+ }
431
+ ) : /* @__PURE__ */ e(
432
+ T,
433
+ {
434
+ value: i[l].value,
435
+ readOnly: !0,
436
+ size: "sm",
437
+ className: "w-full"
438
+ }
439
+ ) }),
440
+ !s && /* @__PURE__ */ e("div", { className: "flex-1", children: f ? /* @__PURE__ */ e(
441
+ k,
442
+ {
443
+ size: "sm",
444
+ className: "w-full",
445
+ options: S,
446
+ value: S.find(
447
+ (a) => a.value === (u == null ? void 0 : u.whenToWrite)
448
+ ),
449
+ onChange: (a) => {
450
+ a && K((v) => ({
451
+ ...v,
452
+ [l]: { ...u, whenToWrite: a.value }
453
+ }));
454
+ }
455
+ }
456
+ ) : /* @__PURE__ */ e(
457
+ k,
458
+ {
459
+ size: "sm",
460
+ className: "w-full",
461
+ value: S.find(
462
+ (a) => a.value === i[l].whenToWrite
463
+ ),
464
+ isDisabled: !0
465
+ }
466
+ ) }),
467
+ /* @__PURE__ */ e("div", { className: "flex w-20 justify-center gap-1", children: f ? /* @__PURE__ */ t(I, { children: [
468
+ /* @__PURE__ */ e(
469
+ F,
470
+ {
471
+ size: "sm",
472
+ StartIcon: "check",
473
+ variant: "icon",
474
+ color: "primary",
475
+ onClick: () => fe(l)
476
+ }
477
+ ),
478
+ /* @__PURE__ */ e(
479
+ F,
480
+ {
481
+ size: "sm",
482
+ StartIcon: "x",
483
+ variant: "icon",
484
+ color: "secondary",
485
+ onClick: () => B(l)
486
+ }
487
+ )
488
+ ] }) : /* @__PURE__ */ t(I, { children: [
489
+ /* @__PURE__ */ e(
490
+ F,
491
+ {
492
+ size: "sm",
493
+ StartIcon: "pencil",
494
+ variant: "icon",
495
+ color: "minimal",
496
+ onClick: () => ie(l)
497
+ }
498
+ ),
499
+ /* @__PURE__ */ e(
500
+ F,
501
+ {
502
+ size: "sm",
503
+ StartIcon: "x",
504
+ variant: "icon",
505
+ color: "minimal",
506
+ onClick: () => {
507
+ const a = { ...i };
508
+ delete a[l], c(a);
509
+ }
510
+ }
511
+ )
512
+ ] }) })
513
+ ] }),
514
+ f && ne[l] && /* @__PURE__ */ e(ke, { severity: "error", className: "mt-1", message: ne[l] })
515
+ ] }, l);
516
+ }),
517
+ Y && /* @__PURE__ */ t("div", { children: [
518
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
519
+ /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
520
+ T,
521
+ {
522
+ size: "sm",
523
+ className: "w-full",
524
+ value: g.field,
525
+ placeholder: h("field_name"),
526
+ onChange: (l) => L({
527
+ ...g,
528
+ field: l.target.value
529
+ })
530
+ }
531
+ ) }),
532
+ /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
533
+ k,
534
+ {
535
+ size: "sm",
536
+ className: "w-full",
537
+ options: b,
538
+ value: D,
539
+ onChange: (l) => {
540
+ l && (p(l), L({
541
+ ...g,
542
+ fieldType: l.value,
543
+ ...l.value === N.DATE && {
544
+ value: E.value
545
+ },
546
+ ...l.value === N.CHECKBOX && {
547
+ value: r.value
548
+ }
549
+ }));
550
+ }
551
+ }
552
+ ) }),
553
+ /* @__PURE__ */ e("div", { className: "flex-1", children: g.fieldType === N.DATE ? /* @__PURE__ */ e(
554
+ k,
555
+ {
556
+ size: "sm",
557
+ className: "w-full",
558
+ options: O,
559
+ value: E,
560
+ onChange: (l) => {
561
+ l && (_(l), L({
562
+ ...g,
563
+ value: l.value
564
+ }));
565
+ }
566
+ }
567
+ ) : g.fieldType === N.CHECKBOX ? /* @__PURE__ */ e(
568
+ k,
569
+ {
570
+ size: "sm",
571
+ className: "w-full",
572
+ options: w,
573
+ value: r,
574
+ onChange: (l) => {
575
+ l && (m(l), L({
576
+ ...g,
577
+ value: l.value
578
+ }));
579
+ }
580
+ }
581
+ ) : /* @__PURE__ */ e(
582
+ T,
583
+ {
584
+ size: "sm",
585
+ className: "w-full",
586
+ value: g.value,
587
+ placeholder: h("value"),
588
+ onChange: (l) => L({
589
+ ...g,
590
+ value: l.target.value
591
+ })
592
+ }
593
+ ) }),
594
+ !s && /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
595
+ k,
596
+ {
597
+ size: "sm",
598
+ className: "w-full",
599
+ options: S,
600
+ value: M,
601
+ onChange: (l) => {
602
+ l && (ee(l), L({
603
+ ...g,
604
+ whenToWrite: l.value
605
+ }));
606
+ }
607
+ }
608
+ ) }),
609
+ /* @__PURE__ */ t("div", { className: "flex w-20 justify-center gap-1", children: [
610
+ /* @__PURE__ */ e(
611
+ F,
612
+ {
613
+ size: "sm",
614
+ StartIcon: "check",
615
+ variant: "icon",
616
+ color: "primary",
617
+ disabled: !(g.field && g.fieldType && g.value !== "" && g.whenToWrite),
618
+ onClick: ue
619
+ }
620
+ ),
621
+ /* @__PURE__ */ e(
622
+ F,
623
+ {
624
+ size: "sm",
625
+ StartIcon: "x",
626
+ variant: "icon",
627
+ color: "secondary",
628
+ onClick: te
629
+ }
630
+ )
631
+ ] })
632
+ ] }),
633
+ ae && /* @__PURE__ */ e(ke, { severity: "error", className: "mt-1", message: ae })
634
+ ] })
635
+ ] })
636
+ ] }),
637
+ !Y && /* @__PURE__ */ e(
638
+ F,
639
+ {
640
+ className: "text-subtle mt-2 w-fit",
641
+ StartIcon: "plus",
642
+ color: "minimal",
643
+ size: "sm",
644
+ onClick: () => {
645
+ $(), P(!0);
646
+ },
647
+ children: h("add_new_field")
648
+ }
649
+ )
650
+ ] }) : null
651
+ ] });
652
+ }, re = {
653
+ bookerCountryFieldId: "country",
654
+ bookerStateFieldId: "state",
655
+ bookerZipFieldId: "zip",
656
+ bookerSubRegionFieldId: "sub_region"
657
+ }, be = {
658
+ [W.SUB_REGION]: {
659
+ labelKey: "salesforce_rule_sub_region",
660
+ descKey: "salesforce_rule_sub_region_desc",
661
+ categoryKey: "salesforce_tiebreaker_category_geo",
662
+ categoryVariant: "blue"
663
+ },
664
+ [W.COUNTRY_STATE_ZIP]: {
665
+ labelKey: "salesforce_rule_country_state_zip",
666
+ descKey: "salesforce_rule_country_state_zip_desc",
667
+ categoryKey: "salesforce_tiebreaker_category_geo",
668
+ categoryVariant: "blue"
669
+ },
670
+ [W.COUNTRY_STATE]: {
671
+ labelKey: "salesforce_rule_country_state",
672
+ descKey: "salesforce_rule_country_state_desc",
673
+ categoryKey: "salesforce_tiebreaker_category_geo",
674
+ categoryVariant: "blue"
675
+ },
676
+ [W.COUNTRY]: {
677
+ labelKey: "salesforce_rule_country",
678
+ descKey: "salesforce_rule_country_desc",
679
+ categoryKey: "salesforce_tiebreaker_category_geo",
680
+ categoryVariant: "blue"
681
+ },
682
+ [W.CHILD_ACCOUNTS_MAX]: {
683
+ labelKey: "salesforce_rule_child_accounts",
684
+ descKey: "salesforce_rule_child_accounts_desc",
685
+ categoryKey: "salesforce_tiebreaker_category_size",
686
+ categoryVariant: "green"
687
+ },
688
+ [W.OPPORTUNITIES_MAX]: {
689
+ labelKey: "salesforce_rule_opportunities",
690
+ descKey: "salesforce_rule_opportunities_desc",
691
+ categoryKey: "salesforce_tiebreaker_category_size",
692
+ categoryVariant: "green"
693
+ },
694
+ [W.CONTACTS_MAX]: {
695
+ labelKey: "salesforce_rule_contacts",
696
+ descKey: "salesforce_rule_contacts_desc",
697
+ categoryKey: "salesforce_tiebreaker_category_size",
698
+ categoryVariant: "green"
699
+ },
700
+ [W.LAST_ACTIVITY_MAX]: {
701
+ labelKey: "salesforce_rule_last_activity",
702
+ descKey: "salesforce_rule_last_activity_desc",
703
+ categoryKey: "salesforce_tiebreaker_category_recency",
704
+ categoryVariant: "orange"
705
+ },
706
+ [W.CREATED_DATE_MIN]: {
707
+ labelKey: "salesforce_rule_created_date",
708
+ descKey: "salesforce_rule_created_date_desc",
709
+ categoryKey: "salesforce_tiebreaker_category_age",
710
+ categoryVariant: "gray"
711
+ }
712
+ };
713
+ function Qe() {
714
+ return Te.map((C) => ({ id: C, enabled: !0 }));
715
+ }
716
+ function el() {
717
+ return [
718
+ {
719
+ labelKey: "salesforce_geo_field_country",
720
+ descKey: "salesforce_geo_field_country_desc",
721
+ identifier: re.bookerCountryFieldId,
722
+ usedBy: [
723
+ "salesforce_rule_country",
724
+ "salesforce_rule_country_state",
725
+ "salesforce_rule_country_state_zip"
726
+ ],
727
+ ipFallback: !0
728
+ },
729
+ {
730
+ labelKey: "salesforce_geo_field_state",
731
+ descKey: "salesforce_geo_field_state_desc",
732
+ identifier: re.bookerStateFieldId,
733
+ usedBy: ["salesforce_rule_country_state", "salesforce_rule_country_state_zip"],
734
+ ipFallback: !0
735
+ },
736
+ {
737
+ labelKey: "salesforce_geo_field_zip",
738
+ descKey: "salesforce_geo_field_zip_desc",
739
+ identifier: re.bookerZipFieldId,
740
+ usedBy: ["salesforce_rule_country_state_zip"],
741
+ ipFallback: !1
742
+ },
743
+ {
744
+ labelKey: "salesforce_geo_field_sub_region",
745
+ descKey: "salesforce_geo_field_sub_region_desc",
746
+ identifier: re.bookerSubRegionFieldId,
747
+ usedBy: ["salesforce_rule_sub_region"],
748
+ ipFallback: !1
749
+ }
750
+ ];
751
+ }
752
+ const ll = ({
753
+ open: C,
754
+ onOpenChange: x
755
+ }) => {
756
+ const { t: d } = Q(), R = el();
757
+ return /* @__PURE__ */ e(We, { open: C, onOpenChange: x, children: /* @__PURE__ */ t(De, { enableOverflow: !0, type: "creation", className: "sm:max-w-[640px]", children: [
758
+ /* @__PURE__ */ t("div", { children: [
759
+ /* @__PURE__ */ e("h1", { className: "w-full text-xl font-semibold", children: d("salesforce_geo_fields_dialog_title") }),
760
+ /* @__PURE__ */ e("p", { className: "text-subtle mt-2 text-sm", children: d("salesforce_geo_fields_dialog_intro") }),
761
+ /* @__PURE__ */ t("ul", { className: "text-emphasis ml-5 mt-3 list-disc text-sm", children: [
762
+ /* @__PURE__ */ e("li", { children: d("salesforce_geo_fields_dialog_hint_convention") }),
763
+ /* @__PURE__ */ e("li", { children: d("salesforce_geo_fields_dialog_hint_ip_fallback") }),
764
+ /* @__PURE__ */ e("li", { children: d("salesforce_geo_fields_dialog_hint_priority") })
765
+ ] }),
766
+ /* @__PURE__ */ e("div", { className: "divide-subtle mt-6 divide-y rounded-md border border-subtle", children: R.map((i) => /* @__PURE__ */ t("div", { className: "p-4", children: [
767
+ /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-2", children: [
768
+ /* @__PURE__ */ e("span", { className: "text-default text-sm font-semibold", children: d(i.labelKey) }),
769
+ i.identifier ? /* @__PURE__ */ e("code", { className: "rounded bg-subtle px-2 py-0.5 text-emphasis text-xs", children: i.identifier }) : null,
770
+ i.ipFallback ? /* @__PURE__ */ e(de, { variant: "blue", children: d("salesforce_geo_fields_dialog_ip_fallback_badge") }) : null
771
+ ] }),
772
+ /* @__PURE__ */ e("p", { className: "text-subtle mt-1 text-sm", children: d(i.descKey) }),
773
+ /* @__PURE__ */ t("div", { className: "mt-2 flex flex-wrap items-center gap-1 text-subtle text-xs", children: [
774
+ /* @__PURE__ */ e("span", { children: d("salesforce_geo_fields_dialog_used_by") }),
775
+ i.usedBy.map((c, s) => /* @__PURE__ */ t("span", { className: "text-emphasis", children: [
776
+ d(c),
777
+ s < i.usedBy.length - 1 ? "," : null
778
+ ] }, c))
779
+ ] })
780
+ ] }, i.labelKey)) })
781
+ ] }),
782
+ /* @__PURE__ */ e(Ge, { showDivider: !0, children: /* @__PURE__ */ e(He, { color: "primary" }) })
783
+ ] }) });
784
+ }, al = ({
785
+ rules: C,
786
+ onChange: x
787
+ }) => {
788
+ const { t: d } = Q(), [R] = Ke(), i = C ?? Qe(), [c, s] = y(!1), [h, b] = y(!1), S = new Set(i.map((_) => _.id)), w = Te.filter((_) => !S.has(_)), O = (_, r) => {
789
+ const m = [...i];
790
+ [m[_], m[r]] = [m[r], m[_]], x(m);
791
+ }, D = (_) => {
792
+ x(i.filter((r, m) => m !== _));
793
+ }, p = (_) => {
794
+ x([...i, { id: _, enabled: !0 }]), s(!1);
795
+ }, E = i.some(
796
+ (_) => {
797
+ var r;
798
+ return ((r = be[_.id]) == null ? void 0 : r.categoryKey) === "salesforce_tiebreaker_category_geo";
799
+ }
800
+ );
801
+ return /* @__PURE__ */ t("div", { className: "mt-3", children: [
802
+ /* @__PURE__ */ e("p", { className: "mb-3 text-sm text-subtle", children: d("salesforce_tiebreaker_rules_description") }),
803
+ E ? /* @__PURE__ */ e(
804
+ "button",
805
+ {
806
+ type: "button",
807
+ className: "mb-3 text-sm text-emphasis underline underline-offset-2 hover:text-default",
808
+ onClick: () => b(!0),
809
+ children: d("salesforce_how_to_use_geo_fields_link")
810
+ }
811
+ ) : null,
812
+ /* @__PURE__ */ e(ll, { open: h, onOpenChange: b }),
813
+ /* @__PURE__ */ e("ul", { ref: R, className: "divide-y divide-subtle rounded-md border border-subtle", children: i.map((_, r) => {
814
+ const m = be[_.id];
815
+ return m ? /* @__PURE__ */ t(
816
+ "li",
817
+ {
818
+ className: "group relative flex items-center justify-between p-4 transition hover:bg-cal-muted",
819
+ children: [
820
+ r > 0 && /* @__PURE__ */ e(
821
+ "button",
822
+ {
823
+ type: "button",
824
+ className: "invisible absolute -left-[12px] -mt-4 mb-4 -ml-4 hidden h-6 w-6 scale-0 items-center justify-center rounded-md border border-subtle bg-default p-1 text-muted transition-all hover:border-emphasis hover:text-emphasis hover:shadow group-hover:visible group-hover:scale-100 sm:ml-0 sm:flex",
825
+ onClick: () => O(r, r - 1),
826
+ children: /* @__PURE__ */ e(Be, { className: "h-5 w-5" })
827
+ }
828
+ ),
829
+ r < i.length - 1 && /* @__PURE__ */ e(
830
+ "button",
831
+ {
832
+ type: "button",
833
+ className: "invisible absolute -left-[12px] mt-8 -ml-4 hidden h-6 w-6 scale-0 items-center justify-center rounded-md border border-subtle bg-default p-1 text-muted transition-all hover:border-emphasis hover:text-emphasis hover:shadow group-hover:visible group-hover:scale-100 sm:ml-0 sm:flex",
834
+ onClick: () => O(r, r + 1),
835
+ children: /* @__PURE__ */ e(Le, { className: "h-5 w-5" })
836
+ }
837
+ ),
838
+ /* @__PURE__ */ t("div", { children: [
839
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
840
+ /* @__PURE__ */ e("span", { className: "font-semibold text-default text-sm", children: d(m.labelKey) }),
841
+ /* @__PURE__ */ e(de, { variant: m.categoryVariant, children: d(m.categoryKey) }),
842
+ /* @__PURE__ */ e(de, { variant: "grayWithoutHover", children: d("salesforce_tiebreaker_priority", { priority: r + 1 }) })
843
+ ] }),
844
+ /* @__PURE__ */ e("p", { className: "max-w-[280px] pt-1 text-sm text-subtle sm:max-w-[500px]", children: d(m.descKey) })
845
+ ] }),
846
+ /* @__PURE__ */ e(
847
+ F,
848
+ {
849
+ color: "destructive",
850
+ variant: "icon",
851
+ "data-testid": "delete-tiebreaker-rule",
852
+ StartIcon: "trash-2",
853
+ onClick: () => D(r)
854
+ }
855
+ )
856
+ ]
857
+ },
858
+ _.id
859
+ ) : null;
860
+ }) }),
861
+ w.length > 0 && /* @__PURE__ */ t("div", { className: "relative mt-3", children: [
862
+ /* @__PURE__ */ e(
863
+ F,
864
+ {
865
+ type: "button",
866
+ color: "minimal",
867
+ size: "sm",
868
+ StartIcon: "plus",
869
+ onClick: () => s(!c),
870
+ children: d("salesforce_add_tiebreaker")
871
+ }
872
+ ),
873
+ c && /* @__PURE__ */ e("ul", { className: "absolute z-10 mt-1 w-80 rounded-md border border-subtle bg-default shadow-lg", children: w.map((_) => {
874
+ const r = be[_];
875
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ t(
876
+ "button",
877
+ {
878
+ type: "button",
879
+ className: "w-full px-3 py-2.5 text-left hover:bg-muted",
880
+ onClick: () => p(_),
881
+ children: [
882
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
883
+ /* @__PURE__ */ e("span", { className: "font-medium text-default text-sm", children: d(r.labelKey) }),
884
+ /* @__PURE__ */ e(de, { variant: r.categoryVariant, children: d(r.categoryKey) })
885
+ ] }),
886
+ /* @__PURE__ */ e("p", { className: "mt-0.5 text-subtle text-xs", children: d(r.descKey) })
887
+ ]
888
+ }
889
+ ) }, _);
890
+ }) })
891
+ ] }),
892
+ /* @__PURE__ */ t("div", { className: "mt-3 flex items-center gap-1 text-subtle text-xs", children: [
893
+ /* @__PURE__ */ e("span", { children: "↓" }),
894
+ /* @__PURE__ */ e("span", { children: d("salesforce_tiebreaker_fallback") })
895
+ ] })
896
+ ] });
897
+ }, nl = {}, rl = function({
898
+ app: x,
899
+ eventType: d,
900
+ onAppInstallSuccess: R
901
+ }) {
902
+ var ge, Ce;
903
+ const i = je.usePathname(), { getAppData: c, setAppData: s, disabled: h } = Ve(), { enabled: b, updateEnabled: S } = Ie(x), w = c("roundRobinLeadSkip"), O = c("roundRobinSkipCheckRecordOn") ?? A.CONTACT, D = c("ifFreeEmailDomainSkipOwnerCheck") ?? !1, p = c("skipContactCreation"), E = c("createLeadIfAccountNull"), _ = c("createNewContactUnderAccount"), r = c("createEventOn") ?? A.CONTACT, m = c("onBookingWriteToEventObject") ?? !1, M = c("onBookingWriteToEventObjectMap") ?? nl, ee = c("createEventOnLeadCheckForContact") ?? !1, H = c("onBookingChangeRecordOwner") ?? !1, le = c("onBookingChangeRecordOwnerName") ?? [], X = c("sendNoShowAttendeeData") ?? !1, K = c("sendNoShowAttendeeDataField") ?? "", ae = c("onBookingWriteToRecord") ?? !1, j = c("onBookingWriteToRecordFields") ?? {}, ne = c("ignoreGuests") ?? !1, V = c("roundRobinSkipFallbackToLeadOwner") ?? !1, Y = c("onCancelWriteToEventRecord") ?? !1, P = c("onCancelWriteToEventRecordFields") ?? {}, g = c("onCancelWriteToRecord") ?? !1, L = c("onCancelWriteToRecordFields") ?? {}, $ = c("rrSkipFieldRules") ?? [], ue = c("excludeAccountRecordTypes") ?? [], [te, ie] = y(() => ue.join(", ")), B = c("lastSyncError"), fe = c("enableFuzzyDomainMatching") ?? !1, l = c("tiebreakerRules"), f = !l || l.length > 0, u = Ze(
904
+ l && l.length > 0 ? l : void 0
905
+ );
906
+ l && l.length > 0 && (u.current = l);
907
+ const { t: a } = Q(), v = [
908
+ { label: a("contact"), value: A.CONTACT },
909
+ { label: a("salesforce_lead"), value: A.LEAD },
910
+ { label: a("salesforce_contact_under_account"), value: A.ACCOUNT }
911
+ ], [U, xe] = y(
912
+ v.find((n) => n.value === r) ?? v[0]
913
+ ), me = [
914
+ { label: a("contact"), value: A.CONTACT },
915
+ { label: a("salesforce_lead"), value: A.LEAD },
916
+ { label: a("account"), value: A.ACCOUNT }
917
+ ], [pe, Re] = y(
918
+ me.find((n) => n.value === O) ?? me[0]
919
+ ), { normalizedEventObjectMap: Ae, hasLegacyEventFields: Fe } = qe(() => {
920
+ const n = M, Z = {};
921
+ let Ne = !1;
922
+ for (const [ye, q] of Object.entries(n))
923
+ if (Ue(q))
924
+ Z[ye] = q;
925
+ else {
926
+ Ne = !0;
927
+ const Se = typeof q == "boolean";
928
+ Z[ye] = {
929
+ value: Se ? q : String(q ?? ""),
930
+ fieldType: Se ? N.CHECKBOX : N.TEXT,
931
+ whenToWrite: G.EVERY_BOOKING
932
+ };
933
+ }
934
+ return { normalizedEventObjectMap: Z, hasLegacyEventFields: Ne };
935
+ }, [M]), ve = () => /* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
936
+ o.SubSectionHeader,
937
+ {
938
+ icon: "at-sign",
939
+ title: a("salesforce_create_new_contact_under_account"),
940
+ labelFor: "create-new-contact-under-account",
941
+ children: /* @__PURE__ */ e(
942
+ z,
943
+ {
944
+ size: "sm",
945
+ labelOnLeading: !0,
946
+ checked: _,
947
+ onCheckedChange: (n) => {
948
+ s("createNewContactUnderAccount", n);
949
+ }
950
+ }
951
+ )
952
+ }
953
+ ) });
954
+ return /* @__PURE__ */ e(
955
+ ze,
956
+ {
957
+ onAppInstallSuccess: R,
958
+ returnTo: `${Me}${i}?tabName=apps`,
959
+ app: x,
960
+ teamId: ((ge = d.team) == null ? void 0 : ge.id) || void 0,
961
+ switchOnClick: (n) => {
962
+ S(n);
963
+ },
964
+ switchChecked: b,
965
+ hideSettingsIcon: !0,
966
+ children: /* @__PURE__ */ t(o.Content, { children: [
967
+ B && /* @__PURE__ */ t(he, { variant: "error", className: "mb-4", children: [
968
+ /* @__PURE__ */ e(Xe, { className: "size-4" }),
969
+ /* @__PURE__ */ e(Oe, { children: a("salesforce_sync_failure", { errorCode: B.errorCode }) }),
970
+ /* @__PURE__ */ e(Ee, { children: `${B.errorMessage}${(Ce = B.droppedFields) != null && Ce.length ? ` (${a("salesforce_dropped_fields")}: ${B.droppedFields.join(", ")})` : ""} — ${new Date(B.timestamp).toLocaleString()}` }),
971
+ /* @__PURE__ */ e(Ye, { children: /* @__PURE__ */ e(
972
+ "button",
973
+ {
974
+ type: "button",
975
+ className: "text-sm font-medium underline",
976
+ onClick: () => s("lastSyncError", null),
977
+ children: a("dismiss")
978
+ }
979
+ ) })
980
+ ] }),
981
+ /* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
982
+ o.SubSectionHeader,
983
+ {
984
+ icon: "zap",
985
+ title: a("salesforce_add_attendees_as"),
986
+ justify: "start",
987
+ labelFor: "add-attendees-as",
988
+ children: /* @__PURE__ */ e(
989
+ k,
990
+ {
991
+ size: "sm",
992
+ id: "add-attendees-as",
993
+ className: "w-[200px]",
994
+ options: v,
995
+ value: U,
996
+ onChange: (n) => {
997
+ n && (xe(n), s("createEventOn", n.value));
998
+ }
999
+ }
1000
+ )
1001
+ }
1002
+ ) }),
1003
+ /* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
1004
+ o.SubSectionHeader,
1005
+ {
1006
+ icon: "user-plus",
1007
+ title: a("salesforce_ignore_guests"),
1008
+ labelFor: "ignore-guests",
1009
+ children: /* @__PURE__ */ e(
1010
+ z,
1011
+ {
1012
+ size: "sm",
1013
+ labelOnLeading: !0,
1014
+ checked: ne,
1015
+ onCheckedChange: (n) => {
1016
+ s("ignoreGuests", n);
1017
+ }
1018
+ }
1019
+ )
1020
+ }
1021
+ ) }),
1022
+ U.value === A.CONTACT ? /* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
1023
+ o.SubSectionHeader,
1024
+ {
1025
+ icon: "user-plus",
1026
+ title: a("skip_contact_creation", { appName: "Salesforce" }),
1027
+ labelFor: "skip-contact-creation",
1028
+ children: /* @__PURE__ */ e(
1029
+ z,
1030
+ {
1031
+ size: "sm",
1032
+ labelOnLeading: !0,
1033
+ checked: p,
1034
+ onCheckedChange: (n) => {
1035
+ s("skipContactCreation", n);
1036
+ }
1037
+ }
1038
+ )
1039
+ }
1040
+ ) }) : null,
1041
+ U.value === A.LEAD ? /* @__PURE__ */ t(I, { children: [
1042
+ /* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
1043
+ o.SubSectionHeader,
1044
+ {
1045
+ icon: "user-plus",
1046
+ title: a("salesforce_create_event_on_contact"),
1047
+ labelFor: "create-event-on-contact",
1048
+ children: /* @__PURE__ */ e(
1049
+ z,
1050
+ {
1051
+ size: "sm",
1052
+ labelOnLeading: !0,
1053
+ checked: ee,
1054
+ onCheckedChange: (n) => {
1055
+ s("createEventOnLeadCheckForContact", n);
1056
+ }
1057
+ }
1058
+ )
1059
+ }
1060
+ ) }),
1061
+ /* @__PURE__ */ e(ve, {})
1062
+ ] }) : null,
1063
+ U.value === A.ACCOUNT ? /* @__PURE__ */ t(I, { children: [
1064
+ /* @__PURE__ */ e(ve, {}),
1065
+ /* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
1066
+ o.SubSectionHeader,
1067
+ {
1068
+ icon: "user-plus",
1069
+ title: a("salesforce_if_account_does_not_exist"),
1070
+ labelFor: "create-lead-if-account-null",
1071
+ children: /* @__PURE__ */ e(
1072
+ z,
1073
+ {
1074
+ size: "sm",
1075
+ labelOnLeading: !0,
1076
+ checked: E,
1077
+ onCheckedChange: (n) => {
1078
+ s("createLeadIfAccountNull", n);
1079
+ }
1080
+ }
1081
+ )
1082
+ }
1083
+ ) })
1084
+ ] }) : null,
1085
+ (U.value === A.ACCOUNT || U.value === A.LEAD) && /* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
1086
+ o.SubSectionHeader,
1087
+ {
1088
+ icon: "search",
1089
+ title: a("salesforce_enable_fuzzy_domain_matching"),
1090
+ labelFor: "enable-fuzzy-domain-matching",
1091
+ children: /* @__PURE__ */ e(
1092
+ z,
1093
+ {
1094
+ size: "sm",
1095
+ id: "enable-fuzzy-domain-matching",
1096
+ labelOnLeading: !0,
1097
+ checked: fe,
1098
+ onCheckedChange: (n) => {
1099
+ s("enableFuzzyDomainMatching", n);
1100
+ }
1101
+ }
1102
+ )
1103
+ }
1104
+ ) }),
1105
+ /* @__PURE__ */ t(o.SubSection, { children: [
1106
+ /* @__PURE__ */ e(
1107
+ ce,
1108
+ {
1109
+ bookingAction: J.ON_BOOKING,
1110
+ optionLabel: a("on_booking_write_to_event_object"),
1111
+ optionEnabled: m,
1112
+ optionSwitchOnChange: (n) => {
1113
+ s("onBookingWriteToEventObject", n);
1114
+ },
1115
+ writeToObjectData: Ae,
1116
+ updateWriteToObjectData: (n) => s("onBookingWriteToEventObjectMap", n),
1117
+ hideWhenToWrite: !0
1118
+ }
1119
+ ),
1120
+ m && Fe && /* @__PURE__ */ t(he, { variant: "warning", className: "mt-2", children: [
1121
+ /* @__PURE__ */ e(Pe, { className: "size-4" }),
1122
+ /* @__PURE__ */ e(Ee, { children: a("salesforce_legacy_event_fields_warning") })
1123
+ ] })
1124
+ ] }),
1125
+ /* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
1126
+ ce,
1127
+ {
1128
+ bookingAction: J.ON_BOOKING,
1129
+ optionLabel: a("salesforce_on_booking_write_to_record", { record: r }),
1130
+ optionEnabled: ae,
1131
+ writeToObjectData: j,
1132
+ optionSwitchOnChange: (n) => {
1133
+ s("onBookingWriteToRecord", n);
1134
+ },
1135
+ updateWriteToObjectData: (n) => s("onBookingWriteToRecordFields", n)
1136
+ }
1137
+ ) }),
1138
+ /* @__PURE__ */ t(o.SubSection, { children: [
1139
+ /* @__PURE__ */ e(
1140
+ o.SubSectionHeader,
1141
+ {
1142
+ icon: "user-plus",
1143
+ title: a("salesforce_change_record_owner_on_booking"),
1144
+ labelFor: "change-record-owner-on-booking",
1145
+ children: /* @__PURE__ */ e(
1146
+ z,
1147
+ {
1148
+ size: "sm",
1149
+ labelOnLeading: !0,
1150
+ checked: H,
1151
+ onCheckedChange: (n) => {
1152
+ s("onBookingChangeRecordOwner", n);
1153
+ }
1154
+ }
1155
+ )
1156
+ }
1157
+ ),
1158
+ H ? /* @__PURE__ */ e(o.SubSectionContent, { classNames: { container: "p-3" }, children: /* @__PURE__ */ t("div", { children: [
1159
+ /* @__PURE__ */ e(
1160
+ oe,
1161
+ {
1162
+ htmlFor: "on-booking-change-record-owner-name",
1163
+ className: "text-subtle text-sm font-medium",
1164
+ children: a("salesforce_owner_name_to_change")
1165
+ }
1166
+ ),
1167
+ /* @__PURE__ */ e(
1168
+ T,
1169
+ {
1170
+ id: "on-booking-change-record-owner-name",
1171
+ size: "sm",
1172
+ value: le,
1173
+ onChange: (n) => s("onBookingChangeRecordOwnerName", n.target.value)
1174
+ }
1175
+ )
1176
+ ] }) }) : null
1177
+ ] }),
1178
+ /* @__PURE__ */ t(o.SubSection, { children: [
1179
+ /* @__PURE__ */ e(
1180
+ o.SubSectionHeader,
1181
+ {
1182
+ icon: "filter",
1183
+ title: a("salesforce_exclude_record_types"),
1184
+ justify: "start",
1185
+ children: null
1186
+ }
1187
+ ),
1188
+ /* @__PURE__ */ e(o.SubSectionContent, { classNames: { container: "p-3" }, children: /* @__PURE__ */ t("div", { children: [
1189
+ /* @__PURE__ */ e(oe, { htmlFor: "exclude-account-record-types", className: "text-subtle text-sm font-medium", children: a("salesforce_exclude_record_types_description") }),
1190
+ /* @__PURE__ */ e(
1191
+ T,
1192
+ {
1193
+ id: "exclude-account-record-types",
1194
+ size: "sm",
1195
+ placeholder: "Partner/Alliance, Vendor",
1196
+ value: te,
1197
+ onChange: (n) => ie(n.target.value),
1198
+ onBlur: () => {
1199
+ const n = te.split(",").map((Z) => Z.trim()).filter(Boolean);
1200
+ s("excludeAccountRecordTypes", n), ie(n.join(", "));
1201
+ }
1202
+ }
1203
+ )
1204
+ ] }) })
1205
+ ] }),
1206
+ /* @__PURE__ */ t(o.SubSection, { children: [
1207
+ /* @__PURE__ */ e(
1208
+ o.SubSectionHeader,
1209
+ {
1210
+ icon: "sliders-vertical",
1211
+ title: a("salesforce_tiebreaker_rules"),
1212
+ labelFor: "tiebreaker-rules-toggle",
1213
+ children: /* @__PURE__ */ e(
1214
+ z,
1215
+ {
1216
+ size: "sm",
1217
+ id: "tiebreaker-rules-toggle",
1218
+ labelOnLeading: !0,
1219
+ checked: f,
1220
+ onCheckedChange: (n) => {
1221
+ n ? s("tiebreakerRules", u.current ?? void 0) : s("tiebreakerRules", []);
1222
+ }
1223
+ }
1224
+ )
1225
+ }
1226
+ ),
1227
+ f && /* @__PURE__ */ e(o.SubSectionContent, { classNames: { container: "p-3" }, children: /* @__PURE__ */ e(
1228
+ al,
1229
+ {
1230
+ rules: l,
1231
+ onChange: (n) => s("tiebreakerRules", n)
1232
+ }
1233
+ ) })
1234
+ ] }),
1235
+ d.schedulingType === $e.ROUND_ROBIN ? /* @__PURE__ */ t(I, { children: [
1236
+ /* @__PURE__ */ t(o.SubSection, { children: [
1237
+ /* @__PURE__ */ e(
1238
+ o.SubSectionHeader,
1239
+ {
1240
+ icon: "users",
1241
+ title: a("salesforce_book_directly_with_attendee_owner"),
1242
+ labelFor: "book-directly-with-attendee-owner",
1243
+ children: /* @__PURE__ */ e(
1244
+ z,
1245
+ {
1246
+ size: "sm",
1247
+ id: "book-directly-witha-attendee-owner",
1248
+ checked: w,
1249
+ onCheckedChange: (n) => {
1250
+ s("roundRobinLeadSkip", n), n && s("enabled", n);
1251
+ }
1252
+ }
1253
+ )
1254
+ }
1255
+ ),
1256
+ w ? /* @__PURE__ */ e(o.SubSectionContent, { classNames: { container: "p-3" }, children: /* @__PURE__ */ t("div", { children: [
1257
+ /* @__PURE__ */ e(
1258
+ oe,
1259
+ {
1260
+ htmlFor: "round-robin-skip-check-record-on",
1261
+ className: "text-subtle text-sm font-medium",
1262
+ children: a("salesforce_check_owner_of")
1263
+ }
1264
+ ),
1265
+ /* @__PURE__ */ e(
1266
+ k,
1267
+ {
1268
+ size: "sm",
1269
+ className: "w-60",
1270
+ options: me,
1271
+ value: pe,
1272
+ onChange: (n) => {
1273
+ n && (Re(n), s("roundRobinSkipCheckRecordOn", n.value));
1274
+ }
1275
+ }
1276
+ )
1277
+ ] }) }) : null
1278
+ ] }),
1279
+ /* @__PURE__ */ e(I, { children: w ? /* @__PURE__ */ t(I, { children: [
1280
+ pe.value === A.CONTACT ? /* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
1281
+ o.SubSectionHeader,
1282
+ {
1283
+ icon: "users",
1284
+ title: a("salesforce_round_robin_skip_fallback_to_lead_owner"),
1285
+ labelFor: "round-robin-skip-fallback-to-lead-owner",
1286
+ children: /* @__PURE__ */ e(
1287
+ z,
1288
+ {
1289
+ id: "round-robin-skip-fallback-to-lead-owner",
1290
+ size: "sm",
1291
+ checked: V,
1292
+ onCheckedChange: (n) => {
1293
+ s("roundRobinSkipFallbackToLeadOwner", n);
1294
+ }
1295
+ }
1296
+ )
1297
+ }
1298
+ ) }) : null,
1299
+ /* @__PURE__ */ t(o.SubSection, { children: [
1300
+ /* @__PURE__ */ e(
1301
+ o.SubSectionHeader,
1302
+ {
1303
+ icon: "users",
1304
+ title: a("salesforce_if_free_email_domain_skip_owner_check"),
1305
+ labelFor: "if-free-email-domain-skip-owner-check",
1306
+ children: /* @__PURE__ */ e(
1307
+ z,
1308
+ {
1309
+ id: "if-free-email-domain-skip-owner-check",
1310
+ size: "sm",
1311
+ checked: D,
1312
+ onCheckedChange: (n) => {
1313
+ s("ifFreeEmailDomainSkipOwnerCheck", n);
1314
+ }
1315
+ }
1316
+ )
1317
+ }
1318
+ ),
1319
+ /* @__PURE__ */ e(he, { variant: "info", children: /* @__PURE__ */ e(Oe, { children: a("skip_rr_description") }) })
1320
+ ] }),
1321
+ /* @__PURE__ */ e(
1322
+ Je,
1323
+ {
1324
+ fieldRules: $,
1325
+ updateFieldRules: (n) => s("rrSkipFieldRules", n)
1326
+ }
1327
+ )
1328
+ ] }) : null })
1329
+ ] }) : null,
1330
+ /* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
1331
+ ce,
1332
+ {
1333
+ bookingAction: J.ON_CANCEL,
1334
+ optionLabel: a("salesforce_on_cancel_write_to_event"),
1335
+ optionEnabled: Y,
1336
+ writeToObjectData: P,
1337
+ optionSwitchOnChange: (n) => {
1338
+ s("onCancelWriteToEventRecord", n);
1339
+ },
1340
+ updateWriteToObjectData: (n) => s("onCancelWriteToEventRecordFields", n)
1341
+ }
1342
+ ) }),
1343
+ /* @__PURE__ */ e(o.SubSection, { children: /* @__PURE__ */ e(
1344
+ ce,
1345
+ {
1346
+ bookingAction: J.ON_CANCEL,
1347
+ optionLabel: a("salesforce_on_cancel_write_to_record", { record: r }),
1348
+ optionEnabled: g,
1349
+ writeToObjectData: L,
1350
+ optionSwitchOnChange: (n) => {
1351
+ s("onCancelWriteToRecord", n);
1352
+ },
1353
+ updateWriteToObjectData: (n) => s("onCancelWriteToRecordFields", n)
1354
+ }
1355
+ ) }),
1356
+ /* @__PURE__ */ t(o.SubSection, { children: [
1357
+ /* @__PURE__ */ e(
1358
+ o.SubSectionHeader,
1359
+ {
1360
+ icon: "calendar",
1361
+ title: "Send no show attendee data to event object",
1362
+ labelFor: "send-no-show-attendee-data",
1363
+ children: /* @__PURE__ */ e(
1364
+ z,
1365
+ {
1366
+ id: "send-no-show-attendee-data",
1367
+ size: "sm",
1368
+ checked: X,
1369
+ onCheckedChange: (n) => {
1370
+ s("sendNoShowAttendeeData", n);
1371
+ }
1372
+ }
1373
+ )
1374
+ }
1375
+ ),
1376
+ X ? /* @__PURE__ */ t(o.SubSectionContent, { classNames: { container: "p-3" }, children: [
1377
+ /* @__PURE__ */ e(
1378
+ oe,
1379
+ {
1380
+ htmlFor: "send-no-show-attendee-data-field-name",
1381
+ className: "text-subtle text-sm font-medium",
1382
+ children: "Field name to check (must be checkbox data type)"
1383
+ }
1384
+ ),
1385
+ /* @__PURE__ */ e(
1386
+ T,
1387
+ {
1388
+ id: "send-no-show-attendee-data-field-name",
1389
+ size: "sm",
1390
+ value: K,
1391
+ onChange: (n) => s("sendNoShowAttendeeDataField", n.target.value)
1392
+ }
1393
+ )
1394
+ ] }) : null
1395
+ ] })
1396
+ ] })
1397
+ }
1398
+ );
1399
+ };
1400
+ export {
1401
+ rl as default
1402
+ };