@whop/embedded-components-vanilla-js 0.0.13-beta.8 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,16 +14,6 @@ interface TypedEventCreatorFn<Events, EventKeys extends keyof Events> {
14
14
  }
15
15
  type InferEvent<Fn> = Fn extends TypedEventCreatorFn<infer Events, infer EventKeys> ? TypedEventUnion<Events, EventKeys> : never;
16
16
 
17
- interface EmptyStateOptions {
18
- image?: {
19
- url: string;
20
- width?: number;
21
- height?: number;
22
- };
23
- title?: string;
24
- description?: string;
25
- }
26
-
27
17
  /**
28
18
  * A CSS property value.
29
19
  */
@@ -154,6 +144,31 @@ declare class TypedEmitterType<L extends ListenerSignature<L> = DefaultListener>
154
144
  setMaxListeners(n: number): this;
155
145
  }
156
146
 
147
+ /**
148
+ * Error codes emitted by Whop elements when something goes wrong.
149
+ *
150
+ * - `"UNKNOWN_ERROR"` — An unrecognized or unexpected error occurred inside the element.
151
+ */
152
+ type WhopElementErrorCode = "UNKNOWN_ERROR";
153
+ /**
154
+ * Structured error emitted by Whop elements.
155
+ *
156
+ * Provides a stable `code` for programmatic handling instead of leaking
157
+ * internal error messages to the embed host.
158
+ *
159
+ * @example
160
+ * ```typescript
161
+ * element.on("error", (error) => {
162
+ * if (error instanceof WhopElementError) {
163
+ * console.log(error.code); // "UNKNOWN_ERROR"
164
+ * }
165
+ * });
166
+ * ```
167
+ */
168
+ declare class WhopElementError extends Error {
169
+ readonly code: WhopElementErrorCode;
170
+ constructor(code: WhopElementErrorCode, message?: string);
171
+ }
157
172
  /**
158
173
  * Base interface for all Whop embeddable elements.
159
174
  *
@@ -251,6 +266,16 @@ interface WhopElement<ElementOptions, ElementEvents extends ListenerSignature<El
251
266
  getSnapshot: () => ElementSnapshot;
252
267
  }
253
268
 
269
+ interface EmptyStateOptions {
270
+ image?: {
271
+ url: string;
272
+ width?: number;
273
+ height?: number;
274
+ };
275
+ title?: string;
276
+ description?: string;
277
+ }
278
+
254
279
  /**
255
280
  * Events emitted by the ChatElement.
256
281
  *
@@ -293,10 +318,12 @@ interface ChatElementEvents {
293
318
  }>) => void;
294
319
  /**
295
320
  * Emitted when the user sends a message.
296
- * @param ev - The event containing the `message` in `ev.detail`.
321
+ * @param ev - The event containing the `id`, `content`, and `channelId` in `ev.detail`.
297
322
  */
298
323
  messageSent: (ev: CustomEvent<{
324
+ id: string;
299
325
  content: string;
326
+ channelId: string;
300
327
  }>) => void;
301
328
  /**
302
329
  * Emitted when the user clicks on an experience mention.
@@ -305,8 +332,24 @@ interface ChatElementEvents {
305
332
  experienceClick: (ev: CustomEvent<{
306
333
  id: string;
307
334
  }>) => void;
335
+ /**
336
+ * Emitted when the user clicks on an attachment.
337
+ * @param ev - The event containing the `messageId` and `attachments` in `ev.detail`.
338
+ */
339
+ attachmentClick: (ev: CustomEvent<{
340
+ messageId: string;
341
+ attachments: AttachmentClickEventAttachment[];
342
+ }>) => void;
343
+ }
344
+ interface AttachmentClickEventAttachment {
345
+ id: string;
346
+ url: string;
347
+ contentType?: string;
348
+ filename?: string;
349
+ width?: number;
350
+ height?: number;
308
351
  }
309
- declare const createTypedEvent$1: TypedEventCreatorFn<ChatElementEvents, "profileClick" | "linkClick" | "messageSent" | "experienceClick">;
352
+ declare const createTypedEvent$1: TypedEventCreatorFn<ChatElementEvents, "profileClick" | "linkClick" | "messageSent" | "experienceClick" | "attachmentClick">;
310
353
  type ChatElementEvent = InferEvent<typeof createTypedEvent$1>;
311
354
  /**
312
355
  * Configuration options for the ChatElement.
@@ -340,6 +383,40 @@ interface ChatElementOptions {
340
383
  * Custom empty state displayed when there are no messages.
341
384
  */
342
385
  emptyState?: EmptyStateOptions;
386
+ /**
387
+ * The style of the chat.
388
+ * @default 'imessage'
389
+ */
390
+ style?: "imessage" | "discord";
391
+ /**
392
+ * Configure which features are available in chat.
393
+ */
394
+ features?: {
395
+ /**
396
+ * Allow admins to ban users.
397
+ * When disabled, removes the "Ban user" option from message menu.
398
+ * @default true
399
+ */
400
+ banUser?: boolean;
401
+ /**
402
+ * Allow admins to mute users.
403
+ * When disabled, removes the "Mute user" option from message menu.
404
+ * @default true
405
+ */
406
+ muteUser?: boolean;
407
+ /**
408
+ * Allow users to preview attachments.
409
+ * When disabled, clicking an attachment does not open the preview modal.
410
+ * @default true
411
+ */
412
+ previewAttachments?: boolean;
413
+ /**
414
+ * Allow users to mention experiences.
415
+ * When disabled, typing # will not show experience suggestions.
416
+ * @default true
417
+ */
418
+ mentionExperiences?: boolean;
419
+ };
343
420
  /**
344
421
  * Callback fired when the element has finished loading and is ready for interaction.
345
422
  * This is equivalent to listening to the `ready` event.
@@ -401,7 +478,7 @@ interface ChatElementSnapshot {
401
478
  * });
402
479
  *
403
480
  * element.on("messageSent", (ev) => {
404
- * console.log("Message sent:", ev.detail.content);
481
+ * console.log("Message sent:", ev.detail.id, ev.detail.content, ev.detail.channelId);
405
482
  * });
406
483
  *
407
484
  * element.on("experienceClick", (ev) => {
@@ -532,6 +609,141 @@ interface DmsListElementSnapshot {
532
609
  */
533
610
  type DmsListElement = WhopElement<DmsListElementOptions, DmsListElementEvents, DmsListElementSnapshot>;
534
611
 
612
+ /**
613
+ * Events emitted by the SearchElement.
614
+ *
615
+ * Listen to these events using the `on()` method or by passing callback functions in the options.
616
+ */
617
+ interface SearchElementEvents {
618
+ /**
619
+ * Emitted when an error occurs during element initialization or operation.
620
+ * @param error - The error that occurred
621
+ */
622
+ error: (error: unknown) => void;
623
+ /**
624
+ * Emitted when the element has finished loading and is ready for user interaction.
625
+ * @param element - The element instance
626
+ */
627
+ ready: (element: SearchElement) => void;
628
+ /**
629
+ * Emitted when the element's options are updated via `updateOptions()`.
630
+ * @param options - The updated options object
631
+ */
632
+ optionsUpdated: (options: SearchElementOptions) => void;
633
+ /**
634
+ * Emitted when the element's internal state changes.
635
+ * @param snapshot - The current state snapshot
636
+ */
637
+ snapshot: (snapshot: SearchElementSnapshot) => void;
638
+ /**
639
+ * Emitted when the user closes the search element.
640
+ * Call `ev.preventDefault()` to prevent the element from automatically unmounting.
641
+ * @param ev - The close event. Access the element via `ev.detail`.
642
+ */
643
+ close: (ev: CustomEvent) => void;
644
+ /**
645
+ * Callback fired when the user clicks on a search result.
646
+ * Call `ev.preventDefault()` to prevent the element from automatically unmounting.
647
+ * @param ev - The event containing the `messageId` in `ev.detail`.
648
+ */
649
+ resultClick: (ev: CustomEvent<{
650
+ messageId: string;
651
+ channelId: string;
652
+ }>) => void;
653
+ }
654
+ /**
655
+ * Configuration options for the SearchElement.
656
+ *
657
+ * @example
658
+ * ```typescript
659
+ * const element = session.createElement("search-element", {
660
+ * channelId: "feed_XXXXXXXXXXXXXX",
661
+ * onReady: (element) => {
662
+ * console.log("Search element is ready");
663
+ * },
664
+ * });
665
+ * ```
666
+ */
667
+ interface SearchElementOptions {
668
+ /**
669
+ * The ID of the company to search messages in.
670
+ */
671
+ companyId?: string;
672
+ /**
673
+ * The ID of the chat channel to search messages in.
674
+ */
675
+ channelId?: string;
676
+ /**
677
+ * Callback fired when the element has finished loading and is ready for interaction.
678
+ * This is equivalent to listening to the `ready` event.
679
+ * @param element - The element instance
680
+ */
681
+ onReady?: (element: SearchElement) => void;
682
+ /**
683
+ * Callback fired when the user closes the element.
684
+ * By default, the element will unmount when closed. Call `ev.preventDefault()` to keep it mounted.
685
+ * @param ev - The close event
686
+ */
687
+ onClose?: (ev: CustomEvent) => void;
688
+ /**
689
+ * Callback fired when the user clicks on a search result.
690
+ * By default, the element will unmount after the result is clicked. Call `ev.preventDefault()` to keep it mounted.
691
+ * @param ev - The event
692
+ */
693
+ onResultClick?: (ev: CustomEvent<{
694
+ messageId: string;
695
+ channelId: string;
696
+ }>) => void;
697
+ }
698
+ /**
699
+ * Represents the current state of the SearchElement.
700
+ *
701
+ * Use `element.getSnapshot()` to get the current state, or listen to the `snapshot` event for changes.
702
+ */
703
+ interface SearchElementSnapshot {
704
+ /**
705
+ * The current loading state of the element.
706
+ * - `"loading"` - The element is initializing
707
+ * - `"ready"` - The element is fully loaded and interactive
708
+ */
709
+ state: "loading" | "ready";
710
+ }
711
+ /**
712
+ * A UI element that allows users to search for messages in a chat channel.
713
+ *
714
+ * @example Basic usage
715
+ * ```typescript
716
+ * // Create the element
717
+ * const element = session.createElement("search-element", {
718
+ * onClose: (ev) => {
719
+ * console.log("Search element closed");
720
+ * },
721
+ * });
722
+ *
723
+ * // Mount it to a container
724
+ * element.mount("#search-container");
725
+ * ```
726
+ *
727
+ * @example Using as a modal
728
+ * ```typescript
729
+ * // Show the element in a modal overlay
730
+ * const modal = session.showSearchModal({
731
+ * channelId: "feed_XXXXXXXXXXXXXX",
732
+ * onResultClick: (ev) => {
733
+ * console.log("Result clicked!", ev.detail.messageId);
734
+ * // Element auto-unmounts by default
735
+ * },
736
+ * });
737
+ * ```
738
+ */
739
+ type SearchElement = WhopElement<SearchElementOptions, SearchElementEvents, SearchElementSnapshot>;
740
+
741
+ interface ModalContainer {
742
+ modalContainer: HTMLElement;
743
+ mount: () => void;
744
+ close: () => void;
745
+ }
746
+
535
747
  type Token = string | Promise<string | null> | null;
536
748
  type GetToken = (opts: {
537
749
  abortSignal: AbortSignal;
@@ -607,6 +819,7 @@ interface ChatSessionEvents {
607
819
  type ChatSessionElements = {
608
820
  "chat-element": [ChatElementOptions, ChatElement];
609
821
  "dms-list-element": [DmsListElementOptions, DmsListElement];
822
+ "search-element": [SearchElementOptions, SearchElement];
610
823
  };
611
824
  /**
612
825
  * Manages authentication and creates chat elements.
@@ -668,6 +881,17 @@ interface ChatSession extends TypedEmitter<ChatSessionEvents> {
668
881
  createElement<T extends keyof ChatSessionElements>(type: T | {
669
882
  type: T;
670
883
  }, options: ChatSessionElements[T][0]): ChatSessionElements[T][1];
884
+ /**
885
+ * Show the search element in a modal overlay.
886
+ *
887
+ * By default, the modal auto-closes on completion (`onResultClick`) or dismiss (`onClose`).
888
+ * Call `ev.preventDefault()` in a callback to prevent auto-close.
889
+ *
890
+ * @category modal
891
+ * @param options - Element options or a callback that receives the modal container
892
+ * @returns The modal container, or undefined if a modal is already open (unless force is true)
893
+ */
894
+ showSearchModal<Force extends boolean = false>(options: SearchElementOptions | ((modal: ModalContainer) => SearchElementOptions), force?: Force): Force extends true ? ModalContainer : ModalContainer | undefined;
671
895
  }
672
896
 
673
897
  /**
@@ -971,6 +1195,130 @@ interface AutomaticWithdrawElementSnapshot {
971
1195
  */
972
1196
  type AutomaticWithdrawElement = WhopElement<AutomaticWithdrawElementOptions, AutomaticWithdrawElementEvents, AutomaticWithdrawElementSnapshot>;
973
1197
 
1198
+ /**
1199
+ * Events emitted by the AvailableCashBreakdownElement.
1200
+ *
1201
+ * Listen to these events using the `on()` method or by passing callback functions in the options.
1202
+ */
1203
+ interface AvailableCashBreakdownElementEvents {
1204
+ /**
1205
+ * Emitted when an error occurs during element initialization or operation.
1206
+ * @param error - The error that occurred
1207
+ */
1208
+ error: (error: unknown) => void;
1209
+ /**
1210
+ * Emitted when the element has finished loading and is ready for user interaction.
1211
+ * @param element - The element instance
1212
+ */
1213
+ ready: (element: AvailableCashBreakdownElement) => void;
1214
+ /**
1215
+ * Emitted when the element's options are updated via `updateOptions()`.
1216
+ * @param options - The updated options object
1217
+ */
1218
+ optionsUpdated: (options: AvailableCashBreakdownElementOptions) => void;
1219
+ /**
1220
+ * Emitted when the user closes the breakdown view.
1221
+ * Call `ev.preventDefault()` to prevent the element from automatically unmounting.
1222
+ * @param ev - The close event. Access the element via `ev.detail`.
1223
+ */
1224
+ close: (ev: CustomEvent) => void;
1225
+ /**
1226
+ * Emitted when the element's internal state changes.
1227
+ * @param snapshot - The current state snapshot
1228
+ */
1229
+ snapshot: (snapshot: AvailableCashBreakdownElementSnapshot) => void;
1230
+ }
1231
+ /**
1232
+ * Configuration options for the AvailableCashBreakdownElement.
1233
+ *
1234
+ * @example
1235
+ * ```typescript
1236
+ * const element = session.createElement("available-cash-breakdown-element", {
1237
+ * onReady: (element) => {
1238
+ * console.log("Breakdown is ready");
1239
+ * },
1240
+ * onClose: (ev) => {
1241
+ * console.log("User closed the breakdown");
1242
+ * },
1243
+ * });
1244
+ * ```
1245
+ */
1246
+ interface AvailableCashBreakdownElementOptions {
1247
+ /**
1248
+ * Callback fired when the element has finished loading and is ready for interaction.
1249
+ * This is equivalent to listening to the `ready` event.
1250
+ * @param element - The element instance
1251
+ */
1252
+ onReady?: (element: AvailableCashBreakdownElement) => void;
1253
+ /**
1254
+ * Callback fired when the user closes the breakdown view.
1255
+ * By default, the element will unmount when closed. Call `ev.preventDefault()` to keep it mounted.
1256
+ * @param ev - The close event
1257
+ */
1258
+ onClose?: (ev: CustomEvent) => void;
1259
+ }
1260
+ /**
1261
+ * Represents the current state of the AvailableCashBreakdownElement.
1262
+ *
1263
+ * Use `element.getSnapshot()` to get the current state, or listen to the `snapshot` event for changes.
1264
+ */
1265
+ interface AvailableCashBreakdownElementSnapshot {
1266
+ /**
1267
+ * The current loading state of the element.
1268
+ * - `"loading"` - The element is initializing
1269
+ * - `"ready"` - The element is fully loaded and interactive
1270
+ */
1271
+ state: "loading" | "ready";
1272
+ }
1273
+ /**
1274
+ * A UI element that shows a detailed breakdown of the available (withdrawable) cash balance.
1275
+ *
1276
+ * This element provides a detailed view of available funds, including:
1277
+ * - Itemized breakdown of available cash by source
1278
+ * - Total withdrawable amount
1279
+ * - Close action to dismiss the breakdown
1280
+ *
1281
+ * @example Basic usage
1282
+ * ```typescript
1283
+ * // Create the element
1284
+ * const element = session.createElement("available-cash-breakdown-element", {
1285
+ * onClose: (ev) => {
1286
+ * console.log("Breakdown closed");
1287
+ * },
1288
+ * });
1289
+ *
1290
+ * // Mount it to a container
1291
+ * element.mount("#breakdown-container");
1292
+ * ```
1293
+ *
1294
+ * @example Using as a modal
1295
+ * ```typescript
1296
+ * // Show the breakdown in a modal overlay
1297
+ * const modal = session.showAvailableCashBreakdownModal({
1298
+ * onClose: (ev) => {
1299
+ * ev.preventDefault();
1300
+ * modal.close();
1301
+ * },
1302
+ * });
1303
+ * ```
1304
+ *
1305
+ * @example Listening to events
1306
+ * ```typescript
1307
+ * const element = session.createElement("available-cash-breakdown-element", {});
1308
+ *
1309
+ * element.on("ready", () => {
1310
+ * console.log("Breakdown loaded");
1311
+ * });
1312
+ *
1313
+ * element.on("close", (ev) => {
1314
+ * console.log("User closed the breakdown");
1315
+ * });
1316
+ *
1317
+ * element.mount("#container");
1318
+ * ```
1319
+ */
1320
+ type AvailableCashBreakdownElement = WhopElement<AvailableCashBreakdownElementOptions, AvailableCashBreakdownElementEvents, AvailableCashBreakdownElementSnapshot>;
1321
+
974
1322
  /**
975
1323
  * Events emitted by the BalanceElement.
976
1324
  *
@@ -998,23 +1346,16 @@ interface BalanceElementEvents {
998
1346
  */
999
1347
  snapshot: (snapshot: BalanceElementSnapshot) => void;
1000
1348
  /**
1001
- * Emitted when the user clicks to view the available balance breakdown.
1002
- * By default, opens the TotalBalanceBreakdown modal. Call `ev.preventDefault()` to handle this yourself.
1003
- * @param ev - The event. Access the element via `ev.detail`.
1004
- */
1005
- showAvailableBalanceBreakdown: (ev: CustomEvent<BalanceElement>) => void;
1006
- /**
1007
- * Emitted when the user clicks to view the regular reserve balance breakdown.
1008
- * By default, opens the RegularReserveBalanceBreakdown modal. Call `ev.preventDefault()` to handle this yourself.
1009
- * @param ev - The event. Access the element via `ev.detail`.
1349
+ * Emitted when the user clicks the withdraw button.
1350
+ * Call `ev.preventDefault()` to prevent the element from automatically opening the withdraw modal.
1351
+ * @param ev - The withdraw event. Access the element via `ev.detail`.
1010
1352
  */
1011
- showRegularReserveBalanceBreakdown: (ev: CustomEvent<BalanceElement>) => void;
1353
+ withdraw: (ev: CustomEvent<BalanceElement>) => void;
1012
1354
  /**
1013
- * Emitted when the user clicks to view the BNPL reserve balance breakdown.
1014
- * By default, opens the BnplReserveBalanceBreakdown modal. Call `ev.preventDefault()` to handle this yourself.
1015
- * @param ev - The event. Access the element via `ev.detail`.
1355
+ * Emitted when the user needs to verify their account before withdrawing.
1356
+ * @param ev - The verify event. Access the element via `ev.detail`.
1016
1357
  */
1017
- showBnplReserveBalanceBreakdown: (ev: CustomEvent<BalanceElement>) => void;
1358
+ verify: (ev: CustomEvent<BalanceElement>) => void;
1018
1359
  }
1019
1360
  /**
1020
1361
  * Configuration options for the BalanceElement.
@@ -1022,25 +1363,25 @@ interface BalanceElementEvents {
1022
1363
  * @example
1023
1364
  * ```typescript
1024
1365
  * const element = session.createElement("balance-element", {
1025
- * hidePendingBalance: true,
1366
+ * showWithdrawButton: true,
1026
1367
  * onReady: (element) => {
1027
1368
  * console.log("Balance element is ready");
1028
1369
  * },
1029
- * onShowAvailableBalanceBreakdown: (ev) => {
1030
- * // Custom handling - prevent default modal
1031
- * ev.preventDefault();
1032
- * showCustomBreakdownModal();
1370
+ * onWithdraw: (ev) => {
1371
+ * console.log("User clicked withdraw");
1372
+ * },
1373
+ * onVerify: (ev) => {
1374
+ * console.log("User needs to verify their account");
1033
1375
  * },
1034
1376
  * });
1035
1377
  * ```
1036
1378
  */
1037
1379
  interface BalanceElementOptions {
1038
1380
  /**
1039
- * Whether to hide the pending balance from the display.
1040
- * When `true`, only the available balance will be shown.
1041
- * @default false
1381
+ * Whether to show the withdraw button within the balance element.
1382
+ * When enabled, the user can initiate a withdrawal directly from the balance view.
1042
1383
  */
1043
- hidePendingBalance?: boolean;
1384
+ showWithdrawButton?: boolean;
1044
1385
  /**
1045
1386
  * Callback fired when the element has finished loading and is ready for interaction.
1046
1387
  * This is equivalent to listening to the `ready` event.
@@ -1048,23 +1389,16 @@ interface BalanceElementOptions {
1048
1389
  */
1049
1390
  onReady?: (element: BalanceElement) => void;
1050
1391
  /**
1051
- * Callback fired when the user clicks to view the available balance breakdown.
1052
- * By default, opens the TotalBalanceBreakdown modal. Call `ev.preventDefault()` to handle this yourself.
1053
- * @param ev - The event. Access the element via `ev.detail`.
1054
- */
1055
- onShowAvailableBalanceBreakdown?: (ev: CustomEvent<BalanceElement>) => void;
1056
- /**
1057
- * Callback fired when the user clicks to view the regular reserve balance breakdown.
1058
- * By default, opens the RegularReserveBalanceBreakdown modal. Call `ev.preventDefault()` to handle this yourself.
1059
- * @param ev - The event. Access the element via `ev.detail`.
1392
+ * Callback fired when the user clicks the withdraw button.
1393
+ * By default, the element will open the withdraw modal. Call `ev.preventDefault()` to handle the withdrawal yourself.
1394
+ * @param ev - The withdraw event. Access the element via `ev.detail`.
1060
1395
  */
1061
- onShowRegularReserveBalanceBreakdown?: (ev: CustomEvent<BalanceElement>) => void;
1396
+ onWithdraw?: (ev: CustomEvent<BalanceElement>) => void;
1062
1397
  /**
1063
- * Callback fired when the user clicks to view the BNPL reserve balance breakdown.
1064
- * By default, opens the BnplReserveBalanceBreakdown modal. Call `ev.preventDefault()` to handle this yourself.
1065
- * @param ev - The event. Access the element via `ev.detail`.
1398
+ * Callback fired when the user needs to verify their account before withdrawing.
1399
+ * @param ev - The verify event. Access the element via `ev.detail`.
1066
1400
  */
1067
- onShowBnplReserveBalanceBreakdown?: (ev: CustomEvent<BalanceElement>) => void;
1401
+ onVerify?: (ev: CustomEvent<BalanceElement>) => void;
1068
1402
  }
1069
1403
  /**
1070
1404
  * Represents the current state of the BalanceElement.
@@ -1080,22 +1414,21 @@ interface BalanceElementSnapshot {
1080
1414
  state: "loading" | "ready";
1081
1415
  }
1082
1416
  /**
1083
- * A UI element that displays the user's balance information including available, pending, and reserve balances.
1084
- *
1085
- * This element provides a comprehensive view of the user's financial status:
1086
- * - Available balance (funds ready for withdrawal)
1087
- * - Pending balance (funds being processed)
1088
- * - Regular reserve balance (funds held in reserve)
1089
- * - BNPL reserve balance (Buy Now Pay Later reserve funds)
1417
+ * A UI element that displays the user's current balance including available, pending, and reserve amounts with an optional withdraw button.
1090
1418
  *
1091
- * Clicking on balance sections opens detailed breakdown modals by default.
1419
+ * This element provides a complete balance overview, including:
1420
+ * - Displaying available, pending, and reserve balance amounts
1421
+ * - Optional withdraw button to initiate withdrawals
1422
+ * - Clickable balance rows that open detailed breakdown modals
1423
+ * - Treasury balance display when enabled
1092
1424
  *
1093
1425
  * @example Basic usage
1094
1426
  * ```typescript
1095
1427
  * // Create the element
1096
1428
  * const element = session.createElement("balance-element", {
1097
- * onReady: () => {
1098
- * console.log("Balance loaded!");
1429
+ * showWithdrawButton: true,
1430
+ * onWithdraw: (ev) => {
1431
+ * console.log("User initiated withdrawal");
1099
1432
  * },
1100
1433
  * });
1101
1434
  *
@@ -1103,40 +1436,25 @@ interface BalanceElementSnapshot {
1103
1436
  * element.mount("#balance-container");
1104
1437
  * ```
1105
1438
  *
1106
- * @example Hiding pending balance
1439
+ * @example Listening to events
1107
1440
  * ```typescript
1108
1441
  * const element = session.createElement("balance-element", {
1109
- * hidePendingBalance: true,
1442
+ * showWithdrawButton: true,
1110
1443
  * });
1111
1444
  *
1112
- * element.mount("#balance-container");
1113
- * ```
1114
- *
1115
- * @example Custom breakdown handling
1116
- * ```typescript
1117
- * const element = session.createElement("balance-element", {
1118
- * onShowAvailableBalanceBreakdown: (ev) => {
1119
- * // Prevent the default modal from opening
1120
- * ev.preventDefault();
1121
- * // Show your own custom breakdown UI
1122
- * showCustomBreakdownModal();
1123
- * },
1445
+ * element.on("ready", () => {
1446
+ * console.log("Balance loaded");
1124
1447
  * });
1125
1448
  *
1126
- * element.mount("#balance-container");
1127
- * ```
1128
- *
1129
- * @example Listening to events
1130
- * ```typescript
1131
- * const element = session.createElement("balance-element", {});
1132
- *
1133
- * element.on("ready", () => {
1134
- * console.log("Element loaded");
1449
+ * element.on("withdraw", (ev) => {
1450
+ * // Prevent the default withdraw modal from opening
1451
+ * ev.preventDefault();
1452
+ * // Handle withdrawal with your own UI
1453
+ * openCustomWithdrawFlow();
1135
1454
  * });
1136
1455
  *
1137
- * element.on("showAvailableBalanceBreakdown", (ev) => {
1138
- * console.log("User clicked on available balance");
1139
- * // Let default modal open, or call ev.preventDefault() to handle yourself
1456
+ * element.on("verify", (ev) => {
1457
+ * console.log("Account verification required");
1140
1458
  * });
1141
1459
  *
1142
1460
  * element.mount("#container");
@@ -1145,11 +1463,11 @@ interface BalanceElementSnapshot {
1145
1463
  type BalanceElement = WhopElement<BalanceElementOptions, BalanceElementEvents, BalanceElementSnapshot>;
1146
1464
 
1147
1465
  /**
1148
- * Events emitted by the BnplReserveBalanceBreakdownElement.
1466
+ * Events emitted by the BalancesElement.
1149
1467
  *
1150
1468
  * Listen to these events using the `on()` method or by passing callback functions in the options.
1151
1469
  */
1152
- interface BnplReserveBalanceBreakdownElementEvents {
1470
+ interface BalancesElementEvents {
1153
1471
  /**
1154
1472
  * Emitted when an error occurs during element initialization or operation.
1155
1473
  * @param error - The error that occurred
@@ -1159,116 +1477,106 @@ interface BnplReserveBalanceBreakdownElementEvents {
1159
1477
  * Emitted when the element has finished loading and is ready for user interaction.
1160
1478
  * @param element - The element instance
1161
1479
  */
1162
- ready: (element: BnplReserveBalanceBreakdownElement) => void;
1480
+ ready: (element: BalancesElement) => void;
1163
1481
  /**
1164
1482
  * Emitted when the element's options are updated via `updateOptions()`.
1165
1483
  * @param options - The updated options object
1166
1484
  */
1167
- optionsUpdated: (options: BnplReserveBalanceBreakdownElementOptions) => void;
1168
- /**
1169
- * Emitted when the user closes the breakdown view.
1170
- * Call `ev.preventDefault()` to prevent the element from automatically unmounting.
1171
- * @param ev - The close event. Access the element via `ev.detail`.
1172
- */
1173
- close: (ev: CustomEvent) => void;
1485
+ optionsUpdated: (options: BalancesElementOptions) => void;
1174
1486
  /**
1175
1487
  * Emitted when the element's internal state changes.
1176
1488
  * @param snapshot - The current state snapshot
1177
1489
  */
1178
- snapshot: (snapshot: BnplReserveBalanceBreakdownElementSnapshot) => void;
1490
+ snapshot: (snapshot: BalancesElementSnapshot) => void;
1179
1491
  }
1180
1492
  /**
1181
- * Configuration options for the BnplReserveBalanceBreakdownElement.
1493
+ * Configuration options for the BalancesElement.
1182
1494
  *
1183
1495
  * @example
1184
1496
  * ```typescript
1185
- * const element = session.createElement("bnpl-reserve-balance-breakdown-element", {
1497
+ * const element = session.createElement("balances-element", {
1498
+ * primaryCurrency: "usd",
1186
1499
  * onReady: (element) => {
1187
- * console.log("Breakdown is ready");
1188
- * },
1189
- * onClose: (ev) => {
1190
- * console.log("User closed the breakdown");
1500
+ * console.log("Balances element is ready");
1191
1501
  * },
1192
1502
  * });
1193
1503
  * ```
1194
1504
  */
1195
- interface BnplReserveBalanceBreakdownElementOptions {
1505
+ interface BalancesElementOptions {
1506
+ /**
1507
+ * The ISO currency code to display as the primary (top-level) currency.
1508
+ * Other currencies with balances will appear below it.
1509
+ */
1510
+ primaryCurrency?: string;
1196
1511
  /**
1197
1512
  * Callback fired when the element has finished loading and is ready for interaction.
1198
1513
  * This is equivalent to listening to the `ready` event.
1199
1514
  * @param element - The element instance
1200
1515
  */
1201
- onReady?: (element: BnplReserveBalanceBreakdownElement) => void;
1202
- /**
1203
- * Callback fired when the user closes the breakdown view.
1204
- * By default, the element will unmount when closed. Call `ev.preventDefault()` to keep it mounted.
1205
- * @param ev - The close event
1206
- */
1207
- onClose?: (ev: CustomEvent) => void;
1516
+ onReady?: (element: BalancesElement) => void;
1208
1517
  }
1209
1518
  /**
1210
- * Represents the current state of the BnplReserveBalanceBreakdownElement.
1519
+ * Represents the current state of the BalancesElement.
1211
1520
  *
1212
1521
  * Use `element.getSnapshot()` to get the current state, or listen to the `snapshot` event for changes.
1213
1522
  */
1214
- interface BnplReserveBalanceBreakdownElementSnapshot {
1523
+ interface BalancesElementSnapshot {
1215
1524
  /**
1216
1525
  * The current loading state of the element.
1217
1526
  * - `"loading"` - The element is initializing
1218
1527
  * - `"ready"` - The element is fully loaded and interactive
1528
+ * - `"error"` - The element encountered an error during initialization
1219
1529
  */
1220
- state: "loading" | "ready";
1530
+ state: "loading" | "ready" | "error";
1531
+ /**
1532
+ * The list of ISO currency codes that have balances.
1533
+ */
1534
+ currencies: string[];
1535
+ /**
1536
+ * Whether the treasury (crypto portfolio) feature is enabled for this account.
1537
+ */
1538
+ treasuryEnabled: boolean;
1221
1539
  }
1222
1540
  /**
1223
- * A UI element that displays a detailed breakdown of the BNPL (Buy Now Pay Later) reserve balance.
1541
+ * A UI element that displays a multi-currency balance overview with expandable currency rows showing available, pending, and reserve breakdowns per currency.
1224
1542
  *
1225
- * This element shows how funds are allocated in the BNPL reserve, including:
1226
- * - Total BNPL reserve amount
1227
- * - Individual transaction holds
1228
- * - Expected release dates for reserved funds
1229
- *
1230
- * BNPL reserves are funds held to cover potential refunds or chargebacks from Buy Now Pay Later transactions.
1543
+ * This element provides a comprehensive multi-currency balance view, including:
1544
+ * - Aggregated total balance across all currencies
1545
+ * - Expandable rows for each currency with available, pending, and reserve breakdowns
1546
+ * - Primary currency pinned at the top of the list
1547
+ * - Treasury (crypto portfolio) section when enabled
1231
1548
  *
1232
1549
  * @example Basic usage
1233
1550
  * ```typescript
1234
1551
  * // Create the element
1235
- * const element = session.createElement("bnpl-reserve-balance-breakdown-element", {
1236
- * onClose: () => {
1237
- * console.log("Breakdown closed");
1552
+ * const element = session.createElement("balances-element", {
1553
+ * primaryCurrency: "usd",
1554
+ * onReady: (element) => {
1555
+ * console.log("Balances loaded");
1238
1556
  * },
1239
1557
  * });
1240
1558
  *
1241
1559
  * // Mount it to a container
1242
- * element.mount("#bnpl-breakdown-container");
1243
- * ```
1244
- *
1245
- * @example Using as a modal
1246
- * ```typescript
1247
- * // Show the breakdown in a modal overlay
1248
- * const modal = session.showBnplReserveBalanceBreakdownModal({
1249
- * onClose: (ev) => {
1250
- * ev.preventDefault();
1251
- * modal.close();
1252
- * },
1253
- * });
1560
+ * element.mount("#balances-container");
1254
1561
  * ```
1255
1562
  *
1256
1563
  * @example Listening to events
1257
1564
  * ```typescript
1258
- * const element = session.createElement("bnpl-reserve-balance-breakdown-element", {});
1565
+ * const element = session.createElement("balances-element", {});
1259
1566
  *
1260
1567
  * element.on("ready", () => {
1261
- * console.log("Breakdown loaded");
1568
+ * console.log("Element loaded");
1262
1569
  * });
1263
1570
  *
1264
- * element.on("close", (ev) => {
1265
- * console.log("User closed the breakdown");
1571
+ * element.on("snapshot", (snapshot) => {
1572
+ * console.log("Currencies:", snapshot.currencies);
1573
+ * console.log("Treasury enabled:", snapshot.treasuryEnabled);
1266
1574
  * });
1267
1575
  *
1268
1576
  * element.mount("#container");
1269
1577
  * ```
1270
1578
  */
1271
- type BnplReserveBalanceBreakdownElement = WhopElement<BnplReserveBalanceBreakdownElementOptions, BnplReserveBalanceBreakdownElementEvents, BnplReserveBalanceBreakdownElementSnapshot>;
1579
+ type BalancesElement = WhopElement<BalancesElementOptions, BalancesElementEvents, BalancesElementSnapshot>;
1272
1580
 
1273
1581
  /**
1274
1582
  * Events emitted by the ChangeAccountCountryElement.
@@ -1580,11 +1888,11 @@ interface GenerateWithdrawalReceiptElementSnapshot {
1580
1888
  type GenerateWithdrawalReceiptElement = WhopElement<GenerateWithdrawalReceiptElementOptions, GenerateWithdrawalReceiptElementEvents, GenerateWithdrawalReceiptElementSnapshot>;
1581
1889
 
1582
1890
  /**
1583
- * Events emitted by the RegularReserveBalanceBreakdownElement.
1891
+ * Events emitted by the PendingBreakdownElement.
1584
1892
  *
1585
1893
  * Listen to these events using the `on()` method or by passing callback functions in the options.
1586
1894
  */
1587
- interface RegularReserveBalanceBreakdownElementEvents {
1895
+ interface PendingBreakdownElementEvents {
1588
1896
  /**
1589
1897
  * Emitted when an error occurs during element initialization or operation.
1590
1898
  * @param error - The error that occurred
@@ -1594,12 +1902,12 @@ interface RegularReserveBalanceBreakdownElementEvents {
1594
1902
  * Emitted when the element has finished loading and is ready for user interaction.
1595
1903
  * @param element - The element instance
1596
1904
  */
1597
- ready: (element: RegularReserveBalanceBreakdownElement) => void;
1905
+ ready: (element: PendingBreakdownElement) => void;
1598
1906
  /**
1599
1907
  * Emitted when the element's options are updated via `updateOptions()`.
1600
1908
  * @param options - The updated options object
1601
1909
  */
1602
- optionsUpdated: (options: RegularReserveBalanceBreakdownElementOptions) => void;
1910
+ optionsUpdated: (options: PendingBreakdownElementOptions) => void;
1603
1911
  /**
1604
1912
  * Emitted when the user closes the breakdown view.
1605
1913
  * Call `ev.preventDefault()` to prevent the element from automatically unmounting.
@@ -1610,14 +1918,14 @@ interface RegularReserveBalanceBreakdownElementEvents {
1610
1918
  * Emitted when the element's internal state changes.
1611
1919
  * @param snapshot - The current state snapshot
1612
1920
  */
1613
- snapshot: (snapshot: RegularReserveBalanceBreakdownElementSnapshot) => void;
1921
+ snapshot: (snapshot: PendingBreakdownElementSnapshot) => void;
1614
1922
  }
1615
1923
  /**
1616
- * Configuration options for the RegularReserveBalanceBreakdownElement.
1924
+ * Configuration options for the PendingBreakdownElement.
1617
1925
  *
1618
1926
  * @example
1619
1927
  * ```typescript
1620
- * const element = session.createElement("regular-reserve-balance-breakdown-element", {
1928
+ * const element = session.createElement("pending-breakdown-element", {
1621
1929
  * onReady: (element) => {
1622
1930
  * console.log("Breakdown is ready");
1623
1931
  * },
@@ -1627,13 +1935,13 @@ interface RegularReserveBalanceBreakdownElementEvents {
1627
1935
  * });
1628
1936
  * ```
1629
1937
  */
1630
- interface RegularReserveBalanceBreakdownElementOptions {
1938
+ interface PendingBreakdownElementOptions {
1631
1939
  /**
1632
1940
  * Callback fired when the element has finished loading and is ready for interaction.
1633
1941
  * This is equivalent to listening to the `ready` event.
1634
1942
  * @param element - The element instance
1635
1943
  */
1636
- onReady?: (element: RegularReserveBalanceBreakdownElement) => void;
1944
+ onReady?: (element: PendingBreakdownElement) => void;
1637
1945
  /**
1638
1946
  * Callback fired when the user closes the breakdown view.
1639
1947
  * By default, the element will unmount when closed. Call `ev.preventDefault()` to keep it mounted.
@@ -1642,11 +1950,11 @@ interface RegularReserveBalanceBreakdownElementOptions {
1642
1950
  onClose?: (ev: CustomEvent) => void;
1643
1951
  }
1644
1952
  /**
1645
- * Represents the current state of the RegularReserveBalanceBreakdownElement.
1953
+ * Represents the current state of the PendingBreakdownElement.
1646
1954
  *
1647
1955
  * Use `element.getSnapshot()` to get the current state, or listen to the `snapshot` event for changes.
1648
1956
  */
1649
- interface RegularReserveBalanceBreakdownElementSnapshot {
1957
+ interface PendingBreakdownElementSnapshot {
1650
1958
  /**
1651
1959
  * The current loading state of the element.
1652
1960
  * - `"loading"` - The element is initializing
@@ -1655,32 +1963,155 @@ interface RegularReserveBalanceBreakdownElementSnapshot {
1655
1963
  state: "loading" | "ready";
1656
1964
  }
1657
1965
  /**
1658
- * A UI element that displays a detailed breakdown of the regular reserve balance.
1966
+ * A UI element that displays a breakdown of pending balance amounts that are being processed.
1659
1967
  *
1660
- * This element shows how funds are allocated in the regular reserve, including:
1661
- * - Total reserve amount
1662
- * - Individual transaction holds
1663
- * - Expected release dates for reserved funds
1968
+ * This element provides a detailed view of pending funds, including:
1969
+ * - Itemized list of pending transactions and their expected settlement
1970
+ * - Total pending amount
1971
+ * - Close action to dismiss the breakdown
1972
+ *
1973
+ * @example Basic usage
1974
+ * ```typescript
1975
+ * // Create the element
1976
+ * const element = session.createElement("pending-breakdown-element", {
1977
+ * onClose: (ev) => {
1978
+ * console.log("Breakdown closed");
1979
+ * },
1980
+ * });
1981
+ *
1982
+ * // Mount it to a container
1983
+ * element.mount("#breakdown-container");
1984
+ * ```
1985
+ *
1986
+ * @example Using as a modal
1987
+ * ```typescript
1988
+ * // Show the breakdown in a modal overlay
1989
+ * const modal = session.showPendingBreakdownModal({
1990
+ * onClose: (ev) => {
1991
+ * ev.preventDefault();
1992
+ * modal.close();
1993
+ * },
1994
+ * });
1995
+ * ```
1664
1996
  *
1665
- * Regular reserves are funds held to cover potential refunds, chargebacks, or disputes from standard transactions.
1997
+ * @example Listening to events
1998
+ * ```typescript
1999
+ * const element = session.createElement("pending-breakdown-element", {});
2000
+ *
2001
+ * element.on("ready", () => {
2002
+ * console.log("Breakdown loaded");
2003
+ * });
2004
+ *
2005
+ * element.on("close", (ev) => {
2006
+ * console.log("User closed the breakdown");
2007
+ * });
2008
+ *
2009
+ * element.mount("#container");
2010
+ * ```
2011
+ */
2012
+ type PendingBreakdownElement = WhopElement<PendingBreakdownElementOptions, PendingBreakdownElementEvents, PendingBreakdownElementSnapshot>;
2013
+
2014
+ /**
2015
+ * Events emitted by the ReserveBreakdownElement.
2016
+ *
2017
+ * Listen to these events using the `on()` method or by passing callback functions in the options.
2018
+ */
2019
+ interface ReserveBreakdownElementEvents {
2020
+ /**
2021
+ * Emitted when an error occurs during element initialization or operation.
2022
+ * @param error - The error that occurred
2023
+ */
2024
+ error: (error: unknown) => void;
2025
+ /**
2026
+ * Emitted when the element has finished loading and is ready for user interaction.
2027
+ * @param element - The element instance
2028
+ */
2029
+ ready: (element: ReserveBreakdownElement) => void;
2030
+ /**
2031
+ * Emitted when the element's options are updated via `updateOptions()`.
2032
+ * @param options - The updated options object
2033
+ */
2034
+ optionsUpdated: (options: ReserveBreakdownElementOptions) => void;
2035
+ /**
2036
+ * Emitted when the user closes the breakdown view.
2037
+ * Call `ev.preventDefault()` to prevent the element from automatically unmounting.
2038
+ * @param ev - The close event. Access the element via `ev.detail`.
2039
+ */
2040
+ close: (ev: CustomEvent) => void;
2041
+ /**
2042
+ * Emitted when the element's internal state changes.
2043
+ * @param snapshot - The current state snapshot
2044
+ */
2045
+ snapshot: (snapshot: ReserveBreakdownElementSnapshot) => void;
2046
+ }
2047
+ /**
2048
+ * Configuration options for the ReserveBreakdownElement.
2049
+ *
2050
+ * @example
2051
+ * ```typescript
2052
+ * const element = session.createElement("reserve-breakdown-element", {
2053
+ * onReady: (element) => {
2054
+ * console.log("Breakdown is ready");
2055
+ * },
2056
+ * onClose: (ev) => {
2057
+ * console.log("User closed the breakdown");
2058
+ * },
2059
+ * });
2060
+ * ```
2061
+ */
2062
+ interface ReserveBreakdownElementOptions {
2063
+ /**
2064
+ * Callback fired when the element has finished loading and is ready for interaction.
2065
+ * This is equivalent to listening to the `ready` event.
2066
+ * @param element - The element instance
2067
+ */
2068
+ onReady?: (element: ReserveBreakdownElement) => void;
2069
+ /**
2070
+ * Callback fired when the user closes the breakdown view.
2071
+ * By default, the element will unmount when closed. Call `ev.preventDefault()` to keep it mounted.
2072
+ * @param ev - The close event
2073
+ */
2074
+ onClose?: (ev: CustomEvent) => void;
2075
+ }
2076
+ /**
2077
+ * Represents the current state of the ReserveBreakdownElement.
2078
+ *
2079
+ * Use `element.getSnapshot()` to get the current state, or listen to the `snapshot` event for changes.
2080
+ */
2081
+ interface ReserveBreakdownElementSnapshot {
2082
+ /**
2083
+ * The current loading state of the element.
2084
+ * - `"loading"` - The element is initializing
2085
+ * - `"ready"` - The element is fully loaded and interactive
2086
+ */
2087
+ state: "loading" | "ready";
2088
+ }
2089
+ /**
2090
+ * A UI element that shows a breakdown of reserve balance amounts explaining held funds and their expected availability.
2091
+ *
2092
+ * This element provides a detailed view of reserved funds, including:
2093
+ * - Itemized list of reserve holds and their reasons
2094
+ * - Expected release dates for held funds
2095
+ * - Total reserve amount
2096
+ * - Close action to dismiss the breakdown
1666
2097
  *
1667
2098
  * @example Basic usage
1668
2099
  * ```typescript
1669
2100
  * // Create the element
1670
- * const element = session.createElement("regular-reserve-balance-breakdown-element", {
1671
- * onClose: () => {
2101
+ * const element = session.createElement("reserve-breakdown-element", {
2102
+ * onClose: (ev) => {
1672
2103
  * console.log("Breakdown closed");
1673
2104
  * },
1674
2105
  * });
1675
2106
  *
1676
2107
  * // Mount it to a container
1677
- * element.mount("#reserve-breakdown-container");
2108
+ * element.mount("#breakdown-container");
1678
2109
  * ```
1679
2110
  *
1680
2111
  * @example Using as a modal
1681
2112
  * ```typescript
1682
2113
  * // Show the breakdown in a modal overlay
1683
- * const modal = session.showRegularReserveBalanceBreakdownModal({
2114
+ * const modal = session.showReserveBreakdownModal({
1684
2115
  * onClose: (ev) => {
1685
2116
  * ev.preventDefault();
1686
2117
  * modal.close();
@@ -1690,7 +2121,7 @@ interface RegularReserveBalanceBreakdownElementSnapshot {
1690
2121
  *
1691
2122
  * @example Listening to events
1692
2123
  * ```typescript
1693
- * const element = session.createElement("regular-reserve-balance-breakdown-element", {});
2124
+ * const element = session.createElement("reserve-breakdown-element", {});
1694
2125
  *
1695
2126
  * element.on("ready", () => {
1696
2127
  * console.log("Breakdown loaded");
@@ -1703,7 +2134,7 @@ interface RegularReserveBalanceBreakdownElementSnapshot {
1703
2134
  * element.mount("#container");
1704
2135
  * ```
1705
2136
  */
1706
- type RegularReserveBalanceBreakdownElement = WhopElement<RegularReserveBalanceBreakdownElementOptions, RegularReserveBalanceBreakdownElementEvents, RegularReserveBalanceBreakdownElementSnapshot>;
2137
+ type ReserveBreakdownElement = WhopElement<ReserveBreakdownElementOptions, ReserveBreakdownElementEvents, ReserveBreakdownElementSnapshot>;
1707
2138
 
1708
2139
  /**
1709
2140
  * Events emitted by the ResetAccountElement.
@@ -2028,11 +2459,11 @@ interface StatusBannerElementSnapshot {
2028
2459
  type StatusBannerElement = WhopElement<StatusBannerElementOptions, StatusBannerElementEvents, StatusBannerElementSnapshot>;
2029
2460
 
2030
2461
  /**
2031
- * Events emitted by the TotalBalanceBreakdownElement.
2462
+ * Events emitted by the TreasuryBreakdownElement.
2032
2463
  *
2033
2464
  * Listen to these events using the `on()` method or by passing callback functions in the options.
2034
2465
  */
2035
- interface TotalBalanceBreakdownElementEvents {
2466
+ interface TreasuryBreakdownElementEvents {
2036
2467
  /**
2037
2468
  * Emitted when an error occurs during element initialization or operation.
2038
2469
  * @param error - The error that occurred
@@ -2042,12 +2473,12 @@ interface TotalBalanceBreakdownElementEvents {
2042
2473
  * Emitted when the element has finished loading and is ready for user interaction.
2043
2474
  * @param element - The element instance
2044
2475
  */
2045
- ready: (element: TotalBalanceBreakdownElement) => void;
2476
+ ready: (element: TreasuryBreakdownElement) => void;
2046
2477
  /**
2047
2478
  * Emitted when the element's options are updated via `updateOptions()`.
2048
2479
  * @param options - The updated options object
2049
2480
  */
2050
- optionsUpdated: (options: TotalBalanceBreakdownElementOptions) => void;
2481
+ optionsUpdated: (options: TreasuryBreakdownElementOptions) => void;
2051
2482
  /**
2052
2483
  * Emitted when the user closes the breakdown view.
2053
2484
  * Call `ev.preventDefault()` to prevent the element from automatically unmounting.
@@ -2058,14 +2489,14 @@ interface TotalBalanceBreakdownElementEvents {
2058
2489
  * Emitted when the element's internal state changes.
2059
2490
  * @param snapshot - The current state snapshot
2060
2491
  */
2061
- snapshot: (snapshot: TotalBalanceBreakdownElementSnapshot) => void;
2492
+ snapshot: (snapshot: TreasuryBreakdownElementSnapshot) => void;
2062
2493
  }
2063
2494
  /**
2064
- * Configuration options for the TotalBalanceBreakdownElement.
2495
+ * Configuration options for the TreasuryBreakdownElement.
2065
2496
  *
2066
2497
  * @example
2067
2498
  * ```typescript
2068
- * const element = session.createElement("total-balance-breakdown-element", {
2499
+ * const element = session.createElement("treasury-breakdown-element", {
2069
2500
  * onReady: (element) => {
2070
2501
  * console.log("Breakdown is ready");
2071
2502
  * },
@@ -2075,13 +2506,13 @@ interface TotalBalanceBreakdownElementEvents {
2075
2506
  * });
2076
2507
  * ```
2077
2508
  */
2078
- interface TotalBalanceBreakdownElementOptions {
2509
+ interface TreasuryBreakdownElementOptions {
2079
2510
  /**
2080
2511
  * Callback fired when the element has finished loading and is ready for interaction.
2081
2512
  * This is equivalent to listening to the `ready` event.
2082
2513
  * @param element - The element instance
2083
2514
  */
2084
- onReady?: (element: TotalBalanceBreakdownElement) => void;
2515
+ onReady?: (element: TreasuryBreakdownElement) => void;
2085
2516
  /**
2086
2517
  * Callback fired when the user closes the breakdown view.
2087
2518
  * By default, the element will unmount when closed. Call `ev.preventDefault()` to keep it mounted.
@@ -2090,11 +2521,11 @@ interface TotalBalanceBreakdownElementOptions {
2090
2521
  onClose?: (ev: CustomEvent) => void;
2091
2522
  }
2092
2523
  /**
2093
- * Represents the current state of the TotalBalanceBreakdownElement.
2524
+ * Represents the current state of the TreasuryBreakdownElement.
2094
2525
  *
2095
2526
  * Use `element.getSnapshot()` to get the current state, or listen to the `snapshot` event for changes.
2096
2527
  */
2097
- interface TotalBalanceBreakdownElementSnapshot {
2528
+ interface TreasuryBreakdownElementSnapshot {
2098
2529
  /**
2099
2530
  * The current loading state of the element.
2100
2531
  * - `"loading"` - The element is initializing
@@ -2103,31 +2534,30 @@ interface TotalBalanceBreakdownElementSnapshot {
2103
2534
  state: "loading" | "ready";
2104
2535
  }
2105
2536
  /**
2106
- * A UI element that displays a detailed breakdown of the user's total available balance.
2537
+ * A UI element that displays a breakdown of treasury funds including crypto portfolio holdings.
2107
2538
  *
2108
- * This element shows how the total balance is composed, including:
2109
- * - Available balance (funds ready for withdrawal)
2110
- * - Pending transactions
2111
- * - Expected deposits
2112
- * - Any holds or adjustments
2539
+ * This element provides a detailed view of treasury funds, including:
2540
+ * - Crypto portfolio holdings and their current values
2541
+ * - Total treasury balance
2542
+ * - Close action to dismiss the breakdown
2113
2543
  *
2114
2544
  * @example Basic usage
2115
2545
  * ```typescript
2116
2546
  * // Create the element
2117
- * const element = session.createElement("total-balance-breakdown-element", {
2118
- * onClose: () => {
2547
+ * const element = session.createElement("treasury-breakdown-element", {
2548
+ * onClose: (ev) => {
2119
2549
  * console.log("Breakdown closed");
2120
2550
  * },
2121
2551
  * });
2122
2552
  *
2123
2553
  * // Mount it to a container
2124
- * element.mount("#balance-breakdown-container");
2554
+ * element.mount("#breakdown-container");
2125
2555
  * ```
2126
2556
  *
2127
2557
  * @example Using as a modal
2128
2558
  * ```typescript
2129
2559
  * // Show the breakdown in a modal overlay
2130
- * const modal = session.showTotalBalanceBreakdownModal({
2560
+ * const modal = session.showTreasuryBreakdownModal({
2131
2561
  * onClose: (ev) => {
2132
2562
  * ev.preventDefault();
2133
2563
  * modal.close();
@@ -2137,7 +2567,7 @@ interface TotalBalanceBreakdownElementSnapshot {
2137
2567
  *
2138
2568
  * @example Listening to events
2139
2569
  * ```typescript
2140
- * const element = session.createElement("total-balance-breakdown-element", {});
2570
+ * const element = session.createElement("treasury-breakdown-element", {});
2141
2571
  *
2142
2572
  * element.on("ready", () => {
2143
2573
  * console.log("Breakdown loaded");
@@ -2150,7 +2580,7 @@ interface TotalBalanceBreakdownElementSnapshot {
2150
2580
  * element.mount("#container");
2151
2581
  * ```
2152
2582
  */
2153
- type TotalBalanceBreakdownElement = WhopElement<TotalBalanceBreakdownElementOptions, TotalBalanceBreakdownElementEvents, TotalBalanceBreakdownElementSnapshot>;
2583
+ type TreasuryBreakdownElement = WhopElement<TreasuryBreakdownElementOptions, TreasuryBreakdownElementEvents, TreasuryBreakdownElementSnapshot>;
2154
2584
 
2155
2585
  /**
2156
2586
  * Events emitted by the VerifyElement.
@@ -2438,6 +2868,11 @@ interface WithdrawButtonElementOptions {
2438
2868
  * @default false
2439
2869
  */
2440
2870
  highContrast?: boolean;
2871
+ /**
2872
+ * Whether to show an icon in the button.
2873
+ * @default false
2874
+ */
2875
+ showIcon?: boolean;
2441
2876
  }
2442
2877
  /**
2443
2878
  * Represents the current state of the WithdrawButtonElement.
@@ -2588,6 +3023,12 @@ interface WithdrawElementOptions {
2588
3023
  * @param ev - The close event
2589
3024
  */
2590
3025
  onClose?: (ev: CustomEvent) => void;
3026
+ /**
3027
+ * When true, shows a currency picker before the withdrawal form.
3028
+ * This allows the user to choose which currency to withdraw from when they have balances in multiple currencies.
3029
+ * The session's default currency will be omitted so the picker can display all available options.
3030
+ */
3031
+ showCurrencySelector?: boolean;
2591
3032
  }
2592
3033
  /**
2593
3034
  * Represents the current state of the WithdrawElement.
@@ -2935,12 +3376,6 @@ interface WithdrawalsElementSnapshot {
2935
3376
  */
2936
3377
  type WithdrawalsElement = WhopElement<WithdrawalsElementOptions, WithdrawalsElementEvents, WithdrawalsElementSnapshot>;
2937
3378
 
2938
- interface ModalContainer {
2939
- modalContainer: HTMLElement;
2940
- mount: () => void;
2941
- close: () => void;
2942
- }
2943
-
2944
3379
  /** elements types */
2945
3380
 
2946
3381
  interface PayoutsSessionOptions {
@@ -3029,6 +3464,10 @@ type PayoutsSessionElements = {
3029
3464
  AddPayoutMethodElementOptions,
3030
3465
  AddPayoutMethodElement
3031
3466
  ];
3467
+ "available-cash-breakdown-element": [
3468
+ AvailableCashBreakdownElementOptions,
3469
+ AvailableCashBreakdownElement
3470
+ ];
3032
3471
  "balance-element": [BalanceElementOptions, BalanceElement];
3033
3472
  "withdraw-button-element": [
3034
3473
  WithdrawButtonElementOptions,
@@ -3050,23 +3489,24 @@ type PayoutsSessionElements = {
3050
3489
  ChangeAccountCountryElement
3051
3490
  ];
3052
3491
  "reset-account-element": [ResetAccountElementOptions, ResetAccountElement];
3053
- "regular-reserve-balance-breakdown-element": [
3054
- RegularReserveBalanceBreakdownElementOptions,
3055
- RegularReserveBalanceBreakdownElement
3056
- ];
3057
- "bnpl-reserve-balance-breakdown-element": [
3058
- BnplReserveBalanceBreakdownElementOptions,
3059
- BnplReserveBalanceBreakdownElement
3060
- ];
3061
- "total-balance-breakdown-element": [
3062
- TotalBalanceBreakdownElementOptions,
3063
- TotalBalanceBreakdownElement
3064
- ];
3065
3492
  "generate-withdrawal-receipt-element": [
3066
3493
  GenerateWithdrawalReceiptElementOptions,
3067
3494
  GenerateWithdrawalReceiptElement
3068
3495
  ];
3069
3496
  "status-banner-element": [StatusBannerElementOptions, StatusBannerElement];
3497
+ "balances-element": [BalancesElementOptions, BalancesElement];
3498
+ "pending-breakdown-element": [
3499
+ PendingBreakdownElementOptions,
3500
+ PendingBreakdownElement
3501
+ ];
3502
+ "reserve-breakdown-element": [
3503
+ ReserveBreakdownElementOptions,
3504
+ ReserveBreakdownElement
3505
+ ];
3506
+ "treasury-breakdown-element": [
3507
+ TreasuryBreakdownElementOptions,
3508
+ TreasuryBreakdownElement
3509
+ ];
3070
3510
  };
3071
3511
  /**
3072
3512
  * Manages authentication and creates payout elements.
@@ -3104,20 +3544,21 @@ type PayoutsSessionElements = {
3104
3544
  *
3105
3545
  * @example Using modal methods
3106
3546
  * ```typescript
3107
- * // With options object
3547
+ * // No args — the modal auto-closes on completion or dismiss
3548
+ * session.showWithdrawModal();
3549
+ *
3550
+ * // Custom callback — runs your handler, then auto-closes
3108
3551
  * session.showWithdrawModal({
3109
3552
  * onWithdraw: () => console.log("Withdrawal submitted"),
3110
- * onClose: () => console.log("Modal closed"),
3111
3553
  * });
3112
3554
  *
3113
- * // With callback for modal reference
3114
- * session.showWithdrawModal((modal) => ({
3115
- * onWithdraw: () => {
3116
- * console.log("Withdrawal submitted");
3117
- * modal.close();
3555
+ * // preventDefault() opts out of auto-close
3556
+ * session.showWithdrawModal({
3557
+ * onWithdraw: (ev) => {
3558
+ * ev.preventDefault(); // modal stays open
3559
+ * showConfirmation();
3118
3560
  * },
3119
- * onClose: () => modal.close(),
3120
- * }));
3561
+ * });
3121
3562
  * ```
3122
3563
  */
3123
3564
  interface PayoutsSession extends TypedEmitter<PayoutsSessionEvents> {
@@ -3155,81 +3596,136 @@ interface PayoutsSession extends TypedEmitter<PayoutsSessionEvents> {
3155
3596
  }, options: PayoutsSessionElements[T][0]): PayoutsSessionElements[T][1];
3156
3597
  /**
3157
3598
  * Show the withdraw element in a modal overlay.
3599
+ *
3600
+ * By default, the modal auto-closes on completion (`onWithdraw`) or dismiss (`onClose`).
3601
+ * Call `ev.preventDefault()` in a callback to prevent auto-close.
3602
+ *
3158
3603
  * @category modal
3159
3604
  * @param options - Element options or a callback that receives the modal container
3160
3605
  * @returns The modal container, or undefined if a modal is already open (unless force is true)
3161
3606
  */
3162
- showWithdrawModal: <Force extends boolean = false>(options: WithdrawElementOptions | ((modal: ModalContainer) => WithdrawElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3607
+ showWithdrawModal: <Force extends boolean = false>(options?: WithdrawElementOptions | ((modal: ModalContainer) => WithdrawElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3163
3608
  /**
3164
3609
  * Show the add payout method element in a modal overlay.
3610
+ *
3611
+ * By default, the modal auto-closes on completion (`onComplete`) or dismiss (`onClose`).
3612
+ * Call `ev.preventDefault()` in a callback to prevent auto-close.
3613
+ *
3165
3614
  * @category modal
3166
3615
  * @param options - Element options or a callback that receives the modal container
3167
3616
  * @returns The modal container, or undefined if a modal is already open (unless force is true)
3168
3617
  */
3169
- showAddPayoutMethodModal: <Force extends boolean = false>(options: AddPayoutMethodElementOptions | ((modal: ModalContainer) => AddPayoutMethodElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3618
+ showAddPayoutMethodModal: <Force extends boolean = false>(options?: AddPayoutMethodElementOptions | ((modal: ModalContainer) => AddPayoutMethodElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3170
3619
  /**
3171
3620
  * Show the automatic withdraw settings element in a modal overlay.
3621
+ *
3622
+ * By default, the modal auto-closes on completion (`onComplete`) or dismiss (`onClose`).
3623
+ * Call `ev.preventDefault()` in a callback to prevent auto-close.
3624
+ *
3172
3625
  * @category modal
3173
3626
  * @param options - Element options or a callback that receives the modal container
3174
3627
  * @returns The modal container, or undefined if a modal is already open (unless force is true)
3175
3628
  */
3176
- showAutomaticWithdrawModal: <Force extends boolean = false>(options: AutomaticWithdrawElementOptions | ((modal: ModalContainer) => AutomaticWithdrawElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3629
+ showAutomaticWithdrawModal: <Force extends boolean = false>(options?: AutomaticWithdrawElementOptions | ((modal: ModalContainer) => AutomaticWithdrawElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3177
3630
  /**
3178
3631
  * Show the identity verification element in a modal overlay.
3632
+ *
3633
+ * By default, the modal auto-closes on completion (`onVerificationSubmitted`) or dismiss (`onClose`).
3634
+ * Call `ev.preventDefault()` in a callback to prevent auto-close.
3635
+ *
3179
3636
  * @category modal
3180
3637
  * @param options - Element options or a callback that receives the modal container
3181
3638
  * @returns The modal container, or undefined if a modal is already open (unless force is true)
3182
3639
  */
3183
- showVerifyModal: <Force extends boolean = false>(options: VerifyElementOptions | ((modal: ModalContainer) => VerifyElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3640
+ showVerifyModal: <Force extends boolean = false>(options?: VerifyElementOptions | ((modal: ModalContainer) => VerifyElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3184
3641
  /**
3185
3642
  * Show the withdrawal breakdown element in a modal overlay.
3643
+ *
3644
+ * By default, the modal auto-closes on dismiss (`onClose`).
3645
+ * Call `ev.preventDefault()` in a callback to prevent auto-close.
3646
+ *
3186
3647
  * @category modal
3187
- * @param options - Element options or a callback that receives the modal container
3648
+ * @param options - Element options or a callback that receives the modal container. Must include `withdrawalId`.
3188
3649
  * @returns The modal container, or undefined if a modal is already open (unless force is true)
3189
3650
  */
3190
3651
  showWithdrawalBreakdownModal: <Force extends boolean = false>(options: WithdrawalBreakdownElementOptions | ((modal: ModalContainer) => WithdrawalBreakdownElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3191
3652
  /**
3192
3653
  * Show the change account country element in a modal overlay.
3654
+ *
3655
+ * By default, the modal auto-closes on completion (`onCountryChanged`) or dismiss (`onClose`).
3656
+ * Call `ev.preventDefault()` in a callback to prevent auto-close.
3657
+ *
3193
3658
  * @category modal
3194
3659
  * @param options - Element options or a callback that receives the modal container
3195
3660
  * @returns The modal container, or undefined if a modal is already open (unless force is true)
3196
3661
  */
3197
- showChangeAccountCountryModal: <Force extends boolean = false>(options: ChangeAccountCountryElementOptions | ((modal: ModalContainer) => ChangeAccountCountryElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3662
+ showChangeAccountCountryModal: <Force extends boolean = false>(options?: ChangeAccountCountryElementOptions | ((modal: ModalContainer) => ChangeAccountCountryElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3198
3663
  /**
3199
3664
  * Show the reset account element in a modal overlay.
3665
+ *
3666
+ * By default, the modal auto-closes on completion (`onReset`) or dismiss (`onClose`).
3667
+ * Call `ev.preventDefault()` in a callback to prevent auto-close.
3668
+ *
3200
3669
  * @category modal
3201
3670
  * @param options - Element options or a callback that receives the modal container
3202
3671
  * @returns The modal container, or undefined if a modal is already open (unless force is true)
3203
3672
  */
3204
- showResetAccountModal: <Force extends boolean = false>(options: ResetAccountElementOptions | ((modal: ModalContainer) => ResetAccountElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3673
+ showResetAccountModal: <Force extends boolean = false>(options?: ResetAccountElementOptions | ((modal: ModalContainer) => ResetAccountElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3205
3674
  /**
3206
- * Show the total balance breakdown element in a modal overlay.
3675
+ * Show the available cash breakdown element in a modal overlay.
3676
+ *
3677
+ * By default, the modal auto-closes on dismiss (`onClose`).
3678
+ * Call `ev.preventDefault()` in a callback to prevent auto-close.
3679
+ *
3207
3680
  * @category modal
3208
3681
  * @param options - Element options or a callback that receives the modal container
3209
3682
  * @returns The modal container, or undefined if a modal is already open (unless force is true)
3210
3683
  */
3211
- showTotalBalanceBreakdownModal: <Force extends boolean = false>(options: TotalBalanceBreakdownElementOptions | ((modal: ModalContainer) => TotalBalanceBreakdownElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3684
+ showAvailableCashBreakdownModal: <Force extends boolean = false>(options?: AvailableCashBreakdownElementOptions | ((modal: ModalContainer) => AvailableCashBreakdownElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3212
3685
  /**
3213
- * Show the regular reserve balance breakdown element in a modal overlay.
3686
+ * Show the generate withdrawal receipt element in a modal overlay.
3687
+ *
3688
+ * By default, the modal auto-closes on completion (`onReceiptRequested`) or dismiss (`onClose`).
3689
+ * Call `ev.preventDefault()` in a callback to prevent auto-close.
3690
+ *
3691
+ * @category modal
3692
+ * @param options - Element options or a callback that receives the modal container. Must include `withdrawalId`.
3693
+ * @returns The modal container, or undefined if a modal is already open (unless force is true)
3694
+ */
3695
+ showGenerateWithdrawalReceiptModal: <Force extends boolean = false>(options: GenerateWithdrawalReceiptElementOptions | ((modal: ModalContainer) => GenerateWithdrawalReceiptElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3696
+ /**
3697
+ * Show the pending breakdown element in a modal overlay.
3698
+ *
3699
+ * By default, the modal auto-closes on dismiss (`onClose`).
3700
+ * Call `ev.preventDefault()` in a callback to prevent auto-close.
3701
+ *
3214
3702
  * @category modal
3215
3703
  * @param options - Element options or a callback that receives the modal container
3216
3704
  * @returns The modal container, or undefined if a modal is already open (unless force is true)
3217
3705
  */
3218
- showRegularReserveBalanceBreakdownModal: <Force extends boolean = false>(options: RegularReserveBalanceBreakdownElementOptions | ((modal: ModalContainer) => RegularReserveBalanceBreakdownElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3706
+ showPendingBreakdownModal: <Force extends boolean = false>(options?: PendingBreakdownElementOptions | ((modal: ModalContainer) => PendingBreakdownElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3219
3707
  /**
3220
- * Show the BNPL reserve balance breakdown element in a modal overlay.
3708
+ * Show the reserve breakdown element in a modal overlay.
3709
+ *
3710
+ * By default, the modal auto-closes on dismiss (`onClose`).
3711
+ * Call `ev.preventDefault()` in a callback to prevent auto-close.
3712
+ *
3221
3713
  * @category modal
3222
3714
  * @param options - Element options or a callback that receives the modal container
3223
3715
  * @returns The modal container, or undefined if a modal is already open (unless force is true)
3224
3716
  */
3225
- showBnplReserveBalanceBreakdownModal: <Force extends boolean = false>(options: BnplReserveBalanceBreakdownElementOptions | ((modal: ModalContainer) => BnplReserveBalanceBreakdownElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3717
+ showReserveBreakdownModal: <Force extends boolean = false>(options?: ReserveBreakdownElementOptions | ((modal: ModalContainer) => ReserveBreakdownElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3226
3718
  /**
3227
- * Show the generate withdrawal receipt element in a modal overlay.
3719
+ * Show the treasury breakdown element in a modal overlay.
3720
+ *
3721
+ * By default, the modal auto-closes on dismiss (`onClose`).
3722
+ * Call `ev.preventDefault()` in a callback to prevent auto-close.
3723
+ *
3228
3724
  * @category modal
3229
3725
  * @param options - Element options or a callback that receives the modal container
3230
3726
  * @returns The modal container, or undefined if a modal is already open (unless force is true)
3231
3727
  */
3232
- showGenerateWithdrawalReceiptModal: <Force extends boolean = false>(options: GenerateWithdrawalReceiptElementOptions | ((modal: ModalContainer) => GenerateWithdrawalReceiptElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3728
+ showTreasuryBreakdownModal: <Force extends boolean = false>(options?: TreasuryBreakdownElementOptions | ((modal: ModalContainer) => TreasuryBreakdownElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
3233
3729
  }
3234
3730
 
3235
3731
  declare global {
@@ -3380,4 +3876,4 @@ interface WhopElementsEvents {
3380
3876
  optionsUpdated: (options: WhopElementsOptions) => void;
3381
3877
  }
3382
3878
 
3383
- export type { AddPayoutMethodElement, AddPayoutMethodElementOptions, AddPayoutMethodElementSnapshot, Appearance, AutomaticWithdrawElement, AutomaticWithdrawElementOptions, AutomaticWithdrawElementSnapshot, BalanceElement, BalanceElementOptions, BalanceElementSnapshot, BnplReserveBalanceBreakdownElement, BnplReserveBalanceBreakdownElementOptions, BnplReserveBalanceBreakdownElementSnapshot, ChangeAccountCountryElement, ChangeAccountCountryElementOptions, ChangeAccountCountryElementSnapshot, ChatElement, ChatElementEvent, ChatElementOptions, ChatElementSnapshot, ChatSession, ChatSessionElements, ChatSessionEvents, ChatSessionOptions, DmsListElement, DmsListElementEvent, DmsListElementOptions, DmsListElementSnapshot, ExpandedChatSessionOptions, ExpandedPayoutsSessionOptions, GenerateWithdrawalReceiptElement, GenerateWithdrawalReceiptElementOptions, GenerateWithdrawalReceiptElementSnapshot, I18nSupportedLocale, PayoutsSession, PayoutsSessionElements, PayoutsSessionEvents, PayoutsSessionOptions, RegularReserveBalanceBreakdownElement, RegularReserveBalanceBreakdownElementOptions, RegularReserveBalanceBreakdownElementSnapshot, ResetAccountElement, ResetAccountElementOptions, ResetAccountElementSnapshot, StatusBannerElement, StatusBannerElementOptions, StatusBannerElementSnapshot, StatusBannerType, TotalBalanceBreakdownElement, TotalBalanceBreakdownElementOptions, TotalBalanceBreakdownElementSnapshot, VerifyElement, VerifyElementOptions, VerifyElementSnapshot, WhopElement, WhopElements, WhopElementsConstructor, WhopElementsEnvironment, WhopElementsEvents, WhopElementsOptions, WithdrawButtonElement, WithdrawButtonElementOptions, WithdrawElement, WithdrawElementOptions, WithdrawElementSnapshot, WithdrawalBreakdownElement, WithdrawalBreakdownElementOptions, WithdrawalBreakdownElementSnapshot, WithdrawalsElement, WithdrawalsElementOptions, WithdrawalsElementSnapshot };
3879
+ export { type AddPayoutMethodElement, type AddPayoutMethodElementOptions, type AddPayoutMethodElementSnapshot, type Appearance, type AutomaticWithdrawElement, type AutomaticWithdrawElementOptions, type AutomaticWithdrawElementSnapshot, type AvailableCashBreakdownElement, type AvailableCashBreakdownElementOptions, type AvailableCashBreakdownElementSnapshot, type BalanceElement, type BalanceElementOptions, type BalanceElementSnapshot, type BalancesElement, type BalancesElementOptions, type BalancesElementSnapshot, type ChangeAccountCountryElement, type ChangeAccountCountryElementOptions, type ChangeAccountCountryElementSnapshot, type ChatElement, type ChatElementEvent, type ChatElementOptions, type ChatElementSnapshot, type ChatSession, type ChatSessionElements, type ChatSessionEvents, type ChatSessionOptions, type DmsListElement, type DmsListElementEvent, type DmsListElementOptions, type DmsListElementSnapshot, type ExpandedChatSessionOptions, type ExpandedPayoutsSessionOptions, type GenerateWithdrawalReceiptElement, type GenerateWithdrawalReceiptElementOptions, type GenerateWithdrawalReceiptElementSnapshot, type I18nSupportedLocale, type PayoutsSession, type PayoutsSessionElements, type PayoutsSessionEvents, type PayoutsSessionOptions, type PendingBreakdownElement, type PendingBreakdownElementOptions, type PendingBreakdownElementSnapshot, type ReserveBreakdownElement, type ReserveBreakdownElementOptions, type ReserveBreakdownElementSnapshot, type ResetAccountElement, type ResetAccountElementOptions, type ResetAccountElementSnapshot, type SearchElement, type SearchElementOptions, type SearchElementSnapshot, type StatusBannerElement, type StatusBannerElementOptions, type StatusBannerElementSnapshot, type StatusBannerType, type TreasuryBreakdownElement, type TreasuryBreakdownElementOptions, type TreasuryBreakdownElementSnapshot, type VerifyElement, type VerifyElementOptions, type VerifyElementSnapshot, type WhopElement, WhopElementError, type WhopElementErrorCode, type WhopElements, type WhopElementsConstructor, type WhopElementsEnvironment, type WhopElementsEvents, type WhopElementsOptions, type WithdrawButtonElement, type WithdrawButtonElementOptions, type WithdrawElement, type WithdrawElementOptions, type WithdrawElementSnapshot, type WithdrawalBreakdownElement, type WithdrawalBreakdownElementOptions, type WithdrawalBreakdownElementSnapshot, type WithdrawalsElement, type WithdrawalsElementOptions, type WithdrawalsElementSnapshot };