@burdenoff/microfe-integrations 2026.1107.2 → 2026.1109.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 (247) hide show
  1. package/dist/dev/main.d.ts +0 -2
  2. package/dist/generated/global-operations.d.ts +4 -2
  3. package/dist/generated/global-types.d.ts +2 -22
  4. package/dist/generated/wspace-operations.d.ts +995 -705
  5. package/dist/generated/wspace-operations.js +180 -167
  6. package/dist/generated/wspace-operations.js.map +1 -1
  7. package/dist/generated/wspace-types.d.ts +4 -24
  8. package/dist/generated/wspace-types.js +1 -2
  9. package/dist/generated/wspace-types.js.map +1 -1
  10. package/dist/index.d.ts +0 -1
  11. package/dist/integrations/ConnectSourceDialog.d.ts +0 -2
  12. package/dist/integrations/ConnectSourceDialog.js +13 -14
  13. package/dist/integrations/ConnectSourceDialog.js.map +1 -1
  14. package/dist/integrations/ConnectionsPanel.d.ts +0 -2
  15. package/dist/integrations/ConnectionsPanel.js +5 -6
  16. package/dist/integrations/ConnectionsPanel.js.map +1 -1
  17. package/dist/integrations/IntegrationsAdminRoot.d.ts +0 -2
  18. package/dist/integrations/IntegrationsAdminRoot.js +14 -11
  19. package/dist/integrations/IntegrationsAdminRoot.js.map +1 -1
  20. package/dist/integrations/IntegrationsAdminRoutes.d.ts +1 -2
  21. package/dist/integrations/IntegrationsAdminRoutes.js +1 -2
  22. package/dist/integrations/IntegrationsAdminRoutes.js.map +1 -1
  23. package/dist/integrations/IntegrationsRoot.d.ts +0 -2
  24. package/dist/integrations/IntegrationsRoot.js +9 -6
  25. package/dist/integrations/IntegrationsRoot.js.map +1 -1
  26. package/dist/integrations/IntegrationsUserRoutes.d.ts +1 -2
  27. package/dist/integrations/IntegrationsUserRoutes.js +7 -8
  28. package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
  29. package/dist/integrations/components/AddConnectionDialog.d.ts +1 -3
  30. package/dist/integrations/components/AddConnectionDialog.js +12 -15
  31. package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
  32. package/dist/integrations/components/AuthMethodsEditor.d.ts +0 -2
  33. package/dist/integrations/components/AuthMethodsEditor.js +1 -2
  34. package/dist/integrations/components/AuthMethodsEditor.js.map +1 -1
  35. package/dist/integrations/components/ConfirmDialog.d.ts +1 -3
  36. package/dist/integrations/components/ConfirmDialog.js +1 -2
  37. package/dist/integrations/components/ConfirmDialog.js.map +1 -1
  38. package/dist/integrations/components/ConnectionCard.d.ts +0 -2
  39. package/dist/integrations/components/ConnectionCard.js +9 -10
  40. package/dist/integrations/components/ConnectionCard.js.map +1 -1
  41. package/dist/integrations/components/ConnectionModalFrame.d.ts +0 -2
  42. package/dist/integrations/components/ConnectionModalFrame.js +2 -3
  43. package/dist/integrations/components/ConnectionModalFrame.js.map +1 -1
  44. package/dist/integrations/components/ConnectionSharing.d.ts +0 -2
  45. package/dist/integrations/components/ConnectionSharing.js +7 -8
  46. package/dist/integrations/components/ConnectionSharing.js.map +1 -1
  47. package/dist/integrations/components/ConnectionStatusBadge.d.ts +0 -2
  48. package/dist/integrations/components/ConnectionStatusBadge.js +1 -2
  49. package/dist/integrations/components/ConnectionStatusBadge.js.map +1 -1
  50. package/dist/integrations/components/ConnectorSubmissionCard.d.ts +2 -4
  51. package/dist/integrations/components/ConnectorSubmissionCard.js +8 -9
  52. package/dist/integrations/components/ConnectorSubmissionCard.js.map +1 -1
  53. package/dist/integrations/components/ConnectorSubmissionPager.d.ts +1 -2
  54. package/dist/integrations/components/ConnectorSubmissionPager.js +1 -2
  55. package/dist/integrations/components/ConnectorSubmissionPager.js.map +1 -1
  56. package/dist/integrations/components/MailMessageBody.d.ts +1 -3
  57. package/dist/integrations/components/MailMessageBody.js +4 -5
  58. package/dist/integrations/components/MailMessageBody.js.map +1 -1
  59. package/dist/integrations/components/ProviderCard.d.ts +0 -2
  60. package/dist/integrations/components/ProviderCard.js +8 -9
  61. package/dist/integrations/components/ProviderCard.js.map +1 -1
  62. package/dist/integrations/constants/featureFlags.d.ts +0 -1
  63. package/dist/integrations/constants/featureFlags.js +1 -2
  64. package/dist/integrations/constants/featureFlags.js.map +1 -1
  65. package/dist/integrations/constants/permissions.d.ts +0 -1
  66. package/dist/integrations/constants/permissions.js +1 -2
  67. package/dist/integrations/constants/permissions.js.map +1 -1
  68. package/dist/integrations/events/integrations-events.d.ts +0 -1
  69. package/dist/integrations/events/useIntegrationsEventBus.d.ts +0 -2
  70. package/dist/integrations/events/useIntegrationsEventBus.js +1 -2
  71. package/dist/integrations/events/useIntegrationsEventBus.js.map +1 -1
  72. package/dist/integrations/hooks/useConnections.d.ts +3 -14
  73. package/dist/integrations/hooks/useConnections.js +74 -75
  74. package/dist/integrations/hooks/useConnections.js.map +1 -1
  75. package/dist/integrations/hooks/useConnectorSubmissions.d.ts +2 -10
  76. package/dist/integrations/hooks/useConnectorSubmissions.js +23 -24
  77. package/dist/integrations/hooks/useConnectorSubmissions.js.map +1 -1
  78. package/dist/integrations/hooks/useFormatDate.d.ts +0 -1
  79. package/dist/integrations/hooks/useFormatDate.js +1 -2
  80. package/dist/integrations/hooks/useFormatDate.js.map +1 -1
  81. package/dist/integrations/hooks/useFormatLastUsed.d.ts +0 -1
  82. package/dist/integrations/hooks/useFormatLastUsed.js +1 -2
  83. package/dist/integrations/hooks/useFormatLastUsed.js.map +1 -1
  84. package/dist/integrations/hooks/useLabel.d.ts +0 -2
  85. package/dist/integrations/hooks/useLabel.js +1 -2
  86. package/dist/integrations/hooks/useLabel.js.map +1 -1
  87. package/dist/integrations/hooks/useLogs.d.ts +1 -6
  88. package/dist/integrations/hooks/useLogs.js +6 -7
  89. package/dist/integrations/hooks/useLogs.js.map +1 -1
  90. package/dist/integrations/hooks/useMailbox.d.ts +19 -43
  91. package/dist/integrations/hooks/useMailbox.js +46 -47
  92. package/dist/integrations/hooks/useMailbox.js.map +1 -1
  93. package/dist/integrations/hooks/useProviders.d.ts +3 -14
  94. package/dist/integrations/hooks/useProviders.js +42 -43
  95. package/dist/integrations/hooks/useProviders.js.map +1 -1
  96. package/dist/integrations/hooks/useTr.d.ts +0 -1
  97. package/dist/integrations/hooks/useTr.js +1 -2
  98. package/dist/integrations/hooks/useTr.js.map +1 -1
  99. package/dist/integrations/index.d.ts +0 -1
  100. package/dist/integrations/index.js +9 -8
  101. package/dist/integrations/pages/AddConnectionWizard.d.ts +1 -2
  102. package/dist/integrations/pages/AddConnectionWizard.js +291 -306
  103. package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
  104. package/dist/integrations/pages/ConnectionDetail.d.ts +1 -2
  105. package/dist/integrations/pages/ConnectionDetail.js +241 -246
  106. package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
  107. package/dist/integrations/pages/ConnectionLogs.d.ts +1 -2
  108. package/dist/integrations/pages/ConnectionLogs.js +154 -155
  109. package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
  110. package/dist/integrations/pages/ConnectionsList.d.ts +1 -2
  111. package/dist/integrations/pages/ConnectionsList.js +40 -41
  112. package/dist/integrations/pages/ConnectionsList.js.map +1 -1
  113. package/dist/integrations/pages/ConnectorReviewQueuePage.d.ts +1 -2
  114. package/dist/integrations/pages/ConnectorReviewQueuePage.js +9 -10
  115. package/dist/integrations/pages/ConnectorReviewQueuePage.js.map +1 -1
  116. package/dist/integrations/pages/ConnectorSubmissionsPage.d.ts +1 -2
  117. package/dist/integrations/pages/ConnectorSubmissionsPage.js +138 -139
  118. package/dist/integrations/pages/ConnectorSubmissionsPage.js.map +1 -1
  119. package/dist/integrations/pages/IntegrationsOverview.d.ts +1 -2
  120. package/dist/integrations/pages/IntegrationsOverview.js +35 -36
  121. package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
  122. package/dist/integrations/pages/IntegrationsSettings.d.ts +1 -2
  123. package/dist/integrations/pages/IntegrationsSettings.js +7 -8
  124. package/dist/integrations/pages/IntegrationsSettings.js.map +1 -1
  125. package/dist/integrations/pages/IntegrationsUserLandingPage.d.ts +1 -2
  126. package/dist/integrations/pages/IntegrationsUserLandingPage.js +1 -2
  127. package/dist/integrations/pages/IntegrationsUserLandingPage.js.map +1 -1
  128. package/dist/integrations/pages/MailboxInbox.d.ts +1 -2
  129. package/dist/integrations/pages/MailboxInbox.js +135 -140
  130. package/dist/integrations/pages/MailboxInbox.js.map +1 -1
  131. package/dist/integrations/pages/ProviderCatalog.d.ts +1 -2
  132. package/dist/integrations/pages/ProviderCatalog.js +107 -108
  133. package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
  134. package/dist/integrations/pages/ProviderDetail.d.ts +1 -2
  135. package/dist/integrations/pages/ProviderDetail.js +21 -22
  136. package/dist/integrations/pages/ProviderDetail.js.map +1 -1
  137. package/dist/integrations/pages/ProviderEditorPage.d.ts +1 -2
  138. package/dist/integrations/pages/ProviderEditorPage.js +261 -264
  139. package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
  140. package/dist/integrations/providers/IntegrationsProvider.d.ts +0 -2
  141. package/dist/integrations/providers/IntegrationsProvider.js +109 -96
  142. package/dist/integrations/providers/IntegrationsProvider.js.map +1 -1
  143. package/dist/integrations/store/integrationsStore.d.ts +0 -2
  144. package/dist/integrations/store/integrationsStore.js +1 -2
  145. package/dist/integrations/store/integrationsStore.js.map +1 -1
  146. package/dist/integrations/store/mailboxStore.d.ts +0 -2
  147. package/dist/integrations/store/mailboxStore.js +1 -2
  148. package/dist/integrations/store/mailboxStore.js.map +1 -1
  149. package/dist/integrations/translations/en.d.ts +0 -1
  150. package/dist/integrations/types/index.d.ts +0 -1
  151. package/dist/integrations/utils/appearance.d.ts +0 -1
  152. package/dist/integrations/utils/appearance.js +1 -2
  153. package/dist/integrations/utils/appearance.js.map +1 -1
  154. package/dist/integrations/utils/cn.d.ts +0 -2
  155. package/dist/integrations/utils/cn.js +2 -3
  156. package/dist/integrations/utils/cn.js.map +1 -1
  157. package/dist/integrations/utils/constants.d.ts +0 -1
  158. package/dist/integrations/utils/constants.js +1 -2
  159. package/dist/integrations/utils/constants.js.map +1 -1
  160. package/dist/integrations/utils/integrationsHelpers.d.ts +0 -2
  161. package/dist/integrations/utils/integrationsHelpers.js +1 -2
  162. package/dist/integrations/utils/integrationsHelpers.js.map +1 -1
  163. package/dist/integrations/utils/mailHtml.d.ts +0 -2
  164. package/dist/integrations/utils/mailHtml.js +3 -4
  165. package/dist/integrations/utils/mailHtml.js.map +1 -1
  166. package/dist/integrations/utils/mappers.d.ts +0 -2
  167. package/dist/integrations/utils/mappers.js +2 -3
  168. package/dist/integrations/utils/mappers.js.map +1 -1
  169. package/dist/integrations/utils/navigation.d.ts +0 -1
  170. package/dist/integrations/utils/navigation.js +2 -8
  171. package/dist/integrations/utils/navigation.js.map +1 -1
  172. package/dist/integrations/utils/paths.d.ts +0 -1
  173. package/dist/integrations/utils/paths.js +1 -2
  174. package/dist/integrations/utils/paths.js.map +1 -1
  175. package/dist/node_modules/clsx/dist/clsx.js +8 -7
  176. package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
  177. package/dist/node_modules/dompurify/dist/purify.es.js +20 -36
  178. package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -1
  179. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +229 -167
  180. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  181. package/dist/utils/nativeBridge.d.ts +0 -1
  182. package/dist/utils/nativeBridge.js +1 -2
  183. package/package.json +63 -49
  184. package/dist/dev/main.d.ts.map +0 -1
  185. package/dist/generated/global-operations.d.ts.map +0 -1
  186. package/dist/generated/global-types.d.ts.map +0 -1
  187. package/dist/generated/wspace-operations.d.ts.map +0 -1
  188. package/dist/generated/wspace-types.d.ts.map +0 -1
  189. package/dist/index.d.ts.map +0 -1
  190. package/dist/integrations/ConnectSourceDialog.d.ts.map +0 -1
  191. package/dist/integrations/ConnectionsPanel.d.ts.map +0 -1
  192. package/dist/integrations/IntegrationsAdminRoot.d.ts.map +0 -1
  193. package/dist/integrations/IntegrationsAdminRoutes.d.ts.map +0 -1
  194. package/dist/integrations/IntegrationsRoot.d.ts.map +0 -1
  195. package/dist/integrations/IntegrationsUserRoutes.d.ts.map +0 -1
  196. package/dist/integrations/components/AddConnectionDialog.d.ts.map +0 -1
  197. package/dist/integrations/components/AuthMethodsEditor.d.ts.map +0 -1
  198. package/dist/integrations/components/ConfirmDialog.d.ts.map +0 -1
  199. package/dist/integrations/components/ConnectionCard.d.ts.map +0 -1
  200. package/dist/integrations/components/ConnectionModalFrame.d.ts.map +0 -1
  201. package/dist/integrations/components/ConnectionSharing.d.ts.map +0 -1
  202. package/dist/integrations/components/ConnectionStatusBadge.d.ts.map +0 -1
  203. package/dist/integrations/components/ConnectorSubmissionCard.d.ts.map +0 -1
  204. package/dist/integrations/components/ConnectorSubmissionPager.d.ts.map +0 -1
  205. package/dist/integrations/components/MailMessageBody.d.ts.map +0 -1
  206. package/dist/integrations/components/ProviderCard.d.ts.map +0 -1
  207. package/dist/integrations/constants/featureFlags.d.ts.map +0 -1
  208. package/dist/integrations/constants/permissions.d.ts.map +0 -1
  209. package/dist/integrations/events/integrations-events.d.ts.map +0 -1
  210. package/dist/integrations/events/useIntegrationsEventBus.d.ts.map +0 -1
  211. package/dist/integrations/hooks/useConnections.d.ts.map +0 -1
  212. package/dist/integrations/hooks/useConnectorSubmissions.d.ts.map +0 -1
  213. package/dist/integrations/hooks/useFormatDate.d.ts.map +0 -1
  214. package/dist/integrations/hooks/useFormatLastUsed.d.ts.map +0 -1
  215. package/dist/integrations/hooks/useLabel.d.ts.map +0 -1
  216. package/dist/integrations/hooks/useLogs.d.ts.map +0 -1
  217. package/dist/integrations/hooks/useMailbox.d.ts.map +0 -1
  218. package/dist/integrations/hooks/useProviders.d.ts.map +0 -1
  219. package/dist/integrations/hooks/useTr.d.ts.map +0 -1
  220. package/dist/integrations/index.d.ts.map +0 -1
  221. package/dist/integrations/pages/AddConnectionWizard.d.ts.map +0 -1
  222. package/dist/integrations/pages/ConnectionDetail.d.ts.map +0 -1
  223. package/dist/integrations/pages/ConnectionLogs.d.ts.map +0 -1
  224. package/dist/integrations/pages/ConnectionsList.d.ts.map +0 -1
  225. package/dist/integrations/pages/ConnectorReviewQueuePage.d.ts.map +0 -1
  226. package/dist/integrations/pages/ConnectorSubmissionsPage.d.ts.map +0 -1
  227. package/dist/integrations/pages/IntegrationsOverview.d.ts.map +0 -1
  228. package/dist/integrations/pages/IntegrationsSettings.d.ts.map +0 -1
  229. package/dist/integrations/pages/IntegrationsUserLandingPage.d.ts.map +0 -1
  230. package/dist/integrations/pages/MailboxInbox.d.ts.map +0 -1
  231. package/dist/integrations/pages/ProviderCatalog.d.ts.map +0 -1
  232. package/dist/integrations/pages/ProviderDetail.d.ts.map +0 -1
  233. package/dist/integrations/pages/ProviderEditorPage.d.ts.map +0 -1
  234. package/dist/integrations/providers/IntegrationsProvider.d.ts.map +0 -1
  235. package/dist/integrations/store/integrationsStore.d.ts.map +0 -1
  236. package/dist/integrations/store/mailboxStore.d.ts.map +0 -1
  237. package/dist/integrations/translations/en.d.ts.map +0 -1
  238. package/dist/integrations/types/index.d.ts.map +0 -1
  239. package/dist/integrations/utils/appearance.d.ts.map +0 -1
  240. package/dist/integrations/utils/cn.d.ts.map +0 -1
  241. package/dist/integrations/utils/constants.d.ts.map +0 -1
  242. package/dist/integrations/utils/integrationsHelpers.d.ts.map +0 -1
  243. package/dist/integrations/utils/mailHtml.d.ts.map +0 -1
  244. package/dist/integrations/utils/mappers.d.ts.map +0 -1
  245. package/dist/integrations/utils/navigation.d.ts.map +0 -1
  246. package/dist/integrations/utils/paths.d.ts.map +0 -1
  247. package/dist/utils/nativeBridge.d.ts.map +0 -1
@@ -1,19 +1,19 @@
1
- import { useIntegrations as e } from "../providers/IntegrationsProvider.js";
2
- import { useTr as t } from "../hooks/useTr.js";
3
- import { cn as n } from "../utils/cn.js";
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { joinPath as t } from "../utils/paths.js";
3
+ import { useTr as n } from "../hooks/useTr.js";
4
4
  import { MailboxFolder as r, MailboxKind as i, MailboxLabelKind as a } from "../../generated/wspace-types.js";
5
5
  import { useFormatDate as o } from "../hooks/useFormatDate.js";
6
- import { joinPath as s } from "../utils/paths.js";
7
- import { ConfirmDialog as c } from "../components/ConfirmDialog.js";
8
- import { MAILBOX_SEND_ATTACHMENT_BYTES as l, splitRecipients as u, useMailboxAccounts as d, useMailboxLabels as f, useMailboxMessages as p, useMailboxThread as m, useMailboxThreadActions as h, useSendMail as g, useSetMailRead as _, useUploadMailAttachment as v } from "../hooks/useMailbox.js";
9
- import { useMailboxStore as y } from "../store/mailboxStore.js";
10
- import { formatBytes as b } from "../utils/mailHtml.js";
11
- import { MailMessageBody as x } from "../components/MailMessageBody.js";
6
+ import { useIntegrations as s } from "../providers/IntegrationsProvider.js";
7
+ import { MAILBOX_SEND_ATTACHMENT_BYTES as c, splitRecipients as l, useMailboxAccounts as u, useMailboxLabels as d, useMailboxMessages as f, useMailboxThread as p, useMailboxThreadActions as m, useSendMail as h, useSetMailRead as g, useUploadMailAttachment as _ } from "../hooks/useMailbox.js";
8
+ import { useMailboxStore as v } from "../store/mailboxStore.js";
9
+ import { ConfirmDialog as y } from "../components/ConfirmDialog.js";
10
+ import { MailMessageBody as b } from "../components/MailMessageBody.js";
11
+ import { formatBytes as x } from "../utils/mailHtml.js";
12
12
  import { useEffect as S, useId as C, useRef as w, useState as T } from "react";
13
13
  import { Archive as E, ArrowLeft as D, Inbox as O, Loader2 as k, Mail as A, MailOpen as j, Paperclip as M, PenSquare as N, RefreshCw as P, Reply as F, Search as I, Send as L, Trash2 as R, X as z } from "lucide-react";
14
14
  import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
15
15
  import { Button as U, IllustratedEmptyState as W, PagePurpose as G } from "@burdenoff/fe-libs/ui";
16
- //#region src/integrations/pages/MailboxInbox.tsx
16
+ // src/integrations/pages/MailboxInbox.tsx
17
17
  function K(e) {
18
18
  return e ? e.name ? `${e.name} <${e.email}>` : e.email : "";
19
19
  }
@@ -37,28 +37,24 @@ var J = [
37
37
  label: "All mail"
38
38
  }
39
39
  ];
40
- function Y(e) {
41
- let { connectionId: r, kind: i, replyTo: a, onClose: o, onSent: s } = e, c = t(), d = C(), { send: f, sending: p } = g(), m = v(), h = w(null), [_, y] = T([]), [x, S] = T(!1), E = l[i], D = Math.round(E / (1024 * 1024) * 10) / 10, O = async (e) => {
40
+ function Y(t) {
41
+ let { connectionId: r, kind: i, replyTo: a, onClose: o, onSent: s } = t, u = n(), d = C(), { send: f, sending: p } = h(), m = _(), g = w(null), [v, y] = T([]), [b, S] = T(!1), E = c[i], D = Math.round(E / 1048576 * 10) / 10, O = async (e) => {
42
42
  let t = Array.from(e ?? []);
43
- if (h.current && (h.current.value = ""), t.length !== 0) {
44
- if (G(null), _.length + t.length > 10) {
45
- G(c("integrations.mailbox.compose.tooManyFiles", "A message can have at most {{max}} attachments", { max: 10 }));
46
- return;
47
- }
48
- if ([..._, ...t].reduce((e, t) => e + t.size, 0) > E) {
49
- G(c("integrations.mailbox.compose.filesTooLarge", "Attachments on one message can total at most {{max}} MB with this mailbox", { max: D }));
50
- return;
51
- }
52
- S(!0);
53
- try {
54
- for (let e of t) {
55
- let t = await m(e);
56
- y((e) => [...e, t]);
43
+ if (g.current && (g.current.value = ""), t.length !== 0) {
44
+ if (G(null), v.length + t.length > 10) G(u("integrations.mailbox.compose.tooManyFiles", "A message can have at most {{max}} attachments", { max: 10 }));
45
+ else if ([...v, ...t].reduce((e, t) => e + t.size, 0) > E) G(u("integrations.mailbox.compose.filesTooLarge", "Attachments on one message can total at most {{max}} MB with this mailbox", { max: D }));
46
+ else {
47
+ S(!0);
48
+ try {
49
+ for (let e of t) {
50
+ let t = await m(e);
51
+ y((e) => [...e, t]);
52
+ }
53
+ } catch (e) {
54
+ G(e instanceof Error ? e.message : u("integrations.mailbox.compose.uploadFailed", "Could not upload the file"));
55
+ } finally {
56
+ S(!1);
57
57
  }
58
- } catch (e) {
59
- G(e instanceof Error ? e.message : c("integrations.mailbox.compose.uploadFailed", "Could not upload the file"));
60
- } finally {
61
- S(!1);
62
58
  }
63
59
  }
64
60
  }, [A, j] = T(a?.to ?? ""), [N, P] = T(""), [F, I] = T(a?.subject ?? ""), [R, B] = T(""), [W, G] = T(null), K = async (e) => {
@@ -66,34 +62,34 @@ function Y(e) {
66
62
  try {
67
63
  await f({
68
64
  connectionId: r,
69
- to: u(A),
70
- cc: u(N),
65
+ to: l(A),
66
+ cc: l(N),
71
67
  subject: F,
72
68
  bodyText: R,
73
69
  replyToMessageId: a?.messageId,
74
- attachmentFileIds: _.map((e) => e.fileId)
70
+ attachmentFileIds: v.map((e) => e.fileId)
75
71
  }), s();
76
72
  } catch (e) {
77
- G(e instanceof Error ? e.message : c("integrations.mailbox.compose.failed", "Could not send"));
73
+ G(e instanceof Error ? e.message : u("integrations.mailbox.compose.failed", "Could not send"));
78
74
  }
79
75
  }, q = "w-full px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary";
80
76
  return /* @__PURE__ */ H("form", {
81
77
  onSubmit: K,
82
78
  className: "rounded-xl border border-border-seam bg-bg-surface p-4 space-y-3",
83
- "aria-label": a ? c("integrations.mailbox.compose.replyTitle", "Reply") : c("integrations.mailbox.compose.title", "New message"),
79
+ "aria-label": a ? u("integrations.mailbox.compose.replyTitle", "Reply") : u("integrations.mailbox.compose.title", "New message"),
84
80
  children: [
85
81
  /* @__PURE__ */ H("div", {
86
82
  className: "flex items-center justify-between",
87
83
  children: [/* @__PURE__ */ V("h2", {
88
84
  className: "text-sm font-semibold text-text-primary",
89
- children: a ? c("integrations.mailbox.compose.replyTitle", "Reply") : c("integrations.mailbox.compose.title", "New message")
85
+ children: a ? u("integrations.mailbox.compose.replyTitle", "Reply") : u("integrations.mailbox.compose.title", "New message")
90
86
  }), /* @__PURE__ */ V(U, {
91
87
  type: "button",
92
88
  variant: "ghost",
93
89
  size: "icon",
94
90
  onClick: o,
95
91
  disabled: p,
96
- "aria-label": c("integrations.common.close", "Close"),
92
+ "aria-label": u("integrations.common.close", "Close"),
97
93
  children: /* @__PURE__ */ V(z, { size: 16 })
98
94
  })]
99
95
  }),
@@ -102,13 +98,13 @@ function Y(e) {
102
98
  children: [/* @__PURE__ */ V("label", {
103
99
  htmlFor: `${d}-to`,
104
100
  className: "text-xs font-medium text-text-secondary",
105
- children: c("integrations.mailbox.compose.to", "To")
101
+ children: u("integrations.mailbox.compose.to", "To")
106
102
  }), /* @__PURE__ */ V("input", {
107
103
  id: `${d}-to`,
108
104
  type: "text",
109
105
  value: A,
110
106
  onChange: (e) => j(e.target.value),
111
- placeholder: c("integrations.mailbox.compose.toPlaceholder", "name@example.com, another@example.com"),
107
+ placeholder: u("integrations.mailbox.compose.toPlaceholder", "name@example.com, another@example.com"),
112
108
  className: q,
113
109
  required: !0
114
110
  })]
@@ -118,7 +114,7 @@ function Y(e) {
118
114
  children: [/* @__PURE__ */ V("label", {
119
115
  htmlFor: `${d}-cc`,
120
116
  className: "text-xs font-medium text-text-secondary",
121
- children: c("integrations.mailbox.compose.cc", "Cc")
117
+ children: u("integrations.mailbox.compose.cc", "Cc")
122
118
  }), /* @__PURE__ */ V("input", {
123
119
  id: `${d}-cc`,
124
120
  type: "text",
@@ -132,7 +128,7 @@ function Y(e) {
132
128
  children: [/* @__PURE__ */ V("label", {
133
129
  htmlFor: `${d}-subject`,
134
130
  className: "text-xs font-medium text-text-secondary",
135
- children: c("integrations.mailbox.compose.subject", "Subject")
131
+ children: u("integrations.mailbox.compose.subject", "Subject")
136
132
  }), /* @__PURE__ */ V("input", {
137
133
  id: `${d}-subject`,
138
134
  type: "text",
@@ -147,13 +143,13 @@ function Y(e) {
147
143
  children: [/* @__PURE__ */ V("label", {
148
144
  htmlFor: `${d}-body`,
149
145
  className: "text-xs font-medium text-text-secondary",
150
- children: c("integrations.mailbox.compose.body", "Message")
146
+ children: u("integrations.mailbox.compose.body", "Message")
151
147
  }), /* @__PURE__ */ V("textarea", {
152
148
  id: `${d}-body`,
153
149
  value: R,
154
150
  onChange: (e) => B(e.target.value),
155
151
  rows: 8,
156
- className: n(q, "resize-y"),
152
+ className: e(q, "resize-y"),
157
153
  required: !0
158
154
  })]
159
155
  }),
@@ -161,38 +157,38 @@ function Y(e) {
161
157
  className: "space-y-2",
162
158
  children: [
163
159
  /* @__PURE__ */ V("input", {
164
- ref: h,
160
+ ref: g,
165
161
  id: `${d}-files`,
166
162
  type: "file",
167
163
  multiple: !0,
168
- "aria-label": c("integrations.mailbox.compose.attach", "Attach files"),
164
+ "aria-label": u("integrations.mailbox.compose.attach", "Attach files"),
169
165
  tabIndex: -1,
170
166
  className: "sr-only",
171
167
  onChange: (e) => void O(e.target.files),
172
- disabled: p || x
168
+ disabled: p || b
173
169
  }),
174
170
  /* @__PURE__ */ H(U, {
175
171
  type: "button",
176
172
  variant: "outline",
177
173
  size: "sm",
178
- disabled: p || x || _.length >= 10,
179
- onClick: () => h.current?.click(),
180
- children: [x ? /* @__PURE__ */ V(k, {
174
+ disabled: p || b || v.length >= 10,
175
+ onClick: () => g.current?.click(),
176
+ children: [b ? /* @__PURE__ */ V(k, {
181
177
  size: 14,
182
178
  className: "animate-spin"
183
- }) : /* @__PURE__ */ V(M, { size: 14 }), x ? c("integrations.mailbox.compose.uploading", "Uploading…") : c("integrations.mailbox.compose.attach", "Attach files")]
179
+ }) : /* @__PURE__ */ V(M, { size: 14 }), b ? u("integrations.mailbox.compose.uploading", "Uploading…") : u("integrations.mailbox.compose.attach", "Attach files")]
184
180
  }),
185
181
  /* @__PURE__ */ V("p", {
186
182
  className: "text-xs text-text-tertiary",
187
- children: c("integrations.mailbox.compose.attachHint", "Up to {{count}} files, {{max}} MB in total. A copy is kept in your Files.", {
183
+ children: u("integrations.mailbox.compose.attachHint", "Up to {{count}} files, {{max}} MB in total. A copy is kept in your Files.", {
188
184
  count: 10,
189
185
  max: D
190
186
  })
191
187
  }),
192
- _.length > 0 && /* @__PURE__ */ V("ul", {
188
+ v.length > 0 && /* @__PURE__ */ V("ul", {
193
189
  className: "flex flex-wrap gap-2",
194
190
  "data-testid": "mailbox-compose-attachments",
195
- children: _.map((e) => /* @__PURE__ */ H("li", {
191
+ children: v.map((e) => /* @__PURE__ */ H("li", {
196
192
  className: "flex items-center gap-1 rounded-full border border-border-subtle px-3 py-1 text-xs text-text-primary",
197
193
  children: [
198
194
  /* @__PURE__ */ V(M, { size: 12 }),
@@ -202,13 +198,13 @@ function Y(e) {
202
198
  }),
203
199
  /* @__PURE__ */ V("span", {
204
200
  className: "text-text-tertiary",
205
- children: b(e.size)
201
+ children: x(e.size)
206
202
  }),
207
203
  /* @__PURE__ */ V("button", {
208
204
  type: "button",
209
205
  className: "ml-1 rounded-full p-0.5 hover:bg-accent",
210
206
  disabled: p,
211
- "aria-label": c("integrations.mailbox.compose.removeFile", "Remove {{name}}", { name: e.name }),
207
+ "aria-label": u("integrations.mailbox.compose.removeFile", "Remove {{name}}", { name: e.name }),
212
208
  onClick: () => y((t) => t.filter((t) => t.fileId !== e.fileId)),
213
209
  children: /* @__PURE__ */ V(z, { size: 12 })
214
210
  })
@@ -229,60 +225,60 @@ function Y(e) {
229
225
  variant: "outline",
230
226
  onClick: o,
231
227
  disabled: p,
232
- children: c("integrations.common.cancel", "Cancel")
228
+ children: u("integrations.common.cancel", "Cancel")
233
229
  }), /* @__PURE__ */ H(U, {
234
230
  type: "submit",
235
- disabled: p || x || !R.trim() || !A.trim(),
231
+ disabled: p || b || !R.trim() || !A.trim(),
236
232
  children: [p ? /* @__PURE__ */ V(k, {
237
233
  size: 16,
238
234
  className: "animate-spin"
239
- }) : /* @__PURE__ */ V(L, { size: 16 }), c("integrations.mailbox.compose.send", "Send")]
235
+ }) : /* @__PURE__ */ V(L, { size: 16 }), u("integrations.mailbox.compose.send", "Send")]
240
236
  })]
241
237
  })
242
238
  ]
243
239
  });
244
240
  }
245
241
  function X(e) {
246
- let { connectionId: n, kind: r, threadId: a, accountEmail: s, onBack: l, onRemoved: u } = e, d = t(), f = o(), { thread: p, loading: g, error: _, refetch: v } = m(n, a), { archiveThread: y, trashThread: b, busy: S } = h(), [C, w] = T(!1), [O, A] = T(null), j = async (e) => {
242
+ let { connectionId: t, kind: r, threadId: a, accountEmail: s, onBack: c, onRemoved: l } = e, u = n(), d = o(), { thread: f, loading: h, error: g, refetch: _ } = p(t, a), { archiveThread: v, trashThread: x, busy: S } = m(), [C, w] = T(!1), [O, A] = T(null), j = async (e) => {
247
243
  A(null);
248
244
  try {
249
- e === "archived" ? await y(n, a) : await b(n, a), w(!1), u(e);
245
+ e === "archived" ? await v(t, a) : await x(t, a), w(!1), l(e);
250
246
  } catch (e) {
251
- w(!1), A(e instanceof Error ? e.message : d("integrations.mailbox.actions.failed", "That did not work. Try again."));
247
+ w(!1), A(e instanceof Error ? e.message : u("integrations.mailbox.actions.failed", "That did not work. Try again."));
252
248
  }
253
249
  }, [N, I] = T(!1), [L, z] = T(!1);
254
- if (g && !p) return /* @__PURE__ */ V("div", {
250
+ if (h && !f) return /* @__PURE__ */ V("div", {
255
251
  className: "flex items-center justify-center py-16",
256
252
  children: /* @__PURE__ */ V(k, { className: "size-6 animate-spin text-primary" })
257
253
  });
258
- if (_ || !p) return /* @__PURE__ */ H("div", {
254
+ if (g || !f) return /* @__PURE__ */ H("div", {
259
255
  className: "p-6 space-y-3 text-center",
260
256
  children: [/* @__PURE__ */ V("p", {
261
257
  role: "alert",
262
258
  className: "text-sm text-status-error-text",
263
- children: _?.message ?? d("integrations.mailbox.thread.notFound", "Conversation not found")
259
+ children: g?.message ?? u("integrations.mailbox.thread.notFound", "Conversation not found")
264
260
  }), /* @__PURE__ */ H("div", {
265
261
  className: "flex flex-wrap justify-center gap-2",
266
262
  children: [/* @__PURE__ */ H(U, {
267
263
  variant: "ghost",
268
- onClick: l,
264
+ onClick: c,
269
265
  children: [
270
266
  /* @__PURE__ */ V(D, { size: 16 }),
271
267
  " ",
272
- d("integrations.common.back", "Back")
268
+ u("integrations.common.back", "Back")
273
269
  ]
274
270
  }), /* @__PURE__ */ H(U, {
275
271
  variant: "outline",
276
- onClick: () => v(),
272
+ onClick: () => _(),
277
273
  children: [
278
274
  /* @__PURE__ */ V(P, { size: 16 }),
279
275
  " ",
280
- d("integrations.mailbox.actions.retry", "Try again")
276
+ u("integrations.mailbox.actions.retry", "Try again")
281
277
  ]
282
278
  })]
283
279
  })]
284
280
  });
285
- let B = p.messages[p.messages.length - 1], W = s?.trim().toLowerCase() ?? null, G = B ? W && B.from?.email.toLowerCase() === W ? B.to.map((e) => e.email).filter((e) => e.toLowerCase() !== W) : [B.from?.email ?? ""] : [];
281
+ let B = f.messages[f.messages.length - 1], W = s?.trim().toLowerCase() ?? null, G = B ? W && B.from?.email.toLowerCase() === W ? B.to.map((e) => e.email).filter((e) => e.toLowerCase() !== W) : [B.from?.email ?? ""] : [];
286
282
  return /* @__PURE__ */ H("div", {
287
283
  className: "space-y-4",
288
284
  "data-testid": "mailbox-thread",
@@ -294,13 +290,13 @@ function X(e) {
294
290
  variant: "ghost",
295
291
  size: "icon",
296
292
  className: "lg:hidden",
297
- onClick: l,
298
- "aria-label": d("integrations.common.back", "Back"),
293
+ onClick: c,
294
+ "aria-label": u("integrations.common.back", "Back"),
299
295
  children: /* @__PURE__ */ V(D, { size: 18 })
300
296
  }),
301
297
  /* @__PURE__ */ V("h2", {
302
298
  className: "min-w-0 flex-1 text-lg font-semibold text-text-primary break-words",
303
- children: p.subject || d("integrations.mailbox.noSubject", "(no subject)")
299
+ children: f.subject || u("integrations.mailbox.noSubject", "(no subject)")
304
300
  }),
305
301
  /* @__PURE__ */ H("div", {
306
302
  className: "flex shrink-0 gap-1",
@@ -309,16 +305,16 @@ function X(e) {
309
305
  size: "icon",
310
306
  disabled: S,
311
307
  onClick: () => void j("archived"),
312
- "aria-label": d("integrations.mailbox.actions.archive", "Archive"),
313
- title: d("integrations.mailbox.actions.archive", "Archive"),
308
+ "aria-label": u("integrations.mailbox.actions.archive", "Archive"),
309
+ title: u("integrations.mailbox.actions.archive", "Archive"),
314
310
  children: /* @__PURE__ */ V(E, { size: 18 })
315
311
  }), /* @__PURE__ */ V(U, {
316
312
  variant: "ghost",
317
313
  size: "icon",
318
314
  disabled: S,
319
315
  onClick: () => w(!0),
320
- "aria-label": d("integrations.mailbox.actions.trash", "Delete"),
321
- title: d("integrations.mailbox.actions.trash", "Delete"),
316
+ "aria-label": u("integrations.mailbox.actions.trash", "Delete"),
317
+ title: u("integrations.mailbox.actions.trash", "Delete"),
322
318
  children: /* @__PURE__ */ V(R, { size: 18 })
323
319
  })]
324
320
  })
@@ -329,18 +325,18 @@ function X(e) {
329
325
  className: "text-sm text-status-error-text",
330
326
  children: O
331
327
  }),
332
- /* @__PURE__ */ V(c, {
328
+ /* @__PURE__ */ V(y, {
333
329
  open: C,
334
- title: d("integrations.mailbox.trash.title", "Delete this conversation?"),
335
- description: r === i.Outlook ? d("integrations.mailbox.trash.descriptionOutlook", "It moves to Deleted Items in Outlook, where you can restore it.") : d("integrations.mailbox.trash.descriptionGmail", "It moves to Trash in Gmail, where you can restore it for 30 days."),
336
- confirmLabel: d("integrations.mailbox.actions.trash", "Delete"),
337
- cancelLabel: d("integrations.common.cancel", "Cancel"),
330
+ title: u("integrations.mailbox.trash.title", "Delete this conversation?"),
331
+ description: r === i.Outlook ? u("integrations.mailbox.trash.descriptionOutlook", "It moves to Deleted Items in Outlook, where you can restore it.") : u("integrations.mailbox.trash.descriptionGmail", "It moves to Trash in Gmail, where you can restore it for 30 days."),
332
+ confirmLabel: u("integrations.mailbox.actions.trash", "Delete"),
333
+ cancelLabel: u("integrations.common.cancel", "Cancel"),
338
334
  loading: S,
339
335
  destructive: !0,
340
336
  onConfirm: () => void j("trashed"),
341
337
  onCancel: () => w(!1)
342
338
  }),
343
- p.messages.map((e) => /* @__PURE__ */ H("article", {
339
+ f.messages.map((e) => /* @__PURE__ */ H("article", {
344
340
  className: "rounded-xl border border-border-subtle bg-bg-surface p-4 space-y-2",
345
341
  children: [/* @__PURE__ */ H("header", {
346
342
  className: "flex flex-wrap items-baseline justify-between gap-2",
@@ -352,44 +348,44 @@ function X(e) {
352
348
  }), /* @__PURE__ */ H("p", {
353
349
  className: "text-xs text-text-secondary break-all",
354
350
  children: [
355
- d("integrations.mailbox.thread.to", "To"),
351
+ u("integrations.mailbox.thread.to", "To"),
356
352
  ":",
357
353
  " ",
358
354
  e.to.map(K).join(", "),
359
- e.cc.length > 0 && ` · ${d("integrations.mailbox.thread.cc", "Cc")}: ${e.cc.map(K).join(", ")}`
355
+ e.cc.length > 0 && ` · ${u("integrations.mailbox.thread.cc", "Cc")}: ${e.cc.map(K).join(", ")}`
360
356
  ]
361
357
  })]
362
358
  }), /* @__PURE__ */ H("div", {
363
359
  className: "flex items-center gap-2 text-xs text-text-tertiary",
364
360
  children: [e.hasAttachments && /* @__PURE__ */ V(M, {
365
361
  size: 14,
366
- "aria-label": d("integrations.mailbox.attachments", "Has attachments")
362
+ "aria-label": u("integrations.mailbox.attachments", "Has attachments")
367
363
  }), e.receivedAt && /* @__PURE__ */ V("time", {
368
364
  dateTime: e.receivedAt,
369
- children: f(e.receivedAt)
365
+ children: d(e.receivedAt)
370
366
  })]
371
367
  })]
372
- }), /* @__PURE__ */ V(x, {
373
- connectionId: n,
368
+ }), /* @__PURE__ */ V(b, {
369
+ connectionId: t,
374
370
  message: e
375
371
  })]
376
372
  }, e.id)),
377
373
  L && /* @__PURE__ */ V("p", {
378
374
  role: "status",
379
375
  className: "text-sm text-status-success-text",
380
- children: d("integrations.mailbox.compose.sent", "Message sent")
376
+ children: u("integrations.mailbox.compose.sent", "Message sent")
381
377
  }),
382
378
  B && (N ? /* @__PURE__ */ V(Y, {
383
- connectionId: n,
379
+ connectionId: t,
384
380
  kind: r,
385
381
  replyTo: {
386
382
  messageId: B.id,
387
383
  to: G.filter(Boolean).join(", "),
388
- subject: p.subject
384
+ subject: f.subject
389
385
  },
390
386
  onClose: () => I(!1),
391
387
  onSent: () => {
392
- I(!1), z(!0), v();
388
+ I(!1), z(!0), _();
393
389
  }
394
390
  }) : /* @__PURE__ */ H(U, {
395
391
  variant: "outline",
@@ -397,14 +393,14 @@ function X(e) {
397
393
  children: [
398
394
  /* @__PURE__ */ V(F, { size: 16 }),
399
395
  " ",
400
- d("integrations.mailbox.actions.reply", "Reply")
396
+ u("integrations.mailbox.actions.reply", "Reply")
401
397
  ]
402
398
  }))
403
399
  ]
404
400
  });
405
401
  }
406
- function Z(e) {
407
- let { messages: i, loading: a, error: s, refetch: c, folder: l, threadId: u, hasPrevious: d, nextPageToken: f, onOpen: p, onPrevious: m, onNext: h } = e, g = t(), _ = o();
402
+ function Z(t) {
403
+ let { messages: i, loading: a, error: s, refetch: c, folder: l, threadId: u, hasPrevious: d, nextPageToken: f, onOpen: p, onPrevious: m, onNext: h } = t, g = n(), _ = o();
408
404
  return /* @__PURE__ */ H(B, { children: [s ? /* @__PURE__ */ H("div", {
409
405
  className: "p-6 text-center space-y-3",
410
406
  children: [/* @__PURE__ */ V("p", {
@@ -429,36 +425,36 @@ function Z(e) {
429
425
  }) : /* @__PURE__ */ V("ul", {
430
426
  className: "divide-y divide-border-subtle",
431
427
  "data-testid": "mailbox-message-list",
432
- children: i.map((e) => /* @__PURE__ */ V("li", { children: /* @__PURE__ */ H("button", {
428
+ children: i.map((t) => /* @__PURE__ */ V("li", { children: /* @__PURE__ */ H("button", {
433
429
  type: "button",
434
- onClick: () => p(e.threadId, e.id, e.isUnread),
435
- "aria-current": u === e.threadId ? "true" : void 0,
436
- className: n("w-full text-left px-4 py-3 transition-colors hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/30", u === e.threadId && "bg-accent"),
430
+ onClick: () => p(t.threadId, t.id, t.isUnread),
431
+ "aria-current": u === t.threadId ? "true" : void 0,
432
+ className: e("w-full text-left px-4 py-3 transition-colors hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/30", u === t.threadId && "bg-accent"),
437
433
  children: [
438
434
  /* @__PURE__ */ H("div", {
439
435
  className: "flex items-center justify-between gap-2",
440
436
  children: [/* @__PURE__ */ V("span", {
441
- className: n("truncate text-sm", e.isUnread ? "font-semibold text-text-primary" : "text-text-secondary"),
442
- children: l === r.Sent ? e.to.map(q).join(", ") : q(e.from)
437
+ className: e("truncate text-sm", t.isUnread ? "font-semibold text-text-primary" : "text-text-secondary"),
438
+ children: l === r.Sent ? t.to.map(q).join(", ") : q(t.from)
443
439
  }), /* @__PURE__ */ H("span", {
444
440
  className: "flex shrink-0 items-center gap-1 text-xs text-text-tertiary",
445
441
  children: [
446
- e.hasAttachments && /* @__PURE__ */ V(M, { size: 12 }),
447
- e.isUnread ? /* @__PURE__ */ V(A, { size: 12 }) : /* @__PURE__ */ V(j, { size: 12 }),
448
- e.receivedAt ? _(e.receivedAt) : ""
442
+ t.hasAttachments && /* @__PURE__ */ V(M, { size: 12 }),
443
+ t.isUnread ? /* @__PURE__ */ V(A, { size: 12 }) : /* @__PURE__ */ V(j, { size: 12 }),
444
+ t.receivedAt ? _(t.receivedAt) : ""
449
445
  ]
450
446
  })]
451
447
  }),
452
448
  /* @__PURE__ */ V("p", {
453
- className: n("truncate text-sm", e.isUnread ? "font-medium text-text-primary" : "text-text-primary"),
454
- children: e.subject || g("integrations.mailbox.noSubject", "(no subject)")
449
+ className: e("truncate text-sm", t.isUnread ? "font-medium text-text-primary" : "text-text-primary"),
450
+ children: t.subject || g("integrations.mailbox.noSubject", "(no subject)")
455
451
  }),
456
452
  /* @__PURE__ */ V("p", {
457
453
  className: "truncate text-xs text-text-secondary",
458
- children: e.snippet
454
+ children: t.snippet
459
455
  })
460
456
  ]
461
- }) }, e.id))
457
+ }) }, t.id))
462
458
  }), (d || f) && /* @__PURE__ */ H("div", {
463
459
  className: "flex justify-between gap-2 border-t border-border-subtle p-3",
464
460
  children: [/* @__PURE__ */ V(U, {
@@ -476,17 +472,17 @@ function Z(e) {
476
472
  })]
477
473
  })] });
478
474
  }
479
- function Q(n) {
480
- let r = t(), { basePath: i = "/", navigate: a } = e(), o = s(i, "providers");
475
+ function Q(e) {
476
+ let r = n(), { basePath: i = "/", navigate: a } = s(), o = t(i, "providers");
481
477
  return /* @__PURE__ */ H("div", {
482
478
  className: "space-y-6 p-6 max-w-5xl mx-auto",
483
479
  children: [/* @__PURE__ */ V(G, {
484
480
  icon: /* @__PURE__ */ V(A, { size: 16 }),
485
481
  children: r("integrations.mailbox.purpose", "Read and send mail from your own Gmail or Outlook account without leaving Workspaces. Only you can open your mailbox; sharing a connection never shares your mail.")
486
- }), n.errorMessage ? /* @__PURE__ */ V("p", {
482
+ }), e.errorMessage ? /* @__PURE__ */ V("p", {
487
483
  role: "alert",
488
484
  className: "text-sm text-status-error-text text-center",
489
- children: n.errorMessage
485
+ children: e.errorMessage
490
486
  }) : /* @__PURE__ */ V(W, {
491
487
  illustration: "empty-data",
492
488
  title: r("integrations.mailbox.empty.title", "Connect a mailbox"),
@@ -503,7 +499,7 @@ function Q(n) {
503
499
  });
504
500
  }
505
501
  function $(e) {
506
- let { accounts: n, connectionId: r } = e, i = t(), a = C(), o = y((e) => e.composing), s = y((e) => e.selectConnection), c = y((e) => e.startCompose), l = n.find((e) => e.connectionId === r) ?? null;
502
+ let { accounts: t, connectionId: r } = e, i = n(), a = C(), o = v((e) => e.composing), s = v((e) => e.selectConnection), c = v((e) => e.startCompose), l = t.find((e) => e.connectionId === r) ?? null;
507
503
  return /* @__PURE__ */ V("div", {
508
504
  className: "rounded-xl border border-border-seam bg-accent-wash p-4 sm:p-6",
509
505
  children: /* @__PURE__ */ H("div", {
@@ -525,7 +521,7 @@ function $(e) {
525
521
  })] })]
526
522
  }), /* @__PURE__ */ H("div", {
527
523
  className: "flex flex-wrap items-center gap-2",
528
- children: [n.length > 1 && /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("label", {
524
+ children: [t.length > 1 && /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("label", {
529
525
  htmlFor: `${a}-account`,
530
526
  className: "sr-only",
531
527
  children: i("integrations.mailbox.account", "Mailbox")
@@ -535,7 +531,7 @@ function $(e) {
535
531
  disabled: o,
536
532
  onChange: (e) => s(e.target.value),
537
533
  className: "px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm text-text-primary",
538
- children: n.map((e) => /* @__PURE__ */ V("option", {
534
+ children: t.map((e) => /* @__PURE__ */ V("option", {
539
535
  value: e.connectionId,
540
536
  children: e.emailAddress ?? e.name
541
537
  }, e.connectionId))
@@ -551,9 +547,9 @@ function $(e) {
551
547
  })
552
548
  });
553
549
  }
554
- var ee = new Set(["INBOX", "SENT"]);
555
- function te(e) {
556
- let r = t(), i = C(), o = y((e) => e.folder), s = y((e) => e.folderId), c = y((e) => e.query), l = y((e) => e.selectFolder), u = y((e) => e.selectLabel), d = y((e) => e.search), { labels: p } = f(e.connectionId), m = p.filter((e) => !(e.kind === a.System && ee.has(e.id))), [h, g] = T(c);
550
+ var ee = /* @__PURE__ */ new Set(["INBOX", "SENT"]);
551
+ function te(t) {
552
+ let r = n(), i = C(), o = v((e) => e.folder), s = v((e) => e.folderId), c = v((e) => e.query), l = v((e) => e.selectFolder), u = v((e) => e.selectLabel), f = v((e) => e.search), { labels: p } = d(t.connectionId), m = p.filter((e) => !(e.kind === a.System && ee.has(e.id))), [h, g] = T(c);
557
553
  return /* @__PURE__ */ H("div", {
558
554
  className: "flex flex-col sm:flex-row gap-3",
559
555
  children: [
@@ -561,13 +557,13 @@ function te(e) {
561
557
  className: "flex gap-1 rounded-lg border border-border-subtle bg-bg-surface p-1",
562
558
  role: "group",
563
559
  "aria-label": r("integrations.mailbox.folders.ariaLabel", "Folders"),
564
- children: J.map((e) => /* @__PURE__ */ V("button", {
560
+ children: J.map((t) => /* @__PURE__ */ V("button", {
565
561
  type: "button",
566
- "aria-pressed": !s && o === e.value,
567
- onClick: () => l(e.value),
568
- className: n("px-3 py-1.5 text-sm rounded-md transition-colors", !s && o === e.value ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:bg-accent"),
569
- children: r(`integrations.mailbox.folders.${e.key}`, e.label)
570
- }, e.value))
562
+ "aria-pressed": !s && o === t.value,
563
+ onClick: () => l(t.value),
564
+ className: e("px-3 py-1.5 text-sm rounded-md transition-colors", !s && o === t.value ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:bg-accent"),
565
+ children: r(`integrations.mailbox.folders.${t.key}`, t.label)
566
+ }, t.value))
571
567
  }),
572
568
  m.length > 0 && /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
573
569
  htmlFor: `${i}-label`,
@@ -592,7 +588,7 @@ function te(e) {
592
588
  /* @__PURE__ */ H("form", {
593
589
  className: "flex-1 relative",
594
590
  onSubmit: (e) => {
595
- e.preventDefault(), d(h);
591
+ e.preventDefault(), f(h);
596
592
  },
597
593
  children: [/* @__PURE__ */ V(I, {
598
594
  size: 16,
@@ -609,12 +605,12 @@ function te(e) {
609
605
  }),
610
606
  /* @__PURE__ */ H(U, {
611
607
  variant: "outline",
612
- onClick: e.onRefresh,
613
- disabled: e.loading,
608
+ onClick: t.onRefresh,
609
+ disabled: t.loading,
614
610
  children: [
615
611
  /* @__PURE__ */ V(P, {
616
612
  size: 16,
617
- className: n(e.loading && "animate-spin")
613
+ className: e(t.loading && "animate-spin")
618
614
  }),
619
615
  " ",
620
616
  r("integrations.mailbox.actions.refresh", "Refresh")
@@ -623,10 +619,10 @@ function te(e) {
623
619
  ]
624
620
  });
625
621
  }
626
- function ne(e) {
627
- let { accounts: a } = e, o = t(), s = y(), c = y((e) => e.reset), l = _();
622
+ function ne(t) {
623
+ let { accounts: a } = t, o = n(), s = v(), c = v((e) => e.reset), l = g();
628
624
  S(() => c, [c]);
629
- let u = a.find((e) => e.connectionId === s.selectedConnectionId) ?? a[0] ?? null, d = u?.connectionId ?? null, [f, m] = T(null), { messages: h, nextPageToken: g, loading: v, error: b, refetch: x } = p({
625
+ let u = a.find((e) => e.connectionId === s.selectedConnectionId) ?? a[0] ?? null, d = u?.connectionId ?? null, [p, m] = T(null), { messages: h, nextPageToken: _, loading: y, error: b, refetch: x } = f({
630
626
  connectionId: d,
631
627
  folder: s.folder,
632
628
  folderId: s.folderId,
@@ -645,13 +641,13 @@ function ne(e) {
645
641
  }),
646
642
  /* @__PURE__ */ V(te, {
647
643
  connectionId: d,
648
- loading: v,
644
+ loading: y,
649
645
  onRefresh: () => void x()
650
646
  }, d ?? "none"),
651
- f && !s.threadId && /* @__PURE__ */ V("p", {
647
+ p && !s.threadId && /* @__PURE__ */ V("p", {
652
648
  role: "status",
653
649
  className: "text-sm text-status-success-text",
654
- children: f
650
+ children: p
655
651
  }),
656
652
  s.sentNotice && /* @__PURE__ */ V("p", {
657
653
  role: "status",
@@ -662,22 +658,22 @@ function ne(e) {
662
658
  className: "grid gap-4 lg:grid-cols-[minmax(0,2fr)_minmax(0,3fr)]",
663
659
  children: [/* @__PURE__ */ V("section", {
664
660
  "aria-label": o("integrations.mailbox.list.ariaLabel", "Messages"),
665
- className: n("rounded-xl border border-border-subtle bg-bg-surface overflow-hidden", w && "hidden lg:block"),
661
+ className: e("rounded-xl border border-border-subtle bg-bg-surface overflow-hidden", w && "hidden lg:block"),
666
662
  children: /* @__PURE__ */ V(Z, {
667
663
  messages: h,
668
- loading: v,
664
+ loading: y,
669
665
  error: b,
670
666
  refetch: x,
671
667
  folder: s.folder,
672
668
  threadId: s.threadId,
673
669
  hasPrevious: s.pageTokens.length > 1,
674
- nextPageToken: g,
670
+ nextPageToken: _,
675
671
  onOpen: C,
676
672
  onPrevious: s.previousPage,
677
673
  onNext: s.nextPage
678
674
  })
679
675
  }), /* @__PURE__ */ V("section", {
680
- className: n(!w && "hidden lg:block"),
676
+ className: e(!w && "hidden lg:block"),
681
677
  children: s.composing && d ? /* @__PURE__ */ V(Y, {
682
678
  connectionId: d,
683
679
  kind: u?.kind ?? i.Gmail,
@@ -704,14 +700,13 @@ function ne(e) {
704
700
  });
705
701
  }
706
702
  function re() {
707
- let { accounts: e, answered: t, error: n } = d();
703
+ let { accounts: e, answered: t, error: n } = u();
708
704
  return !t && !n ? /* @__PURE__ */ V("div", {
709
705
  className: "flex items-center justify-center py-24",
710
706
  "data-testid": "mailbox-loading",
711
707
  children: /* @__PURE__ */ V(k, { className: "size-6 animate-spin text-primary" })
712
708
  }) : e.length === 0 ? /* @__PURE__ */ V(Q, { errorMessage: n?.message ?? null }) : /* @__PURE__ */ V(ne, { accounts: e });
713
709
  }
714
- //#endregion
715
710
  export { re as MailboxInbox };
716
711
 
717
712
  //# sourceMappingURL=MailboxInbox.js.map