ezux 1.1.13 → 1.1.15

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 (201) hide show
  1. package/README.md +22 -0
  2. package/dist/EzContextMenu-9STA_8UL.cjs +1 -0
  3. package/dist/EzContextMenu-vcwZjlYv.js +288 -0
  4. package/dist/EzErrorBoundary-C7R4h7QH.cjs +1 -0
  5. package/dist/EzErrorBoundary-b-fGQvjw.js +74 -0
  6. package/dist/EzEventModal-C1ItJBxp.cjs +1 -0
  7. package/dist/EzEventModal-MDtx4Gwd.js +720 -0
  8. package/dist/EzFlow-B3oi5QvJ.js +2533 -0
  9. package/dist/EzFlow-BeiFmX7h.cjs +5 -0
  10. package/dist/EzGroupingPanel-B1B2B3Sc.js +107 -0
  11. package/dist/EzGroupingPanel-BGHywLsj.cjs +1 -0
  12. package/dist/EzKanban-CEPmBCZV.js +1589 -0
  13. package/dist/EzKanban-CsnJ80LW.cjs +2 -0
  14. package/dist/EzLayout-DYRKNOrI.cjs +1 -0
  15. package/dist/EzLayout-DyMI9A92.js +6986 -0
  16. package/dist/EzProvider-Df2qgeDn.js +975 -0
  17. package/dist/EzProvider-DntSad5M.cjs +1 -0
  18. package/dist/EzScheduler-CTYXyOG8.js +2737 -0
  19. package/dist/EzScheduler-CzL68fTe.cjs +1 -0
  20. package/dist/EzSchedulerQuickAdd-CPSPAjdk.cjs +1 -0
  21. package/dist/EzSchedulerQuickAdd-wXGn1L1c.js +124 -0
  22. package/dist/EzSchedulerToolbar-B5iXsdn2.cjs +1 -0
  23. package/dist/EzSchedulerToolbar-NdKzGgMo.js +306 -0
  24. package/dist/EzSignature-Bg9jJvHp.cjs +1 -0
  25. package/dist/EzSignature-CZk-iAb3.js +375 -0
  26. package/dist/EzTable-Bde5BUoE.cjs +3 -0
  27. package/dist/EzTable-CaCyWXNv.js +4291 -0
  28. package/dist/EzTableEditDialog-5CJ-i5FI.js +84 -0
  29. package/dist/EzTableEditDialog-DAPhmWxI.cjs +1 -0
  30. package/dist/EzTableFooter-B347PRkZ.js +35 -0
  31. package/dist/EzTableFooter-ZqHoQKYB.cjs +1 -0
  32. package/dist/EzTableToolbar-D4Qw-fwb.js +161 -0
  33. package/dist/EzTableToolbar-DNxAgMdI.cjs +1 -0
  34. package/dist/EzTreeView-ChsTltti.js +819 -0
  35. package/dist/EzTreeView-D8k-Wmxa.cjs +1 -0
  36. package/dist/HighlightText-BZ_1jMaA.js +56 -0
  37. package/dist/HighlightText-V5NgtV18.cjs +1 -0
  38. package/dist/KanbanBoard-BzIhmn-2.cjs +1 -0
  39. package/dist/KanbanBoard-DTsy_GAc.js +1698 -0
  40. package/dist/NotificationPanel-B0pVgPcO.js +55 -0
  41. package/dist/NotificationPanel-ulIs4r-0.cjs +1 -0
  42. package/dist/TooltipWrapper-66yWxRSD.js +44 -0
  43. package/dist/TooltipWrapper-QRc3qTIG.cjs +1 -0
  44. package/dist/advanced.cjs +10 -0
  45. package/dist/advanced.d.ts +2616 -0
  46. package/dist/advanced.es.js +401 -0
  47. package/dist/avatar-DOjSWi4R.js +24 -0
  48. package/dist/avatar-hWg4zkh7.cjs +1 -0
  49. package/dist/button-BN0DK137.js +42 -0
  50. package/dist/button-CfngAt_5.cjs +1 -0
  51. package/dist/calendar-DEtDSI0W.js +112 -0
  52. package/dist/calendar-DroJGSPS.cjs +1 -0
  53. package/dist/card-CswobLmE.cjs +1 -0
  54. package/dist/card-vtDNxeL3.js +50 -0
  55. package/dist/checkbox-BpxQa4HQ.cjs +1 -0
  56. package/dist/checkbox-CS_BOaA6.js +22 -0
  57. package/dist/chunk-D-qHiVGv.cjs +1 -0
  58. package/dist/date-time-picker-C6i4TdP7.js +127 -0
  59. package/dist/date-time-picker-CfHnqJDm.cjs +1 -0
  60. package/dist/dropdown-menu-HrOgNiFv.js +78 -0
  61. package/dist/dropdown-menu-Xjuk1Xa-.cjs +1 -0
  62. package/dist/ezux.css +2 -1
  63. package/dist/flow.cjs +1 -0
  64. package/dist/flow.d.ts +539 -0
  65. package/dist/flow.es.js +2 -0
  66. package/dist/index.cjs +3 -12
  67. package/dist/index.d.ts +385 -1368
  68. package/dist/index.es.js +230 -1041
  69. package/dist/input-BE8Mmo8X.js +13 -0
  70. package/dist/input-DPWRzn7K.cjs +1 -0
  71. package/dist/kanban.cjs +1 -1
  72. package/dist/kanban.es.js +4 -17
  73. package/dist/label-4cHst7uN.cjs +1 -0
  74. package/dist/label-BLMeK8-Z.js +14 -0
  75. package/dist/layout.cjs +1 -1
  76. package/dist/layout.d.ts +4 -0
  77. package/dist/layout.es.js +2 -20
  78. package/dist/mock-services.cjs +1 -0
  79. package/dist/mock-services.d.ts +273 -0
  80. package/dist/mock-services.es.js +161 -0
  81. package/dist/popover--Cf3FJ0g.cjs +1 -0
  82. package/dist/popover-CbakOivq.js +15 -0
  83. package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
  84. package/dist/scheduler.cjs +1 -1
  85. package/dist/scheduler.d.ts +78 -3
  86. package/dist/scheduler.es.js +2 -11
  87. package/dist/scroll-area-CBllCk9n.js +35 -0
  88. package/dist/scroll-area-COOakfzY.cjs +1 -0
  89. package/dist/select-1vYIUsge.cjs +1 -0
  90. package/dist/select-Bes3Q6zL.js +43 -0
  91. package/dist/signature.cjs +1 -1
  92. package/dist/signature.es.js +2 -4
  93. package/dist/table.cjs +1 -1
  94. package/dist/table.d.ts +78 -24
  95. package/dist/table.es.js +2 -17
  96. package/dist/theme-vars.css +143 -135
  97. package/dist/tooltip-BRCnO0kH.cjs +1 -0
  98. package/dist/tooltip-CrhCAu6_.js +14 -0
  99. package/dist/treeview.cjs +1 -1
  100. package/dist/treeview.es.js +2 -954
  101. package/dist/useComponentState-CYR9x36s.js +57 -0
  102. package/dist/useComponentState-DqA-gi3-.cjs +1 -0
  103. package/dist/useImperativeAPI-CPRA9SCj.js +7 -0
  104. package/dist/useImperativeAPI-KOlk1Cvt.cjs +1 -0
  105. package/dist/useInitCoreServices-CRq0kPGA.cjs +1 -0
  106. package/dist/useInitCoreServices-lkTv2its.js +40 -0
  107. package/dist/useService-BkqWkhiU.js +10 -0
  108. package/dist/useService-CKITee_1.cjs +1 -0
  109. package/dist/useServiceState-BDTGXKyx.cjs +1 -0
  110. package/dist/useServiceState-CInpkGt2.js +21 -0
  111. package/dist/utils-DyS9jpam.cjs +1 -0
  112. package/dist/utils-hFRduYmq.js +8 -0
  113. package/package.json +42 -16
  114. package/dist/EzContextMenu-B6HBUjWv.cjs +0 -5
  115. package/dist/EzContextMenu-BSA_B6Pr.js +0 -3500
  116. package/dist/EzErrorBoundary-CEdz_hDo.cjs +0 -41
  117. package/dist/EzErrorBoundary-D4NBadES.js +0 -3727
  118. package/dist/EzEventModal-BUMp_BFi.js +0 -689
  119. package/dist/EzEventModal-xzHfzi0O.cjs +0 -1
  120. package/dist/EzGroupingPanel-BUsIYDRi.js +0 -143
  121. package/dist/EzGroupingPanel-D0HdSomF.cjs +0 -1
  122. package/dist/EzSchedulerQuickAdd-C653LTGh.js +0 -118
  123. package/dist/EzSchedulerQuickAdd-UnOWCpJd.cjs +0 -1
  124. package/dist/EzSchedulerToolbar-C-5OdRY6.cjs +0 -1
  125. package/dist/EzSchedulerToolbar-CO5jjDQg.js +0 -240
  126. package/dist/EzSignature-BaNesxwC.cjs +0 -1
  127. package/dist/EzSignature-D4EYwo9W.js +0 -419
  128. package/dist/EzTableEditDialog-Cd948V1C.js +0 -63
  129. package/dist/EzTableEditDialog-NiOubaMT.cjs +0 -1
  130. package/dist/EzTableFooter-CWjfGCjL.cjs +0 -1
  131. package/dist/EzTableFooter-DveD12RC.js +0 -54
  132. package/dist/EzTableToolbar-Bz8UWv6j.js +0 -246
  133. package/dist/EzTableToolbar-DHE7Bb1R.cjs +0 -1
  134. package/dist/HighlightText-8D6KEyBw.js +0 -68
  135. package/dist/HighlightText-LtZmzCle.cjs +0 -1
  136. package/dist/NotificationPanel-D2Y-_ahk.js +0 -68
  137. package/dist/NotificationPanel-zLxrtTGf.cjs +0 -1
  138. package/dist/TooltipWrapper-BrRTi5EJ.js +0 -2021
  139. package/dist/TooltipWrapper-DWts4bAI.cjs +0 -1
  140. package/dist/avatar-BeK0E4mn.js +0 -41
  141. package/dist/avatar-DZAaTK2f.cjs +0 -1
  142. package/dist/bell-DAz8P0BR.js +0 -14
  143. package/dist/bell-DOX2y38e.cjs +0 -1
  144. package/dist/calendar-BMZ8ddOf.cjs +0 -1
  145. package/dist/calendar-Dy3rVMW2.js +0 -90
  146. package/dist/checkbox-B0lGHUyy.cjs +0 -1
  147. package/dist/checkbox-boJRxICT.js +0 -46
  148. package/dist/chevron-down-C3s8jU6B.js +0 -5
  149. package/dist/chevron-down-DZVL7VHW.cjs +0 -1
  150. package/dist/chevron-left-BFr8XZyF.js +0 -5
  151. package/dist/chevron-left-HWhRo6IH.cjs +0 -1
  152. package/dist/circle-alert-77QqFR-z.cjs +0 -1
  153. package/dist/circle-alert-B2AMDd8N.js +0 -9
  154. package/dist/circle-x-Cv7bfIC_.js +0 -9
  155. package/dist/circle-x-DwVXxhXr.cjs +0 -1
  156. package/dist/date-time-picker-DTxHdPgQ.cjs +0 -1
  157. package/dist/date-time-picker-Dj2eftJI.js +0 -1636
  158. package/dist/download-0ZhO2XaW.cjs +0 -1
  159. package/dist/download-panVHmk6.js +0 -9
  160. package/dist/ellipsis-CuqNthAj.js +0 -9
  161. package/dist/ellipsis-CzlqJf-i.cjs +0 -1
  162. package/dist/grip-vertical-CSyDKBul.js +0 -12
  163. package/dist/grip-vertical-DZNBW1Dn.cjs +0 -1
  164. package/dist/index-B3ipEEhH.cjs +0 -2
  165. package/dist/index-BPPb7bcs.js +0 -3220
  166. package/dist/index-BQKw_Vho.js +0 -9604
  167. package/dist/index-C5STgBSy.js +0 -5203
  168. package/dist/index-C6NfgycP.js +0 -4644
  169. package/dist/index-D4f2ZdrG.cjs +0 -2
  170. package/dist/index-DUY1SqMo.cjs +0 -1
  171. package/dist/index-c1Zg--dt.cjs +0 -7
  172. package/dist/input-BgM_la4k.cjs +0 -1
  173. package/dist/input-jYQ5VKNR.js +0 -21
  174. package/dist/isBefore-C3Y_wbk3.js +0 -15
  175. package/dist/isBefore-Cp1ttk6q.cjs +0 -1
  176. package/dist/label-ClOW9UCt.js +0 -55
  177. package/dist/label-Dx6oDB-X.cjs +0 -1
  178. package/dist/layers-BA4i1fYX.js +0 -27
  179. package/dist/layers-xSPd-hz3.cjs +0 -1
  180. package/dist/popover-BJq1CKmi.cjs +0 -1
  181. package/dist/popover-Cmlb7w3R.js +0 -341
  182. package/dist/scroll-area-9fwpVNxT.js +0 -573
  183. package/dist/scroll-area-CwwZSSA4.cjs +0 -1
  184. package/dist/select-GxA46anr.cjs +0 -1
  185. package/dist/select-mDCun_IR.js +0 -35
  186. package/dist/settings-CvyjK75A.js +0 -31
  187. package/dist/settings-DKPknrt8.cjs +0 -1
  188. package/dist/sortable.esm-CsRPuXyD.cjs +0 -1
  189. package/dist/sortable.esm-CzMCDPet.js +0 -477
  190. package/dist/tooltip-B41iztKT.cjs +0 -1
  191. package/dist/tooltip-BCtrEe0z.js +0 -490
  192. package/dist/useComponentState-C87xXa5d.js +0 -64
  193. package/dist/useComponentState-DDgGbBXv.cjs +0 -1
  194. package/dist/useImperativeAPI-DXmCQvPL.js +0 -7
  195. package/dist/useImperativeAPI-DbZ3owSV.cjs +0 -1
  196. package/dist/useInitCoreServices-CwXv2p4S.cjs +0 -1
  197. package/dist/useInitCoreServices-D1WaWlaI.js +0 -3929
  198. package/dist/useService-8OoezWr8.cjs +0 -1
  199. package/dist/useService-BUi3uAqE.js +0 -10
  200. package/dist/useServiceState-BjpCjUn2.cjs +0 -1
  201. package/dist/useServiceState-VE-viK8b.js +0 -24
@@ -0,0 +1,720 @@
1
+ import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
2
+ import { t } from "./utils-hFRduYmq.js";
3
+ import { t as n } from "./button-BN0DK137.js";
4
+ import { t as r } from "./input-BE8Mmo8X.js";
5
+ import { t as i } from "./label-BLMeK8-Z.js";
6
+ import { t as a } from "./date-time-picker-C6i4TdP7.js";
7
+ import { useEffect as o } from "react";
8
+ import { Paperclip as s, Trash2 as c, X as l } from "lucide-react";
9
+ import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
10
+ import { useForm as p } from "@tanstack/react-form";
11
+ import { createPortal as m } from "react-dom";
12
+ //#region src/components/EzScheduler/components/EzEventModal.tsx
13
+ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
14
+ {
15
+ label: "S",
16
+ value: "SU"
17
+ },
18
+ {
19
+ label: "M",
20
+ value: "MO"
21
+ },
22
+ {
23
+ label: "T",
24
+ value: "TU"
25
+ },
26
+ {
27
+ label: "W",
28
+ value: "WE"
29
+ },
30
+ {
31
+ label: "T",
32
+ value: "TH"
33
+ },
34
+ {
35
+ label: "F",
36
+ value: "FR"
37
+ },
38
+ {
39
+ label: "S",
40
+ value: "SA"
41
+ }
42
+ ], _ = ({ isOpen: e, onClose: h, mode: _, event: v, onSave: y, onDelete: b, locale: x, editorTemplate: S, headerTemplate: C, footerTemplate: w }) => {
43
+ let T = p({
44
+ defaultValues: {
45
+ title: v?.title || "",
46
+ start: v?.start,
47
+ end: v?.end,
48
+ resourceIds: v?.resourceIds || (v?.resourceId ? [v.resourceId] : []) || [],
49
+ location: v?.location || "",
50
+ isAllDay: !!v?.allDay || !!v?.isAllDay || !1,
51
+ description: v?.description || "",
52
+ isTimezoneEnabled: !!v?.timezone,
53
+ startTimezone: v?.timezone?.start || "Asia/Calcutta",
54
+ endTimezone: v?.timezone?.end || "Asia/Calcutta",
55
+ repeatFrequency: v?.recurrence?.frequency || "Never",
56
+ repeatInterval: v?.recurrence?.interval || 1,
57
+ repeatDays: v?.recurrence?.days || [],
58
+ repeatBy: v?.recurrence?.repeatBy || "day",
59
+ repeatEndLevel: v?.recurrence?.end || "Never",
60
+ repeatEndCount: v?.recurrence?.endCount || 1,
61
+ repeatEndUntil: v?.recurrence?.endUntil,
62
+ attachments: v?.attachments || []
63
+ },
64
+ onSubmit: async ({ value: e }) => {
65
+ y({
66
+ ...v,
67
+ title: e.title,
68
+ start: e.start,
69
+ end: e.end,
70
+ resourceId: e.resourceIds[0],
71
+ resourceIds: e.resourceIds,
72
+ location: e.location,
73
+ allDay: e.isAllDay,
74
+ description: e.description,
75
+ timezone: e.isTimezoneEnabled ? {
76
+ start: e.startTimezone,
77
+ end: e.endTimezone
78
+ } : void 0,
79
+ recurrence: e.repeatFrequency === "Never" ? void 0 : {
80
+ frequency: e.repeatFrequency,
81
+ interval: e.repeatInterval,
82
+ unit: e.repeatFrequency.replace("ly", "") + "(s)",
83
+ end: e.repeatEndLevel,
84
+ endCount: e.repeatEndLevel === "Count" ? e.repeatEndCount : void 0,
85
+ endUntil: e.repeatEndLevel === "Until" ? e.repeatEndUntil : void 0,
86
+ days: e.repeatFrequency === "Weekly" ? e.repeatDays : void 0,
87
+ repeatBy: e.repeatFrequency === "Monthly" || e.repeatFrequency === "Yearly" ? e.repeatBy : void 0
88
+ },
89
+ attachments: e.attachments
90
+ }), h();
91
+ }
92
+ });
93
+ if (o(() => {
94
+ e && T.reset();
95
+ }, [
96
+ e,
97
+ v,
98
+ T
99
+ ]), !e) return null;
100
+ let E = (e) => {
101
+ e.preventDefault(), e.stopPropagation(), T.handleSubmit();
102
+ }, D = _ === "view";
103
+ return m(/* @__PURE__ */ f("div", {
104
+ "data-testid": "ez-event-modal",
105
+ style: {
106
+ position: "fixed",
107
+ top: 0,
108
+ left: 0,
109
+ width: "100vw",
110
+ height: "100vh",
111
+ zIndex: 1e4,
112
+ backgroundColor: "rgba(0, 0, 0, 0.4)",
113
+ backdropFilter: "blur(2px)",
114
+ pointerEvents: "auto"
115
+ },
116
+ children: [/* @__PURE__ */ d("div", {
117
+ style: {
118
+ position: "absolute",
119
+ inset: 0
120
+ },
121
+ onClick: h
122
+ }), /* @__PURE__ */ f("div", {
123
+ className: t("bg-background rounded-xl shadow-2xl flex flex-col border border-border overflow-hidden", "animate-in zoom-in-95 fade-in duration-300 ease-out"),
124
+ style: {
125
+ backgroundColor: "white",
126
+ width: "650px",
127
+ maxWidth: "95vw",
128
+ maxHeight: "92vh",
129
+ position: "absolute",
130
+ top: "50%",
131
+ left: "50%",
132
+ transform: "translate(-50%, -50%)",
133
+ zIndex: 10001
134
+ },
135
+ children: [
136
+ /* @__PURE__ */ d("div", {
137
+ className: "flex items-center justify-between shrink-0 bg-background",
138
+ style: { padding: "16px 40px" },
139
+ children: C ? C(v || {}, _) : /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ f("h2", {
140
+ className: "text-xl font-bold tracking-tight text-foreground",
141
+ children: [
142
+ _ === "create" && "New Event",
143
+ _ === "edit" && "Edit Event",
144
+ _ === "view" && "Event Details"
145
+ ]
146
+ }), /* @__PURE__ */ d(n, {
147
+ variant: "ghost",
148
+ size: "icon",
149
+ className: "h-9 w-9 rounded-full hover:bg-muted text-muted-foreground mr-[-8px]",
150
+ onClick: h,
151
+ children: /* @__PURE__ */ d(l, { className: "w-5 h-5" })
152
+ })] })
153
+ }),
154
+ S ? /* @__PURE__ */ d("div", {
155
+ className: "overflow-y-auto custom-scrollbar flex-1 bg-background",
156
+ style: { padding: "8px 40px 32px 40px" },
157
+ children: S(v || {})
158
+ }) : /* @__PURE__ */ f("form", {
159
+ onSubmit: E,
160
+ className: "space-y-6 overflow-y-auto custom-scrollbar flex-1 bg-background",
161
+ style: { padding: "8px 40px 32px 40px" },
162
+ children: [
163
+ /* @__PURE__ */ f("div", {
164
+ className: "grid grid-cols-1 md:grid-cols-2 gap-6",
165
+ children: [/* @__PURE__ */ d(T.Field, {
166
+ name: "title",
167
+ validators: { onChange: ({ value: e }) => e ? void 0 : "Title is required" },
168
+ children: (e) => /* @__PURE__ */ f("div", {
169
+ className: "space-y-2",
170
+ children: [
171
+ /* @__PURE__ */ d(i, {
172
+ htmlFor: "title",
173
+ className: "text-[13px] font-semibold text-foreground/70",
174
+ children: "Title"
175
+ }),
176
+ /* @__PURE__ */ d(r, {
177
+ id: "title",
178
+ placeholder: "Add title",
179
+ value: e.state.value,
180
+ onChange: (t) => e.handleChange(t.target.value),
181
+ onBlur: e.handleBlur,
182
+ disabled: D,
183
+ className: t("h-10 rounded-md border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20 bg-background transition-all", e.state.meta.errors.length > 0 && "border-destructive focus-visible:border-destructive ring-destructive/20")
184
+ }),
185
+ e.state.meta.errors.length > 0 && /* @__PURE__ */ d("p", {
186
+ className: "text-[12px] font-medium text-destructive mt-1.5 animate-in fade-in slide-in-from-top-1",
187
+ children: e.state.meta.errors.join(", ")
188
+ })
189
+ ]
190
+ })
191
+ }), /* @__PURE__ */ d(T.Field, {
192
+ name: "location",
193
+ children: (e) => /* @__PURE__ */ f("div", {
194
+ className: "space-y-2",
195
+ children: [/* @__PURE__ */ d(i, {
196
+ htmlFor: "location",
197
+ className: "text-[13px] font-semibold text-foreground/70",
198
+ children: "Location"
199
+ }), /* @__PURE__ */ d(r, {
200
+ id: "location",
201
+ placeholder: "Add location",
202
+ value: e.state.value,
203
+ onChange: (t) => e.handleChange(t.target.value),
204
+ disabled: D,
205
+ className: "h-10 rounded-md border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20 bg-background transition-all"
206
+ })]
207
+ })
208
+ })]
209
+ }),
210
+ /* @__PURE__ */ f("div", {
211
+ className: "grid grid-cols-1 md:grid-cols-2 gap-6",
212
+ children: [/* @__PURE__ */ d(T.Field, {
213
+ name: "start",
214
+ validators: { onChange: ({ value: e }) => e ? void 0 : "Start date is required" },
215
+ children: (e) => /* @__PURE__ */ f("div", {
216
+ className: "space-y-2",
217
+ children: [
218
+ /* @__PURE__ */ d(i, {
219
+ className: "text-[13px] font-semibold text-foreground/70",
220
+ children: "Start"
221
+ }),
222
+ /* @__PURE__ */ d(a, {
223
+ date: e.state.value,
224
+ setDate: (t) => e.handleChange(t),
225
+ disabled: D,
226
+ required: !0,
227
+ locale: x,
228
+ mode: T.getFieldValue("isAllDay") ? "date" : "datetime",
229
+ className: "border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20"
230
+ }),
231
+ e.state.meta.errors.length > 0 && /* @__PURE__ */ d("p", {
232
+ className: "text-[12px] font-medium text-destructive mt-1.5",
233
+ children: e.state.meta.errors.join(", ")
234
+ })
235
+ ]
236
+ })
237
+ }), /* @__PURE__ */ d(T.Field, {
238
+ name: "end",
239
+ validators: { onChange: ({ value: e, fieldApi: t }) => {
240
+ if (!e) return "End date is required";
241
+ let n = t.form.getFieldValue("start");
242
+ if (n && e <= n) return "End time must be after start time";
243
+ } },
244
+ children: (e) => /* @__PURE__ */ f("div", {
245
+ className: "space-y-2",
246
+ children: [
247
+ /* @__PURE__ */ d(i, {
248
+ className: "text-[13px] font-semibold text-foreground/70",
249
+ children: "End"
250
+ }),
251
+ /* @__PURE__ */ d(a, {
252
+ date: e.state.value,
253
+ setDate: (t) => e.handleChange(t),
254
+ disabled: D,
255
+ required: !0,
256
+ locale: x,
257
+ mode: T.getFieldValue("isAllDay") ? "date" : "datetime",
258
+ minDate: T.getFieldValue("start"),
259
+ className: t("border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20", e.state.meta.errors.length > 0 && "border-destructive focus-visible:border-destructive ring-destructive/20")
260
+ }),
261
+ e.state.meta.errors.length > 0 && /* @__PURE__ */ d("p", {
262
+ className: "text-[12px] font-medium text-destructive mt-1.5 animate-in fade-in slide-in-from-top-1",
263
+ children: e.state.meta.errors.join(", ")
264
+ })
265
+ ]
266
+ })
267
+ })]
268
+ }),
269
+ /* @__PURE__ */ f("div", {
270
+ className: "grid grid-cols-1 md:grid-cols-2 gap-6",
271
+ children: [/* @__PURE__ */ d(T.Field, {
272
+ name: "isAllDay",
273
+ children: (e) => /* @__PURE__ */ d("div", {
274
+ className: "flex items-center h-10",
275
+ children: /* @__PURE__ */ f("label", {
276
+ className: "flex items-center space-x-3 cursor-pointer group select-none",
277
+ children: [/* @__PURE__ */ d("input", {
278
+ type: "checkbox",
279
+ checked: e.state.value,
280
+ onChange: (t) => e.handleChange(t.target.checked),
281
+ disabled: D,
282
+ className: "h-4 w-4 rounded border-border/50 text-primary focus:ring-primary/30 accent-primary transition-all cursor-pointer"
283
+ }), /* @__PURE__ */ d("span", {
284
+ className: "text-[14px] font-medium text-foreground/70 group-hover:text-foreground",
285
+ children: "All day event"
286
+ })]
287
+ })
288
+ })
289
+ }), /* @__PURE__ */ d(T.Field, {
290
+ name: "isTimezoneEnabled",
291
+ children: (e) => /* @__PURE__ */ d("div", {
292
+ className: "flex items-center h-10",
293
+ children: /* @__PURE__ */ f("label", {
294
+ className: "flex items-center space-x-3 cursor-pointer group select-none",
295
+ children: [/* @__PURE__ */ d("input", {
296
+ type: "checkbox",
297
+ checked: e.state.value,
298
+ onChange: (t) => e.handleChange(t.target.checked),
299
+ disabled: D,
300
+ className: "h-4 w-4 rounded border-border/50 text-primary focus:ring-primary/30 accent-primary transition-all cursor-pointer"
301
+ }), /* @__PURE__ */ d("span", {
302
+ className: "text-[14px] font-medium text-foreground/70 group-hover:text-foreground",
303
+ children: "Enable timezone"
304
+ })]
305
+ })
306
+ })
307
+ })]
308
+ }),
309
+ /* @__PURE__ */ d(T.Subscribe, {
310
+ selector: (e) => [e.values.isTimezoneEnabled],
311
+ children: ([e]) => e && /* @__PURE__ */ f("div", {
312
+ className: "grid grid-cols-1 md:grid-cols-2 gap-6 p-6 bg-highlight/50 rounded-lg border border-border animate-in slide-in-from-top-2 duration-300",
313
+ children: [/* @__PURE__ */ d(T.Field, {
314
+ name: "startTimezone",
315
+ children: (e) => /* @__PURE__ */ f("div", {
316
+ className: "space-y-2",
317
+ children: [/* @__PURE__ */ d(i, {
318
+ className: "text-[13px] font-semibold text-foreground/70",
319
+ children: "Start Timezone"
320
+ }), /* @__PURE__ */ f("select", {
321
+ className: "w-full h-10 px-3 rounded-md border-border bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",
322
+ value: e.state.value,
323
+ onChange: (t) => e.handleChange(t.target.value),
324
+ children: [
325
+ /* @__PURE__ */ d("option", {
326
+ value: "Asia/Calcutta",
327
+ children: "Asia/Calcutta"
328
+ }),
329
+ /* @__PURE__ */ d("option", {
330
+ value: "UTC",
331
+ children: "UTC"
332
+ }),
333
+ /* @__PURE__ */ d("option", {
334
+ value: "America/New_York",
335
+ children: "America/New_York"
336
+ })
337
+ ]
338
+ })]
339
+ })
340
+ }), /* @__PURE__ */ d(T.Field, {
341
+ name: "endTimezone",
342
+ children: (e) => /* @__PURE__ */ f("div", {
343
+ className: "space-y-2",
344
+ children: [/* @__PURE__ */ d(i, {
345
+ className: "text-[13px] font-semibold text-foreground/70",
346
+ children: "End Timezone"
347
+ }), /* @__PURE__ */ f("select", {
348
+ className: "w-full h-10 px-3 rounded-md border-border bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",
349
+ value: e.state.value,
350
+ onChange: (t) => e.handleChange(t.target.value),
351
+ children: [
352
+ /* @__PURE__ */ d("option", {
353
+ value: "Asia/Calcutta",
354
+ children: "Asia/Calcutta"
355
+ }),
356
+ /* @__PURE__ */ d("option", {
357
+ value: "UTC",
358
+ children: "UTC"
359
+ }),
360
+ /* @__PURE__ */ d("option", {
361
+ value: "America/New_York",
362
+ children: "America/New_York"
363
+ })
364
+ ]
365
+ })]
366
+ })
367
+ })]
368
+ })
369
+ }),
370
+ /* @__PURE__ */ f("div", {
371
+ className: "grid grid-cols-1 md:grid-cols-2 gap-6",
372
+ children: [/* @__PURE__ */ d(T.Field, {
373
+ name: "repeatFrequency",
374
+ children: (e) => /* @__PURE__ */ f("div", {
375
+ className: "space-y-2",
376
+ children: [/* @__PURE__ */ d(i, {
377
+ className: "text-[13px] font-semibold text-foreground/70",
378
+ children: "Repeat"
379
+ }), /* @__PURE__ */ f("select", {
380
+ className: "w-full h-10 px-3 rounded-md border-border bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",
381
+ value: e.state.value,
382
+ onChange: (t) => e.handleChange(t.target.value),
383
+ children: [
384
+ /* @__PURE__ */ d("option", {
385
+ value: "Never",
386
+ children: "Never"
387
+ }),
388
+ /* @__PURE__ */ d("option", {
389
+ value: "Daily",
390
+ children: "Daily"
391
+ }),
392
+ /* @__PURE__ */ d("option", {
393
+ value: "Weekly",
394
+ children: "Weekly"
395
+ }),
396
+ /* @__PURE__ */ d("option", {
397
+ value: "Monthly",
398
+ children: "Monthly"
399
+ }),
400
+ /* @__PURE__ */ d("option", {
401
+ value: "Yearly",
402
+ children: "Yearly"
403
+ })
404
+ ]
405
+ })]
406
+ })
407
+ }), /* @__PURE__ */ d(T.Subscribe, {
408
+ selector: (e) => [e.values.repeatFrequency],
409
+ children: ([e]) => e !== "Never" && /* @__PURE__ */ d(T.Field, {
410
+ name: "repeatEndLevel",
411
+ children: (e) => /* @__PURE__ */ f("div", {
412
+ className: "space-y-2 animate-in slide-in-from-top-2 duration-300",
413
+ children: [/* @__PURE__ */ d(i, {
414
+ className: "text-[13px] font-semibold text-foreground/70",
415
+ children: "End"
416
+ }), /* @__PURE__ */ f("select", {
417
+ className: "w-full h-10 px-3 rounded-md border-border bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",
418
+ value: e.state.value,
419
+ onChange: (t) => e.handleChange(t.target.value),
420
+ children: [
421
+ /* @__PURE__ */ d("option", {
422
+ value: "Never",
423
+ children: "Never"
424
+ }),
425
+ /* @__PURE__ */ d("option", {
426
+ value: "Until",
427
+ children: "Until"
428
+ }),
429
+ /* @__PURE__ */ d("option", {
430
+ value: "Count",
431
+ children: "Count"
432
+ })
433
+ ]
434
+ })]
435
+ })
436
+ })
437
+ })]
438
+ }),
439
+ /* @__PURE__ */ d(T.Subscribe, {
440
+ selector: (e) => [e.values.repeatFrequency, e.values.repeatEndLevel],
441
+ children: ([e, t]) => e !== "Never" && /* @__PURE__ */ f("div", {
442
+ className: "grid grid-cols-1 md:grid-cols-2 gap-6 animate-in slide-in-from-top-2 duration-300",
443
+ children: [
444
+ /* @__PURE__ */ d(T.Field, {
445
+ name: "repeatInterval",
446
+ children: (t) => /* @__PURE__ */ f("div", {
447
+ className: "space-y-2",
448
+ children: [/* @__PURE__ */ d(i, {
449
+ className: "text-[13px] font-semibold text-foreground/70",
450
+ children: "Repeat every"
451
+ }), /* @__PURE__ */ f("div", {
452
+ className: "flex items-center gap-3",
453
+ children: [/* @__PURE__ */ d("select", {
454
+ className: "flex-1 h-10 px-3 rounded-md border-border bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",
455
+ value: t.state.value,
456
+ onChange: (e) => t.handleChange(parseInt(e.target.value)),
457
+ children: [
458
+ 1,
459
+ 2,
460
+ 3,
461
+ 4,
462
+ 5,
463
+ 6,
464
+ 7,
465
+ 8,
466
+ 9,
467
+ 10,
468
+ 11,
469
+ 12,
470
+ 13,
471
+ 14,
472
+ 15,
473
+ 20,
474
+ 30
475
+ ].map((e) => /* @__PURE__ */ d("option", {
476
+ value: e,
477
+ children: e
478
+ }, e))
479
+ }), /* @__PURE__ */ d("span", {
480
+ className: "text-sm font-medium text-muted-foreground whitespace-nowrap",
481
+ children: e === "Daily" ? "Day(s)" : e.replace("ly", "") + "(s)"
482
+ })]
483
+ })]
484
+ })
485
+ }),
486
+ t === "Until" && /* @__PURE__ */ d(T.Field, {
487
+ name: "repeatEndUntil",
488
+ children: (e) => /* @__PURE__ */ f("div", {
489
+ className: "space-y-2 animate-in slide-in-from-top-1",
490
+ children: [/* @__PURE__ */ d(i, {
491
+ className: "text-[13px] font-semibold text-foreground/70",
492
+ children: "Until"
493
+ }), /* @__PURE__ */ d(a, {
494
+ date: e.state.value,
495
+ setDate: (t) => e.handleChange(t),
496
+ disabled: D,
497
+ locale: x,
498
+ mode: "date",
499
+ minDate: T.getFieldValue("start"),
500
+ className: "border-border focus:border-primary"
501
+ })]
502
+ })
503
+ }),
504
+ t === "Count" && /* @__PURE__ */ d(T.Field, {
505
+ name: "repeatEndCount",
506
+ children: (e) => /* @__PURE__ */ f("div", {
507
+ className: "space-y-2 animate-in slide-in-from-top-1",
508
+ children: [/* @__PURE__ */ d(i, {
509
+ className: "text-[13px] font-semibold text-foreground/70",
510
+ children: "Occurrences"
511
+ }), /* @__PURE__ */ d(r, {
512
+ type: "number",
513
+ min: 1,
514
+ value: e.state.value,
515
+ onChange: (t) => e.handleChange(parseInt(t.target.value)),
516
+ className: "h-10 rounded-md border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20 bg-background transition-all"
517
+ })]
518
+ })
519
+ })
520
+ ]
521
+ })
522
+ }),
523
+ /* @__PURE__ */ d(T.Subscribe, {
524
+ selector: (e) => [e.values.repeatFrequency],
525
+ children: ([e]) => e === "Weekly" && /* @__PURE__ */ d(T.Field, {
526
+ name: "repeatDays",
527
+ children: (e) => /* @__PURE__ */ f("div", {
528
+ className: "space-y-3 animate-in fade-in duration-300",
529
+ children: [/* @__PURE__ */ d(i, {
530
+ className: "text-[13px] font-semibold text-foreground/70",
531
+ children: "Repeat On"
532
+ }), /* @__PURE__ */ d("div", {
533
+ className: "flex flex-wrap gap-2",
534
+ children: g.map((n) => /* @__PURE__ */ d("button", {
535
+ type: "button",
536
+ onClick: () => {
537
+ let t = e.state.value || [];
538
+ t.includes(n.value) ? e.handleChange(t.filter((e) => e !== n.value)) : e.handleChange([...t, n.value]);
539
+ },
540
+ className: t("w-9 h-9 rounded-full flex items-center justify-center text-sm font-bold transition-all border", (e.state.value || []).includes(n.value) ? "bg-primary text-white border-primary shadow-sm" : "bg-background text-foreground/60 border-border/60 hover:border-primary/40 hover:text-primary"),
541
+ children: n.label
542
+ }, n.value))
543
+ })]
544
+ })
545
+ })
546
+ }),
547
+ /* @__PURE__ */ d(T.Subscribe, {
548
+ selector: (e) => [e.values.repeatFrequency],
549
+ children: ([e]) => (e === "Monthly" || e === "Yearly") && /* @__PURE__ */ d(T.Field, {
550
+ name: "repeatBy",
551
+ children: (e) => /* @__PURE__ */ f("div", {
552
+ className: "space-y-4 animate-in fade-in duration-300",
553
+ children: [/* @__PURE__ */ d(i, {
554
+ className: "text-[13px] font-semibold text-foreground/70",
555
+ children: "Repeat On"
556
+ }), /* @__PURE__ */ f("div", {
557
+ className: "space-y-3",
558
+ children: [/* @__PURE__ */ f("label", {
559
+ className: "flex items-center space-x-3 cursor-pointer group",
560
+ children: [/* @__PURE__ */ d("input", {
561
+ type: "radio",
562
+ name: "repeatBy",
563
+ checked: e.state.value === "day",
564
+ onChange: () => e.handleChange("day"),
565
+ className: "h-4 w-4 border-border text-primary focus:ring-primary"
566
+ }), /* @__PURE__ */ d("span", {
567
+ className: "text-sm text-foreground/80",
568
+ children: "Day of the month"
569
+ })]
570
+ }), /* @__PURE__ */ f("label", {
571
+ className: "flex items-center space-x-3 cursor-pointer group",
572
+ children: [/* @__PURE__ */ d("input", {
573
+ type: "radio",
574
+ name: "repeatBy",
575
+ checked: e.state.value === "ordinal",
576
+ onChange: () => e.handleChange("ordinal"),
577
+ className: "h-4 w-4 border-border text-primary focus:ring-primary"
578
+ }), /* @__PURE__ */ d("span", {
579
+ className: "text-sm text-foreground/80",
580
+ children: "Ordinal position"
581
+ })]
582
+ })]
583
+ })]
584
+ })
585
+ })
586
+ }),
587
+ /* @__PURE__ */ d(T.Field, {
588
+ name: "description",
589
+ children: (e) => /* @__PURE__ */ f("div", {
590
+ className: "space-y-2",
591
+ children: [/* @__PURE__ */ d(i, {
592
+ htmlFor: "description",
593
+ className: "text-[13px] font-semibold text-foreground/70",
594
+ children: "Description"
595
+ }), /* @__PURE__ */ d("textarea", {
596
+ id: "description",
597
+ placeholder: "Add description",
598
+ className: "flex min-h-[100px] w-full rounded-md border-border bg-background px-4 py-3 text-sm placeholder:text-muted-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary disabled:cursor-not-allowed disabled:opacity-50 resize-none transition-all hover:border-border",
599
+ value: e.state.value,
600
+ onChange: (t) => e.handleChange(t.target.value),
601
+ disabled: D
602
+ })]
603
+ })
604
+ }),
605
+ /* @__PURE__ */ d(T.Field, {
606
+ name: "attachments",
607
+ children: (e) => /* @__PURE__ */ f("div", {
608
+ className: "space-y-4 pt-4 pb-2",
609
+ children: [/* @__PURE__ */ f("div", {
610
+ className: "flex items-center justify-between",
611
+ children: [
612
+ /* @__PURE__ */ f(i, {
613
+ className: "text-[13px] font-semibold text-foreground/70 flex items-center gap-2",
614
+ children: [/* @__PURE__ */ d(s, { className: "w-4 h-4" }), " Attachments"]
615
+ }),
616
+ /* @__PURE__ */ d("input", {
617
+ type: "file",
618
+ id: "file-upload",
619
+ multiple: !0,
620
+ className: "hidden",
621
+ onChange: (t) => {
622
+ t.target.files && e.handleChange([...e.state.value || [], ...Array.from(t.target.files)]);
623
+ }
624
+ }),
625
+ /* @__PURE__ */ f(n, {
626
+ type: "button",
627
+ variant: "outline",
628
+ size: "sm",
629
+ className: "h-8 text-xs font-semibold gap-2 border-dashed border-border/50 hover:border-primary/40 hover:text-primary transition-all",
630
+ onClick: () => document.getElementById("file-upload")?.click(),
631
+ children: [/* @__PURE__ */ d(s, { className: "w-3 h-3" }), " Add Files"]
632
+ })
633
+ ]
634
+ }), (e.state.value || []).length > 0 && /* @__PURE__ */ d("div", {
635
+ className: "grid grid-cols-1 gap-3",
636
+ children: (e.state.value || []).map((t, r) => /* @__PURE__ */ f("div", {
637
+ className: "flex items-center justify-between p-3 rounded-lg bg-highlight border border-border group hover:border-border transition-all",
638
+ children: [/* @__PURE__ */ f("div", {
639
+ className: "flex items-center gap-3 overflow-hidden",
640
+ children: [/* @__PURE__ */ d("div", {
641
+ className: "w-9 h-9 rounded-md bg-white border border-border flex items-center justify-center shrink-0 shadow-sm",
642
+ children: /* @__PURE__ */ d(s, { className: "w-4 h-4 text-muted-foreground" })
643
+ }), /* @__PURE__ */ f("div", {
644
+ className: "flex flex-col overflow-hidden",
645
+ children: [/* @__PURE__ */ d("span", {
646
+ className: "text-[13px] font-medium text-foreground truncate",
647
+ children: t.name
648
+ }), /* @__PURE__ */ d("span", {
649
+ className: "text-[11px] text-muted-foreground font-medium",
650
+ children: typeof t.size == "number" ? `${(t.size / 1024).toFixed(1)} KB` : "Attachment"
651
+ })]
652
+ })]
653
+ }), /* @__PURE__ */ d(n, {
654
+ type: "button",
655
+ variant: "ghost",
656
+ size: "icon",
657
+ className: "h-8 w-8 text-muted-foreground/50 hover:text-destructive hover:bg-destructive/10 opacity-0 group-hover:opacity-100 transition-all",
658
+ onClick: () => e.handleChange((e.state.value || []).filter((e, t) => t !== r)),
659
+ children: /* @__PURE__ */ d(c, { className: "w-4 h-4" })
660
+ })]
661
+ }, r))
662
+ })]
663
+ })
664
+ })
665
+ ]
666
+ }),
667
+ w ? w(v || {}, _, () => E({}), h) : /* @__PURE__ */ f("div", {
668
+ style: {
669
+ display: "flex",
670
+ alignItems: "center",
671
+ justifyContent: "flex-end",
672
+ padding: "24px 40px",
673
+ backgroundColor: "var(--highlight)",
674
+ gap: "12px",
675
+ width: "100%",
676
+ flexShrink: 0
677
+ },
678
+ children: [!D && b && _ === "edit" && /* @__PURE__ */ d(n, {
679
+ type: "button",
680
+ variant: "ghost",
681
+ className: "text-destructive hover:bg-destructive/10 hover:text-destructive h-10 px-5 font-bold mr-auto",
682
+ onClick: () => {
683
+ b(v?.id), h();
684
+ },
685
+ children: "Delete"
686
+ }), /* @__PURE__ */ f("div", {
687
+ style: {
688
+ display: "flex",
689
+ alignItems: "center",
690
+ gap: "12px"
691
+ },
692
+ children: [!D && /* @__PURE__ */ d(T.Subscribe, {
693
+ selector: (e) => [e.canSubmit, e.isSubmitting],
694
+ children: ([e, t]) => /* @__PURE__ */ d(n, {
695
+ type: "submit",
696
+ variant: "default",
697
+ className: "h-10 px-10 font-bold rounded-md shrink-0 flex items-center justify-center transition-all hover:opacity-90",
698
+ style: { minWidth: "120px" },
699
+ disabled: !e || t,
700
+ onClick: (e) => {
701
+ e.preventDefault(), e.stopPropagation(), T.handleSubmit();
702
+ },
703
+ children: t ? "Saving..." : "Save"
704
+ })
705
+ }), /* @__PURE__ */ d(n, {
706
+ type: "button",
707
+ variant: "outline",
708
+ className: "h-10 px-8 font-bold border border-border hover:bg-highlight text-foreground shrink-0 rounded-md transition-all",
709
+ style: { minWidth: "100px" },
710
+ onClick: h,
711
+ children: "Cancel"
712
+ })]
713
+ })]
714
+ })
715
+ ]
716
+ })]
717
+ }), document.body);
718
+ };
719
+ //#endregion
720
+ export { h as n, _ as t };