@deframe-sdk/components 0.1.33 → 0.1.35

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.
package/dist/index.js CHANGED
@@ -4903,7 +4903,7 @@ var SwapProcessingViewSimple = () => {
4903
4903
  "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]",
4904
4904
  "rounded-[inherit]",
4905
4905
  "backdrop-blur-[12px] [-webkit-backdrop-filter:blur(12px)]",
4906
- "bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-primary)_88%,transparent)]"
4906
+ "bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_88%,transparent)]"
4907
4907
  ),
4908
4908
  children: [
4909
4909
  /* @__PURE__ */ jsxRuntime.jsx(LoadingIcon, {}),
@@ -5255,7 +5255,7 @@ var SwapSignatureWarningViewSimple = ({
5255
5255
  "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]",
5256
5256
  "rounded-[inherit]",
5257
5257
  "backdrop-blur-[12px] [-webkit-backdrop-filter:blur(12px)]",
5258
- "bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-primary)_88%,transparent)]"
5258
+ "bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_88%,transparent)]"
5259
5259
  ),
5260
5260
  children: [
5261
5261
  /* @__PURE__ */ jsxRuntime.jsx(WarningIcon, {}),
@@ -5445,7 +5445,7 @@ var SwapSuccessViewSimple = () => {
5445
5445
  "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]",
5446
5446
  "rounded-[inherit]",
5447
5447
  "backdrop-blur-[12px] [-webkit-backdrop-filter:blur(12px)]",
5448
- "bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-primary)_88%,transparent)]"
5448
+ "bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_88%,transparent)]"
5449
5449
  ),
5450
5450
  children: [
5451
5451
  /* @__PURE__ */ jsxRuntime.jsx(SuccessIcon, {}),
@@ -5648,7 +5648,7 @@ var SwapTransactionFailedViewSimple = ({
5648
5648
  "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]",
5649
5649
  "rounded-[inherit]",
5650
5650
  "backdrop-blur-[12px] [-webkit-backdrop-filter:blur(12px)]",
5651
- "bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-primary)_88%,transparent)]"
5651
+ "bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_88%,transparent)]"
5652
5652
  ),
5653
5653
  children: [
5654
5654
  /* @__PURE__ */ jsxRuntime.jsx(ErrorIcon, {}),
@@ -6345,6 +6345,35 @@ var SwapFormView = ({
6345
6345
  )
6346
6346
  ] });
6347
6347
  };
6348
+ var FONT_SIZE_CLASSES = [
6349
+ "text-[36px]",
6350
+ // 0–7 chars
6351
+ "text-[34px]",
6352
+ // 8 chars
6353
+ "text-[32px]",
6354
+ // 9 chars
6355
+ "text-[30px]",
6356
+ // 10 chars
6357
+ "text-[28px]",
6358
+ // 11 chars
6359
+ "text-[26px]",
6360
+ // 12 chars
6361
+ "text-[24px]",
6362
+ // 13 chars
6363
+ "text-[22px]",
6364
+ // 14 chars
6365
+ "text-[20px]"
6366
+ // 15+ chars
6367
+ ];
6368
+ function getResponsiveFontSizeClass(value) {
6369
+ const len = value.length;
6370
+ if (len <= 7) return FONT_SIZE_CLASSES[0];
6371
+ const index = Math.min(len - 7, FONT_SIZE_CLASSES.length - 1);
6372
+ return FONT_SIZE_CLASSES[index];
6373
+ }
6374
+ function useResponsiveFontSize(value) {
6375
+ return React6.useMemo(() => getResponsiveFontSizeClass(value), [value]);
6376
+ }
6348
6377
  var SwapFromCardViewSimple = ({
6349
6378
  labels,
6350
6379
  selectedToken,
@@ -6368,6 +6397,7 @@ var SwapFromCardViewSimple = ({
6368
6397
  errorActionLabel = "Adicionar via PIX",
6369
6398
  onErrorAction
6370
6399
  }) => {
6400
+ const fontSizeClass = useResponsiveFontSize(amountValue || "");
6371
6401
  const [isHovered, setIsHovered] = React6.useState(false);
6372
6402
  const hideTimeout = React6.useRef(null);
6373
6403
  const handleMouseEnter = React6.useCallback(() => {
@@ -6439,9 +6469,11 @@ var SwapFromCardViewSimple = ({
6439
6469
  className: tailwindMerge.twMerge(
6440
6470
  "bg-transparent border-none outline-none",
6441
6471
  "text-right",
6442
- "text-[36px] [font-weight:var(--deframe-widget-font-weight-semibold)] [line-height:1.1]",
6472
+ fontSizeClass,
6473
+ "[font-weight:var(--deframe-widget-font-weight-semibold)] [line-height:1.1]",
6443
6474
  "w-full px-[var(--deframe-widget-size-padding-x-none)] py-[var(--deframe-widget-size-padding-y-none)]",
6444
6475
  "font-[var(--deframe-widget-font-family)]",
6476
+ "overflow-hidden text-ellipsis",
6445
6477
  "placeholder:text-[color:var(--deframe-widget-color-text-tertiary)]",
6446
6478
  isEmpty ? "text-[color:var(--deframe-widget-color-text-tertiary)]" : "text-[color:var(--deframe-widget-color-text-primary)]"
6447
6479
  )
@@ -6930,6 +6962,7 @@ var SwapToCardViewSimple = ({
6930
6962
  }) => {
6931
6963
  const handleTokenClick = onNetworkAndAssetClick != null ? onNetworkAndAssetClick : onTokenClick;
6932
6964
  const isEmpty = !outputAmount || Number(outputAmount) === 0;
6965
+ const fontSizeClass = useResponsiveFontSize(outputAmount || "");
6933
6966
  const wrapperClasses = tailwindMerge.twMerge(
6934
6967
  "rounded-[var(--deframe-widget-size-radius-sm)]",
6935
6968
  "border",
@@ -7095,9 +7128,10 @@ var SwapToCardViewSimple = ({
7095
7128
  {
7096
7129
  "data-test-id": "swap-to-simple-output-amount",
7097
7130
  className: tailwindMerge.twMerge(
7098
- "text-[36px] [font-weight:var(--deframe-widget-font-weight-semibold)] [line-height:1.1]",
7131
+ fontSizeClass,
7132
+ "[font-weight:var(--deframe-widget-font-weight-semibold)] [line-height:1.1]",
7099
7133
  "font-[var(--deframe-widget-font-family)]",
7100
- "text-right w-full",
7134
+ "text-right w-full overflow-hidden text-ellipsis",
7101
7135
  isEmpty ? "text-[color:var(--deframe-widget-color-text-tertiary)]" : "text-[color:var(--deframe-widget-color-text-primary)]"
7102
7136
  ),
7103
7137
  children: isEmpty ? "0" : outputAmount
@@ -10915,7 +10949,8 @@ var EarnTokenSelectorSimpleView = ({
10915
10949
  isLoading,
10916
10950
  selectTokenLabel,
10917
10951
  chainLabel,
10918
- chainImage
10952
+ chainImage,
10953
+ className
10919
10954
  }) => {
10920
10955
  const hasToken = selectedToken != null;
10921
10956
  const isInteractive = !!onNetworkAndAssetClick;
@@ -10934,7 +10969,8 @@ var EarnTokenSelectorSimpleView = ({
10934
10969
  };
10935
10970
  const selectorClasses = tailwindMerge.twMerge(
10936
10971
  baseClasses,
10937
- stateClasses[isInteractive ? "interactive" : "static"]
10972
+ stateClasses[isInteractive ? "interactive" : "static"],
10973
+ className
10938
10974
  );
10939
10975
  return /* @__PURE__ */ jsxRuntime.jsx(
10940
10976
  "button",
@@ -11061,9 +11097,10 @@ var EarnAmountInputSimpleView = ({
11061
11097
  dollarAmountFormatted
11062
11098
  }) => {
11063
11099
  const isEmpty = !value || value === "0";
11100
+ const fontSizeClass = useResponsiveFontSize(value || "");
11064
11101
  const inputBaseClasses = [
11065
11102
  "bg-transparent border-none outline-none text-right",
11066
- "text-[36px] [font-weight:var(--deframe-widget-font-weight-semibold)] [line-height:1.1]",
11103
+ `${fontSizeClass} [font-weight:var(--deframe-widget-font-weight-semibold)] [line-height:1.1]`,
11067
11104
  "w-full",
11068
11105
  "px-[var(--deframe-widget-size-padding-x-none)] py-[var(--deframe-widget-size-padding-y-none)]",
11069
11106
  "font-[var(--deframe-widget-font-family)]",
@@ -12087,7 +12124,18 @@ var EarnDepositProcessingView = ({
12087
12124
  }
12088
12125
  );
12089
12126
  };
12090
- function EarnFormSkeleton() {
12127
+ function EarnFormSkeleton({
12128
+ headerTitle = "Deposit",
12129
+ tokenSymbol = "USDC",
12130
+ tokenLogoURI,
12131
+ chainLabel = "Arbitrum",
12132
+ chainImage,
12133
+ amount = "500",
12134
+ dollarAmount = "\u2248 $499.87",
12135
+ availableBalance = "Available: 1,250.00 USDC",
12136
+ cancelLabel = "Cancel",
12137
+ submitLabel = "Deposit"
12138
+ } = {}) {
12091
12139
  const headerClasses = [
12092
12140
  "flex items-center",
12093
12141
  "px-[var(--deframe-widget-size-padding-x-md)]",
@@ -12123,7 +12171,7 @@ function EarnFormSkeleton() {
12123
12171
  "data-test-id": "earn-form-skeleton",
12124
12172
  className: "flex flex-col font-[var(--deframe-widget-font-family)]",
12125
12173
  children: [
12126
- /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-form-skeleton-header", className: headerClasses, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: titleClasses2, children: "Deposit" }) }),
12174
+ /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-form-skeleton-header", className: headerClasses, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: titleClasses2, children: headerTitle }) }),
12127
12175
  /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-form-skeleton-divider", className: dividerClasses }),
12128
12176
  /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-form-skeleton-body", className: bodyClasses, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "earn-form-skeleton-input-card", className: inputCardClasses, children: [
12129
12177
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
@@ -12139,29 +12187,43 @@ function EarnFormSkeleton() {
12139
12187
  ),
12140
12188
  children: [
12141
12189
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-shrink-0 w-[38px] h-[38px]", children: [
12142
- /* @__PURE__ */ jsxRuntime.jsx(
12190
+ tokenLogoURI ? /* @__PURE__ */ jsxRuntime.jsx(
12191
+ "img",
12192
+ {
12193
+ src: tokenLogoURI,
12194
+ alt: tokenSymbol,
12195
+ className: "w-full h-full rounded-[var(--deframe-widget-size-radius-full)] object-cover"
12196
+ }
12197
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
12143
12198
  "div",
12144
12199
  {
12145
12200
  className: "w-full h-full rounded-[var(--deframe-widget-size-radius-full)] bg-[var(--deframe-widget-color-bg-tertiary)] flex items-center justify-center text-[12px] [font-weight:var(--deframe-widget-font-weight-bold)] text-[color:var(--deframe-widget-color-text-primary)]",
12146
- children: "US"
12201
+ children: tokenSymbol.slice(0, 2).toUpperCase()
12147
12202
  }
12148
12203
  ),
12149
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -bottom-0.5 -right-0.5 w-4 h-4 rounded-[var(--deframe-widget-size-radius-full)] bg-[var(--deframe-widget-color-bg-tertiary)] shadow-[0_0_0_2px_var(--deframe-widget-color-bg-secondary)]" })
12204
+ chainImage ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -bottom-0.5 -right-0.5 w-4 h-4 rounded-[var(--deframe-widget-size-radius-full)] shadow-[0_0_0_2px_var(--deframe-widget-color-bg-secondary)]", children: /* @__PURE__ */ jsxRuntime.jsx(
12205
+ "img",
12206
+ {
12207
+ src: chainImage,
12208
+ alt: chainLabel,
12209
+ className: "w-full h-full rounded-[var(--deframe-widget-size-radius-full)] object-cover"
12210
+ }
12211
+ ) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -bottom-0.5 -right-0.5 w-4 h-4 rounded-[var(--deframe-widget-size-radius-full)] bg-[var(--deframe-widget-color-bg-tertiary)] shadow-[0_0_0_2px_var(--deframe-widget-color-bg-secondary)]" })
12150
12212
  ] }),
12151
12213
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-start min-w-0", children: [
12152
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[16px] [font-weight:var(--deframe-widget-font-weight-semibold)] leading-[1.2] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-primary)]", children: "USDC" }),
12153
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] text-[color:var(--deframe-widget-color-text-tertiary)] uppercase tracking-[0.04em] font-[var(--deframe-widget-font-family)] leading-[1.2]", children: "Arbitrum" })
12214
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[16px] [font-weight:var(--deframe-widget-font-weight-semibold)] leading-[1.2] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-primary)]", children: tokenSymbol }),
12215
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] text-[color:var(--deframe-widget-color-text-tertiary)] uppercase tracking-[0.04em] font-[var(--deframe-widget-font-family)] leading-[1.2]", children: chainLabel })
12154
12216
  ] })
12155
12217
  ]
12156
12218
  }
12157
12219
  ),
12158
12220
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-10 bg-[var(--deframe-widget-color-border-secondary)] flex-shrink-0" }),
12159
12221
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-end flex-1 min-w-0", children: [
12160
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[36px] [font-weight:var(--deframe-widget-font-weight-semibold)] [line-height:1.1] text-[color:var(--deframe-widget-color-text-primary)] text-right w-full font-[var(--deframe-widget-font-family)]", children: "500" }),
12161
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]", children: "\u2248 $499.87" })
12222
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[36px] [font-weight:var(--deframe-widget-font-weight-semibold)] [line-height:1.1] text-[color:var(--deframe-widget-color-text-primary)] text-right w-full font-[var(--deframe-widget-font-family)]", children: amount }),
12223
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]", children: dollarAmount })
12162
12224
  ] })
12163
12225
  ] }),
12164
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-[var(--deframe-widget-size-gap-sm)]", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)]", children: "Available: 1,250.00 USDC" }) })
12226
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-[var(--deframe-widget-size-gap-sm)]", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)]", children: availableBalance }) })
12165
12227
  ] }) }),
12166
12228
  /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "earn-form-skeleton-footer", className: footerClasses, children: [
12167
12229
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -12176,7 +12238,7 @@ function EarnFormSkeleton() {
12176
12238
  "text-[15px] [font-weight:var(--deframe-widget-font-weight-semibold)]",
12177
12239
  "text-[color:var(--deframe-widget-color-text-secondary)]"
12178
12240
  ),
12179
- children: "Cancel"
12241
+ children: cancelLabel
12180
12242
  }
12181
12243
  ),
12182
12244
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -12191,7 +12253,7 @@ function EarnFormSkeleton() {
12191
12253
  "text-[15px] [font-weight:var(--deframe-widget-font-weight-semibold)]",
12192
12254
  "text-[color:var(--deframe-widget-color-text-primary-dark)]"
12193
12255
  ),
12194
- children: "Deposit"
12256
+ children: submitLabel
12195
12257
  }
12196
12258
  )
12197
12259
  ] })
@@ -12202,7 +12264,8 @@ function EarnFormSkeleton() {
12202
12264
  function EarnFeedbackOverlaySimpleView({
12203
12265
  variant,
12204
12266
  title,
12205
- subtitle
12267
+ subtitle,
12268
+ formData
12206
12269
  }) {
12207
12270
  const isLoading = variant === "loading";
12208
12271
  const wrapperClasses = tailwindMerge.twMerge(
@@ -12218,7 +12281,7 @@ function EarnFeedbackOverlaySimpleView({
12218
12281
  "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]",
12219
12282
  "rounded-[inherit]",
12220
12283
  "backdrop-blur-[12px] [-webkit-backdrop-filter:blur(12px)]",
12221
- "bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-primary)_88%,transparent)]"
12284
+ "bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_88%,transparent)]"
12222
12285
  );
12223
12286
  const textSectionClasses = tailwindMerge.twMerge(
12224
12287
  "flex flex-col items-center",
@@ -12241,7 +12304,7 @@ function EarnFeedbackOverlaySimpleView({
12241
12304
  "data-slot": "earn-feedback-overlay-wrapper",
12242
12305
  className: wrapperClasses,
12243
12306
  children: [
12244
- /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-feedback-overlay-skeleton", children: /* @__PURE__ */ jsxRuntime.jsx(EarnFormSkeleton, {}) }),
12307
+ /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-feedback-overlay-skeleton", children: /* @__PURE__ */ jsxRuntime.jsx(EarnFormSkeleton, __spreadValues({}, formData)) }),
12245
12308
  /* @__PURE__ */ jsxRuntime.jsxs(
12246
12309
  framerMotion.motion.div,
12247
12310
  {
@@ -12526,15 +12589,24 @@ function WarningIcon2() {
12526
12589
  );
12527
12590
  }
12528
12591
  var EarnDepositProcessingSimpleView = ({
12529
- title,
12530
- descriptionPrefix
12592
+ amountToken,
12593
+ amountUSD,
12594
+ iconSrc,
12595
+ strategyName
12531
12596
  }) => {
12532
12597
  return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-deposit-processing-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
12533
12598
  EarnFeedbackOverlaySimpleView,
12534
12599
  {
12535
12600
  variant: "loading",
12536
- title,
12537
- subtitle: descriptionPrefix
12601
+ title: "Processando Dep\xF3sito...",
12602
+ subtitle: "Aguarde enquanto seu dep\xF3sito \xE9 confirmado.",
12603
+ formData: {
12604
+ headerTitle: "Dep\xF3sito",
12605
+ tokenSymbol: strategyName,
12606
+ tokenLogoURI: iconSrc,
12607
+ amount: amountToken,
12608
+ dollarAmount: amountUSD
12609
+ }
12538
12610
  }
12539
12611
  ) });
12540
12612
  };
@@ -12612,9 +12684,12 @@ var EarnDepositSuccessView = ({
12612
12684
  );
12613
12685
  };
12614
12686
  var EarnDepositSuccessSimpleView = ({
12615
- title,
12616
- descriptionSuffix,
12617
- onClose
12687
+ onClose,
12688
+ tokenSymbol,
12689
+ amountToken,
12690
+ amountUSD,
12691
+ iconSrc,
12692
+ strategyName
12618
12693
  }) => {
12619
12694
  React6__namespace.default.useEffect(() => {
12620
12695
  if (!onClose) return;
@@ -12625,8 +12700,15 @@ var EarnDepositSuccessSimpleView = ({
12625
12700
  EarnFeedbackOverlaySimpleView,
12626
12701
  {
12627
12702
  variant: "success",
12628
- title,
12629
- subtitle: descriptionSuffix
12703
+ title: "Dep\xF3sito Confirmado!",
12704
+ subtitle: "Seu saldo foi atualizado.",
12705
+ formData: {
12706
+ headerTitle: "Dep\xF3sito",
12707
+ tokenSymbol: tokenSymbol || strategyName,
12708
+ tokenLogoURI: iconSrc,
12709
+ amount: amountToken,
12710
+ dollarAmount: amountUSD
12711
+ }
12630
12712
  }
12631
12713
  ) });
12632
12714
  };
@@ -12690,9 +12772,11 @@ var EarnDepositWarningView = ({
12690
12772
  );
12691
12773
  };
12692
12774
  var EarnDepositWarningSimpleView = ({
12693
- title,
12694
- description,
12695
- onBack
12775
+ onBack,
12776
+ amountToken,
12777
+ amountUSD,
12778
+ iconSrc,
12779
+ strategyName
12696
12780
  }) => {
12697
12781
  React6__namespace.default.useEffect(() => {
12698
12782
  if (!onBack) return;
@@ -12703,8 +12787,15 @@ var EarnDepositWarningSimpleView = ({
12703
12787
  EarnFeedbackOverlaySimpleView,
12704
12788
  {
12705
12789
  variant: "warning",
12706
- title,
12707
- subtitle: description
12790
+ title: "Assinatura Recusada",
12791
+ subtitle: "A assinatura da transa\xE7\xE3o foi cancelada.",
12792
+ formData: {
12793
+ headerTitle: "Dep\xF3sito",
12794
+ tokenSymbol: strategyName,
12795
+ tokenLogoURI: iconSrc,
12796
+ amount: amountToken,
12797
+ dollarAmount: amountUSD
12798
+ }
12708
12799
  }
12709
12800
  ) });
12710
12801
  };
@@ -12771,9 +12862,11 @@ var EarnDepositFailedView = ({
12771
12862
  );
12772
12863
  };
12773
12864
  var EarnDepositFailedSimpleView = ({
12774
- title,
12775
- description,
12776
- onBack
12865
+ onBack,
12866
+ amountToken,
12867
+ amountUSD,
12868
+ iconSrc,
12869
+ strategyName
12777
12870
  }) => {
12778
12871
  React6__namespace.default.useEffect(() => {
12779
12872
  if (!onBack) return;
@@ -12784,8 +12877,15 @@ var EarnDepositFailedSimpleView = ({
12784
12877
  EarnFeedbackOverlaySimpleView,
12785
12878
  {
12786
12879
  variant: "error",
12787
- title,
12788
- subtitle: description
12880
+ title: "Dep\xF3sito Falhou",
12881
+ subtitle: "A transa\xE7\xE3o foi revertida.",
12882
+ formData: {
12883
+ headerTitle: "Dep\xF3sito",
12884
+ tokenSymbol: strategyName,
12885
+ tokenLogoURI: iconSrc,
12886
+ amount: amountToken,
12887
+ dollarAmount: amountUSD
12888
+ }
12789
12889
  }
12790
12890
  ) });
12791
12891
  };
@@ -12855,15 +12955,24 @@ var EarnWithdrawProcessingView = ({
12855
12955
  );
12856
12956
  };
12857
12957
  var EarnWithdrawProcessingSimpleView = ({
12858
- title,
12859
- descriptionPrefix
12958
+ amountToken,
12959
+ amountUSD,
12960
+ iconSrc,
12961
+ strategyName
12860
12962
  }) => {
12861
12963
  return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-withdraw-processing-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
12862
12964
  EarnFeedbackOverlaySimpleView,
12863
12965
  {
12864
12966
  variant: "loading",
12865
- title,
12866
- subtitle: descriptionPrefix
12967
+ title: "Processando Saque...",
12968
+ subtitle: "Aguarde enquanto seu saque \xE9 confirmado.",
12969
+ formData: {
12970
+ headerTitle: "Saque",
12971
+ tokenSymbol: strategyName,
12972
+ tokenLogoURI: iconSrc,
12973
+ amount: amountToken,
12974
+ dollarAmount: amountUSD
12975
+ }
12867
12976
  }
12868
12977
  ) });
12869
12978
  };
@@ -12934,9 +13043,12 @@ var EarnWithdrawSuccessView = ({
12934
13043
  );
12935
13044
  };
12936
13045
  var EarnWithdrawSuccessSimpleView = ({
12937
- title,
12938
- descriptionSuffix,
12939
- onClose
13046
+ onClose,
13047
+ tokenSymbol,
13048
+ amountToken,
13049
+ amountUSD,
13050
+ iconSrc,
13051
+ strategyName
12940
13052
  }) => {
12941
13053
  React6__namespace.default.useEffect(() => {
12942
13054
  if (!onClose) return;
@@ -12947,8 +13059,15 @@ var EarnWithdrawSuccessSimpleView = ({
12947
13059
  EarnFeedbackOverlaySimpleView,
12948
13060
  {
12949
13061
  variant: "success",
12950
- title,
12951
- subtitle: descriptionSuffix
13062
+ title: "Saque Confirmado!",
13063
+ subtitle: "Seu saldo foi atualizado.",
13064
+ formData: {
13065
+ headerTitle: "Saque",
13066
+ tokenSymbol: tokenSymbol || strategyName,
13067
+ tokenLogoURI: iconSrc,
13068
+ amount: amountToken,
13069
+ dollarAmount: amountUSD
13070
+ }
12952
13071
  }
12953
13072
  ) });
12954
13073
  };
@@ -13012,9 +13131,11 @@ var EarnWithdrawWarningView = ({
13012
13131
  );
13013
13132
  };
13014
13133
  var EarnWithdrawWarningSimpleView = ({
13015
- title,
13016
- description,
13017
- onBack
13134
+ onBack,
13135
+ amountToken,
13136
+ amountUSD,
13137
+ iconSrc,
13138
+ strategyName
13018
13139
  }) => {
13019
13140
  React6__namespace.default.useEffect(() => {
13020
13141
  if (!onBack) return;
@@ -13025,8 +13146,15 @@ var EarnWithdrawWarningSimpleView = ({
13025
13146
  EarnFeedbackOverlaySimpleView,
13026
13147
  {
13027
13148
  variant: "warning",
13028
- title,
13029
- subtitle: description
13149
+ title: "Assinatura Recusada",
13150
+ subtitle: "A assinatura da transa\xE7\xE3o foi cancelada.",
13151
+ formData: {
13152
+ headerTitle: "Saque",
13153
+ tokenSymbol: strategyName,
13154
+ tokenLogoURI: iconSrc,
13155
+ amount: amountToken,
13156
+ dollarAmount: amountUSD
13157
+ }
13030
13158
  }
13031
13159
  ) });
13032
13160
  };
@@ -13093,9 +13221,11 @@ var EarnWithdrawFailedView = ({
13093
13221
  );
13094
13222
  };
13095
13223
  var EarnWithdrawFailedSimpleView = ({
13096
- title,
13097
- description,
13098
- onBack
13224
+ onBack,
13225
+ amountToken,
13226
+ amountUSD,
13227
+ iconSrc,
13228
+ strategyName
13099
13229
  }) => {
13100
13230
  React6__namespace.default.useEffect(() => {
13101
13231
  if (!onBack) return;
@@ -13106,8 +13236,15 @@ var EarnWithdrawFailedSimpleView = ({
13106
13236
  EarnFeedbackOverlaySimpleView,
13107
13237
  {
13108
13238
  variant: "error",
13109
- title,
13110
- subtitle: description
13239
+ title: "Saque Falhou",
13240
+ subtitle: "A transa\xE7\xE3o foi revertida.",
13241
+ formData: {
13242
+ headerTitle: "Saque",
13243
+ tokenSymbol: strategyName,
13244
+ tokenLogoURI: iconSrc,
13245
+ amount: amountToken,
13246
+ dollarAmount: amountUSD
13247
+ }
13111
13248
  }
13112
13249
  ) });
13113
13250
  };
@@ -13301,6 +13438,82 @@ function OnchainDepositFormView({
13301
13438
  }
13302
13439
  );
13303
13440
  }
13441
+ var tabBaseClasses = [
13442
+ "inline-flex flex-1 items-center justify-center",
13443
+ "gap-[var(--deframe-widget-size-gap-xs)]",
13444
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
13445
+ "border-[length:var(--deframe-widget-size-border-sm)] border-solid border-transparent",
13446
+ "outline-none whitespace-nowrap transition-[background,color,border-color] duration-150",
13447
+ "font-[var(--deframe-widget-font-family)] [font-weight:var(--deframe-widget-font-weight-medium)]",
13448
+ "py-[5px] px-[var(--deframe-widget-size-padding-x-lg)]",
13449
+ "[font-size:var(--deframe-widget-font-size-md)] [line-height:var(--deframe-widget-font-leading-md)]"
13450
+ ].join(" ");
13451
+ var activeTabClasses = "text-[color:var(--deframe-widget-color-brand-primary)]";
13452
+ var inactiveTabClasses = "text-[color:var(--deframe-widget-color-text-secondary)] hover:bg-[var(--deframe-widget-color-bg-tertiary)]";
13453
+ var FlowTabHeader = ({
13454
+ activeTab,
13455
+ cryptoHref,
13456
+ pixHref,
13457
+ cryptoLabel = "Cripto",
13458
+ pixLabel = "PIX",
13459
+ className
13460
+ }) => {
13461
+ return /* @__PURE__ */ jsxRuntime.jsx(
13462
+ "nav",
13463
+ {
13464
+ "data-slot": "flow-tab-header",
13465
+ "data-test-id": "flow-tab-header",
13466
+ className: tailwindMerge.twMerge("px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)]", className),
13467
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
13468
+ "div",
13469
+ {
13470
+ role: "tablist",
13471
+ "data-test-id": "flow-tab-header-tablist",
13472
+ className: tailwindMerge.twMerge(
13473
+ "inline-flex w-full rounded-[var(--deframe-widget-size-radius-md)]",
13474
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
13475
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
13476
+ "p-[3px] gap-[2px]"
13477
+ ),
13478
+ children: [
13479
+ /* @__PURE__ */ jsxRuntime.jsx(
13480
+ "a",
13481
+ {
13482
+ href: cryptoHref,
13483
+ role: "tab",
13484
+ "aria-selected": activeTab === "crypto",
13485
+ "aria-current": activeTab === "crypto" ? "page" : void 0,
13486
+ "aria-label": cryptoLabel,
13487
+ "data-test-id": "flow-tab-header-tab-crypto",
13488
+ className: tailwindMerge.twMerge(
13489
+ tabBaseClasses,
13490
+ activeTab === "crypto" ? activeTabClasses : inactiveTabClasses
13491
+ ),
13492
+ children: cryptoLabel
13493
+ }
13494
+ ),
13495
+ /* @__PURE__ */ jsxRuntime.jsx(
13496
+ "a",
13497
+ {
13498
+ href: pixHref,
13499
+ role: "tab",
13500
+ "aria-selected": activeTab === "pix",
13501
+ "aria-current": activeTab === "pix" ? "page" : void 0,
13502
+ "aria-label": pixLabel,
13503
+ "data-test-id": "flow-tab-header-tab-pix",
13504
+ className: tailwindMerge.twMerge(
13505
+ tabBaseClasses,
13506
+ activeTab === "pix" ? activeTabClasses : inactiveTabClasses
13507
+ ),
13508
+ children: pixLabel
13509
+ }
13510
+ )
13511
+ ]
13512
+ }
13513
+ )
13514
+ }
13515
+ );
13516
+ };
13304
13517
  var OnchainDepositFormSimpleView = ({
13305
13518
  // Token selector
13306
13519
  selectedToken,
@@ -13389,72 +13602,11 @@ var OnchainDepositFormSimpleView = ({
13389
13602
  }
13390
13603
  ),
13391
13604
  /* @__PURE__ */ jsxRuntime.jsx(
13392
- "nav",
13605
+ FlowTabHeader,
13393
13606
  {
13394
- "data-slot": "onchain-deposit-simple-tabs",
13395
- "data-test-id": "onchain-deposit-form-simple-view-tabs",
13396
- className: "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)]",
13397
- children: /* @__PURE__ */ jsxRuntime.jsxs(
13398
- "div",
13399
- {
13400
- role: "tablist",
13401
- "data-test-id": "onchain-deposit-form-simple-view-tablist",
13402
- className: tailwindMerge.twMerge(
13403
- "inline-flex w-full rounded-[var(--deframe-widget-size-radius-md)]",
13404
- "bg-[var(--deframe-widget-color-bg-secondary)]",
13405
- "border border-[color:var(--deframe-widget-color-border-secondary)]",
13406
- "p-[3px] gap-[2px]"
13407
- ),
13408
- children: [
13409
- /* @__PURE__ */ jsxRuntime.jsx(
13410
- "a",
13411
- {
13412
- href: cryptoHref != null ? cryptoHref : "/dashboard/deposit/onchain",
13413
- role: "tab",
13414
- "aria-selected": activeTab === "crypto",
13415
- "aria-current": activeTab === "crypto" ? "page" : void 0,
13416
- "aria-label": "Cripto",
13417
- "data-test-id": "onchain-deposit-form-simple-view-tab-crypto",
13418
- className: tailwindMerge.twMerge(
13419
- "inline-flex flex-1 items-center justify-center",
13420
- "gap-[var(--deframe-widget-size-gap-xs)]",
13421
- "rounded-[var(--deframe-widget-size-radius-sm)]",
13422
- "border-[length:var(--deframe-widget-size-border-sm)] border-solid border-transparent",
13423
- "outline-none whitespace-nowrap transition-[background,color,border-color] duration-150",
13424
- "font-[var(--deframe-widget-font-family)] [font-weight:var(--deframe-widget-font-weight-medium)]",
13425
- "py-[5px] px-[var(--deframe-widget-size-padding-x-lg)]",
13426
- "[font-size:var(--deframe-widget-font-size-md)] [line-height:var(--deframe-widget-font-leading-md)]",
13427
- activeTab === "crypto" ? "text-[color:var(--deframe-widget-color-brand-primary)]" : "text-[color:var(--deframe-widget-color-text-secondary)] hover:bg-[var(--deframe-widget-color-bg-tertiary)]"
13428
- ),
13429
- children: "Cripto"
13430
- }
13431
- ),
13432
- /* @__PURE__ */ jsxRuntime.jsx(
13433
- "a",
13434
- {
13435
- href: pixHref != null ? pixHref : "/dashboard/deposit/onramp",
13436
- role: "tab",
13437
- "aria-selected": activeTab === "pix",
13438
- "aria-current": activeTab === "pix" ? "page" : void 0,
13439
- "aria-label": "PIX",
13440
- "data-test-id": "onchain-deposit-form-simple-view-tab-pix",
13441
- className: tailwindMerge.twMerge(
13442
- "inline-flex flex-1 items-center justify-center",
13443
- "gap-[var(--deframe-widget-size-gap-xs)]",
13444
- "rounded-[var(--deframe-widget-size-radius-sm)]",
13445
- "border-[length:var(--deframe-widget-size-border-sm)] border-solid border-transparent",
13446
- "outline-none whitespace-nowrap transition-[background,color,border-color] duration-150",
13447
- "font-[var(--deframe-widget-font-family)] [font-weight:var(--deframe-widget-font-weight-medium)]",
13448
- "py-[5px] px-[var(--deframe-widget-size-padding-x-lg)]",
13449
- "[font-size:var(--deframe-widget-font-size-md)] [line-height:var(--deframe-widget-font-leading-md)]",
13450
- activeTab === "pix" ? "text-[color:var(--deframe-widget-color-brand-primary)]" : "text-[color:var(--deframe-widget-color-text-secondary)] hover:bg-[var(--deframe-widget-color-bg-tertiary)]"
13451
- ),
13452
- children: "PIX"
13453
- }
13454
- )
13455
- ]
13456
- }
13457
- )
13607
+ activeTab: activeTab != null ? activeTab : "crypto",
13608
+ cryptoHref: cryptoHref != null ? cryptoHref : "/dashboard/deposit/onchain",
13609
+ pixHref: pixHref != null ? pixHref : "/dashboard/deposit/onramp"
13458
13610
  }
13459
13611
  ),
13460
13612
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -13493,7 +13645,8 @@ var OnchainDepositFormSimpleView = ({
13493
13645
  isLoading: false,
13494
13646
  selectTokenLabel: "SELECIONE AQUI",
13495
13647
  chainLabel: (_a = selectedChain == null ? void 0 : selectedChain.name) != null ? _a : "",
13496
- chainImage: selectedChain == null ? void 0 : selectedChain.iconUrl
13648
+ chainImage: selectedChain == null ? void 0 : selectedChain.iconUrl,
13649
+ className: "w-full justify-between"
13497
13650
  }
13498
13651
  ),
13499
13652
  !hasToken && /* @__PURE__ */ jsxRuntime.jsx(
@@ -13790,7 +13943,12 @@ function OnchainDepositSuccessView({
13790
13943
  );
13791
13944
  }
13792
13945
  var OnchainDepositSuccessSimpleView = ({
13793
- onClose
13946
+ onClose,
13947
+ tokenSymbol,
13948
+ tokenLogoURI,
13949
+ chainName,
13950
+ chainIconUrl,
13951
+ formattedAmount
13794
13952
  }) => {
13795
13953
  React6__namespace.useEffect(() => {
13796
13954
  if (!onClose) return;
@@ -13802,7 +13960,15 @@ var OnchainDepositSuccessSimpleView = ({
13802
13960
  {
13803
13961
  variant: "success",
13804
13962
  title: "Dep\xF3sito Confirmado!",
13805
- subtitle: "Seu saldo foi atualizado."
13963
+ subtitle: "Seu saldo foi atualizado.",
13964
+ formData: {
13965
+ headerTitle: "Dep\xF3sito",
13966
+ tokenSymbol,
13967
+ tokenLogoURI,
13968
+ chainLabel: chainName,
13969
+ chainImage: chainIconUrl,
13970
+ amount: formattedAmount
13971
+ }
13806
13972
  }
13807
13973
  ) });
13808
13974
  };
@@ -14073,6 +14239,10 @@ function OnchainWithdrawFormView({
14073
14239
  );
14074
14240
  }
14075
14241
  var OnchainWithdrawFormSimpleView = ({
14242
+ // Tab switcher
14243
+ activeTab,
14244
+ cryptoHref,
14245
+ pixHref,
14076
14246
  // Token selector
14077
14247
  selectedToken,
14078
14248
  onTokenClick,
@@ -14221,6 +14391,24 @@ var OnchainWithdrawFormSimpleView = ({
14221
14391
  className: dividerClasses
14222
14392
  }
14223
14393
  ),
14394
+ activeTab && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14395
+ /* @__PURE__ */ jsxRuntime.jsx(
14396
+ FlowTabHeader,
14397
+ {
14398
+ activeTab,
14399
+ cryptoHref: cryptoHref != null ? cryptoHref : "/dashboard/withdraw/onchain",
14400
+ pixHref: pixHref != null ? pixHref : "/dashboard/withdraw/offramp"
14401
+ }
14402
+ ),
14403
+ /* @__PURE__ */ jsxRuntime.jsx(
14404
+ "div",
14405
+ {
14406
+ "data-slot": "onchain-withdraw-simple-divider-tabs",
14407
+ "data-test-id": "onchain-withdraw-form-simple-view-divider-tabs",
14408
+ className: dividerClasses
14409
+ }
14410
+ )
14411
+ ] }),
14224
14412
  /* @__PURE__ */ jsxRuntime.jsxs(
14225
14413
  "div",
14226
14414
  {
@@ -14810,14 +14998,16 @@ function OnchainWithdrawFailedView({
14810
14998
  );
14811
14999
  }
14812
15000
  var OnchainWithdrawProcessingSimpleView = ({
14813
- onClose: _onClose
15001
+ onClose: _onClose,
15002
+ formData
14814
15003
  }) => {
14815
15004
  return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "onchain-withdraw-processing-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
14816
15005
  EarnFeedbackOverlaySimpleView,
14817
15006
  {
14818
15007
  variant: "loading",
14819
15008
  title: "PROCESSANDO SAQUE...",
14820
- subtitle: "Aguarde enquanto sua transa\xE7\xE3o \xE9 confirmada."
15009
+ subtitle: "Aguarde enquanto sua transa\xE7\xE3o \xE9 confirmada.",
15010
+ formData
14821
15011
  }
14822
15012
  ) });
14823
15013
  };
@@ -15084,7 +15274,12 @@ function OnchainWithdrawSignatureWarningView({
15084
15274
  );
15085
15275
  }
15086
15276
  var OnchainWithdrawSignatureWarningSimpleView = ({
15087
- onCancel
15277
+ onCancel,
15278
+ tokenSymbol,
15279
+ tokenLogoURI,
15280
+ chainName,
15281
+ chainIconUrl,
15282
+ formattedAmount
15088
15283
  }) => {
15089
15284
  React6__namespace.useEffect(() => {
15090
15285
  if (!onCancel) return;
@@ -15096,7 +15291,1941 @@ var OnchainWithdrawSignatureWarningSimpleView = ({
15096
15291
  {
15097
15292
  variant: "warning",
15098
15293
  title: "Saque n\xE3o assinado",
15099
- subtitle: "A assinatura da transa\xE7\xE3o foi cancelada."
15294
+ subtitle: "A assinatura da transa\xE7\xE3o foi cancelada.",
15295
+ formData: {
15296
+ headerTitle: "Saque",
15297
+ tokenSymbol,
15298
+ tokenLogoURI,
15299
+ chainLabel: chainName,
15300
+ chainImage: chainIconUrl,
15301
+ amount: formattedAmount
15302
+ }
15303
+ }
15304
+ ) });
15305
+ };
15306
+ function KycLoadingView({ message = "Carregando" }) {
15307
+ return /* @__PURE__ */ jsxRuntime.jsx(
15308
+ "div",
15309
+ {
15310
+ "data-test-id": "kyc-loading-view",
15311
+ className: "w-full max-w-[620px] relative bg-[var(--deframe-widget-color-bg-primary)] lg:bg-[var(--deframe-widget-color-bg-secondary)] overflow-hidden mx-auto mt-[75px] rounded-[var(--deframe-widget-size-radius-sm)] p-6 min-h-[80vh] flex items-center justify-center",
15312
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-6", children: [
15313
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-20 h-20 bg-[#F6A700] rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-10 h-10", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5l-4-4V4h8v3.5l-4 4z" }) }) }),
15314
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
15315
+ /* @__PURE__ */ jsxRuntime.jsx(TextHeading, { variant: "h3", children: message }),
15316
+ /* @__PURE__ */ jsxRuntime.jsx(LoadingDots, {})
15317
+ ] })
15318
+ ] })
15319
+ }
15320
+ );
15321
+ }
15322
+ function KycRequiredView({ title, description, buttonLabel, onAction }) {
15323
+ return /* @__PURE__ */ jsxRuntime.jsx(
15324
+ "div",
15325
+ {
15326
+ "data-test-id": "kyc-required-view",
15327
+ className: "w-full max-w-[620px] relative bg-[var(--deframe-widget-color-bg-primary)] lg:bg-[var(--deframe-widget-color-bg-secondary)] overflow-hidden mx-auto mt-[75px] rounded-[var(--deframe-widget-size-radius-sm)] p-6 min-h-[80vh] flex flex-col",
15328
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center gap-6 h-[400px]", children: [
15329
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-20 h-20 bg-[var(--deframe-widget-color-brand-primary)]/20 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-10 h-10 text-[color:var(--deframe-widget-color-brand-primary)]", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 12C14.21 12 16 10.21 16 8C16 5.79 14.21 4 12 4C9.79 4 8 5.79 8 8C8 10.21 9.79 12 12 12ZM12 14C9.33 14 4 15.34 4 18V20H20V18C20 15.34 14.67 14 12 14Z" }) }) }),
15330
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center space-y-2", children: [
15331
+ /* @__PURE__ */ jsxRuntime.jsx(TextHeading, { variant: "h3", children: title }),
15332
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: description })
15333
+ ] }),
15334
+ /* @__PURE__ */ jsxRuntime.jsx(
15335
+ PrimaryButton,
15336
+ {
15337
+ onClick: onAction,
15338
+ className: "w-full max-w-xs h-12",
15339
+ "aria-label": buttonLabel,
15340
+ children: buttonLabel
15341
+ }
15342
+ )
15343
+ ] })
15344
+ }
15345
+ );
15346
+ }
15347
+ var DefaultArrowIcon = /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-5 h-5", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }) });
15348
+ function OffchainMethodSelectionView({
15349
+ title,
15350
+ options,
15351
+ bannerMessage,
15352
+ arrowIcon = DefaultArrowIcon
15353
+ }) {
15354
+ return /* @__PURE__ */ jsxRuntime.jsx(
15355
+ "div",
15356
+ {
15357
+ "data-test-id": "offchain-method-selection-view",
15358
+ className: "w-full max-w-[620px] relative bg-[var(--deframe-widget-color-bg-primary)] lg:bg-[var(--deframe-widget-color-bg-secondary)] overflow-hidden mx-auto lg:my-[75px] rounded-[var(--deframe-widget-size-radius-sm)] p-6 lg:p-12 min-h-[80vh] flex flex-col",
15359
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col w-full flex-1", children: [
15360
+ /* @__PURE__ */ jsxRuntime.jsx(TextHeading, { variant: "h2", className: "mb-3", children: title }),
15361
+ bannerMessage && /* @__PURE__ */ jsxRuntime.jsx(
15362
+ BannerNotification,
15363
+ {
15364
+ variant: "info",
15365
+ message: bannerMessage
15366
+ }
15367
+ ),
15368
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-3 mt-2", children: options.map((option, index) => /* @__PURE__ */ jsxRuntime.jsxs(
15369
+ ListItem,
15370
+ {
15371
+ onClick: () => option.onClick(),
15372
+ containerClassName: "p-2 cursor-pointer transition-all",
15373
+ children: [
15374
+ /* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsxRuntime.jsx(
15375
+ "div",
15376
+ {
15377
+ "data-test-id": `method-option-icon-${index}`,
15378
+ className: "w-12 h-12 rounded-full flex items-center justify-center",
15379
+ style: { backgroundColor: option.iconBgColor },
15380
+ children: option.icon
15381
+ }
15382
+ ) }),
15383
+ /* @__PURE__ */ jsxRuntime.jsx(ListItemContent, { className: "ml-4", children: /* @__PURE__ */ jsxRuntime.jsx(TextHeading, { variant: "h4", className: "mb-1", children: option.label }) }),
15384
+ /* @__PURE__ */ jsxRuntime.jsx(ListItemRightSide, { className: "ml-auto", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: arrowIcon }) })
15385
+ ]
15386
+ },
15387
+ index
15388
+ )) })
15389
+ ] })
15390
+ }
15391
+ );
15392
+ }
15393
+ var defaultBackIcon = /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 12H5M12 19l-7-7 7-7" }) });
15394
+ var defaultFlagIcon = /* @__PURE__ */ jsxRuntime.jsx(
15395
+ "img",
15396
+ {
15397
+ src: "/brazil-flag-rounded.png",
15398
+ alt: "Brazil",
15399
+ className: "w-[24px] h-[24px] rounded-[var(--deframe-widget-size-radius-sm)]"
15400
+ }
15401
+ );
15402
+ function OnrampFormView({
15403
+ amount,
15404
+ onAmountChange,
15405
+ isLoadingQuote,
15406
+ summaryTitle,
15407
+ summaryItems,
15408
+ isBelowMinAmount,
15409
+ minAmountFormatted,
15410
+ hasNoAmount,
15411
+ isProcessing,
15412
+ onSubmit,
15413
+ onBack,
15414
+ submitLabel,
15415
+ flagIcon = defaultFlagIcon,
15416
+ backIcon = defaultBackIcon,
15417
+ className
15418
+ }) {
15419
+ return /* @__PURE__ */ jsxRuntime.jsxs(
15420
+ "div",
15421
+ {
15422
+ className: tailwindMerge.twMerge("w-full p-4 mx-auto space-y-6", className),
15423
+ "data-test-id": "onramp-form-view",
15424
+ children: [
15425
+ /* @__PURE__ */ jsxRuntime.jsx(
15426
+ SecondaryButton,
15427
+ {
15428
+ onClick: onBack,
15429
+ className: "mb-4 !border-0 max-w-[84px]",
15430
+ "aria-label": "Voltar",
15431
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
15432
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-5 h-5 text-[color:var(--deframe-widget-color-text-primary-dark)]", children: backIcon }),
15433
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-primary-dark)]", children: "Voltar" })
15434
+ ] })
15435
+ }
15436
+ ),
15437
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
15438
+ /* @__PURE__ */ jsxRuntime.jsx(TextHeading, { variant: "h3", children: "Quanto voc\xEA quer depositar?" }),
15439
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: "Insira o valor gere o c\xF3digo PIX" })
15440
+ ] }),
15441
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-[var(--deframe-widget-color-bg-secondary)] rounded-[var(--deframe-widget-size-radius-lg)] shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 flex items-end justify-between", children: [
15442
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
15443
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 mb-1", children: /* @__PURE__ */ jsxRuntime.jsx(
15444
+ TextBody,
15445
+ {
15446
+ variant: "text-small",
15447
+ className: "text-[color:var(--deframe-widget-color-text-secondary)]",
15448
+ children: "Voc\xEA paga com PIX"
15449
+ }
15450
+ ) }),
15451
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center", children: flagIcon })
15452
+ ] }),
15453
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 text-right", children: /* @__PURE__ */ jsxRuntime.jsx(
15454
+ "input",
15455
+ {
15456
+ type: "text",
15457
+ inputMode: "decimal",
15458
+ value: amount ? `R$ ${amount}` : "",
15459
+ onChange: (e) => {
15460
+ const value = e.target.value.replace(/[^0-9.]/g, "");
15461
+ onAmountChange(value || "");
15462
+ },
15463
+ onWheel: (event) => {
15464
+ event.currentTarget.blur();
15465
+ },
15466
+ placeholder: "R$0.00",
15467
+ className: "w-full bg-transparent text-right text-[28px] font-extrabold text-[color:var(--deframe-widget-color-text-secondary)] outline-none",
15468
+ "data-test-id": "onramp-form-amount-input",
15469
+ "aria-label": "Valor do dep\xF3sito"
15470
+ }
15471
+ ) })
15472
+ ] }) }),
15473
+ isLoadingQuote ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[var(--deframe-widget-color-bg-secondary)] p-4 rounded-[var(--deframe-widget-size-radius-lg)] space-y-3", children: [
15474
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
15475
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 96, height: 16, shimmer: true }),
15476
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 80, height: 16, shimmer: true })
15477
+ ] }),
15478
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
15479
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 80, height: 16, shimmer: true }),
15480
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 64, height: 16, shimmer: true })
15481
+ ] })
15482
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(
15483
+ SummaryDetails,
15484
+ {
15485
+ title: summaryTitle,
15486
+ items: summaryItems,
15487
+ defaultOpen: true,
15488
+ showDividers: true,
15489
+ className: "bg-[var(--deframe-widget-color-bg-secondary)]"
15490
+ }
15491
+ ),
15492
+ /* @__PURE__ */ jsxRuntime.jsx(
15493
+ BannerNotification,
15494
+ {
15495
+ message: "Dep\xF3sitos via Pix s\xE3o convertidos automaticamente em BRLA.",
15496
+ variant: "info"
15497
+ }
15498
+ ),
15499
+ isBelowMinAmount && /* @__PURE__ */ jsxRuntime.jsx(
15500
+ BannerNotification,
15501
+ {
15502
+ message: `O valor m\xEDnimo para dep\xF3sito \xE9 R$ ${minAmountFormatted}.`,
15503
+ variant: "warning"
15504
+ }
15505
+ ),
15506
+ /* @__PURE__ */ jsxRuntime.jsx(
15507
+ PrimaryButton,
15508
+ {
15509
+ onClick: onSubmit,
15510
+ disabled: isBelowMinAmount || isProcessing || hasNoAmount,
15511
+ "aria-label": submitLabel,
15512
+ "data-test-id": "onramp-form-submit",
15513
+ children: isProcessing ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center justify-center gap-2", children: [
15514
+ "Processando ",
15515
+ /* @__PURE__ */ jsxRuntime.jsx(LoadingDots, {})
15516
+ ] }) : submitLabel
15517
+ }
15518
+ )
15519
+ ]
15520
+ }
15521
+ );
15522
+ }
15523
+ var ClockIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsxs(
15524
+ "svg",
15525
+ {
15526
+ xmlns: "http://www.w3.org/2000/svg",
15527
+ width: "16",
15528
+ height: "16",
15529
+ viewBox: "0 0 24 24",
15530
+ fill: "none",
15531
+ stroke: "currentColor",
15532
+ strokeWidth: "2",
15533
+ strokeLinecap: "round",
15534
+ strokeLinejoin: "round",
15535
+ className,
15536
+ "aria-hidden": "true",
15537
+ children: [
15538
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
15539
+ /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "12 6 12 12 16 14" })
15540
+ ]
15541
+ }
15542
+ );
15543
+ var CopyIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsxs(
15544
+ "svg",
15545
+ {
15546
+ xmlns: "http://www.w3.org/2000/svg",
15547
+ width: "16",
15548
+ height: "16",
15549
+ viewBox: "0 0 24 24",
15550
+ fill: "none",
15551
+ stroke: "currentColor",
15552
+ strokeWidth: "2",
15553
+ strokeLinecap: "round",
15554
+ strokeLinejoin: "round",
15555
+ className,
15556
+ "aria-hidden": "true",
15557
+ children: [
15558
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
15559
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
15560
+ ]
15561
+ }
15562
+ );
15563
+ var OnrampFormSimpleView = ({
15564
+ // Base OnrampFormViewProps
15565
+ amount,
15566
+ onAmountChange,
15567
+ isLoadingQuote,
15568
+ summaryTitle,
15569
+ summaryItems,
15570
+ isBelowMinAmount,
15571
+ minAmountFormatted,
15572
+ hasNoAmount,
15573
+ isProcessing,
15574
+ onSubmit,
15575
+ onBack,
15576
+ submitLabel,
15577
+ // Simple-specific props
15578
+ activeTab,
15579
+ cryptoHref,
15580
+ pixHref,
15581
+ pixCode,
15582
+ qrCodeElement,
15583
+ remainingLabel,
15584
+ isExpired,
15585
+ copied,
15586
+ onCopy,
15587
+ onRegenerate,
15588
+ isRegenerating,
15589
+ onClose,
15590
+ error
15591
+ }) => {
15592
+ const hasPixCode = !!pixCode;
15593
+ const isSubmitDisabled = !amount || amount === "0" || amount === "" || isBelowMinAmount || hasNoAmount || isProcessing;
15594
+ const panelBaseClasses = [
15595
+ "relative flex flex-col overflow-hidden w-[420px]",
15596
+ "rounded-[var(--deframe-widget-size-radius-md)]",
15597
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
15598
+ "font-[var(--deframe-widget-font-family)]"
15599
+ ].join(" ");
15600
+ const headerBaseClasses = [
15601
+ "flex items-center",
15602
+ "px-[var(--deframe-widget-size-padding-x-md)]",
15603
+ "py-[var(--deframe-widget-size-padding-y-md)]"
15604
+ ].join(" ");
15605
+ const titleBaseClasses = [
15606
+ "flex-1",
15607
+ "text-[15px]",
15608
+ "[font-weight:var(--deframe-widget-font-weight-semibold)]",
15609
+ "text-[color:var(--deframe-widget-color-text-primary)]"
15610
+ ].join(" ");
15611
+ const dividerClasses = "h-px bg-[var(--deframe-widget-color-border-secondary)]";
15612
+ const bodyBaseClasses = [
15613
+ "flex flex-col",
15614
+ "gap-[var(--deframe-widget-size-gap-md)]",
15615
+ "px-[var(--deframe-widget-size-padding-x-md)]",
15616
+ "py-[var(--deframe-widget-size-padding-y-md)]"
15617
+ ].join(" ");
15618
+ const footerBaseClasses = [
15619
+ "flex gap-[var(--deframe-widget-size-gap-sm)]",
15620
+ "px-[var(--deframe-widget-size-padding-x-md)]",
15621
+ "pb-[var(--deframe-widget-size-padding-y-md)]"
15622
+ ].join(" ");
15623
+ const cardClasses2 = tailwindMerge.twMerge(
15624
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
15625
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
15626
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
15627
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]"
15628
+ );
15629
+ const secondaryButtonClasses = [
15630
+ "flex-1 h-12 rounded-[var(--deframe-widget-size-radius-sm)]",
15631
+ "text-[15px] text-[color:var(--deframe-widget-color-text-secondary)]",
15632
+ "border-[color:var(--deframe-widget-color-border-secondary)]",
15633
+ "outline-none",
15634
+ "transition-[background,color,border-color] duration-150",
15635
+ "hover:opacity-100",
15636
+ "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]",
15637
+ "hover:text-[color:var(--deframe-widget-color-text-primary)]"
15638
+ ].join(" ");
15639
+ return /* @__PURE__ */ jsxRuntime.jsxs(
15640
+ "div",
15641
+ {
15642
+ "data-slot": "onramp-form-simple-panel",
15643
+ "data-test-id": "onramp-form-simple-view",
15644
+ className: panelBaseClasses,
15645
+ children: [
15646
+ /* @__PURE__ */ jsxRuntime.jsxs(
15647
+ "header",
15648
+ {
15649
+ "data-slot": "onramp-form-simple-header",
15650
+ "data-test-id": "onramp-form-simple-view-header",
15651
+ className: headerBaseClasses,
15652
+ children: [
15653
+ /* @__PURE__ */ jsxRuntime.jsx(
15654
+ "span",
15655
+ {
15656
+ "data-slot": "onramp-form-simple-title",
15657
+ "data-test-id": "onramp-form-simple-view-title",
15658
+ className: titleBaseClasses,
15659
+ children: "Depositar"
15660
+ }
15661
+ ),
15662
+ onClose && /* @__PURE__ */ jsxRuntime.jsx(
15663
+ CloseButton_default,
15664
+ {
15665
+ onClick: onClose,
15666
+ ariaLabel: "Fechar painel de dep\xF3sito",
15667
+ testId: "onramp-form-simple-view-close"
15668
+ }
15669
+ )
15670
+ ]
15671
+ }
15672
+ ),
15673
+ /* @__PURE__ */ jsxRuntime.jsx(
15674
+ "div",
15675
+ {
15676
+ "data-slot": "onramp-form-simple-divider",
15677
+ "data-test-id": "onramp-form-simple-view-divider",
15678
+ className: dividerClasses
15679
+ }
15680
+ ),
15681
+ /* @__PURE__ */ jsxRuntime.jsx(
15682
+ FlowTabHeader,
15683
+ {
15684
+ activeTab: activeTab != null ? activeTab : "pix",
15685
+ cryptoHref: cryptoHref != null ? cryptoHref : "/dashboard/deposit/onchain",
15686
+ pixHref: pixHref != null ? pixHref : "/dashboard/deposit/onramp"
15687
+ }
15688
+ ),
15689
+ /* @__PURE__ */ jsxRuntime.jsx(
15690
+ "div",
15691
+ {
15692
+ "data-slot": "onramp-form-simple-divider-tabs",
15693
+ "data-test-id": "onramp-form-simple-view-divider-tabs",
15694
+ className: dividerClasses
15695
+ }
15696
+ ),
15697
+ /* @__PURE__ */ jsxRuntime.jsx(
15698
+ "div",
15699
+ {
15700
+ "data-slot": "onramp-form-simple-body",
15701
+ "data-test-id": "onramp-form-simple-view-body",
15702
+ className: bodyBaseClasses,
15703
+ children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: !hasPixCode ? (
15704
+ /* ── Step 1: Amount input ─────────────────────────────────────── */
15705
+ /* @__PURE__ */ jsxRuntime.jsxs(
15706
+ framerMotion.motion.div,
15707
+ {
15708
+ "data-slot": "onramp-form-simple-step-1",
15709
+ "data-test-id": "onramp-form-simple-view-step-1",
15710
+ initial: { opacity: 0 },
15711
+ animate: { opacity: 1 },
15712
+ exit: { opacity: 0 },
15713
+ transition: { duration: 0.15 },
15714
+ className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]",
15715
+ children: [
15716
+ /* @__PURE__ */ jsxRuntime.jsx(
15717
+ "div",
15718
+ {
15719
+ "data-slot": "onramp-form-simple-amount-card",
15720
+ "data-test-id": "onramp-form-simple-view-amount-card",
15721
+ className: cardClasses2,
15722
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
15723
+ "div",
15724
+ {
15725
+ "data-slot": "onramp-form-simple-amount-row",
15726
+ "data-test-id": "onramp-form-simple-view-amount-row",
15727
+ className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
15728
+ children: [
15729
+ /* @__PURE__ */ jsxRuntime.jsx(
15730
+ "span",
15731
+ {
15732
+ "data-slot": "onramp-form-simple-currency-label",
15733
+ "data-test-id": "onramp-form-simple-view-currency-label",
15734
+ className: "text-[36px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-tertiary)] leading-[1] flex-shrink-0",
15735
+ children: "R$"
15736
+ }
15737
+ ),
15738
+ /* @__PURE__ */ jsxRuntime.jsx(
15739
+ "div",
15740
+ {
15741
+ "data-test-id": "onramp-form-simple-view-currency-divider",
15742
+ className: "w-px h-10 bg-[var(--deframe-widget-color-border-secondary)] flex-shrink-0"
15743
+ }
15744
+ ),
15745
+ /* @__PURE__ */ jsxRuntime.jsx(
15746
+ EarnAmountInputSimpleView,
15747
+ {
15748
+ value: amount,
15749
+ onChange: (e) => {
15750
+ const raw = e.target.value.replace(/[^0-9.,]/g, "");
15751
+ onAmountChange(raw);
15752
+ },
15753
+ ariaLabel: "Valor do dep\xF3sito PIX",
15754
+ dollarAmountFormatted: ""
15755
+ }
15756
+ )
15757
+ ]
15758
+ }
15759
+ )
15760
+ }
15761
+ ),
15762
+ isBelowMinAmount && /* @__PURE__ */ jsxRuntime.jsx(
15763
+ EarnInlineNotificationSimpleView,
15764
+ {
15765
+ variant: "warning",
15766
+ message: `O valor m\xEDnimo para dep\xF3sito \xE9 R$ ${minAmountFormatted}.`
15767
+ }
15768
+ ),
15769
+ error && /* @__PURE__ */ jsxRuntime.jsx(
15770
+ EarnInlineNotificationSimpleView,
15771
+ {
15772
+ variant: "error",
15773
+ message: error
15774
+ }
15775
+ ),
15776
+ isLoadingQuote ? /* @__PURE__ */ jsxRuntime.jsxs(
15777
+ "div",
15778
+ {
15779
+ "data-test-id": "onramp-form-simple-view-skeleton",
15780
+ className: tailwindMerge.twMerge(cardClasses2, "space-y-3"),
15781
+ children: [
15782
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
15783
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 96, height: 16, shimmer: true }),
15784
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 80, height: 16, shimmer: true })
15785
+ ] }),
15786
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
15787
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 80, height: 16, shimmer: true }),
15788
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 64, height: 16, shimmer: true })
15789
+ ] })
15790
+ ]
15791
+ }
15792
+ ) : summaryItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
15793
+ SummaryDetails,
15794
+ {
15795
+ title: summaryTitle,
15796
+ items: summaryItems,
15797
+ defaultOpen: true,
15798
+ showDividers: true,
15799
+ className: "bg-[var(--deframe-widget-color-bg-secondary)]"
15800
+ }
15801
+ )
15802
+ ]
15803
+ },
15804
+ "step-1"
15805
+ )
15806
+ ) : (
15807
+ /* ── Step 2: QR code + PIX code ───────────────────────────────── */
15808
+ /* @__PURE__ */ jsxRuntime.jsxs(
15809
+ framerMotion.motion.div,
15810
+ {
15811
+ "data-slot": "onramp-form-simple-step-2",
15812
+ "data-test-id": "onramp-form-simple-view-step-2",
15813
+ initial: { opacity: 0 },
15814
+ animate: { opacity: 1 },
15815
+ exit: { opacity: 0 },
15816
+ transition: { duration: 0.15 },
15817
+ className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]",
15818
+ children: [
15819
+ /* @__PURE__ */ jsxRuntime.jsxs(
15820
+ "div",
15821
+ {
15822
+ "data-slot": "onramp-form-simple-qr-card",
15823
+ "data-test-id": "onramp-form-simple-view-qr-card",
15824
+ className: tailwindMerge.twMerge(
15825
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
15826
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
15827
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
15828
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]",
15829
+ "flex items-center justify-center",
15830
+ "relative overflow-hidden"
15831
+ ),
15832
+ children: [
15833
+ /* @__PURE__ */ jsxRuntime.jsx(
15834
+ "div",
15835
+ {
15836
+ "data-slot": "onramp-form-simple-qr-wrapper",
15837
+ "data-test-id": "onramp-form-simple-view-qr-wrapper",
15838
+ className: "bg-white p-3 rounded-lg leading-[0]",
15839
+ children: qrCodeElement
15840
+ }
15841
+ ),
15842
+ isExpired && /* @__PURE__ */ jsxRuntime.jsx(
15843
+ "div",
15844
+ {
15845
+ "data-slot": "onramp-form-simple-qr-expired-overlay",
15846
+ "data-test-id": "onramp-form-simple-view-qr-expired-overlay",
15847
+ className: tailwindMerge.twMerge(
15848
+ "absolute inset-0 flex items-center justify-center",
15849
+ "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-primary)_80%,transparent)]",
15850
+ "rounded-[var(--deframe-widget-size-radius-sm)]"
15851
+ ),
15852
+ children: /* @__PURE__ */ jsxRuntime.jsx(
15853
+ "span",
15854
+ {
15855
+ "data-test-id": "onramp-form-simple-view-qr-expired-text",
15856
+ className: "text-[15px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-state-error)] font-[var(--deframe-widget-font-family)]",
15857
+ children: "C\xF3digo expirado"
15858
+ }
15859
+ )
15860
+ }
15861
+ )
15862
+ ]
15863
+ }
15864
+ ),
15865
+ /* @__PURE__ */ jsxRuntime.jsxs(
15866
+ "div",
15867
+ {
15868
+ "data-slot": "onramp-form-simple-pix-code",
15869
+ "data-test-id": "onramp-form-simple-view-pix-code",
15870
+ className: tailwindMerge.twMerge(
15871
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
15872
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
15873
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
15874
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)]"
15875
+ ),
15876
+ children: [
15877
+ /* @__PURE__ */ jsxRuntime.jsx(
15878
+ "p",
15879
+ {
15880
+ "data-test-id": "onramp-form-simple-view-pix-code-label",
15881
+ className: "mb-[var(--deframe-widget-size-gap-xs)] text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
15882
+ children: "C\xF3digo PIX"
15883
+ }
15884
+ ),
15885
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
15886
+ /* @__PURE__ */ jsxRuntime.jsx(
15887
+ "span",
15888
+ {
15889
+ "data-test-id": "onramp-form-simple-view-pix-code-value",
15890
+ className: "flex-1 min-w-0 truncate font-mono text-[13px] text-[color:var(--deframe-widget-color-text-primary)] font-[var(--deframe-widget-font-family)]",
15891
+ children: pixCode
15892
+ }
15893
+ ),
15894
+ /* @__PURE__ */ jsxRuntime.jsxs(
15895
+ "button",
15896
+ {
15897
+ type: "button",
15898
+ "data-test-id": "onramp-form-simple-view-pix-code-copy",
15899
+ "aria-label": copied ? "C\xF3digo copiado" : "Copiar c\xF3digo PIX",
15900
+ onClick: onCopy,
15901
+ className: tailwindMerge.twMerge(
15902
+ "flex items-center gap-1 flex-shrink-0 px-2 py-1",
15903
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
15904
+ "text-[12px] [font-weight:var(--deframe-widget-font-weight-medium)]",
15905
+ "font-[var(--deframe-widget-font-family)]",
15906
+ "cursor-pointer outline-none",
15907
+ "transition-[background,color] duration-150",
15908
+ copied ? "text-[color:var(--deframe-widget-color-state-success)] bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-success)_12%,transparent)]" : "text-[color:var(--deframe-widget-color-brand-primary)] hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)]"
15909
+ ),
15910
+ children: [
15911
+ /* @__PURE__ */ jsxRuntime.jsx(CopyIcon, {}),
15912
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: copied ? "Copiado!" : "Copiar" })
15913
+ ]
15914
+ }
15915
+ )
15916
+ ] })
15917
+ ]
15918
+ }
15919
+ ),
15920
+ remainingLabel && /* @__PURE__ */ jsxRuntime.jsxs(
15921
+ "div",
15922
+ {
15923
+ "data-slot": "onramp-form-simple-timer",
15924
+ "data-test-id": "onramp-form-simple-view-timer",
15925
+ className: "flex items-center justify-center gap-[var(--deframe-widget-size-gap-xs)]",
15926
+ children: [
15927
+ /* @__PURE__ */ jsxRuntime.jsx(
15928
+ ClockIcon,
15929
+ {
15930
+ className: tailwindMerge.twMerge(
15931
+ "flex-shrink-0",
15932
+ isExpired ? "text-[color:var(--deframe-widget-color-state-error)]" : "text-[color:var(--deframe-widget-color-text-tertiary)]"
15933
+ )
15934
+ }
15935
+ ),
15936
+ /* @__PURE__ */ jsxRuntime.jsx(
15937
+ "span",
15938
+ {
15939
+ "data-test-id": "onramp-form-simple-view-timer-label",
15940
+ className: tailwindMerge.twMerge(
15941
+ "text-[13px] [font-weight:var(--deframe-widget-font-weight-medium)] font-[var(--deframe-widget-font-family)]",
15942
+ isExpired ? "text-[color:var(--deframe-widget-color-state-error)]" : "text-[color:var(--deframe-widget-color-text-tertiary)]"
15943
+ ),
15944
+ children: remainingLabel
15945
+ }
15946
+ )
15947
+ ]
15948
+ }
15949
+ ),
15950
+ isExpired && onRegenerate && /* @__PURE__ */ jsxRuntime.jsx(
15951
+ PrimaryButton,
15952
+ {
15953
+ type: "button",
15954
+ onClick: onRegenerate,
15955
+ disabled: isRegenerating,
15956
+ className: "w-full h-12 rounded-[var(--deframe-widget-size-radius-sm)] text-[15px]",
15957
+ "aria-label": "Gerar novo c\xF3digo PIX",
15958
+ "data-test-id": "onramp-form-simple-view-regenerate",
15959
+ children: isRegenerating ? "Gerando..." : "Gerar novo c\xF3digo"
15960
+ }
15961
+ )
15962
+ ]
15963
+ },
15964
+ "step-2"
15965
+ )
15966
+ ) })
15967
+ }
15968
+ ),
15969
+ /* @__PURE__ */ jsxRuntime.jsx(
15970
+ "footer",
15971
+ {
15972
+ "data-slot": "onramp-form-simple-footer",
15973
+ "data-test-id": "onramp-form-simple-view-footer",
15974
+ className: footerBaseClasses,
15975
+ children: !hasPixCode ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
15976
+ /* @__PURE__ */ jsxRuntime.jsx(
15977
+ SecondaryButton,
15978
+ {
15979
+ type: "button",
15980
+ className: secondaryButtonClasses,
15981
+ onClick: onBack,
15982
+ "aria-label": "Cancelar dep\xF3sito",
15983
+ "data-test-id": "onramp-form-simple-view-cancel",
15984
+ children: "Cancelar"
15985
+ }
15986
+ ),
15987
+ /* @__PURE__ */ jsxRuntime.jsx(
15988
+ PrimaryButton,
15989
+ {
15990
+ type: "button",
15991
+ className: "flex-1 h-12 rounded-[var(--deframe-widget-size-radius-sm)] text-[15px]",
15992
+ onClick: onSubmit,
15993
+ disabled: isSubmitDisabled,
15994
+ "aria-label": submitLabel,
15995
+ "data-test-id": "onramp-form-simple-view-submit",
15996
+ children: isProcessing ? "Processando..." : submitLabel
15997
+ }
15998
+ )
15999
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(
16000
+ SecondaryButton,
16001
+ {
16002
+ type: "button",
16003
+ className: tailwindMerge.twMerge(secondaryButtonClasses, "w-full"),
16004
+ onClick: onBack,
16005
+ "aria-label": "Cancelar",
16006
+ "data-test-id": "onramp-form-simple-view-cancel",
16007
+ children: "Cancelar"
16008
+ }
16009
+ )
16010
+ }
16011
+ )
16012
+ ]
16013
+ }
16014
+ );
16015
+ };
16016
+ function OnrampPixcodeView({
16017
+ pixCode,
16018
+ summaryTitle,
16019
+ summaryItems,
16020
+ isLoadingQuote,
16021
+ remainingLabel,
16022
+ isExpired,
16023
+ copied,
16024
+ isRegenerating,
16025
+ onCopy,
16026
+ onRegenerate,
16027
+ qrCodeElement,
16028
+ className
16029
+ }) {
16030
+ return /* @__PURE__ */ jsxRuntime.jsxs(
16031
+ "div",
16032
+ {
16033
+ className: tailwindMerge.twMerge(
16034
+ "w-full p-4 mx-auto space-y-6 animate-fade-in flex flex-col flex-1",
16035
+ className
16036
+ ),
16037
+ "data-test-id": "onramp-pixcode-view",
16038
+ children: [
16039
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
16040
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-[21px] font-bold text-[color:var(--deframe-widget-color-text-secondary)] leading-tight", children: "Pague com Pix" }),
16041
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[14px] text-[color:var(--deframe-widget-color-text-secondary)]", children: "Aponte a sua c\xE2mera para o QR code ou copie e cole o c\xF3digo no app do seu banco" })
16042
+ ] }),
16043
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-[var(--deframe-widget-color-bg-primary)] p-4 rounded-[var(--deframe-widget-size-radius-lg)]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative mx-auto w-fit", children: [
16044
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: isExpired ? "blur-sm opacity-60 transition" : "transition", children: qrCodeElement }),
16045
+ isExpired && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-center px-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[12px] font-semibold text-[color:var(--deframe-widget-color-text-primary)] bg-[var(--deframe-widget-color-bg-primary)]/90 rounded-[var(--deframe-widget-size-radius-sm)] px-3 py-2 border border-[var(--deframe-widget-color-border-secondary)]", children: "C\xF3digo expirado" }) })
16046
+ ] }) }) }),
16047
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-[var(--deframe-widget-color-bg-secondary)] rounded-[var(--deframe-widget-size-radius-lg)] shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
16048
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "font-mono text-[12px] text-[color:var(--deframe-widget-color-text-primary)] truncate flex-1", children: [
16049
+ pixCode.substring(0, 50),
16050
+ "..."
16051
+ ] }),
16052
+ /* @__PURE__ */ jsxRuntime.jsx(
16053
+ "button",
16054
+ {
16055
+ onClick: onCopy,
16056
+ disabled: isExpired,
16057
+ className: tailwindMerge.twMerge(
16058
+ "text-[12px] font-semibold underline shrink-0",
16059
+ isExpired ? "text-[color:var(--deframe-widget-color-text-tertiary)] cursor-not-allowed" : "text-[color:var(--deframe-widget-color-brand-primary)]"
16060
+ ),
16061
+ "aria-label": copied ? "C\xF3digo copiado" : "Copiar c\xF3digo PIX",
16062
+ "data-test-id": "onramp-pixcode-copy-button",
16063
+ children: copied ? "Copiado!" : "Copiar"
16064
+ }
16065
+ )
16066
+ ] }) }) }),
16067
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
16068
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "w-4 h-4 text-[color:var(--deframe-widget-color-text-secondary)]", viewBox: "0 0 16 16", fill: "none", children: [
16069
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "8", r: "6.5", stroke: "#1890FF", strokeWidth: "1" }),
16070
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 4V8L10.5 10.5", stroke: "#1890FF", strokeWidth: "1", strokeLinecap: "round" })
16071
+ ] }),
16072
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: isExpired ? "C\xF3digo expirou. Gere um novo para pagar." : `Expira em ${remainingLabel}` })
16073
+ ] }),
16074
+ isExpired && /* @__PURE__ */ jsxRuntime.jsx(
16075
+ "button",
16076
+ {
16077
+ type: "button",
16078
+ onClick: onRegenerate,
16079
+ disabled: isRegenerating,
16080
+ className: "text-[12px] font-semibold text-[color:var(--deframe-widget-color-brand-primary)] underline self-center disabled:opacity-50 disabled:cursor-not-allowed",
16081
+ "aria-label": "Gerar novo c\xF3digo Pix",
16082
+ "data-test-id": "onramp-pixcode-regenerate-button",
16083
+ children: isRegenerating ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16084
+ "Gerando novo c\xF3digo ",
16085
+ /* @__PURE__ */ jsxRuntime.jsx(LoadingDots, {})
16086
+ ] }) : "Gerar novo c\xF3digo Pix"
16087
+ }
16088
+ ),
16089
+ isLoadingQuote ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 bg-[var(--deframe-widget-color-bg-secondary)] rounded-[var(--deframe-widget-size-radius-lg)] border border-[var(--deframe-widget-color-border-secondary)] space-y-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
16090
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-[var(--deframe-widget-color-bg-tertiary)] rounded-[var(--deframe-widget-size-radius-sm)] animate-pulse w-20" }),
16091
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[14px] text-[color:var(--deframe-widget-color-text-secondary)]", children: "\u2248" }),
16092
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-[var(--deframe-widget-color-bg-tertiary)] rounded-[var(--deframe-widget-size-radius-sm)] animate-pulse w-16" })
16093
+ ] }) }) : /* @__PURE__ */ jsxRuntime.jsx(
16094
+ SummaryDetails,
16095
+ {
16096
+ title: summaryTitle,
16097
+ items: summaryItems,
16098
+ defaultOpen: true,
16099
+ className: "bg-[var(--deframe-widget-color-bg-secondary)]"
16100
+ }
16101
+ )
16102
+ ]
16103
+ }
16104
+ );
16105
+ }
16106
+ function SuccessIcon3() {
16107
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative w-20 h-20", children: [
16108
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-[#2ba176] rounded-full opacity-20" }),
16109
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-12 h-12 bg-[#2ba176] rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-5 h-5", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
16110
+ "path",
16111
+ {
16112
+ d: "M10 15V5M10 5L6 9M10 5L14 9",
16113
+ stroke: "#121212",
16114
+ strokeWidth: "2",
16115
+ strokeLinecap: "round",
16116
+ strokeLinejoin: "round"
16117
+ }
16118
+ ) }) }) })
16119
+ ] });
16120
+ }
16121
+ function SuccessHeader({ children }) {
16122
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-center gap-4", children });
16123
+ }
16124
+ function SuccessTitle({ children }) {
16125
+ return /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-[28px] font-extrabold text-[color:var(--deframe-widget-color-text-primary)] leading-tight mb-2", children });
16126
+ }
16127
+ function SuccessDescription({ children }) {
16128
+ return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[14px] text-[color:var(--deframe-widget-color-text-secondary)]", children });
16129
+ }
16130
+ function DepositCard({ children }) {
16131
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-[var(--deframe-widget-color-bg-secondary)] rounded-[var(--deframe-widget-size-radius-lg)] shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-6", children }) });
16132
+ }
16133
+ function DepositRow({ children }) {
16134
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-3", children });
16135
+ }
16136
+ function DepositIcon() {
16137
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 bg-[var(--deframe-widget-color-brand-primary)] rounded-full flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg", children: "R" }) });
16138
+ }
16139
+ function DepositInfo({ children }) {
16140
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col", children });
16141
+ }
16142
+ function OnrampSuccessView({
16143
+ amount = "0",
16144
+ summaryTitle = "",
16145
+ summaryItems = [],
16146
+ onNewDeposit,
16147
+ onGoToDashboard,
16148
+ className
16149
+ }) {
16150
+ return /* @__PURE__ */ jsxRuntime.jsxs(
16151
+ "div",
16152
+ {
16153
+ className: tailwindMerge.twMerge(
16154
+ "w-full p-4 mx-auto space-y-6 animate-fade-in flex flex-col flex-1",
16155
+ className
16156
+ ),
16157
+ "data-test-id": "onramp-success-view",
16158
+ children: [
16159
+ /* @__PURE__ */ jsxRuntime.jsxs(SuccessHeader, { children: [
16160
+ /* @__PURE__ */ jsxRuntime.jsx(SuccessIcon3, {}),
16161
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
16162
+ /* @__PURE__ */ jsxRuntime.jsx(SuccessTitle, { children: "Dep\xF3sito via PIX conclu\xEDdo" }),
16163
+ /* @__PURE__ */ jsxRuntime.jsxs(SuccessDescription, { children: [
16164
+ amount,
16165
+ " BRLA foram adicionados \xE0 sua carteira."
16166
+ ] })
16167
+ ] })
16168
+ ] }),
16169
+ /* @__PURE__ */ jsxRuntime.jsx(DepositCard, { children: /* @__PURE__ */ jsxRuntime.jsxs(DepositRow, { children: [
16170
+ /* @__PURE__ */ jsxRuntime.jsx(DepositIcon, {}),
16171
+ /* @__PURE__ */ jsxRuntime.jsxs(DepositInfo, { children: [
16172
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: "Voc\xEA depositou via PIX" }),
16173
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-[14px] font-semibold text-[color:var(--deframe-widget-color-text-secondary)]", children: [
16174
+ amount,
16175
+ " BRLA"
16176
+ ] })
16177
+ ] })
16178
+ ] }) }),
16179
+ /* @__PURE__ */ jsxRuntime.jsx(
16180
+ SummaryDetails,
16181
+ {
16182
+ title: summaryTitle,
16183
+ items: summaryItems,
16184
+ defaultOpen: false,
16185
+ className: "bg-[var(--deframe-widget-color-bg-secondary)]"
16186
+ }
16187
+ ),
16188
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex items-center my-4 gap-2 mt-auto", children: [
16189
+ /* @__PURE__ */ jsxRuntime.jsx(
16190
+ SecondaryButton,
16191
+ {
16192
+ onClick: onNewDeposit,
16193
+ "aria-label": "Fazer novo dep\xF3sito",
16194
+ "data-test-id": "onramp-success-new-deposit",
16195
+ children: "Fazer novo dep\xF3sito"
16196
+ }
16197
+ ),
16198
+ /* @__PURE__ */ jsxRuntime.jsx(
16199
+ PrimaryButton,
16200
+ {
16201
+ onClick: onGoToDashboard,
16202
+ "aria-label": "Ir para carteira",
16203
+ "data-test-id": "onramp-success-go-dashboard",
16204
+ children: "Ir para carteira"
16205
+ }
16206
+ )
16207
+ ] })
16208
+ ]
16209
+ }
16210
+ );
16211
+ }
16212
+ var OnrampSuccessSimpleView = ({
16213
+ onGoToDashboard
16214
+ }) => {
16215
+ React6__namespace.useEffect(() => {
16216
+ if (!onGoToDashboard) return;
16217
+ const timer = setTimeout(onGoToDashboard, 5e3);
16218
+ return () => clearTimeout(timer);
16219
+ }, [onGoToDashboard]);
16220
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "onramp-success-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
16221
+ EarnFeedbackOverlaySimpleView,
16222
+ {
16223
+ variant: "success",
16224
+ title: "Dep\xF3sito via PIX Confirmado!",
16225
+ subtitle: "Seu saldo foi atualizado."
16226
+ }
16227
+ ) });
16228
+ };
16229
+ var defaultBackIcon2 = /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 12H5M12 19l-7-7 7-7" }) });
16230
+ function OfframpInputFormView({
16231
+ brlaBalance,
16232
+ amount,
16233
+ onAmountChange,
16234
+ pixKey,
16235
+ onPixKeyChange,
16236
+ onMaxClick,
16237
+ showMaxButton,
16238
+ summaryTitle,
16239
+ summaryItems,
16240
+ isLoadingQuote,
16241
+ amountWarningMessage,
16242
+ hasActiveWithdrawal,
16243
+ completedBanner,
16244
+ error,
16245
+ offrampError,
16246
+ submitLabel,
16247
+ submitDisabled,
16248
+ onSubmit,
16249
+ onBack,
16250
+ backIcon,
16251
+ tokenIconUrl = "/brladigital_32.webp",
16252
+ flagIconUrl = "/brazil-flag-rounded.png",
16253
+ className
16254
+ }) {
16255
+ return /* @__PURE__ */ jsxRuntime.jsxs(
16256
+ "div",
16257
+ {
16258
+ className: tailwindMerge.twMerge(
16259
+ "w-full max-w-[620px] relative bg-[var(--deframe-widget-color-bg-primary)] lg:bg-[var(--deframe-widget-color-bg-secondary)] overflow-hidden mx-auto mt-[75px] rounded-[var(--deframe-widget-size-radius-sm)] p-6 min-h-[80vh] flex flex-col",
16260
+ className
16261
+ ),
16262
+ "data-test-id": "offramp-input-form-view",
16263
+ children: [
16264
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6", children: [
16265
+ /* @__PURE__ */ jsxRuntime.jsxs(
16266
+ "button",
16267
+ {
16268
+ onClick: onBack,
16269
+ className: "flex items-center gap-2 mb-4 cursor-pointer",
16270
+ "aria-label": "Voltar",
16271
+ "data-test-id": "offramp-input-form-back-button",
16272
+ children: [
16273
+ backIcon || defaultBackIcon2,
16274
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-medium", children: "Voltar" })
16275
+ ]
16276
+ }
16277
+ ),
16278
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-1 bg-[var(--deframe-widget-color-border-secondary)] rounded-full overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full bg-[#1FC16B]", style: { width: "25%" } }) })
16279
+ ] }),
16280
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-start justify-start gap-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full space-y-6", children: [
16281
+ completedBanner && /* @__PURE__ */ jsxRuntime.jsx(
16282
+ BannerNotification,
16283
+ {
16284
+ message: completedBanner,
16285
+ variant: "success"
16286
+ }
16287
+ ),
16288
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
16289
+ /* @__PURE__ */ jsxRuntime.jsx(TextHeading, { variant: "h3", children: "Saque via PIX" }),
16290
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: "Insira o valor e a chave PIX para receber em sua conta banc\xE1ria." })
16291
+ ] }),
16292
+ /* @__PURE__ */ jsxRuntime.jsxs(ListItem, { children: [
16293
+ /* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsxRuntime.jsx(
16294
+ "img",
16295
+ {
16296
+ src: tokenIconUrl,
16297
+ alt: "Token",
16298
+ className: "w-10 h-10 rounded-full"
16299
+ }
16300
+ ) }),
16301
+ /* @__PURE__ */ jsxRuntime.jsxs(ListItemContent, { className: "ml-4", children: [
16302
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] ml-2", children: "Saldo em BRLA dispon\xEDvel" }),
16303
+ /* @__PURE__ */ jsxRuntime.jsxs(TextHeading, { variant: "h5", className: "ml-2", children: [
16304
+ brlaBalance,
16305
+ " BRLA"
16306
+ ] })
16307
+ ] })
16308
+ ] }),
16309
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
16310
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] mb-2", children: "Quanto voc\xEA quer enviar via PIX?" }),
16311
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[var(--deframe-widget-color-bg-secondary)] border border-[var(--deframe-widget-color-border-secondary)] rounded-[var(--deframe-widget-size-radius-sm)] p-4 flex items-center justify-between", children: [
16312
+ /* @__PURE__ */ jsxRuntime.jsx("img", { src: flagIconUrl, alt: "BRL", className: "w-6 h-6 rounded-full" }),
16313
+ /* @__PURE__ */ jsxRuntime.jsx(
16314
+ "input",
16315
+ {
16316
+ type: "text",
16317
+ inputMode: "decimal",
16318
+ value: amount ? `R$${amount}` : "",
16319
+ onChange: (e) => {
16320
+ const value = e.target.value.replace(/[^0-9.]/g, "");
16321
+ onAmountChange(value || "");
16322
+ },
16323
+ onWheel: (event) => {
16324
+ event.currentTarget.blur();
16325
+ },
16326
+ placeholder: "R$0.00",
16327
+ className: "w-full bg-transparent text-right text-[28px] font-extrabold text-[color:var(--deframe-widget-color-text-primary)] outline-none",
16328
+ "aria-label": "Valor do saque",
16329
+ "data-test-id": "offramp-input-form-amount"
16330
+ }
16331
+ )
16332
+ ] }),
16333
+ showMaxButton && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
16334
+ TertiaryButton,
16335
+ {
16336
+ onClick: onMaxClick,
16337
+ className: "text-[length:var(--deframe-widget-font-size-sm)]",
16338
+ "aria-label": "Usar valor m\xE1ximo",
16339
+ children: "Max"
16340
+ }
16341
+ ) }),
16342
+ hasActiveWithdrawal && /* @__PURE__ */ jsxRuntime.jsx(
16343
+ BannerNotification,
16344
+ {
16345
+ message: "Voc\xEA j\xE1 tem um saque em andamento. Aguarde a conclus\xE3o antes de iniciar outro.",
16346
+ variant: "warning"
16347
+ }
16348
+ ),
16349
+ amountWarningMessage && /* @__PURE__ */ jsxRuntime.jsx(
16350
+ BannerNotification,
16351
+ {
16352
+ message: amountWarningMessage,
16353
+ variant: "warning"
16354
+ }
16355
+ )
16356
+ ] }),
16357
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
16358
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] mb-2", children: "Qual \xE9 a sua chave PIX?" }),
16359
+ /* @__PURE__ */ jsxRuntime.jsx(
16360
+ Input2,
16361
+ {
16362
+ type: "text",
16363
+ value: pixKey,
16364
+ onChange: (e) => onPixKeyChange(e.target.value),
16365
+ placeholder: "(CPF, email, telefone ou aleat\xF3ria)",
16366
+ className: "w-full h-12 text-[length:var(--deframe-widget-font-size-md)] border border-[var(--deframe-widget-color-border-secondary)] rounded-[var(--deframe-widget-size-radius-sm)] bg-[var(--deframe-widget-color-bg-secondary)]",
16367
+ "aria-label": "Chave PIX",
16368
+ "data-test-id": "offramp-input-form-pix-key"
16369
+ }
16370
+ ),
16371
+ /* @__PURE__ */ jsxRuntime.jsx(
16372
+ BannerNotification,
16373
+ {
16374
+ variant: "info",
16375
+ message: "A chave PIX deve estar vinculada ao mesmo CPF do seu cadastro."
16376
+ }
16377
+ )
16378
+ ] }),
16379
+ isLoadingQuote ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-[var(--deframe-widget-color-bg-secondary)] p-4 rounded-[var(--deframe-widget-size-radius-sm)]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
16380
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 128, height: 16, shimmer: true }),
16381
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 64, height: 16, shimmer: true })
16382
+ ] }) }) : /* @__PURE__ */ jsxRuntime.jsx(
16383
+ SummaryDetails,
16384
+ {
16385
+ title: summaryTitle,
16386
+ items: summaryItems,
16387
+ className: "bg-[var(--deframe-widget-color-bg-secondary)]"
16388
+ }
16389
+ ),
16390
+ /* @__PURE__ */ jsxRuntime.jsx(
16391
+ BannerNotification,
16392
+ {
16393
+ message: "Depois de inserir o valor e confirmar o pix voc\xEA precisa assinar a transa\xE7\xE3o na sua wallet. Processamento pode levar alguns minutos.",
16394
+ variant: "info"
16395
+ }
16396
+ ),
16397
+ (error || offrampError) && /* @__PURE__ */ jsxRuntime.jsx(
16398
+ BannerNotification,
16399
+ {
16400
+ message: error || offrampError || "",
16401
+ variant: "error"
16402
+ }
16403
+ ),
16404
+ /* @__PURE__ */ jsxRuntime.jsx(
16405
+ PrimaryButton,
16406
+ {
16407
+ onClick: onSubmit,
16408
+ disabled: submitDisabled,
16409
+ "aria-label": "Confirmar saque",
16410
+ "data-test-id": "offramp-input-form-submit",
16411
+ children: submitLabel
16412
+ }
16413
+ )
16414
+ ] }) })
16415
+ ]
16416
+ }
16417
+ );
16418
+ }
16419
+
16420
+ // src/stories/offramp-input-form-view/constants.ts
16421
+ var PIX_KEY_OPTIONS = [
16422
+ { value: "cpf", label: "CPF" },
16423
+ { value: "email", label: "Email" },
16424
+ { value: "phone", label: "Celular" },
16425
+ { value: "random", label: "Aleat\xF3ria" }
16426
+ ];
16427
+ var tabBaseClasses2 = [
16428
+ "flex-1 py-[4px] px-[8px]",
16429
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
16430
+ "border-none outline-none cursor-pointer",
16431
+ "whitespace-nowrap text-center",
16432
+ "font-[var(--deframe-widget-font-family)]",
16433
+ "text-[13px] [line-height:1.4]",
16434
+ "transition-[background,color] duration-150",
16435
+ "bg-transparent"
16436
+ ].join(" ");
16437
+ var activeTabClasses2 = [
16438
+ "[font-weight:var(--deframe-widget-font-weight-semibold)]",
16439
+ "text-[color:var(--deframe-widget-color-brand-primary)]"
16440
+ ].join(" ");
16441
+ var inactiveTabClasses2 = [
16442
+ "[font-weight:var(--deframe-widget-font-weight-regular)]",
16443
+ "text-[color:var(--deframe-widget-color-text-secondary)]",
16444
+ "hover:text-[color:var(--deframe-widget-color-text-primary)]",
16445
+ "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]"
16446
+ ].join(" ");
16447
+ var PixKeySegmentedControl = ({
16448
+ value,
16449
+ onChange
16450
+ }) => {
16451
+ return /* @__PURE__ */ jsxRuntime.jsx(
16452
+ "div",
16453
+ {
16454
+ role: "tablist",
16455
+ "data-slot": "pix-key-segmented-control",
16456
+ "data-test-id": "pix-key-segmented-control",
16457
+ className: tailwindMerge.twMerge(
16458
+ "inline-flex w-full",
16459
+ "rounded-[var(--deframe-widget-size-radius-md)]",
16460
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
16461
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
16462
+ "p-[3px] gap-[2px]"
16463
+ ),
16464
+ children: PIX_KEY_OPTIONS.map(({ value: optionValue, label }) => {
16465
+ const isActive = optionValue === value;
16466
+ return /* @__PURE__ */ jsxRuntime.jsx(
16467
+ "button",
16468
+ {
16469
+ type: "button",
16470
+ role: "tab",
16471
+ "aria-selected": isActive,
16472
+ "aria-label": label,
16473
+ "data-test-id": `pix-key-tab-${optionValue}`,
16474
+ onClick: () => onChange(optionValue),
16475
+ className: tailwindMerge.twMerge(
16476
+ tabBaseClasses2,
16477
+ isActive ? activeTabClasses2 : inactiveTabClasses2
16478
+ ),
16479
+ children: label
16480
+ },
16481
+ optionValue
16482
+ );
16483
+ })
16484
+ }
16485
+ );
16486
+ };
16487
+ var STORAGE_KEY = "deframe-pix-key-type";
16488
+ var PIX_PLACEHOLDERS = {
16489
+ cpf: "000.000.000-00",
16490
+ email: "seu@email.com",
16491
+ phone: "+55 (11) 99999-9999",
16492
+ random: "Chave aleat\xF3ria"
16493
+ };
16494
+ var OfframpInputFormSimpleView = ({
16495
+ // Base props
16496
+ brlaBalance,
16497
+ amount,
16498
+ onAmountChange,
16499
+ pixKey,
16500
+ onPixKeyChange,
16501
+ amountWarningMessage,
16502
+ hasActiveWithdrawal,
16503
+ completedBanner,
16504
+ error,
16505
+ offrampError,
16506
+ submitLabel,
16507
+ submitDisabled,
16508
+ onSubmit,
16509
+ onBack,
16510
+ className,
16511
+ // Simple-specific props
16512
+ activeTab,
16513
+ cryptoHref,
16514
+ pixHref,
16515
+ onPercentageSelect,
16516
+ maxLabel,
16517
+ onClose
16518
+ }) => {
16519
+ const [pixKeyType, setPixKeyType] = React6__namespace.default.useState(() => {
16520
+ if (typeof window === "undefined") return "cpf";
16521
+ return localStorage.getItem(STORAGE_KEY) || "cpf";
16522
+ });
16523
+ function handlePixKeyTypeChange(type) {
16524
+ setPixKeyType(type);
16525
+ localStorage.setItem(STORAGE_KEY, type);
16526
+ }
16527
+ const [cardHovered, setCardHovered] = React6__namespace.default.useState(false);
16528
+ const hideTimerRef = React6__namespace.default.useRef(void 0);
16529
+ function handleHoverStart() {
16530
+ clearTimeout(hideTimerRef.current);
16531
+ setCardHovered(true);
16532
+ }
16533
+ function handleHoverEnd() {
16534
+ hideTimerRef.current = setTimeout(() => setCardHovered(false), 150);
16535
+ }
16536
+ React6__namespace.default.useEffect(() => () => clearTimeout(hideTimerRef.current), []);
16537
+ const hasAmountError = !!amountWarningMessage;
16538
+ const hasPixKeyError = !!error || !!offrampError;
16539
+ const isSubmitDisabledInternal = submitDisabled || !amount || amount === "0" || !pixKey.trim();
16540
+ const panelBaseClasses = [
16541
+ "relative flex flex-col overflow-hidden w-[420px]",
16542
+ "rounded-[var(--deframe-widget-size-radius-md)]",
16543
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
16544
+ "font-[var(--deframe-widget-font-family)]"
16545
+ ].join(" ");
16546
+ const headerBaseClasses = [
16547
+ "flex items-center",
16548
+ "px-[var(--deframe-widget-size-padding-x-md)]",
16549
+ "py-[var(--deframe-widget-size-padding-y-md)]"
16550
+ ].join(" ");
16551
+ const titleBaseClasses = [
16552
+ "flex-1",
16553
+ "text-[15px]",
16554
+ "[font-weight:var(--deframe-widget-font-weight-semibold)]",
16555
+ "text-[color:var(--deframe-widget-color-text-primary)]"
16556
+ ].join(" ");
16557
+ const dividerClasses = "h-px bg-[var(--deframe-widget-color-border-secondary)]";
16558
+ const bodyBaseClasses = [
16559
+ "flex flex-col",
16560
+ "gap-[var(--deframe-widget-size-gap-md)]",
16561
+ "px-[var(--deframe-widget-size-padding-x-md)]",
16562
+ "py-[var(--deframe-widget-size-padding-y-md)]"
16563
+ ].join(" ");
16564
+ const amountCardClasses = tailwindMerge.twMerge(
16565
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
16566
+ "border",
16567
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
16568
+ "transition-[border-color,background] duration-200",
16569
+ hasAmountError ? "border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_32%,transparent)] bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_16%,transparent)]" : "border-[color:var(--deframe-widget-color-border-secondary)] bg-[var(--deframe-widget-color-bg-secondary)]"
16570
+ );
16571
+ const pixKeyCardClasses = tailwindMerge.twMerge(
16572
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
16573
+ "border",
16574
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
16575
+ "transition-[border-color,background] duration-200",
16576
+ hasPixKeyError ? "border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_32%,transparent)] bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_16%,transparent)]" : "border-[color:var(--deframe-widget-color-border-secondary)] bg-[var(--deframe-widget-color-bg-secondary)]"
16577
+ );
16578
+ const footerBaseClasses = [
16579
+ "flex gap-[var(--deframe-widget-size-gap-sm)]",
16580
+ "px-[var(--deframe-widget-size-padding-x-md)]",
16581
+ "pb-[var(--deframe-widget-size-padding-y-md)]"
16582
+ ].join(" ");
16583
+ const cancelButtonClasses = [
16584
+ "flex-1 h-12 rounded-[var(--deframe-widget-size-radius-sm)]",
16585
+ "text-[15px] text-[color:var(--deframe-widget-color-text-secondary)]",
16586
+ "border-[color:var(--deframe-widget-color-border-secondary)]",
16587
+ "outline-none",
16588
+ "transition-[background,color,border-color] duration-150",
16589
+ "hover:opacity-100",
16590
+ "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]",
16591
+ "hover:text-[color:var(--deframe-widget-color-text-primary)]"
16592
+ ].join(" ");
16593
+ const submitButtonClasses = [
16594
+ "flex-1 h-12 rounded-[var(--deframe-widget-size-radius-sm)]",
16595
+ "border-none",
16596
+ "text-[15px]",
16597
+ isSubmitDisabledInternal ? "text-[color:var(--deframe-widget-color-text-primary-disabled)]" : "text-[color:var(--deframe-widget-color-text-primary-dark)]",
16598
+ "outline-none",
16599
+ "transition-[background,color] duration-200"
16600
+ ].join(" ");
16601
+ return /* @__PURE__ */ jsxRuntime.jsxs(
16602
+ "div",
16603
+ {
16604
+ "data-slot": "offramp-input-form-simple-panel",
16605
+ "data-test-id": "offramp-input-form-simple-view",
16606
+ className: tailwindMerge.twMerge(panelBaseClasses, className),
16607
+ children: [
16608
+ /* @__PURE__ */ jsxRuntime.jsxs(
16609
+ "header",
16610
+ {
16611
+ "data-slot": "offramp-input-form-simple-header",
16612
+ "data-test-id": "offramp-input-form-simple-view-header",
16613
+ className: headerBaseClasses,
16614
+ children: [
16615
+ /* @__PURE__ */ jsxRuntime.jsx(
16616
+ "span",
16617
+ {
16618
+ "data-slot": "offramp-input-form-simple-title",
16619
+ "data-test-id": "offramp-input-form-simple-view-title",
16620
+ className: titleBaseClasses,
16621
+ children: "Sacar"
16622
+ }
16623
+ ),
16624
+ onClose && /* @__PURE__ */ jsxRuntime.jsx(
16625
+ CloseButton_default,
16626
+ {
16627
+ onClick: onClose,
16628
+ ariaLabel: "Close withdrawal panel",
16629
+ testId: "offramp-input-form-simple-view-close"
16630
+ }
16631
+ )
16632
+ ]
16633
+ }
16634
+ ),
16635
+ /* @__PURE__ */ jsxRuntime.jsx(
16636
+ "div",
16637
+ {
16638
+ "data-slot": "offramp-input-form-simple-divider",
16639
+ "data-test-id": "offramp-input-form-simple-view-divider",
16640
+ className: dividerClasses
16641
+ }
16642
+ ),
16643
+ /* @__PURE__ */ jsxRuntime.jsx(
16644
+ FlowTabHeader,
16645
+ {
16646
+ activeTab: activeTab != null ? activeTab : "pix",
16647
+ cryptoHref: cryptoHref != null ? cryptoHref : "/dashboard/withdraw/onchain",
16648
+ pixHref: pixHref != null ? pixHref : "/dashboard/withdraw/offramp"
16649
+ }
16650
+ ),
16651
+ /* @__PURE__ */ jsxRuntime.jsx(
16652
+ "div",
16653
+ {
16654
+ "data-slot": "offramp-input-form-simple-divider-tabs",
16655
+ "data-test-id": "offramp-input-form-simple-view-divider-tabs",
16656
+ className: dividerClasses
16657
+ }
16658
+ ),
16659
+ /* @__PURE__ */ jsxRuntime.jsxs(
16660
+ "div",
16661
+ {
16662
+ "data-slot": "offramp-input-form-simple-body",
16663
+ "data-test-id": "offramp-input-form-simple-view-body",
16664
+ className: bodyBaseClasses,
16665
+ children: [
16666
+ /* @__PURE__ */ jsxRuntime.jsxs(
16667
+ "div",
16668
+ {
16669
+ "data-slot": "offramp-input-form-simple-amount-card",
16670
+ "data-test-id": "offramp-input-form-simple-view-amount-card",
16671
+ onMouseEnter: handleHoverStart,
16672
+ onMouseLeave: handleHoverEnd,
16673
+ className: amountCardClasses,
16674
+ children: [
16675
+ /* @__PURE__ */ jsxRuntime.jsxs(
16676
+ "div",
16677
+ {
16678
+ "data-slot": "offramp-input-form-simple-amount-top-row",
16679
+ "data-test-id": "offramp-input-form-simple-view-amount-top-row",
16680
+ className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
16681
+ children: [
16682
+ /* @__PURE__ */ jsxRuntime.jsx(
16683
+ "span",
16684
+ {
16685
+ "data-test-id": "offramp-input-form-simple-view-currency-prefix",
16686
+ className: "text-[36px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
16687
+ children: "R$"
16688
+ }
16689
+ ),
16690
+ /* @__PURE__ */ jsxRuntime.jsx(
16691
+ "div",
16692
+ {
16693
+ "data-test-id": "offramp-input-form-simple-view-input-divider",
16694
+ className: "w-px h-10 bg-[var(--deframe-widget-color-border-secondary)] flex-shrink-0"
16695
+ }
16696
+ ),
16697
+ /* @__PURE__ */ jsxRuntime.jsx(
16698
+ EarnAmountInputSimpleView,
16699
+ {
16700
+ value: amount,
16701
+ onChange: (e) => onAmountChange(e.target.value),
16702
+ ariaLabel: "Valor do saque",
16703
+ dollarAmountFormatted: ""
16704
+ }
16705
+ )
16706
+ ]
16707
+ }
16708
+ ),
16709
+ /* @__PURE__ */ jsxRuntime.jsx(
16710
+ "div",
16711
+ {
16712
+ "data-slot": "offramp-input-form-simple-balance-row",
16713
+ "data-test-id": "offramp-input-form-simple-view-balance-row",
16714
+ className: "mt-[var(--deframe-widget-size-gap-sm)]",
16715
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
16716
+ "span",
16717
+ {
16718
+ className: tailwindMerge.twMerge(
16719
+ "text-[13px] font-[var(--deframe-widget-font-family)]",
16720
+ hasAmountError ? "text-[color:var(--deframe-widget-color-state-error)]" : "text-[color:var(--deframe-widget-color-text-secondary)]"
16721
+ ),
16722
+ children: [
16723
+ "Saldo: ",
16724
+ brlaBalance,
16725
+ " BRLA"
16726
+ ]
16727
+ }
16728
+ )
16729
+ }
16730
+ ),
16731
+ /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: onPercentageSelect && cardHovered && /* @__PURE__ */ jsxRuntime.jsx(
16732
+ framerMotion.motion.div,
16733
+ {
16734
+ "data-slot": "offramp-input-form-simple-chips-row",
16735
+ "data-test-id": "offramp-input-form-simple-view-chips-row",
16736
+ initial: { opacity: 0, height: 0, marginTop: 0 },
16737
+ animate: { opacity: 1, height: "auto", marginTop: "var(--deframe-widget-size-gap-sm)" },
16738
+ exit: { opacity: 0, height: 0, marginTop: 0 },
16739
+ transition: { duration: 0.15, ease: "easeOut" },
16740
+ style: { overflow: "hidden" },
16741
+ onMouseEnter: handleHoverStart,
16742
+ onMouseLeave: handleHoverEnd,
16743
+ children: /* @__PURE__ */ jsxRuntime.jsx(
16744
+ EarnPercentageButtonsSimpleView,
16745
+ {
16746
+ onPercentageClick: onPercentageSelect,
16747
+ maxLabel: maxLabel != null ? maxLabel : "M\xE1x."
16748
+ }
16749
+ )
16750
+ }
16751
+ ) }),
16752
+ amountWarningMessage && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-[var(--deframe-widget-size-gap-sm)]", children: /* @__PURE__ */ jsxRuntime.jsx(
16753
+ EarnInlineNotificationSimpleView,
16754
+ {
16755
+ variant: "error",
16756
+ message: amountWarningMessage
16757
+ }
16758
+ ) })
16759
+ ]
16760
+ }
16761
+ ),
16762
+ /* @__PURE__ */ jsxRuntime.jsxs(
16763
+ "div",
16764
+ {
16765
+ "data-slot": "offramp-input-form-simple-pix-key-card",
16766
+ "data-test-id": "offramp-input-form-simple-view-pix-key-card",
16767
+ className: pixKeyCardClasses,
16768
+ children: [
16769
+ /* @__PURE__ */ jsxRuntime.jsx(
16770
+ PixKeySegmentedControl,
16771
+ {
16772
+ value: pixKeyType,
16773
+ onChange: handlePixKeyTypeChange
16774
+ }
16775
+ ),
16776
+ /* @__PURE__ */ jsxRuntime.jsx(
16777
+ "div",
16778
+ {
16779
+ "data-slot": "offramp-input-form-simple-pix-divider",
16780
+ "data-test-id": "offramp-input-form-simple-view-pix-divider",
16781
+ className: "h-px bg-[var(--deframe-widget-color-border-secondary)] my-[var(--deframe-widget-size-gap-sm)]"
16782
+ }
16783
+ ),
16784
+ /* @__PURE__ */ jsxRuntime.jsx(
16785
+ "input",
16786
+ {
16787
+ "data-slot": "offramp-input-form-simple-pix-input",
16788
+ "data-test-id": "offramp-input-form-simple-view-pix-input",
16789
+ type: "text",
16790
+ value: pixKey,
16791
+ onChange: (e) => onPixKeyChange(e.target.value),
16792
+ placeholder: PIX_PLACEHOLDERS[pixKeyType],
16793
+ "aria-label": "Chave PIX",
16794
+ className: tailwindMerge.twMerge(
16795
+ "w-full bg-transparent outline-none",
16796
+ "text-[13px] [font-weight:var(--deframe-widget-font-weight-regular)]",
16797
+ "font-[var(--deframe-widget-font-family)]",
16798
+ "placeholder:text-[color:var(--deframe-widget-color-text-tertiary)]",
16799
+ "text-[color:var(--deframe-widget-color-text-primary)]",
16800
+ '[font-feature-settings:"tnum"]'
16801
+ ),
16802
+ spellCheck: false,
16803
+ autoComplete: "off"
16804
+ }
16805
+ ),
16806
+ (error || offrampError) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-[var(--deframe-widget-size-gap-sm)]", children: /* @__PURE__ */ jsxRuntime.jsx(
16807
+ EarnInlineNotificationSimpleView,
16808
+ {
16809
+ variant: "error",
16810
+ message: error || offrampError || ""
16811
+ }
16812
+ ) })
16813
+ ]
16814
+ }
16815
+ ),
16816
+ /* @__PURE__ */ jsxRuntime.jsx(
16817
+ EarnInlineNotificationSimpleView,
16818
+ {
16819
+ variant: "info",
16820
+ message: "A chave PIX deve estar vinculada ao mesmo CPF do seu cadastro."
16821
+ }
16822
+ ),
16823
+ hasActiveWithdrawal && /* @__PURE__ */ jsxRuntime.jsx(
16824
+ EarnInlineNotificationSimpleView,
16825
+ {
16826
+ variant: "warning",
16827
+ message: "Voc\xEA j\xE1 possui um saque em andamento."
16828
+ }
16829
+ ),
16830
+ completedBanner && /* @__PURE__ */ jsxRuntime.jsx(
16831
+ EarnInlineNotificationSimpleView,
16832
+ {
16833
+ variant: "success",
16834
+ message: completedBanner
16835
+ }
16836
+ )
16837
+ ]
16838
+ }
16839
+ ),
16840
+ /* @__PURE__ */ jsxRuntime.jsxs(
16841
+ "footer",
16842
+ {
16843
+ "data-slot": "offramp-input-form-simple-footer",
16844
+ "data-test-id": "offramp-input-form-simple-view-footer",
16845
+ className: footerBaseClasses,
16846
+ children: [
16847
+ /* @__PURE__ */ jsxRuntime.jsx(
16848
+ SecondaryButton,
16849
+ {
16850
+ type: "button",
16851
+ className: cancelButtonClasses,
16852
+ onClick: onBack,
16853
+ "aria-label": "Cancel withdrawal",
16854
+ "data-test-id": "offramp-input-form-simple-view-cancel",
16855
+ children: "Cancelar"
16856
+ }
16857
+ ),
16858
+ /* @__PURE__ */ jsxRuntime.jsx(
16859
+ PrimaryButton,
16860
+ {
16861
+ type: "button",
16862
+ className: submitButtonClasses,
16863
+ disabled: isSubmitDisabledInternal,
16864
+ onClick: onSubmit,
16865
+ "aria-label": "Confirmar saque",
16866
+ "data-test-id": "offramp-input-form-simple-view-submit",
16867
+ children: submitLabel
16868
+ }
16869
+ )
16870
+ ]
16871
+ }
16872
+ )
16873
+ ]
16874
+ }
16875
+ );
16876
+ };
16877
+ function ExplorerLink2({ href, label, className }) {
16878
+ return /* @__PURE__ */ jsxRuntime.jsx(
16879
+ "a",
16880
+ {
16881
+ "data-test-id": "explorer-link",
16882
+ href,
16883
+ target: "_blank",
16884
+ rel: "noopener noreferrer",
16885
+ "aria-label": label || "View on explorer",
16886
+ className: tailwindMerge.twMerge(
16887
+ "text-[color:var(--deframe-widget-color-brand-primary)] font-[var(--deframe-widget-font-weight-semibold)] hover:underline text-[length:var(--deframe-widget-font-size-sm)] leading-[var(--deframe-widget-font-leading-sm)]",
16888
+ className
16889
+ ),
16890
+ children: label || href
16891
+ }
16892
+ );
16893
+ }
16894
+ function StepStatusIcon2({ status = "completed" }) {
16895
+ switch (status) {
16896
+ case "completed":
16897
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-6 h-6 rounded-full bg-[var(--deframe-widget-color-bg-secondary)] flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "text-[color:var(--deframe-widget-color-brand-primary)]", children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "20 6 9 17 4 12" }) }) });
16898
+ case "pending":
16899
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-6 h-6 rounded-full bg-[var(--deframe-widget-color-bg-secondary)] flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "text-yellow-400", children: [
16900
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
16901
+ /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "12 6 12 12 16 14" })
16902
+ ] }) });
16903
+ case "failed":
16904
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-6 h-6 rounded-full bg-[var(--deframe-widget-color-bg-secondary)] flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "text-red-400", children: [
16905
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
16906
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
16907
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
16908
+ ] }) });
16909
+ }
16910
+ }
16911
+ function StepDisplay2({ step }) {
16912
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4 w-full", children: [
16913
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-primary)] flex-1", children: step.description }),
16914
+ step.explorerUrl && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(ExplorerLink2, { href: step.explorerUrl, label: "Ver no Explorer", className: "text-[length:var(--deframe-widget-font-size-xs)] whitespace-nowrap" }) })
16915
+ ] });
16916
+ }
16917
+ function PixOfframpProcessingDetails({ breakdown, estimatedTime, className }) {
16918
+ if (!breakdown || breakdown.length === 0) {
16919
+ return null;
16920
+ }
16921
+ const getProcessingSteps = () => {
16922
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col w-full", children: [
16923
+ estimatedTime && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between pb-3 text-[length:var(--deframe-widget-font-size-sm)]", children: [
16924
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: "Tempo estimado" }),
16925
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-[var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)]", children: estimatedTime })
16926
+ ] }),
16927
+ breakdown.map((step, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3", children: [
16928
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
16929
+ /* @__PURE__ */ jsxRuntime.jsx(StepStatusIcon2, { status: step.status }),
16930
+ index < breakdown.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px flex-1 min-h-[10px] bg-[var(--deframe-widget-color-bg-primary)] my-2" })
16931
+ ] }),
16932
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 pb-3", children: /* @__PURE__ */ jsxRuntime.jsx(StepDisplay2, { step }) })
16933
+ ] }, `step-${index}`))
16934
+ ] });
16935
+ };
16936
+ const items = [
16937
+ {
16938
+ label: "",
16939
+ value: getProcessingSteps(),
16940
+ valueClassName: "flex flex-col gap-3 w-full"
16941
+ }
16942
+ ];
16943
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "pix-offramp-processing-details", children: /* @__PURE__ */ jsxRuntime.jsx(
16944
+ SummaryDetails,
16945
+ {
16946
+ title: "Detalhes",
16947
+ items,
16948
+ defaultOpen: true,
16949
+ className: `bg-[var(--deframe-widget-color-bg-secondary)] ${className || ""}`
16950
+ }
16951
+ ) });
16952
+ }
16953
+ var defaultCloseIcon = /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6L6 18M6 6l12 12" }) });
16954
+ function OfframpProcessingView({
16955
+ step = "creating_ticket",
16956
+ amount = "0",
16957
+ summaryTitle = "",
16958
+ summaryItems = [],
16959
+ transferTxHash,
16960
+ onClose,
16961
+ closeIcon,
16962
+ tokenIconUrl = "/brladigital_32.webp",
16963
+ className
16964
+ }) {
16965
+ const progressPercent = step === "creating_ticket" ? 50 : step === "transferring" ? 75 : 85;
16966
+ const prepareStatus = step === "creating_ticket" ? "processing" : "done";
16967
+ const signatureStatus = step === "waiting_pix" ? "done" : step === "transferring" ? "processing" : "pending";
16968
+ const sendStatus = "pending";
16969
+ const mapStatus = (status) => {
16970
+ if (status === "done") return "completed";
16971
+ return "pending";
16972
+ };
16973
+ return /* @__PURE__ */ jsxRuntime.jsxs(
16974
+ "div",
16975
+ {
16976
+ className: tailwindMerge.twMerge(
16977
+ "w-full max-w-[620px] relative bg-[var(--deframe-widget-color-bg-primary)] lg:bg-[var(--deframe-widget-color-bg-secondary)] overflow-hidden mx-auto mt-[75px] rounded-[var(--deframe-widget-size-radius-sm)] p-6 min-h-[80vh] flex flex-col",
16978
+ className
16979
+ ),
16980
+ "data-test-id": "offramp-processing-view",
16981
+ children: [
16982
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6", children: [
16983
+ /* @__PURE__ */ jsxRuntime.jsx(
16984
+ "button",
16985
+ {
16986
+ onClick: onClose,
16987
+ className: "flex items-center justify-center w-8 h-8 text-[color:var(--deframe-widget-color-text-secondary)] hover:text-[color:var(--deframe-widget-color-text-primary)] transition mb-4",
16988
+ "aria-label": "Fechar",
16989
+ "data-test-id": "offramp-processing-close-button",
16990
+ children: closeIcon || defaultCloseIcon
16991
+ }
16992
+ ),
16993
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-1 bg-[var(--deframe-widget-color-border-secondary)] rounded-full overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full bg-[#1FC16B] transition-all duration-300", style: { width: `${progressPercent}%` } }) })
16994
+ ] }),
16995
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-start justify-start gap-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full space-y-6", children: [
16996
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center text-center space-y-4", children: [
16997
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-20 h-20 bg-[#F6A700] rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-10 h-10 animate-pulse", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5l-4-4V4h8v3.5l-4 4z" }) }) }),
16998
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
16999
+ /* @__PURE__ */ jsxRuntime.jsxs(TextHeading, { variant: "h3", className: "mb-2 flex items-center justify-center gap-1", children: [
17000
+ "Estamos enviando seu PIX",
17001
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex gap-0.5", children: [
17002
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "animate-bounce", style: { animationDelay: "0ms", animationDuration: "1.4s" }, children: "." }),
17003
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "animate-bounce", style: { animationDelay: "200ms", animationDuration: "1.4s" }, children: "." }),
17004
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "animate-bounce", style: { animationDelay: "400ms", animationDuration: "1.4s" }, children: "." })
17005
+ ] })
17006
+ ] }),
17007
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: "Seu PIX est\xE1 sendo enviado. Na maioria das vezes, cai em segundos." })
17008
+ ] })
17009
+ ] }),
17010
+ /* @__PURE__ */ jsxRuntime.jsxs(ListItem, { children: [
17011
+ /* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsxRuntime.jsx(
17012
+ "img",
17013
+ {
17014
+ src: tokenIconUrl,
17015
+ alt: "Token",
17016
+ className: "w-10 h-10 rounded-full"
17017
+ }
17018
+ ) }),
17019
+ /* @__PURE__ */ jsxRuntime.jsxs(ListItemContent, { className: "ml-4", children: [
17020
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] ml-2", children: "Voc\xEA sacou via PIX" }),
17021
+ /* @__PURE__ */ jsxRuntime.jsxs(TextHeading, { variant: "h5", className: "ml-2", children: [
17022
+ amount,
17023
+ " BRLA"
17024
+ ] })
17025
+ ] })
17026
+ ] }),
17027
+ /* @__PURE__ */ jsxRuntime.jsx(
17028
+ SummaryDetails,
17029
+ {
17030
+ title: summaryTitle,
17031
+ items: summaryItems,
17032
+ className: "bg-[var(--deframe-widget-color-bg-secondary)]"
17033
+ }
17034
+ ),
17035
+ /* @__PURE__ */ jsxRuntime.jsx(
17036
+ PixOfframpProcessingDetails,
17037
+ {
17038
+ estimatedTime: "~2-5 min",
17039
+ breakdown: [
17040
+ {
17041
+ type: "prepare_withdrawal",
17042
+ description: "Preparando seu saque",
17043
+ status: mapStatus(prepareStatus)
17044
+ },
17045
+ {
17046
+ type: "blockchain_signature",
17047
+ description: "Assinatura",
17048
+ status: mapStatus(signatureStatus),
17049
+ explorerUrl: transferTxHash ? `https://polygonscan.com/tx/${transferTxHash}` : void 0
17050
+ },
17051
+ {
17052
+ type: "pix_transfer",
17053
+ description: "Enviando PIX para sua conta",
17054
+ status: mapStatus(sendStatus)
17055
+ }
17056
+ ]
17057
+ }
17058
+ ),
17059
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full space-y-3", children: /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { disabled: true, "aria-label": "Aguarde processamento", children: [
17060
+ "Aguarde ",
17061
+ /* @__PURE__ */ jsxRuntime.jsx(LoadingDots, {})
17062
+ ] }) })
17063
+ ] }) })
17064
+ ]
17065
+ }
17066
+ );
17067
+ }
17068
+ var OfframpProcessingSimpleView = () => {
17069
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "offramp-processing-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
17070
+ EarnFeedbackOverlaySimpleView,
17071
+ {
17072
+ variant: "loading",
17073
+ title: "PROCESSANDO SAQUE...",
17074
+ subtitle: "Seu PIX est\xE1 sendo enviado. Aguarde alguns instantes."
17075
+ }
17076
+ ) });
17077
+ };
17078
+ function Card({ children, className }) {
17079
+ return /* @__PURE__ */ jsxRuntime.jsx(
17080
+ "div",
17081
+ {
17082
+ "data-test-id": "card",
17083
+ className: tailwindMerge.twMerge(
17084
+ "bg-[var(--deframe-widget-color-bg-secondary)] rounded-[var(--deframe-widget-size-radius-sm)] shadow-sm",
17085
+ className
17086
+ ),
17087
+ children
17088
+ }
17089
+ );
17090
+ }
17091
+ var defaultCloseIcon2 = /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6L6 18M6 6l12 12" }) });
17092
+ var defaultArrowUpIcon = /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "w-10 h-10 text-[#1FC16B]", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 19V5M5 12l7-7 7 7" }) });
17093
+ function TransactionIdDisplay({ transactionId }) {
17094
+ const truncated = transactionId.length > 16 ? `${transactionId.slice(0, 8)}...${transactionId.slice(-6)}` : transactionId;
17095
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
17096
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "font-mono text-[color:var(--deframe-widget-color-text-primary)] leading-5", children: truncated }),
17097
+ /* @__PURE__ */ jsxRuntime.jsx(
17098
+ AddressDisplay,
17099
+ {
17100
+ address: transactionId,
17101
+ className: "border-none bg-transparent p-0 gap-0",
17102
+ textClassName: "hidden"
17103
+ }
17104
+ )
17105
+ ] });
17106
+ }
17107
+ function OfframpSuccessView({
17108
+ amount = "0",
17109
+ feesFormatted = "0",
17110
+ transactionId,
17111
+ date = "",
17112
+ onClose,
17113
+ onConfirm,
17114
+ closeIcon,
17115
+ arrowUpIcon,
17116
+ tokenIconUrl = "/brladigital_32.webp",
17117
+ className
17118
+ }) {
17119
+ return /* @__PURE__ */ jsxRuntime.jsxs(
17120
+ "div",
17121
+ {
17122
+ className: tailwindMerge.twMerge(
17123
+ "w-full max-w-[620px] relative bg-[var(--deframe-widget-color-bg-primary)] lg:bg-[var(--deframe-widget-color-bg-secondary)] overflow-hidden mx-auto mt-[75px] rounded-[var(--deframe-widget-size-radius-sm)] p-6 min-h-[80vh] flex flex-col",
17124
+ className
17125
+ ),
17126
+ "data-test-id": "offramp-success-view",
17127
+ children: [
17128
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6", children: [
17129
+ /* @__PURE__ */ jsxRuntime.jsx(
17130
+ "button",
17131
+ {
17132
+ onClick: onClose,
17133
+ className: "flex items-center justify-center w-8 h-8 text-[color:var(--deframe-widget-color-text-secondary)] hover:text-[color:var(--deframe-widget-color-text-primary)] transition mb-4",
17134
+ "aria-label": "Fechar",
17135
+ "data-test-id": "offramp-success-close-button",
17136
+ children: closeIcon || defaultCloseIcon2
17137
+ }
17138
+ ),
17139
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-1 bg-[#1FC16B] rounded-full" })
17140
+ ] }),
17141
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-start justify-start gap-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full space-y-6", children: [
17142
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center text-center space-y-4", children: [
17143
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-20 h-20 bg-[#1FC16B]/20 rounded-full flex items-center justify-center", children: arrowUpIcon || defaultArrowUpIcon }),
17144
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
17145
+ /* @__PURE__ */ jsxRuntime.jsx(TextHeading, { variant: "h3", className: "mb-2", children: "PIX enviado com sucesso!" }),
17146
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: "Seu saque foi conclu\xEDdo e o valor j\xE1 est\xE1 na sua conta." })
17147
+ ] })
17148
+ ] }),
17149
+ /* @__PURE__ */ jsxRuntime.jsxs(ListItem, { children: [
17150
+ /* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: tokenIconUrl, alt: "Token", className: "w-10 h-10 rounded-full" }) }),
17151
+ /* @__PURE__ */ jsxRuntime.jsxs(ListItemContent, { className: "ml-4", children: [
17152
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] ml-2", children: "Voc\xEA sacou via PIX" }),
17153
+ /* @__PURE__ */ jsxRuntime.jsxs(TextHeading, { variant: "h5", className: "ml-2", children: [
17154
+ amount,
17155
+ " BRLA"
17156
+ ] })
17157
+ ] })
17158
+ ] }),
17159
+ /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 w-full inline-flex flex-col justify-start items-center gap-2 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col justify-start items-start gap-2", children: [
17160
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "self-stretch h-6 border-b border-[var(--deframe-widget-color-border-secondary)] inline-flex justify-between items-start", children: [
17161
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] leading-5", children: "Valor do saque" }),
17162
+ /* @__PURE__ */ jsxRuntime.jsxs(TextBody, { variant: "text-small", className: "font-[var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] leading-5", children: [
17163
+ amount,
17164
+ " BRLA"
17165
+ ] })
17166
+ ] }),
17167
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "self-stretch h-6 border-b border-[var(--deframe-widget-color-border-secondary)] inline-flex justify-between items-start", children: [
17168
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] leading-5", children: "Taxa" }),
17169
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "font-[var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] leading-5", children: feesFormatted })
17170
+ ] }),
17171
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "self-stretch h-6 border-b border-[var(--deframe-widget-color-border-secondary)] inline-flex justify-between items-start", children: [
17172
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] leading-5", children: "Metodo" }),
17173
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "font-[var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] leading-5", children: "Transferencia banc\xE1ria (PIX)" })
17174
+ ] }),
17175
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "self-stretch h-8 border-b border-[var(--deframe-widget-color-border-secondary)] inline-flex justify-between items-start", children: [
17176
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] leading-5", children: "Status" }),
17177
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-2 py-0.5 bg-[#1FC16B]/10 rounded-3xl flex justify-end items-center gap-2", children: [
17178
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-primary)] leading-5", children: "Sucesso" }),
17179
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-2 h-2 bg-teal-600 rounded-full" })
17180
+ ] })
17181
+ ] }),
17182
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "self-stretch h-6 border-b border-[var(--deframe-widget-color-border-secondary)] inline-flex justify-between items-start", children: [
17183
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] leading-5", children: "ID da Transa\xE7\xE3o" }),
17184
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-start items-center gap-2", children: transactionId ? /* @__PURE__ */ jsxRuntime.jsx(TransactionIdDisplay, { transactionId }) : /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-primary)] leading-5", children: "-" }) })
17185
+ ] }),
17186
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "self-stretch h-6 border-b border-[var(--deframe-widget-color-border-secondary)] inline-flex justify-between items-start", children: [
17187
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] leading-5", children: "Data" }),
17188
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "font-[var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] leading-5", children: date })
17189
+ ] })
17190
+ ] }) }) }),
17191
+ /* @__PURE__ */ jsxRuntime.jsx(
17192
+ PrimaryButton,
17193
+ {
17194
+ onClick: onConfirm,
17195
+ "aria-label": "Confirmar",
17196
+ "data-test-id": "offramp-success-confirm-button",
17197
+ children: "Ok, obrigado"
17198
+ }
17199
+ )
17200
+ ] }) })
17201
+ ]
17202
+ }
17203
+ );
17204
+ }
17205
+ var OfframpSuccessSimpleView = ({
17206
+ onClose
17207
+ }) => {
17208
+ React6__namespace.useEffect(() => {
17209
+ if (!onClose) return;
17210
+ const timer = setTimeout(onClose, 5e3);
17211
+ return () => clearTimeout(timer);
17212
+ }, [onClose]);
17213
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "offramp-success-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
17214
+ EarnFeedbackOverlaySimpleView,
17215
+ {
17216
+ variant: "success",
17217
+ title: "PIX Enviado com Sucesso!",
17218
+ subtitle: "Seu saque foi conclu\xEDdo e o valor j\xE1 est\xE1 na sua conta."
17219
+ }
17220
+ ) });
17221
+ };
17222
+ var OfframpFailedSimpleView = () => {
17223
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "offramp-failed-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
17224
+ EarnFeedbackOverlaySimpleView,
17225
+ {
17226
+ variant: "error",
17227
+ title: "Saque Falhou",
17228
+ subtitle: "Ocorreu um erro ao processar seu saque. Tente novamente."
15100
17229
  }
15101
17230
  ) });
15102
17231
  };
@@ -16506,6 +18635,8 @@ exports.KYCStatusItemCard = KYCStatusItemCard;
16506
18635
  exports.KYCStatusPage = KYCStatusPage;
16507
18636
  exports.KYCStatusPanel = KYCStatusPanel;
16508
18637
  exports.KYCStepIndicator = KYCStepIndicator;
18638
+ exports.KycLoadingView = KycLoadingView;
18639
+ exports.KycRequiredView = KycRequiredView;
16509
18640
  exports.Label = Label;
16510
18641
  exports.Link = Link;
16511
18642
  exports.ListItem = ListItem;
@@ -16516,6 +18647,14 @@ exports.LoadingDots = LoadingDots;
16516
18647
  exports.LowRiskBadge = LowRiskBadge;
16517
18648
  exports.MediumRiskBadge = MediumRiskBadge;
16518
18649
  exports.Navbar = Navbar;
18650
+ exports.OffchainMethodSelectionView = OffchainMethodSelectionView;
18651
+ exports.OfframpFailedSimpleView = OfframpFailedSimpleView;
18652
+ exports.OfframpInputFormSimpleView = OfframpInputFormSimpleView;
18653
+ exports.OfframpInputFormView = OfframpInputFormView;
18654
+ exports.OfframpProcessingSimpleView = OfframpProcessingSimpleView;
18655
+ exports.OfframpProcessingView = OfframpProcessingView;
18656
+ exports.OfframpSuccessSimpleView = OfframpSuccessSimpleView;
18657
+ exports.OfframpSuccessView = OfframpSuccessView;
16519
18658
  exports.OnchainDepositFormSimpleView = OnchainDepositFormSimpleView;
16520
18659
  exports.OnchainDepositFormView = OnchainDepositFormView;
16521
18660
  exports.OnchainDepositSuccessSimpleView = OnchainDepositSuccessSimpleView;
@@ -16528,6 +18667,11 @@ exports.OnchainWithdrawProcessingSimpleView = OnchainWithdrawProcessingSimpleVie
16528
18667
  exports.OnchainWithdrawSignatureWarningSimpleView = OnchainWithdrawSignatureWarningSimpleView;
16529
18668
  exports.OnchainWithdrawSignatureWarningView = OnchainWithdrawSignatureWarningView;
16530
18669
  exports.OnchainWithdrawSuccessView = OnchainWithdrawSuccessView;
18670
+ exports.OnrampFormSimpleView = OnrampFormSimpleView;
18671
+ exports.OnrampFormView = OnrampFormView;
18672
+ exports.OnrampPixcodeView = OnrampPixcodeView;
18673
+ exports.OnrampSuccessSimpleView = OnrampSuccessSimpleView;
18674
+ exports.OnrampSuccessView = OnrampSuccessView;
16531
18675
  exports.PercentageButton = PercentageButton;
16532
18676
  exports.PrimaryButton = PrimaryButton;
16533
18677
  exports.ProcessingBadge = ProcessingBadge;