@burdenoff/microfe-notification 2026.1029.2 → 2026.1113.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/dist/AdminNotificationRoot.d.ts +33 -0
  2. package/dist/AdminNotificationRoot.js +9 -6
  3. package/dist/AdminNotificationRoot.js.map +1 -1
  4. package/dist/AdminNotificationRoutes.d.ts +1 -0
  5. package/dist/AdminNotificationRoutes.js +22 -23
  6. package/dist/AdminNotificationRoutes.js.map +1 -1
  7. package/dist/NotificationRoot.d.ts +29 -0
  8. package/dist/NotificationRoot.js +9 -6
  9. package/dist/NotificationRoot.js.map +1 -1
  10. package/dist/NotificationRoutes.d.ts +18 -0
  11. package/dist/NotificationRoutes.js +109 -38
  12. package/dist/NotificationRoutes.js.map +1 -1
  13. package/dist/UserNotificationRoot.d.ts +32 -0
  14. package/dist/UserNotificationRoot.js +9 -6
  15. package/dist/UserNotificationRoot.js.map +1 -1
  16. package/dist/UserNotificationRoutes.d.ts +16 -0
  17. package/dist/UserNotificationRoutes.js +9 -10
  18. package/dist/UserNotificationRoutes.js.map +1 -1
  19. package/dist/components/ConfirmDeleteDialog.d.ts +17 -0
  20. package/dist/components/ConfirmDeleteDialog.js +22 -0
  21. package/dist/components/ConfirmDeleteDialog.js.map +1 -0
  22. package/dist/components/FeatureDisabledPage.d.ts +6 -0
  23. package/dist/components/FeatureDisabledPage.js +1 -2
  24. package/dist/components/FeatureDisabledPage.js.map +1 -1
  25. package/dist/components/NotificationBell.d.ts +13 -0
  26. package/dist/components/NotificationBell.js +6 -7
  27. package/dist/components/NotificationBell.js.map +1 -1
  28. package/dist/components/NotificationCard.d.ts +27 -0
  29. package/dist/components/NotificationCard.js +106 -76
  30. package/dist/components/NotificationCard.js.map +1 -1
  31. package/dist/components/NotificationPanel.d.ts +10 -0
  32. package/dist/components/NotificationPanel.js +5 -6
  33. package/dist/components/NotificationPanel.js.map +1 -1
  34. package/dist/components/RecipientSelector.d.ts +32 -0
  35. package/dist/components/RecipientSelector.js +2 -3
  36. package/dist/components/RecipientSelector.js.map +1 -1
  37. package/dist/components/TemplatePreview.d.ts +21 -0
  38. package/dist/components/TemplatePreview.js +3 -4
  39. package/dist/components/TemplatePreview.js.map +1 -1
  40. package/dist/components/VariableInserter.d.ts +11 -0
  41. package/dist/components/index.d.ts +3 -0
  42. package/dist/components/index.js +4 -3
  43. package/dist/constants/permissions.d.ts +23 -0
  44. package/dist/constants/permissions.js +1 -2
  45. package/dist/constants/permissions.js.map +1 -1
  46. package/dist/dev/main.d.ts +0 -0
  47. package/dist/generated/global-operations.d.ts +2119 -0
  48. package/dist/generated/global-operations.js +80 -69
  49. package/dist/generated/global-operations.js.map +1 -1
  50. package/dist/generated/global-types.d.ts +23507 -0
  51. package/dist/generated/wspace-operations.d.ts +4 -0
  52. package/dist/generated/wspace-types.d.ts +57831 -0
  53. package/dist/graphql/global-client.d.ts +32 -0
  54. package/dist/graphql/global-client.js +23 -30
  55. package/dist/graphql/global-client.js.map +1 -1
  56. package/dist/hooks/index.d.ts +7 -0
  57. package/dist/hooks/index.js +7 -6
  58. package/dist/hooks/useNotificationAdmin.d.ts +46 -0
  59. package/dist/hooks/useNotificationAdmin.js +18 -17
  60. package/dist/hooks/useNotificationAdmin.js.map +1 -1
  61. package/dist/hooks/useNotificationAnalytics.d.ts +65 -0
  62. package/dist/hooks/useNotificationAnalytics.js +1 -2
  63. package/dist/hooks/useNotificationAnalytics.js.map +1 -1
  64. package/dist/hooks/useNotificationPreferences.d.ts +10 -0
  65. package/dist/hooks/useNotificationPreferences.js +7 -7
  66. package/dist/hooks/useNotificationPreferences.js.map +1 -1
  67. package/dist/hooks/useNotificationTemplates.d.ts +131 -0
  68. package/dist/hooks/useNotificationTemplates.js +1 -2
  69. package/dist/hooks/useNotificationTemplates.js.map +1 -1
  70. package/dist/hooks/useNotificationTopics.d.ts +35 -0
  71. package/dist/hooks/useNotificationTopics.js +22 -22
  72. package/dist/hooks/useNotificationTopics.js.map +1 -1
  73. package/dist/hooks/useNotifications.d.ts +39 -0
  74. package/dist/hooks/useNotifications.js +6 -4
  75. package/dist/hooks/useNotifications.js.map +1 -1
  76. package/dist/hooks/usePreferenceToggles.d.ts +27 -0
  77. package/dist/hooks/usePreferenceToggles.js +84 -0
  78. package/dist/hooks/usePreferenceToggles.js.map +1 -0
  79. package/dist/hooks/useSendNotification.d.ts +158 -0
  80. package/dist/hooks/useSendNotification.js +12 -10
  81. package/dist/hooks/useSendNotification.js.map +1 -1
  82. package/dist/hooks/useUserSearch.d.ts +26 -0
  83. package/dist/hooks/useUserSearch.js +8 -10
  84. package/dist/hooks/useUserSearch.js.map +1 -1
  85. package/dist/index.d.ts +36 -0
  86. package/dist/index.js +8 -8
  87. package/dist/navigation-v2/AdminPageV2.d.ts +14 -0
  88. package/dist/navigation-v2/AdminPageV2.js +51 -0
  89. package/dist/navigation-v2/AdminPageV2.js.map +1 -0
  90. package/dist/navigation-v2/AdminToolsMenu.d.ts +6 -0
  91. package/dist/navigation-v2/AdminToolsMenu.js +32 -0
  92. package/dist/navigation-v2/AdminToolsMenu.js.map +1 -0
  93. package/dist/navigation-v2/BackToNotifications.d.ts +2 -0
  94. package/dist/navigation-v2/BackToNotifications.js +20 -0
  95. package/dist/navigation-v2/BackToNotifications.js.map +1 -0
  96. package/dist/navigation-v2/FilterControls.d.ts +25 -0
  97. package/dist/navigation-v2/FilterControls.js +64 -0
  98. package/dist/navigation-v2/FilterControls.js.map +1 -0
  99. package/dist/navigation-v2/NotificationArchivedV2.d.ts +9 -0
  100. package/dist/navigation-v2/NotificationArchivedV2.js +174 -0
  101. package/dist/navigation-v2/NotificationArchivedV2.js.map +1 -0
  102. package/dist/navigation-v2/NotificationInboxV2.d.ts +9 -0
  103. package/dist/navigation-v2/NotificationInboxV2.js +309 -0
  104. package/dist/navigation-v2/NotificationInboxV2.js.map +1 -0
  105. package/dist/navigation-v2/NotificationSettingsV2.d.ts +9 -0
  106. package/dist/navigation-v2/NotificationSettingsV2.js +203 -0
  107. package/dist/navigation-v2/NotificationSettingsV2.js.map +1 -0
  108. package/dist/navigation-v2/NotificationsV2Landing.d.ts +9 -0
  109. package/dist/navigation-v2/NotificationsV2Landing.js +37 -0
  110. package/dist/navigation-v2/NotificationsV2Landing.js.map +1 -0
  111. package/dist/navigation-v2/__tests__/uiMocks.d.ts +71 -0
  112. package/dist/navigation-v2/inboxFilters.d.ts +8 -0
  113. package/dist/navigation-v2/inboxFilters.js +10 -0
  114. package/dist/navigation-v2/inboxFilters.js.map +1 -0
  115. package/dist/navigation-v2/paths.d.ts +24 -0
  116. package/dist/navigation-v2/paths.js +31 -0
  117. package/dist/navigation-v2/paths.js.map +1 -0
  118. package/dist/navigation-v2/settingsOptions.d.ts +12 -0
  119. package/dist/navigation-v2/settingsOptions.js +58 -0
  120. package/dist/navigation-v2/settingsOptions.js.map +1 -0
  121. package/dist/navigation-v2/useAdminTools.d.ts +22 -0
  122. package/dist/navigation-v2/useAdminTools.js +76 -0
  123. package/dist/navigation-v2/useAdminTools.js.map +1 -0
  124. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js +1 -2
  125. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js.map +1 -1
  126. package/dist/node_modules/@apollo/client/errors/utils.js +1 -2
  127. package/dist/node_modules/@apollo/client/errors/utils.js.map +1 -1
  128. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +7 -8
  129. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -1
  130. package/dist/node_modules/@apollo/client/link/subscriptions/index.js +9 -10
  131. package/dist/node_modules/@apollo/client/link/subscriptions/index.js.map +1 -1
  132. package/dist/node_modules/@apollo/client/link/utils/createOperation.js +5 -6
  133. package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -1
  134. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +0 -1
  135. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -1
  136. package/dist/node_modules/@apollo/client/utilities/graphql/print.js +4 -5
  137. package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -1
  138. package/dist/node_modules/@apollo/client/utilities/internal/caches.js +1 -2
  139. package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -1
  140. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +1 -2
  141. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -1
  142. package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js +2 -3
  143. package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js.map +1 -1
  144. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +1 -2
  145. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -1
  146. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +1 -2
  147. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -1
  148. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +1 -2
  149. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -1
  150. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +1 -2
  151. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -1
  152. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +1 -2
  153. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -1
  154. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +1 -2
  155. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -1
  156. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +1 -2
  157. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -1
  158. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +1 -2
  159. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -1
  160. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +1 -2
  161. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -1
  162. package/dist/node_modules/@apollo/client/utilities/invariant/index.js +2 -3
  163. package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -1
  164. package/dist/node_modules/@apollo/client/version.js +2 -3
  165. package/dist/node_modules/@apollo/client/version.js.map +1 -1
  166. package/dist/node_modules/@wry/caches/lib/weak.js +1 -2
  167. package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -1
  168. package/dist/node_modules/@wry/trie/lib/index.js +2 -3
  169. package/dist/node_modules/@wry/trie/lib/index.js.map +1 -1
  170. package/dist/node_modules/graphql-ws/dist/client.js +76 -69
  171. package/dist/node_modules/graphql-ws/dist/client.js.map +1 -1
  172. package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js +2 -3
  173. package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js.map +1 -1
  174. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +2 -3
  175. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -1
  176. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +41 -42
  177. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -1
  178. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +14 -15
  179. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -1
  180. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +21 -18
  181. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -1
  182. package/dist/node_modules/rxjs/dist/esm5/internal/config.js +1 -2
  183. package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -1
  184. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +1 -2
  185. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -1
  186. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +2 -3
  187. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -1
  188. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +1 -2
  189. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -1
  190. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +1 -2
  191. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -1
  192. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +1 -2
  193. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -1
  194. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +1 -2
  195. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -1
  196. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +1 -2
  197. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -1
  198. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +1 -2
  199. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -1
  200. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +1 -2
  201. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -1
  202. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +1 -2
  203. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -1
  204. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +1 -2
  205. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -1
  206. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +1 -2
  207. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -1
  208. package/dist/node_modules/{rxjs/node_modules/tslib → tslib}/tslib.es6.js +1 -2
  209. package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
  210. package/dist/pages/CreateNotificationPage.d.ts +5 -0
  211. package/dist/pages/CreateNotificationPage.js +591 -573
  212. package/dist/pages/CreateNotificationPage.js.map +1 -1
  213. package/dist/pages/NotificationCenterPage.d.ts +8 -0
  214. package/dist/pages/NotificationCenterPage.js +87 -83
  215. package/dist/pages/NotificationCenterPage.js.map +1 -1
  216. package/dist/pages/NotificationHistoryAdminPage.d.ts +2 -0
  217. package/dist/pages/NotificationHistoryAdminPage.js +7 -8
  218. package/dist/pages/NotificationHistoryAdminPage.js.map +1 -1
  219. package/dist/pages/NotificationHistoryPage.d.ts +6 -0
  220. package/dist/pages/NotificationHistoryPage.js +59 -55
  221. package/dist/pages/NotificationHistoryPage.js.map +1 -1
  222. package/dist/pages/NotificationLandingPage.d.ts +10 -0
  223. package/dist/pages/NotificationLandingPage.js +5 -6
  224. package/dist/pages/NotificationLandingPage.js.map +1 -1
  225. package/dist/pages/NotificationPreferencesPage.d.ts +5 -0
  226. package/dist/pages/NotificationPreferencesPage.js +97 -159
  227. package/dist/pages/NotificationPreferencesPage.js.map +1 -1
  228. package/dist/pages/NotificationTemplatesPage.d.ts +7 -0
  229. package/dist/pages/NotificationTemplatesPage.js +192 -172
  230. package/dist/pages/NotificationTemplatesPage.js.map +1 -1
  231. package/dist/pages/NotificationTopicsPage.d.ts +1 -0
  232. package/dist/pages/NotificationTopicsPage.js +126 -112
  233. package/dist/pages/NotificationTopicsPage.js.map +1 -1
  234. package/dist/pages/TemplateEditorPage.d.ts +12 -0
  235. package/dist/pages/TemplateEditorPage.js +381 -341
  236. package/dist/pages/TemplateEditorPage.js.map +1 -1
  237. package/dist/providers/NotificationProvider.d.ts +11 -0
  238. package/dist/providers/NotificationProvider.js +7 -7
  239. package/dist/providers/NotificationProvider.js.map +1 -1
  240. package/dist/shared/hooks/useTr.d.ts +13 -0
  241. package/dist/shared/hooks/useTr.js +1 -2
  242. package/dist/shared/hooks/useTr.js.map +1 -1
  243. package/dist/store/notificationStore.d.ts +30 -0
  244. package/dist/store/notificationStore.js +1 -2
  245. package/dist/store/notificationStore.js.map +1 -1
  246. package/dist/test/happydom.d.ts +1 -0
  247. package/dist/translations/en.d.ts +468 -0
  248. package/dist/types/index.d.ts +257 -0
  249. package/dist/utils/inAppNavigation.d.ts +37 -0
  250. package/dist/utils/inAppNavigation.js +2 -3
  251. package/dist/utils/inAppNavigation.js.map +1 -1
  252. package/dist/utils/index.d.ts +68 -0
  253. package/dist/utils/index.js +1 -2
  254. package/dist/utils/index.js.map +1 -1
  255. package/dist/utils/nativeBridge.d.ts +2 -0
  256. package/dist/utils/nativeBridge.js +1 -2
  257. package/dist/utils/notificationHistoryExport.d.ts +12 -0
  258. package/dist/utils/notificationHistoryExport.js +1 -2
  259. package/dist/utils/notificationHistoryExport.js.map +1 -1
  260. package/package.json +67 -49
  261. package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +0 -1
@@ -1,353 +1,373 @@
1
- import { useTr as e } from "../shared/hooks/useTr.js";
2
- import { nativeConfirm as t, nativeImpact as n, nativeNotify as r } from "../utils/nativeBridge.js";
3
- import { NOTIFICATION_PERMISSIONS as i } from "../constants/permissions.js";
4
- import { useNotificationTemplates as a } from "../hooks/useNotificationTemplates.js";
5
- import { useMemo as o, useState as s } from "react";
6
- import { usePermissions as c } from "@burdenoff/fe-libs/shared/providers/shell";
7
- import { AlertCircle as l, FileText as u, Loader2 as d, Plus as f, RefreshCw as p, Search as m, Trash2 as h } from "lucide-react";
8
- import { useNavigate as g } from "react-router";
9
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
10
- import { Button as y, EmphasisPanel as b, GlassCard as x, IllustratedEmptyState as S, NextSteps as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
11
- import { useI18n as T } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
- //#region src/pages/NotificationTemplatesPage.tsx
13
- var ee = {
1
+ import { useNotificationTemplates as e } from "../hooks/useNotificationTemplates.js";
2
+ import { NOTIFICATION_PERMISSIONS as t } from "../constants/permissions.js";
3
+ import { useTr as n } from "../shared/hooks/useTr.js";
4
+ import { nativeConfirm as r, nativeImpact as i, nativeNotify as a } from "../utils/nativeBridge.js";
5
+ import { ConfirmDeleteDialog as o } from "../components/ConfirmDeleteDialog.js";
6
+ import { useNavigationV2 as s, useNotificationPaths as c } from "../navigation-v2/paths.js";
7
+ import { useMemo as ee, useState as l } from "react";
8
+ import { usePermissions as te } from "@burdenoff/fe-libs/shared/providers/shell";
9
+ import { AlertCircle as u, FileText as d, Loader2 as f, Plus as p, RefreshCw as ne, Search as re, Trash2 as m } from "lucide-react";
10
+ import { useNavigate as ie } from "react-router";
11
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
12
+ import { Button as _, EmphasisPanel as v, GlassCard as y, IllustratedEmptyState as b, NextSteps as ae, PagePurpose as oe } from "@burdenoff/fe-libs/ui";
13
+ import { useI18n as x } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
+ // src/pages/NotificationTemplatesPage.tsx
15
+ var S = {
14
16
  TRANSACTIONAL: "text-status-info-text bg-status-info-bg-subtle border-status-info-bg-subtle",
15
17
  MARKETING: "text-accent-purple bg-accent-purple-subtle border-accent-purple-subtle",
16
18
  SYSTEM: "text-status-warning-text bg-status-warning-bg-subtle border-status-warning-bg-subtle",
17
19
  ALERT: "text-status-error-text bg-status-error-bg-subtle border-status-error-bg-subtle"
18
- }, te = {
20
+ }, se = {
19
21
  TRANSACTIONAL: "Transactional",
20
22
  MARKETING: "Marketing",
21
23
  SYSTEM: "System",
22
24
  ALERT: "Alert"
23
25
  };
24
- function E(e, t) {
26
+ function C(e, t) {
25
27
  return new Date(e).toLocaleDateString(t || "en-US", {
26
28
  month: "short",
27
29
  day: "numeric",
28
30
  year: "numeric"
29
31
  });
30
32
  }
31
- function D() {
32
- let D = g(), O = e(), { locale: k } = T(), { hasPermission: A, isLoading: j } = c(), { templates: M, isLoading: N, isDeleting: P, error: F, total: I, hasMore: L, filter: R, refetch: z, loadMore: B, deleteTemplate: V, updateFilter: H } = a(), [U, W] = s(null), [G, K] = s(null), [q, J] = s(/* @__PURE__ */ new Set()), Y = o(() => M.filter((e) => q.has(e.id)), [q, M]), X = M.length > 0 && M.every((e) => q.has(e.id)), Z = M.some((e) => q.has(e.id)) && !X, Q = A(i.TEMPLATE_CREATE), $ = A(i.TEMPLATE_DELETE), ne = async (e, i) => {
33
- e.stopPropagation(), n("medium");
34
- let a = O("notifTemplates.confirmDelete", `Delete template "${i.name}"? This cannot be undone.`), o = await t({
35
- title: O("notifTemplates.deleteTitle", "Delete template"),
36
- message: a,
37
- okButtonTitle: O("notifTemplates.delete", "Delete")
33
+ function w() {
34
+ let w = ie(), T = n(), E = c(), D = s(), [O, k] = l(null), A = (e, t) => D ? new Promise((n) => k({
35
+ title: e,
36
+ message: t,
37
+ resolve: n
38
+ })) : Promise.resolve(window.confirm(t)), { locale: j } = x(), { hasPermission: M, isLoading: ce } = te(), { templates: N, isLoading: P, isDeleting: F, error: I, total: L, hasMore: R, filter: z, refetch: B, loadMore: V, deleteTemplate: H, updateFilter: U } = e(), [W, G] = l(null), [K, q] = l(null), [J, Y] = l(/* @__PURE__ */ new Set()), X = ee(() => N.filter((e) => J.has(e.id)), [J, N]), Z = N.length > 0 && N.every((e) => J.has(e.id)), le = N.some((e) => J.has(e.id)) && !Z, Q = M(t.TEMPLATE_CREATE), $ = M(t.TEMPLATE_DELETE), ue = async (e, t) => {
39
+ e.stopPropagation(), i("medium");
40
+ let n = T("notifTemplates.confirmDelete", `Delete template "${t.name}"? This cannot be undone.`), o = await r({
41
+ title: T("notifTemplates.deleteTitle", "Delete template"),
42
+ message: n,
43
+ okButtonTitle: T("notifTemplates.delete", "Delete")
38
44
  });
39
- if (o === null ? confirm(a) : o) {
40
- W(i.id), K(null);
45
+ if (o === null ? await A(T("notifTemplates.deleteTitle", "Delete template"), n) : o) {
46
+ G(t.id), q(null);
41
47
  try {
42
- await V(i.id), r("success");
48
+ await H(t.id), a("success");
43
49
  } catch (e) {
44
- r("error"), K(e instanceof Error ? e.message : O("notifTemplates.deleteFailed", "Failed to delete template"));
50
+ a("error"), q(e instanceof Error ? e.message : T("notifTemplates.deleteFailed", "Failed to delete template"));
45
51
  } finally {
46
- W(null);
52
+ G(null);
47
53
  }
48
54
  }
49
- }, re = async () => {
50
- if (Y.length === 0) return;
51
- n("medium");
52
- let e = O("notifTemplates.confirmBulkDelete", `Delete ${Y.length} selected template${Y.length === 1 ? "" : "s"}? This cannot be undone.`), i = await t({
53
- title: O("notifTemplates.bulkDeleteTitle", "Delete templates"),
55
+ }, de = async () => {
56
+ if (X.length === 0) return;
57
+ i("medium");
58
+ let e = T("notifTemplates.confirmBulkDelete", `Delete ${X.length} selected template${X.length === 1 ? "" : "s"}? This cannot be undone.`), t = await r({
59
+ title: T("notifTemplates.bulkDeleteTitle", "Delete templates"),
54
60
  message: e,
55
- okButtonTitle: O("notifTemplates.delete", "Delete")
61
+ okButtonTitle: T("notifTemplates.delete", "Delete")
56
62
  });
57
- (i === null ? window.confirm(e) : i) && (K(null), r((await Promise.allSettled(Y.map((e) => V(e.id)))).some((e) => e.status === "rejected") ? "error" : "success"), J(/* @__PURE__ */ new Set()));
58
- }, ie = (e, t) => {
59
- J((n) => {
63
+ if (!(t === null ? await A(T("notifTemplates.bulkDeleteTitle", "Delete templates"), e) : t)) return;
64
+ q(null);
65
+ let n = (await Promise.allSettled(X.map((e) => H(e.id)))).some((e) => e.status === "rejected");
66
+ a(n ? "error" : "success"), Y(/* @__PURE__ */ new Set());
67
+ }, fe = (e, t) => {
68
+ Y((n) => {
60
69
  let r = new Set(n);
61
70
  return t ? r.add(e) : r.delete(e), r;
62
71
  });
63
- }, ae = (e) => {
64
- J((t) => {
72
+ }, pe = (e) => {
73
+ Y((t) => {
65
74
  let n = new Set(t);
66
- return M.forEach((t) => {
75
+ return N.forEach((t) => {
67
76
  e ? n.add(t.id) : n.delete(t.id);
68
77
  }), n;
69
78
  });
70
79
  };
71
- return j ? /* @__PURE__ */ _("div", {
80
+ return ce ? /* @__PURE__ */ h("div", {
72
81
  className: "flex h-64 items-center justify-center",
73
- children: /* @__PURE__ */ _("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
74
- }) : A(i.TEMPLATE_LIST) || Q || $ || A(i.TEMPLATE_UPDATE) ? N && M.length === 0 ? /* @__PURE__ */ v("div", {
82
+ children: /* @__PURE__ */ h("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
83
+ }) : M(t.TEMPLATE_LIST) || Q || $ || M(t.TEMPLATE_UPDATE) ? P && N.length === 0 ? /* @__PURE__ */ g("div", {
75
84
  className: "flex flex-col items-center justify-center h-64 gap-3",
76
- children: [/* @__PURE__ */ _(d, {
85
+ children: [/* @__PURE__ */ h(f, {
77
86
  size: 28,
78
87
  className: "animate-spin text-accent-primary"
79
- }), /* @__PURE__ */ _("p", {
88
+ }), /* @__PURE__ */ h("p", {
80
89
  className: "text-sm text-secondary",
81
- children: O("notifTemplates.loading", "Loading templates...")
90
+ children: T("notifTemplates.loading", "Loading templates...")
82
91
  })]
83
- }) : F && M.length === 0 ? /* @__PURE__ */ v("div", {
92
+ }) : I && N.length === 0 ? /* @__PURE__ */ g("div", {
84
93
  className: "flex flex-col items-center justify-center h-64 gap-4",
85
94
  children: [
86
- /* @__PURE__ */ _(l, {
95
+ /* @__PURE__ */ h(u, {
87
96
  size: 28,
88
97
  className: "text-error"
89
98
  }),
90
- /* @__PURE__ */ _("p", {
99
+ /* @__PURE__ */ h("p", {
91
100
  className: "text-sm text-error",
92
- children: F
101
+ children: I
93
102
  }),
94
- /* @__PURE__ */ v("button", {
95
- onClick: z,
103
+ /* @__PURE__ */ g("button", {
104
+ onClick: B,
96
105
  className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-accent-primary hover:bg-accent-primary/90 rounded-lg transition-all duration-150",
97
- children: [/* @__PURE__ */ _(p, { size: 14 }), O("notifTemplates.retry", "Retry")]
106
+ children: [/* @__PURE__ */ h(ne, { size: 14 }), T("notifTemplates.retry", "Retry")]
98
107
  })
99
108
  ]
100
- }) : /* @__PURE__ */ v("div", {
109
+ }) : /* @__PURE__ */ g("div", {
101
110
  className: "space-y-4 sm:space-y-6 p-3 sm:p-6 animate-in fade-in duration-200",
102
111
  children: [
103
- /* @__PURE__ */ _(w, {
104
- icon: /* @__PURE__ */ _(u, { size: 16 }),
105
- children: O("notifTemplates.purpose", "Reusable, versioned message blueprints — subject lines, bodies and channel layouts with {{variables}} you fill in at send time. Build a template once (e.g. a welcome email or a payment receipt) and reuse it from the Send page so every notification stays on-brand and consistent.")
112
+ /* @__PURE__ */ h(oe, {
113
+ icon: /* @__PURE__ */ h(d, { size: 16 }),
114
+ children: T("notifTemplates.purpose", "Reusable, versioned message blueprints — subject lines, bodies and channel layouts with {{variables}} you fill in at send time. Build a template once (e.g. a welcome email or a payment receipt) and reuse it from the Send page so every notification stays on-brand and consistent.")
106
115
  }),
107
- /* @__PURE__ */ v(b, {
116
+ /* @__PURE__ */ g(v, {
108
117
  className: "flex flex-col gap-4 p-5 sm:flex-row sm:items-center sm:justify-between sm:p-6",
109
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h1", {
118
+ children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
110
119
  className: "text-xl sm:text-2xl font-bold text-primary",
111
- children: O("notifTemplates.title", "Notification Templates")
112
- }), /* @__PURE__ */ v("p", {
120
+ children: T("notifTemplates.title", "Notification Templates")
121
+ }), /* @__PURE__ */ g("p", {
113
122
  className: "text-sm text-secondary mt-1",
114
123
  children: [
115
- I,
124
+ L,
116
125
  " ",
117
- O("notifTemplates.templateCount", "template"),
118
- I === 1 ? "" : "s",
126
+ T("notifTemplates.templateCount", "template"),
127
+ L === 1 ? "" : "s",
119
128
  " ",
120
- O("notifTemplates.total", "total")
129
+ T("notifTemplates.total", "total")
121
130
  ]
122
- })] }), Q && /* @__PURE__ */ v(y, {
123
- onClick: () => D("new"),
131
+ })] }), Q && /* @__PURE__ */ g(_, {
132
+ onClick: () => w(E.newTemplate),
124
133
  className: "gap-2",
125
- children: [/* @__PURE__ */ _(f, { size: 16 }), O("notifTemplates.createTemplate", "Create Template")]
134
+ children: [/* @__PURE__ */ h(p, { size: 16 }), T("notifTemplates.createTemplate", "Create Template")]
126
135
  })]
127
136
  }),
128
- /* @__PURE__ */ _(C, {
137
+ /* @__PURE__ */ h(ae, {
129
138
  storageKey: "notification-templates",
130
139
  steps: [
131
140
  ...Q ? [{
132
141
  id: "create-template",
133
- label: O("notifTemplates.nextCreateLabel", "Create your first template"),
134
- description: O("notifTemplates.nextCreateDesc", "Build a reusable message blueprint with {{variables}} you fill in at send time."),
135
- onClick: () => D("new")
142
+ label: T("notifTemplates.nextCreateLabel", "Create your first template"),
143
+ description: T("notifTemplates.nextCreateDesc", "Build a reusable message blueprint with {{variables}} you fill in at send time."),
144
+ onClick: () => w(E.newTemplate)
136
145
  }] : [],
137
146
  {
138
147
  id: "filter-type",
139
- label: O("notifTemplates.nextFilterLabel", "Filter by type"),
140
- description: O("notifTemplates.nextFilterDesc", "Narrow to Transactional, Marketing, System or Alert templates to find one fast."),
141
- onClick: () => H({ type: "TRANSACTIONAL" })
148
+ label: T("notifTemplates.nextFilterLabel", "Filter by type"),
149
+ description: T("notifTemplates.nextFilterDesc", "Narrow to Transactional, Marketing, System or Alert templates to find one fast."),
150
+ onClick: () => U({ type: "TRANSACTIONAL" })
142
151
  },
143
152
  {
144
153
  id: "use-on-send",
145
- label: O("notifTemplates.nextUseLabel", "Send with a template"),
146
- description: O("notifTemplates.nextUseDesc", "Pick any saved template from the Send page so every notification stays on-brand."),
147
- href: "../send"
154
+ label: T("notifTemplates.nextUseLabel", "Send with a template"),
155
+ description: T("notifTemplates.nextUseDesc", "Pick any saved template from the Send page so every notification stays on-brand."),
156
+ href: E.send
148
157
  }
149
158
  ]
150
159
  }),
151
- /* @__PURE__ */ v("div", {
160
+ /* @__PURE__ */ g("div", {
152
161
  className: "flex flex-col gap-3 sm:flex-row sm:items-center",
153
- children: [/* @__PURE__ */ v("div", {
162
+ children: [/* @__PURE__ */ g("div", {
154
163
  className: "relative flex-1",
155
- children: [/* @__PURE__ */ _(m, {
164
+ children: [/* @__PURE__ */ h(re, {
156
165
  size: 16,
157
166
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-tertiary"
158
- }), /* @__PURE__ */ _("input", {
167
+ }), /* @__PURE__ */ h("input", {
159
168
  type: "text",
160
- value: R.search || "",
161
- onChange: (e) => H({ search: e.target.value }),
162
- placeholder: O("notifTemplates.searchPlaceholder", "Search templates..."),
169
+ value: z.search || "",
170
+ onChange: (e) => U({ search: e.target.value }),
171
+ placeholder: T("notifTemplates.searchPlaceholder", "Search templates..."),
163
172
  className: "w-full pl-9 pr-4 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150"
164
173
  })]
165
- }), /* @__PURE__ */ v("select", {
166
- value: R.type || "",
167
- onChange: (e) => H({ type: e.target.value || void 0 }),
174
+ }), /* @__PURE__ */ g("select", {
175
+ value: z.type || "",
176
+ onChange: (e) => U({ type: e.target.value || void 0 }),
168
177
  className: "px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
169
178
  children: [
170
- /* @__PURE__ */ _("option", {
179
+ /* @__PURE__ */ h("option", {
171
180
  value: "",
172
- children: O("notifTemplates.allTypes", "All Types")
181
+ children: T("notifTemplates.allTypes", "All Types")
173
182
  }),
174
- /* @__PURE__ */ _("option", {
183
+ /* @__PURE__ */ h("option", {
175
184
  value: "TRANSACTIONAL",
176
- children: O("notifTemplates.typeTransactional", "Transactional")
185
+ children: T("notifTemplates.typeTransactional", "Transactional")
177
186
  }),
178
- /* @__PURE__ */ _("option", {
187
+ /* @__PURE__ */ h("option", {
179
188
  value: "MARKETING",
180
- children: O("notifTemplates.typeMarketing", "Marketing")
189
+ children: T("notifTemplates.typeMarketing", "Marketing")
181
190
  }),
182
- /* @__PURE__ */ _("option", {
191
+ /* @__PURE__ */ h("option", {
183
192
  value: "SYSTEM",
184
- children: O("notifTemplates.typeSystem", "System")
193
+ children: T("notifTemplates.typeSystem", "System")
185
194
  }),
186
- /* @__PURE__ */ _("option", {
195
+ /* @__PURE__ */ h("option", {
187
196
  value: "ALERT",
188
- children: O("notifTemplates.typeAlert", "Alert")
197
+ children: T("notifTemplates.typeAlert", "Alert")
189
198
  })
190
199
  ]
191
200
  })]
192
201
  }),
193
- M.length > 0 && /* @__PURE__ */ v(x, {
202
+ N.length > 0 && /* @__PURE__ */ g(y, {
194
203
  treatment: "plain",
195
204
  className: "flex flex-col gap-3 border-border-seam p-4 sm:flex-row sm:items-center sm:justify-between",
196
- children: [/* @__PURE__ */ v("label", {
205
+ children: [/* @__PURE__ */ g("label", {
197
206
  className: "flex items-center gap-2 text-sm text-primary",
198
- children: [/* @__PURE__ */ _("input", {
207
+ children: [/* @__PURE__ */ h("input", {
199
208
  type: "checkbox",
200
- checked: X,
209
+ checked: Z,
201
210
  ref: (e) => {
202
- e && (e.indeterminate = Z && !X);
211
+ e && (e.indeterminate = le && !Z);
203
212
  },
204
- onChange: (e) => ae(e.target.checked),
205
- "aria-label": O("notifTemplates.selectAllVisibleAria", "Select all notification templates"),
213
+ onChange: (e) => pe(e.target.checked),
214
+ "aria-label": T("notifTemplates.selectAllVisibleAria", "Select all notification templates"),
206
215
  className: "h-4 w-4 rounded border-default text-accent-primary"
207
- }), /* @__PURE__ */ _("span", { children: O("notifTemplates.selectAllVisible", "Select all visible") })]
208
- }), /* @__PURE__ */ v("div", {
216
+ }), /* @__PURE__ */ h("span", { children: T("notifTemplates.selectAllVisible", "Select all visible") })]
217
+ }), /* @__PURE__ */ g("div", {
209
218
  className: "flex items-center gap-2",
210
219
  children: [
211
- /* @__PURE__ */ v("span", {
220
+ /* @__PURE__ */ g("span", {
212
221
  className: "text-sm text-secondary",
213
222
  children: [
214
- q.size,
223
+ J.size,
215
224
  " ",
216
- O("notifTemplates.selected", "selected")
225
+ T("notifTemplates.selected", "selected")
217
226
  ]
218
227
  }),
219
- q.size > 0 && /* @__PURE__ */ _("button", {
220
- onClick: () => J(/* @__PURE__ */ new Set()),
228
+ J.size > 0 && /* @__PURE__ */ h("button", {
229
+ onClick: () => Y(/* @__PURE__ */ new Set()),
221
230
  className: "text-sm text-secondary hover:text-primary",
222
- children: O("notifTemplates.clearSelection", "Clear selection")
231
+ children: T("notifTemplates.clearSelection", "Clear selection")
223
232
  }),
224
- $ && /* @__PURE__ */ v("button", {
225
- onClick: re,
226
- disabled: Y.length === 0 || P,
233
+ $ && /* @__PURE__ */ g("button", {
234
+ onClick: de,
235
+ disabled: X.length === 0 || F,
227
236
  className: "flex items-center gap-2 px-3 py-2 text-sm font-medium text-error border border-error/30 hover:bg-error/10 rounded-lg transition-all duration-150 disabled:opacity-50",
228
237
  children: [
229
- /* @__PURE__ */ _(h, { size: 14 }),
230
- O("notifTemplates.deleteSelected", "Delete Selected"),
231
- Y.length > 0 ? ` (${Y.length})` : ""
238
+ /* @__PURE__ */ h(m, { size: 14 }),
239
+ T("notifTemplates.deleteSelected", "Delete Selected"),
240
+ X.length > 0 ? ` (${X.length})` : ""
232
241
  ]
233
242
  })
234
243
  ]
235
244
  })]
236
245
  }),
237
- G && /* @__PURE__ */ v("div", {
246
+ K && /* @__PURE__ */ g("div", {
238
247
  className: "flex items-center gap-3 p-3 bg-error/10 border border-error/30 rounded-lg",
239
- children: [/* @__PURE__ */ _(l, {
248
+ children: [/* @__PURE__ */ h(u, {
240
249
  size: 16,
241
250
  className: "text-error shrink-0"
242
- }), /* @__PURE__ */ _("p", {
251
+ }), /* @__PURE__ */ h("p", {
243
252
  className: "text-sm text-error",
244
- children: G
253
+ children: K
245
254
  })]
246
255
  }),
247
- M.length === 0 && !N && /* @__PURE__ */ _(S, {
248
- illustration: R.search || R.type ? "empty-search" : "empty-files",
249
- title: R.search || R.type ? O("notifTemplates.noMatchingTemplates", "No templates match your filters") : O("notifTemplates.noTemplatesYet", "No templates yet. Create your first one!"),
250
- description: R.search || R.type ? O("notifications.adjustSearchOrDateRange", "Try adjusting your filters") : O("notifTemplates.noTemplatesDescription", "Reusable templates let you send consistent notifications fast."),
251
- action: !R.search && !R.type && Q ? /* @__PURE__ */ v(y, {
252
- onClick: () => D("new"),
256
+ N.length === 0 && !P && /* @__PURE__ */ h(b, {
257
+ illustration: z.search || z.type ? "empty-search" : "empty-files",
258
+ title: z.search || z.type ? T("notifTemplates.noMatchingTemplates", "No templates match your filters") : T("notifTemplates.noTemplatesYet", "No templates yet. Create your first one!"),
259
+ description: z.search || z.type ? T("notifications.adjustSearchOrDateRange", "Try adjusting your filters") : T("notifTemplates.noTemplatesDescription", "Reusable templates let you send consistent notifications fast."),
260
+ action: !z.search && !z.type && Q ? /* @__PURE__ */ g(_, {
261
+ onClick: () => w(E.newTemplate),
253
262
  className: "gap-2",
254
- children: [/* @__PURE__ */ _(f, { size: 16 }), O("notifTemplates.createTemplate", "Create Template")]
263
+ children: [/* @__PURE__ */ h(p, { size: 16 }), T("notifTemplates.createTemplate", "Create Template")]
255
264
  }) : void 0
256
265
  }),
257
- /* @__PURE__ */ _("div", {
266
+ /* @__PURE__ */ h("div", {
258
267
  className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
259
- children: M.map((e) => /* @__PURE__ */ v("div", {
260
- onClick: () => D(e.slug),
261
- className: `group relative p-4 bg-gloss-card border rounded-lg cursor-pointer transition-[box-shadow,border-color] duration-200 hover:shadow-[var(--shadow-pop)] hover:border-accent-primary/30 ${q.has(e.id) ? "border-accent-primary/50 ring-1 ring-accent-primary/20" : "border-border-seam"}`,
268
+ children: N.map((e) => /* @__PURE__ */ g("div", {
269
+ onClick: () => w(E.template(e.slug)),
270
+ className: `group relative p-4 bg-gloss-card border rounded-lg cursor-pointer transition-[box-shadow,border-color] duration-200 hover:shadow-[var(--shadow-pop)] hover:border-accent-primary/30 ${J.has(e.id) ? "border-accent-primary/50 ring-1 ring-accent-primary/20" : "border-border-seam"}`,
262
271
  children: [
263
- /* @__PURE__ */ v("div", {
272
+ /* @__PURE__ */ g("div", {
264
273
  className: "flex items-start justify-between mb-3",
265
- children: [/* @__PURE__ */ v("div", {
274
+ children: [/* @__PURE__ */ g("div", {
266
275
  className: "flex items-center gap-2",
267
- children: [/* @__PURE__ */ _("input", {
276
+ children: [/* @__PURE__ */ h("input", {
268
277
  type: "checkbox",
269
- checked: q.has(e.id),
278
+ checked: J.has(e.id),
270
279
  onChange: (t) => {
271
- t.stopPropagation(), ie(e.id, t.target.checked);
280
+ t.stopPropagation(), fe(e.id, t.target.checked);
272
281
  },
273
282
  onClick: (e) => e.stopPropagation(),
274
- "aria-label": O("notifTemplates.selectTemplateAria", "Select template {{name}}").replace("{{name}}", e.name),
283
+ "aria-label": T("notifTemplates.selectTemplateAria", "Select template {{name}}").replace("{{name}}", e.name),
275
284
  className: "h-4 w-4 rounded border-default text-accent-primary"
276
- }), /* @__PURE__ */ _(u, {
285
+ }), /* @__PURE__ */ h(d, {
277
286
  size: 20,
278
287
  className: "text-accent-primary"
279
288
  })]
280
- }), /* @__PURE__ */ v("div", {
289
+ }), /* @__PURE__ */ g("div", {
281
290
  className: "flex items-center gap-2",
282
- children: [/* @__PURE__ */ _("span", {
283
- className: `px-2 py-0.5 text-[10px] font-semibold rounded-full border ${ee[e.type] || "text-tertiary bg-bg-sunken border-default"}`,
284
- children: O(`notifTemplates.type.${e.type}`, te[e.type] || e.type)
285
- }), $ && /* @__PURE__ */ _("button", {
286
- onClick: (t) => ne(t, e),
287
- disabled: P && U === e.id,
291
+ children: [/* @__PURE__ */ h("span", {
292
+ className: `px-2 py-0.5 text-[10px] font-semibold rounded-full border ${S[e.type] || "text-tertiary bg-bg-sunken border-default"}`,
293
+ children: T(`notifTemplates.type.${e.type}`, se[e.type] || e.type)
294
+ }), $ && /* @__PURE__ */ h("button", {
295
+ onClick: (t) => ue(t, e),
296
+ disabled: F && W === e.id,
288
297
  className: "opacity-0 group-hover:opacity-100 p-1 text-tertiary hover:text-error rounded transition-all duration-150",
289
- title: O("notifTemplates.deleteTemplate", "Delete template"),
290
- children: P && U === e.id ? /* @__PURE__ */ _(d, {
298
+ title: T("notifTemplates.deleteTemplate", "Delete template"),
299
+ children: F && W === e.id ? /* @__PURE__ */ h(f, {
291
300
  size: 14,
292
301
  className: "animate-spin"
293
- }) : /* @__PURE__ */ _(h, { size: 14 })
302
+ }) : /* @__PURE__ */ h(m, { size: 14 })
294
303
  })]
295
304
  })]
296
305
  }),
297
- /* @__PURE__ */ _("h3", {
306
+ /* @__PURE__ */ h("h3", {
298
307
  className: "text-sm font-semibold text-primary mb-1 truncate",
299
308
  children: e.name
300
309
  }),
301
- e.description && /* @__PURE__ */ _("p", {
310
+ e.description && /* @__PURE__ */ h("p", {
302
311
  className: "text-xs text-secondary mb-2 line-clamp-2",
303
312
  children: e.description
304
313
  }),
305
- /* @__PURE__ */ v("div", {
314
+ /* @__PURE__ */ g("div", {
306
315
  className: "flex items-center gap-2 text-[11px] text-tertiary mt-auto pt-2 border-t border-default/50",
307
316
  children: [
308
- /* @__PURE__ */ _("code", {
317
+ /* @__PURE__ */ h("code", {
309
318
  className: "px-1.5 py-0.5 bg-bg-sunken rounded text-[10px]",
310
319
  children: e.slug
311
320
  }),
312
- /* @__PURE__ */ _("span", { children: "•" }),
313
- /* @__PURE__ */ _("span", { children: e.locale || "en" }),
314
- /* @__PURE__ */ _("span", { children: "•" }),
315
- /* @__PURE__ */ _("span", {
321
+ /* @__PURE__ */ h("span", { children: "•" }),
322
+ /* @__PURE__ */ h("span", { children: e.locale || "en" }),
323
+ /* @__PURE__ */ h("span", { children: "•" }),
324
+ /* @__PURE__ */ h("span", {
316
325
  className: e.enabled ? "text-success" : "text-tertiary",
317
- children: e.enabled ? O("notifTemplates.enabled", "Enabled") : O("notifTemplates.disabled", "Disabled")
326
+ children: e.enabled ? T("notifTemplates.enabled", "Enabled") : T("notifTemplates.disabled", "Disabled")
318
327
  })
319
328
  ]
320
329
  }),
321
- /* @__PURE__ */ v("p", {
330
+ /* @__PURE__ */ g("p", {
322
331
  className: "text-[10px] text-tertiary mt-1.5",
323
332
  children: [
324
- O("notifTemplates.updated", "Updated"),
333
+ T("notifTemplates.updated", "Updated"),
325
334
  " ",
326
- E(e.updatedAt, k)
335
+ C(e.updatedAt, j)
327
336
  ]
328
337
  })
329
338
  ]
330
339
  }, e.id))
331
340
  }),
332
- L && /* @__PURE__ */ _("div", {
341
+ R && /* @__PURE__ */ h("div", {
333
342
  className: "flex justify-center pt-2",
334
- children: /* @__PURE__ */ v("button", {
335
- onClick: B,
336
- disabled: N,
343
+ children: /* @__PURE__ */ g("button", {
344
+ onClick: V,
345
+ disabled: P,
337
346
  className: "flex items-center gap-2 px-4 py-2 text-sm text-secondary hover:text-primary border border-default rounded-lg transition-all duration-150 hover:shadow-sm",
338
- children: [N ? /* @__PURE__ */ _(d, {
347
+ children: [P ? /* @__PURE__ */ h(f, {
339
348
  size: 14,
340
349
  className: "animate-spin"
341
- }) : null, O("notifTemplates.loadMore", "Load More")]
350
+ }) : null, T("notifTemplates.loadMore", "Load More")]
342
351
  })
352
+ }),
353
+ D && /* @__PURE__ */ h(o, {
354
+ open: O !== null,
355
+ title: O?.title ?? "",
356
+ description: O?.message ?? "",
357
+ confirmLabel: T("notifTemplates.delete", "Delete"),
358
+ onCancel: () => {
359
+ O?.resolve(!1), k(null);
360
+ },
361
+ onConfirm: () => {
362
+ O?.resolve(!0), k(null);
363
+ }
343
364
  })
344
365
  ]
345
- }) : /* @__PURE__ */ _("div", {
366
+ }) : /* @__PURE__ */ h("div", {
346
367
  className: "p-8 text-center text-text-secondary",
347
- children: O("notifTemplates.noPermissionView", "You don't have permission to view notification templates.")
368
+ children: T("notifTemplates.noPermissionView", "You don't have permission to view notification templates.")
348
369
  });
349
370
  }
350
- //#endregion
351
- export { D as NotificationTemplatesPage };
371
+ export { w as NotificationTemplatesPage };
352
372
 
353
373
  //# sourceMappingURL=NotificationTemplatesPage.js.map