@deframe-sdk/components 0.1.33 → 0.1.34

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.mjs CHANGED
@@ -13277,6 +13277,82 @@ function OnchainDepositFormView({
13277
13277
  }
13278
13278
  );
13279
13279
  }
13280
+ var tabBaseClasses = [
13281
+ "inline-flex flex-1 items-center justify-center",
13282
+ "gap-[var(--deframe-widget-size-gap-xs)]",
13283
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
13284
+ "border-[length:var(--deframe-widget-size-border-sm)] border-solid border-transparent",
13285
+ "outline-none whitespace-nowrap transition-[background,color,border-color] duration-150",
13286
+ "font-[var(--deframe-widget-font-family)] [font-weight:var(--deframe-widget-font-weight-medium)]",
13287
+ "py-[5px] px-[var(--deframe-widget-size-padding-x-lg)]",
13288
+ "[font-size:var(--deframe-widget-font-size-md)] [line-height:var(--deframe-widget-font-leading-md)]"
13289
+ ].join(" ");
13290
+ var activeTabClasses = "text-[color:var(--deframe-widget-color-brand-primary)]";
13291
+ var inactiveTabClasses = "text-[color:var(--deframe-widget-color-text-secondary)] hover:bg-[var(--deframe-widget-color-bg-tertiary)]";
13292
+ var FlowTabHeader = ({
13293
+ activeTab,
13294
+ cryptoHref,
13295
+ pixHref,
13296
+ cryptoLabel = "Cripto",
13297
+ pixLabel = "PIX",
13298
+ className
13299
+ }) => {
13300
+ return /* @__PURE__ */ jsx(
13301
+ "nav",
13302
+ {
13303
+ "data-slot": "flow-tab-header",
13304
+ "data-test-id": "flow-tab-header",
13305
+ className: twMerge("px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)]", className),
13306
+ children: /* @__PURE__ */ jsxs(
13307
+ "div",
13308
+ {
13309
+ role: "tablist",
13310
+ "data-test-id": "flow-tab-header-tablist",
13311
+ className: twMerge(
13312
+ "inline-flex w-full rounded-[var(--deframe-widget-size-radius-md)]",
13313
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
13314
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
13315
+ "p-[3px] gap-[2px]"
13316
+ ),
13317
+ children: [
13318
+ /* @__PURE__ */ jsx(
13319
+ "a",
13320
+ {
13321
+ href: cryptoHref,
13322
+ role: "tab",
13323
+ "aria-selected": activeTab === "crypto",
13324
+ "aria-current": activeTab === "crypto" ? "page" : void 0,
13325
+ "aria-label": cryptoLabel,
13326
+ "data-test-id": "flow-tab-header-tab-crypto",
13327
+ className: twMerge(
13328
+ tabBaseClasses,
13329
+ activeTab === "crypto" ? activeTabClasses : inactiveTabClasses
13330
+ ),
13331
+ children: cryptoLabel
13332
+ }
13333
+ ),
13334
+ /* @__PURE__ */ jsx(
13335
+ "a",
13336
+ {
13337
+ href: pixHref,
13338
+ role: "tab",
13339
+ "aria-selected": activeTab === "pix",
13340
+ "aria-current": activeTab === "pix" ? "page" : void 0,
13341
+ "aria-label": pixLabel,
13342
+ "data-test-id": "flow-tab-header-tab-pix",
13343
+ className: twMerge(
13344
+ tabBaseClasses,
13345
+ activeTab === "pix" ? activeTabClasses : inactiveTabClasses
13346
+ ),
13347
+ children: pixLabel
13348
+ }
13349
+ )
13350
+ ]
13351
+ }
13352
+ )
13353
+ }
13354
+ );
13355
+ };
13280
13356
  var OnchainDepositFormSimpleView = ({
13281
13357
  // Token selector
13282
13358
  selectedToken,
@@ -13365,72 +13441,11 @@ var OnchainDepositFormSimpleView = ({
13365
13441
  }
13366
13442
  ),
13367
13443
  /* @__PURE__ */ jsx(
13368
- "nav",
13444
+ FlowTabHeader,
13369
13445
  {
13370
- "data-slot": "onchain-deposit-simple-tabs",
13371
- "data-test-id": "onchain-deposit-form-simple-view-tabs",
13372
- className: "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)]",
13373
- children: /* @__PURE__ */ jsxs(
13374
- "div",
13375
- {
13376
- role: "tablist",
13377
- "data-test-id": "onchain-deposit-form-simple-view-tablist",
13378
- className: twMerge(
13379
- "inline-flex w-full rounded-[var(--deframe-widget-size-radius-md)]",
13380
- "bg-[var(--deframe-widget-color-bg-secondary)]",
13381
- "border border-[color:var(--deframe-widget-color-border-secondary)]",
13382
- "p-[3px] gap-[2px]"
13383
- ),
13384
- children: [
13385
- /* @__PURE__ */ jsx(
13386
- "a",
13387
- {
13388
- href: cryptoHref != null ? cryptoHref : "/dashboard/deposit/onchain",
13389
- role: "tab",
13390
- "aria-selected": activeTab === "crypto",
13391
- "aria-current": activeTab === "crypto" ? "page" : void 0,
13392
- "aria-label": "Cripto",
13393
- "data-test-id": "onchain-deposit-form-simple-view-tab-crypto",
13394
- className: twMerge(
13395
- "inline-flex flex-1 items-center justify-center",
13396
- "gap-[var(--deframe-widget-size-gap-xs)]",
13397
- "rounded-[var(--deframe-widget-size-radius-sm)]",
13398
- "border-[length:var(--deframe-widget-size-border-sm)] border-solid border-transparent",
13399
- "outline-none whitespace-nowrap transition-[background,color,border-color] duration-150",
13400
- "font-[var(--deframe-widget-font-family)] [font-weight:var(--deframe-widget-font-weight-medium)]",
13401
- "py-[5px] px-[var(--deframe-widget-size-padding-x-lg)]",
13402
- "[font-size:var(--deframe-widget-font-size-md)] [line-height:var(--deframe-widget-font-leading-md)]",
13403
- 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)]"
13404
- ),
13405
- children: "Cripto"
13406
- }
13407
- ),
13408
- /* @__PURE__ */ jsx(
13409
- "a",
13410
- {
13411
- href: pixHref != null ? pixHref : "/dashboard/deposit/onramp",
13412
- role: "tab",
13413
- "aria-selected": activeTab === "pix",
13414
- "aria-current": activeTab === "pix" ? "page" : void 0,
13415
- "aria-label": "PIX",
13416
- "data-test-id": "onchain-deposit-form-simple-view-tab-pix",
13417
- className: twMerge(
13418
- "inline-flex flex-1 items-center justify-center",
13419
- "gap-[var(--deframe-widget-size-gap-xs)]",
13420
- "rounded-[var(--deframe-widget-size-radius-sm)]",
13421
- "border-[length:var(--deframe-widget-size-border-sm)] border-solid border-transparent",
13422
- "outline-none whitespace-nowrap transition-[background,color,border-color] duration-150",
13423
- "font-[var(--deframe-widget-font-family)] [font-weight:var(--deframe-widget-font-weight-medium)]",
13424
- "py-[5px] px-[var(--deframe-widget-size-padding-x-lg)]",
13425
- "[font-size:var(--deframe-widget-font-size-md)] [line-height:var(--deframe-widget-font-leading-md)]",
13426
- 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)]"
13427
- ),
13428
- children: "PIX"
13429
- }
13430
- )
13431
- ]
13432
- }
13433
- )
13446
+ activeTab: activeTab != null ? activeTab : "crypto",
13447
+ cryptoHref: cryptoHref != null ? cryptoHref : "/dashboard/deposit/onchain",
13448
+ pixHref: pixHref != null ? pixHref : "/dashboard/deposit/onramp"
13434
13449
  }
13435
13450
  ),
13436
13451
  /* @__PURE__ */ jsx(
@@ -14049,6 +14064,10 @@ function OnchainWithdrawFormView({
14049
14064
  );
14050
14065
  }
14051
14066
  var OnchainWithdrawFormSimpleView = ({
14067
+ // Tab switcher
14068
+ activeTab,
14069
+ cryptoHref,
14070
+ pixHref,
14052
14071
  // Token selector
14053
14072
  selectedToken,
14054
14073
  onTokenClick,
@@ -14197,6 +14216,24 @@ var OnchainWithdrawFormSimpleView = ({
14197
14216
  className: dividerClasses
14198
14217
  }
14199
14218
  ),
14219
+ activeTab && /* @__PURE__ */ jsxs(Fragment, { children: [
14220
+ /* @__PURE__ */ jsx(
14221
+ FlowTabHeader,
14222
+ {
14223
+ activeTab,
14224
+ cryptoHref: cryptoHref != null ? cryptoHref : "/dashboard/withdraw/onchain",
14225
+ pixHref: pixHref != null ? pixHref : "/dashboard/withdraw/offramp"
14226
+ }
14227
+ ),
14228
+ /* @__PURE__ */ jsx(
14229
+ "div",
14230
+ {
14231
+ "data-slot": "onchain-withdraw-simple-divider-tabs",
14232
+ "data-test-id": "onchain-withdraw-form-simple-view-divider-tabs",
14233
+ className: dividerClasses
14234
+ }
14235
+ )
14236
+ ] }),
14200
14237
  /* @__PURE__ */ jsxs(
14201
14238
  "div",
14202
14239
  {
@@ -15076,6 +15113,1932 @@ var OnchainWithdrawSignatureWarningSimpleView = ({
15076
15113
  }
15077
15114
  ) });
15078
15115
  };
15116
+ function KycLoadingView({ message = "Carregando" }) {
15117
+ return /* @__PURE__ */ jsx(
15118
+ "div",
15119
+ {
15120
+ "data-test-id": "kyc-loading-view",
15121
+ 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",
15122
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-6", children: [
15123
+ /* @__PURE__ */ jsx("div", { className: "w-20 h-20 bg-[#F6A700] rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx("svg", { className: "w-10 h-10", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ 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" }) }) }),
15124
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
15125
+ /* @__PURE__ */ jsx(TextHeading, { variant: "h3", children: message }),
15126
+ /* @__PURE__ */ jsx(LoadingDots, {})
15127
+ ] })
15128
+ ] })
15129
+ }
15130
+ );
15131
+ }
15132
+ function KycRequiredView({ title, description, buttonLabel, onAction }) {
15133
+ return /* @__PURE__ */ jsx(
15134
+ "div",
15135
+ {
15136
+ "data-test-id": "kyc-required-view",
15137
+ 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",
15138
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center gap-6 h-[400px]", children: [
15139
+ /* @__PURE__ */ jsx("div", { className: "w-20 h-20 bg-[var(--deframe-widget-color-brand-primary)]/20 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx("svg", { className: "w-10 h-10 text-[color:var(--deframe-widget-color-brand-primary)]", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ 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" }) }) }),
15140
+ /* @__PURE__ */ jsxs("div", { className: "text-center space-y-2", children: [
15141
+ /* @__PURE__ */ jsx(TextHeading, { variant: "h3", children: title }),
15142
+ /* @__PURE__ */ jsx(TextBody, { className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: description })
15143
+ ] }),
15144
+ /* @__PURE__ */ jsx(
15145
+ PrimaryButton,
15146
+ {
15147
+ onClick: onAction,
15148
+ className: "w-full max-w-xs h-12",
15149
+ "aria-label": buttonLabel,
15150
+ children: buttonLabel
15151
+ }
15152
+ )
15153
+ ] })
15154
+ }
15155
+ );
15156
+ }
15157
+ var DefaultArrowIcon = /* @__PURE__ */ jsx("svg", { className: "w-5 h-5", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }) });
15158
+ function OffchainMethodSelectionView({
15159
+ title,
15160
+ options,
15161
+ bannerMessage,
15162
+ arrowIcon = DefaultArrowIcon
15163
+ }) {
15164
+ return /* @__PURE__ */ jsx(
15165
+ "div",
15166
+ {
15167
+ "data-test-id": "offchain-method-selection-view",
15168
+ 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",
15169
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col w-full flex-1", children: [
15170
+ /* @__PURE__ */ jsx(TextHeading, { variant: "h2", className: "mb-3", children: title }),
15171
+ bannerMessage && /* @__PURE__ */ jsx(
15172
+ BannerNotification,
15173
+ {
15174
+ variant: "info",
15175
+ message: bannerMessage
15176
+ }
15177
+ ),
15178
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3 mt-2", children: options.map((option, index) => /* @__PURE__ */ jsxs(
15179
+ ListItem,
15180
+ {
15181
+ onClick: () => option.onClick(),
15182
+ containerClassName: "p-2 cursor-pointer transition-all",
15183
+ children: [
15184
+ /* @__PURE__ */ jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsx(
15185
+ "div",
15186
+ {
15187
+ "data-test-id": `method-option-icon-${index}`,
15188
+ className: "w-12 h-12 rounded-full flex items-center justify-center",
15189
+ style: { backgroundColor: option.iconBgColor },
15190
+ children: option.icon
15191
+ }
15192
+ ) }),
15193
+ /* @__PURE__ */ jsx(ListItemContent, { className: "ml-4", children: /* @__PURE__ */ jsx(TextHeading, { variant: "h4", className: "mb-1", children: option.label }) }),
15194
+ /* @__PURE__ */ jsx(ListItemRightSide, { className: "ml-auto", children: /* @__PURE__ */ jsx("span", { className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: arrowIcon }) })
15195
+ ]
15196
+ },
15197
+ index
15198
+ )) })
15199
+ ] })
15200
+ }
15201
+ );
15202
+ }
15203
+ var defaultBackIcon = /* @__PURE__ */ 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__ */ jsx("path", { d: "M19 12H5M12 19l-7-7 7-7" }) });
15204
+ var defaultFlagIcon = /* @__PURE__ */ jsx(
15205
+ "img",
15206
+ {
15207
+ src: "/brazil-flag-rounded.png",
15208
+ alt: "Brazil",
15209
+ className: "w-[24px] h-[24px] rounded-[var(--deframe-widget-size-radius-sm)]"
15210
+ }
15211
+ );
15212
+ function OnrampFormView({
15213
+ amount,
15214
+ onAmountChange,
15215
+ isLoadingQuote,
15216
+ summaryTitle,
15217
+ summaryItems,
15218
+ isBelowMinAmount,
15219
+ minAmountFormatted,
15220
+ hasNoAmount,
15221
+ isProcessing,
15222
+ onSubmit,
15223
+ onBack,
15224
+ submitLabel,
15225
+ flagIcon = defaultFlagIcon,
15226
+ backIcon = defaultBackIcon,
15227
+ className
15228
+ }) {
15229
+ return /* @__PURE__ */ jsxs(
15230
+ "div",
15231
+ {
15232
+ className: twMerge("w-full p-4 mx-auto space-y-6", className),
15233
+ "data-test-id": "onramp-form-view",
15234
+ children: [
15235
+ /* @__PURE__ */ jsx(
15236
+ SecondaryButton,
15237
+ {
15238
+ onClick: onBack,
15239
+ className: "mb-4 !border-0 max-w-[84px]",
15240
+ "aria-label": "Voltar",
15241
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
15242
+ /* @__PURE__ */ jsx("span", { className: "w-5 h-5 text-[color:var(--deframe-widget-color-text-primary-dark)]", children: backIcon }),
15243
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-primary-dark)]", children: "Voltar" })
15244
+ ] })
15245
+ }
15246
+ ),
15247
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
15248
+ /* @__PURE__ */ jsx(TextHeading, { variant: "h3", children: "Quanto voc\xEA quer depositar?" }),
15249
+ /* @__PURE__ */ jsx(TextBody, { className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: "Insira o valor gere o c\xF3digo PIX" })
15250
+ ] }),
15251
+ /* @__PURE__ */ jsx("div", { className: "bg-[var(--deframe-widget-color-bg-secondary)] rounded-[var(--deframe-widget-size-radius-lg)] shadow-sm", children: /* @__PURE__ */ jsxs("div", { className: "p-4 flex items-end justify-between", children: [
15252
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
15253
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 mb-1", children: /* @__PURE__ */ jsx(
15254
+ TextBody,
15255
+ {
15256
+ variant: "text-small",
15257
+ className: "text-[color:var(--deframe-widget-color-text-secondary)]",
15258
+ children: "Voc\xEA paga com PIX"
15259
+ }
15260
+ ) }),
15261
+ /* @__PURE__ */ jsx("div", { className: "flex items-center", children: flagIcon })
15262
+ ] }),
15263
+ /* @__PURE__ */ jsx("div", { className: "flex-1 text-right", children: /* @__PURE__ */ jsx(
15264
+ "input",
15265
+ {
15266
+ type: "text",
15267
+ inputMode: "decimal",
15268
+ value: amount ? `R$ ${amount}` : "",
15269
+ onChange: (e) => {
15270
+ const value = e.target.value.replace(/[^0-9.]/g, "");
15271
+ onAmountChange(value || "");
15272
+ },
15273
+ onWheel: (event) => {
15274
+ event.currentTarget.blur();
15275
+ },
15276
+ placeholder: "R$0.00",
15277
+ className: "w-full bg-transparent text-right text-[28px] font-extrabold text-[color:var(--deframe-widget-color-text-secondary)] outline-none",
15278
+ "data-test-id": "onramp-form-amount-input",
15279
+ "aria-label": "Valor do dep\xF3sito"
15280
+ }
15281
+ ) })
15282
+ ] }) }),
15283
+ isLoadingQuote ? /* @__PURE__ */ jsxs("div", { className: "bg-[var(--deframe-widget-color-bg-secondary)] p-4 rounded-[var(--deframe-widget-size-radius-lg)] space-y-3", children: [
15284
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
15285
+ /* @__PURE__ */ jsx(Skeleton, { width: 96, height: 16, shimmer: true }),
15286
+ /* @__PURE__ */ jsx(Skeleton, { width: 80, height: 16, shimmer: true })
15287
+ ] }),
15288
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
15289
+ /* @__PURE__ */ jsx(Skeleton, { width: 80, height: 16, shimmer: true }),
15290
+ /* @__PURE__ */ jsx(Skeleton, { width: 64, height: 16, shimmer: true })
15291
+ ] })
15292
+ ] }) : /* @__PURE__ */ jsx(
15293
+ SummaryDetails,
15294
+ {
15295
+ title: summaryTitle,
15296
+ items: summaryItems,
15297
+ defaultOpen: true,
15298
+ showDividers: true,
15299
+ className: "bg-[var(--deframe-widget-color-bg-secondary)]"
15300
+ }
15301
+ ),
15302
+ /* @__PURE__ */ jsx(
15303
+ BannerNotification,
15304
+ {
15305
+ message: "Dep\xF3sitos via Pix s\xE3o convertidos automaticamente em BRLA.",
15306
+ variant: "info"
15307
+ }
15308
+ ),
15309
+ isBelowMinAmount && /* @__PURE__ */ jsx(
15310
+ BannerNotification,
15311
+ {
15312
+ message: `O valor m\xEDnimo para dep\xF3sito \xE9 R$ ${minAmountFormatted}.`,
15313
+ variant: "warning"
15314
+ }
15315
+ ),
15316
+ /* @__PURE__ */ jsx(
15317
+ PrimaryButton,
15318
+ {
15319
+ onClick: onSubmit,
15320
+ disabled: isBelowMinAmount || isProcessing || hasNoAmount,
15321
+ "aria-label": submitLabel,
15322
+ "data-test-id": "onramp-form-submit",
15323
+ children: isProcessing ? /* @__PURE__ */ jsxs("span", { className: "flex items-center justify-center gap-2", children: [
15324
+ "Processando ",
15325
+ /* @__PURE__ */ jsx(LoadingDots, {})
15326
+ ] }) : submitLabel
15327
+ }
15328
+ )
15329
+ ]
15330
+ }
15331
+ );
15332
+ }
15333
+ var ClockIcon = ({ className }) => /* @__PURE__ */ jsxs(
15334
+ "svg",
15335
+ {
15336
+ xmlns: "http://www.w3.org/2000/svg",
15337
+ width: "16",
15338
+ height: "16",
15339
+ viewBox: "0 0 24 24",
15340
+ fill: "none",
15341
+ stroke: "currentColor",
15342
+ strokeWidth: "2",
15343
+ strokeLinecap: "round",
15344
+ strokeLinejoin: "round",
15345
+ className,
15346
+ "aria-hidden": "true",
15347
+ children: [
15348
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
15349
+ /* @__PURE__ */ jsx("polyline", { points: "12 6 12 12 16 14" })
15350
+ ]
15351
+ }
15352
+ );
15353
+ var CopyIcon = ({ className }) => /* @__PURE__ */ jsxs(
15354
+ "svg",
15355
+ {
15356
+ xmlns: "http://www.w3.org/2000/svg",
15357
+ width: "16",
15358
+ height: "16",
15359
+ viewBox: "0 0 24 24",
15360
+ fill: "none",
15361
+ stroke: "currentColor",
15362
+ strokeWidth: "2",
15363
+ strokeLinecap: "round",
15364
+ strokeLinejoin: "round",
15365
+ className,
15366
+ "aria-hidden": "true",
15367
+ children: [
15368
+ /* @__PURE__ */ jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
15369
+ /* @__PURE__ */ jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
15370
+ ]
15371
+ }
15372
+ );
15373
+ var OnrampFormSimpleView = ({
15374
+ // Base OnrampFormViewProps
15375
+ amount,
15376
+ onAmountChange,
15377
+ isLoadingQuote,
15378
+ summaryTitle,
15379
+ summaryItems,
15380
+ isBelowMinAmount,
15381
+ minAmountFormatted,
15382
+ hasNoAmount,
15383
+ isProcessing,
15384
+ onSubmit,
15385
+ onBack,
15386
+ submitLabel,
15387
+ // Simple-specific props
15388
+ activeTab,
15389
+ cryptoHref,
15390
+ pixHref,
15391
+ pixCode,
15392
+ qrCodeElement,
15393
+ remainingLabel,
15394
+ isExpired,
15395
+ copied,
15396
+ onCopy,
15397
+ onRegenerate,
15398
+ isRegenerating,
15399
+ onClose,
15400
+ error
15401
+ }) => {
15402
+ const hasPixCode = !!pixCode;
15403
+ const isSubmitDisabled = !amount || amount === "0" || amount === "" || isBelowMinAmount || hasNoAmount || isProcessing;
15404
+ const panelBaseClasses = [
15405
+ "relative flex flex-col overflow-hidden w-[420px]",
15406
+ "rounded-[var(--deframe-widget-size-radius-md)]",
15407
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
15408
+ "font-[var(--deframe-widget-font-family)]"
15409
+ ].join(" ");
15410
+ const headerBaseClasses = [
15411
+ "flex items-center",
15412
+ "px-[var(--deframe-widget-size-padding-x-md)]",
15413
+ "py-[var(--deframe-widget-size-padding-y-md)]"
15414
+ ].join(" ");
15415
+ const titleBaseClasses = [
15416
+ "flex-1",
15417
+ "text-[15px]",
15418
+ "[font-weight:var(--deframe-widget-font-weight-semibold)]",
15419
+ "text-[color:var(--deframe-widget-color-text-primary)]"
15420
+ ].join(" ");
15421
+ const dividerClasses = "h-px bg-[var(--deframe-widget-color-border-secondary)]";
15422
+ const bodyBaseClasses = [
15423
+ "flex flex-col",
15424
+ "gap-[var(--deframe-widget-size-gap-md)]",
15425
+ "px-[var(--deframe-widget-size-padding-x-md)]",
15426
+ "py-[var(--deframe-widget-size-padding-y-md)]"
15427
+ ].join(" ");
15428
+ const footerBaseClasses = [
15429
+ "flex gap-[var(--deframe-widget-size-gap-sm)]",
15430
+ "px-[var(--deframe-widget-size-padding-x-md)]",
15431
+ "pb-[var(--deframe-widget-size-padding-y-md)]"
15432
+ ].join(" ");
15433
+ const cardClasses2 = twMerge(
15434
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
15435
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
15436
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
15437
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]"
15438
+ );
15439
+ const secondaryButtonClasses = [
15440
+ "flex-1 h-12 rounded-[var(--deframe-widget-size-radius-sm)]",
15441
+ "text-[15px] text-[color:var(--deframe-widget-color-text-secondary)]",
15442
+ "border-[color:var(--deframe-widget-color-border-secondary)]",
15443
+ "outline-none",
15444
+ "transition-[background,color,border-color] duration-150",
15445
+ "hover:opacity-100",
15446
+ "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]",
15447
+ "hover:text-[color:var(--deframe-widget-color-text-primary)]"
15448
+ ].join(" ");
15449
+ return /* @__PURE__ */ jsxs(
15450
+ "div",
15451
+ {
15452
+ "data-slot": "onramp-form-simple-panel",
15453
+ "data-test-id": "onramp-form-simple-view",
15454
+ className: panelBaseClasses,
15455
+ children: [
15456
+ /* @__PURE__ */ jsxs(
15457
+ "header",
15458
+ {
15459
+ "data-slot": "onramp-form-simple-header",
15460
+ "data-test-id": "onramp-form-simple-view-header",
15461
+ className: headerBaseClasses,
15462
+ children: [
15463
+ /* @__PURE__ */ jsx(
15464
+ "span",
15465
+ {
15466
+ "data-slot": "onramp-form-simple-title",
15467
+ "data-test-id": "onramp-form-simple-view-title",
15468
+ className: titleBaseClasses,
15469
+ children: "Depositar"
15470
+ }
15471
+ ),
15472
+ onClose && /* @__PURE__ */ jsx(
15473
+ CloseButton_default,
15474
+ {
15475
+ onClick: onClose,
15476
+ ariaLabel: "Fechar painel de dep\xF3sito",
15477
+ testId: "onramp-form-simple-view-close"
15478
+ }
15479
+ )
15480
+ ]
15481
+ }
15482
+ ),
15483
+ /* @__PURE__ */ jsx(
15484
+ "div",
15485
+ {
15486
+ "data-slot": "onramp-form-simple-divider",
15487
+ "data-test-id": "onramp-form-simple-view-divider",
15488
+ className: dividerClasses
15489
+ }
15490
+ ),
15491
+ /* @__PURE__ */ jsx(
15492
+ FlowTabHeader,
15493
+ {
15494
+ activeTab: activeTab != null ? activeTab : "pix",
15495
+ cryptoHref: cryptoHref != null ? cryptoHref : "/dashboard/deposit/onchain",
15496
+ pixHref: pixHref != null ? pixHref : "/dashboard/deposit/onramp"
15497
+ }
15498
+ ),
15499
+ /* @__PURE__ */ jsx(
15500
+ "div",
15501
+ {
15502
+ "data-slot": "onramp-form-simple-divider-tabs",
15503
+ "data-test-id": "onramp-form-simple-view-divider-tabs",
15504
+ className: dividerClasses
15505
+ }
15506
+ ),
15507
+ /* @__PURE__ */ jsx(
15508
+ "div",
15509
+ {
15510
+ "data-slot": "onramp-form-simple-body",
15511
+ "data-test-id": "onramp-form-simple-view-body",
15512
+ className: bodyBaseClasses,
15513
+ children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: !hasPixCode ? (
15514
+ /* ── Step 1: Amount input ─────────────────────────────────────── */
15515
+ /* @__PURE__ */ jsxs(
15516
+ motion.div,
15517
+ {
15518
+ "data-slot": "onramp-form-simple-step-1",
15519
+ "data-test-id": "onramp-form-simple-view-step-1",
15520
+ initial: { opacity: 0 },
15521
+ animate: { opacity: 1 },
15522
+ exit: { opacity: 0 },
15523
+ transition: { duration: 0.15 },
15524
+ className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]",
15525
+ children: [
15526
+ /* @__PURE__ */ jsx(
15527
+ "div",
15528
+ {
15529
+ "data-slot": "onramp-form-simple-amount-card",
15530
+ "data-test-id": "onramp-form-simple-view-amount-card",
15531
+ className: cardClasses2,
15532
+ children: /* @__PURE__ */ jsxs(
15533
+ "div",
15534
+ {
15535
+ "data-slot": "onramp-form-simple-amount-row",
15536
+ "data-test-id": "onramp-form-simple-view-amount-row",
15537
+ className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
15538
+ children: [
15539
+ /* @__PURE__ */ jsx(
15540
+ "span",
15541
+ {
15542
+ "data-slot": "onramp-form-simple-currency-label",
15543
+ "data-test-id": "onramp-form-simple-view-currency-label",
15544
+ className: "text-[36px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-tertiary)] leading-[1] flex-shrink-0",
15545
+ children: "R$"
15546
+ }
15547
+ ),
15548
+ /* @__PURE__ */ jsx(
15549
+ "div",
15550
+ {
15551
+ "data-test-id": "onramp-form-simple-view-currency-divider",
15552
+ className: "w-px h-10 bg-[var(--deframe-widget-color-border-secondary)] flex-shrink-0"
15553
+ }
15554
+ ),
15555
+ /* @__PURE__ */ jsx(
15556
+ EarnAmountInputSimpleView,
15557
+ {
15558
+ value: amount,
15559
+ onChange: (e) => {
15560
+ const raw = e.target.value.replace(/[^0-9.,]/g, "");
15561
+ onAmountChange(raw);
15562
+ },
15563
+ ariaLabel: "Valor do dep\xF3sito PIX",
15564
+ dollarAmountFormatted: ""
15565
+ }
15566
+ )
15567
+ ]
15568
+ }
15569
+ )
15570
+ }
15571
+ ),
15572
+ isBelowMinAmount && /* @__PURE__ */ jsx(
15573
+ EarnInlineNotificationSimpleView,
15574
+ {
15575
+ variant: "warning",
15576
+ message: `O valor m\xEDnimo para dep\xF3sito \xE9 R$ ${minAmountFormatted}.`
15577
+ }
15578
+ ),
15579
+ error && /* @__PURE__ */ jsx(
15580
+ EarnInlineNotificationSimpleView,
15581
+ {
15582
+ variant: "error",
15583
+ message: error
15584
+ }
15585
+ ),
15586
+ isLoadingQuote ? /* @__PURE__ */ jsxs(
15587
+ "div",
15588
+ {
15589
+ "data-test-id": "onramp-form-simple-view-skeleton",
15590
+ className: twMerge(cardClasses2, "space-y-3"),
15591
+ children: [
15592
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
15593
+ /* @__PURE__ */ jsx(Skeleton, { width: 96, height: 16, shimmer: true }),
15594
+ /* @__PURE__ */ jsx(Skeleton, { width: 80, height: 16, shimmer: true })
15595
+ ] }),
15596
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
15597
+ /* @__PURE__ */ jsx(Skeleton, { width: 80, height: 16, shimmer: true }),
15598
+ /* @__PURE__ */ jsx(Skeleton, { width: 64, height: 16, shimmer: true })
15599
+ ] })
15600
+ ]
15601
+ }
15602
+ ) : summaryItems.length > 0 && /* @__PURE__ */ jsx(
15603
+ SummaryDetails,
15604
+ {
15605
+ title: summaryTitle,
15606
+ items: summaryItems,
15607
+ defaultOpen: true,
15608
+ showDividers: true,
15609
+ className: "bg-[var(--deframe-widget-color-bg-secondary)]"
15610
+ }
15611
+ )
15612
+ ]
15613
+ },
15614
+ "step-1"
15615
+ )
15616
+ ) : (
15617
+ /* ── Step 2: QR code + PIX code ───────────────────────────────── */
15618
+ /* @__PURE__ */ jsxs(
15619
+ motion.div,
15620
+ {
15621
+ "data-slot": "onramp-form-simple-step-2",
15622
+ "data-test-id": "onramp-form-simple-view-step-2",
15623
+ initial: { opacity: 0 },
15624
+ animate: { opacity: 1 },
15625
+ exit: { opacity: 0 },
15626
+ transition: { duration: 0.15 },
15627
+ className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]",
15628
+ children: [
15629
+ /* @__PURE__ */ jsxs(
15630
+ "div",
15631
+ {
15632
+ "data-slot": "onramp-form-simple-qr-card",
15633
+ "data-test-id": "onramp-form-simple-view-qr-card",
15634
+ className: twMerge(
15635
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
15636
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
15637
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
15638
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]",
15639
+ "flex items-center justify-center",
15640
+ "relative overflow-hidden"
15641
+ ),
15642
+ children: [
15643
+ /* @__PURE__ */ jsx(
15644
+ "div",
15645
+ {
15646
+ "data-slot": "onramp-form-simple-qr-wrapper",
15647
+ "data-test-id": "onramp-form-simple-view-qr-wrapper",
15648
+ className: "bg-white p-3 rounded-lg leading-[0]",
15649
+ children: qrCodeElement
15650
+ }
15651
+ ),
15652
+ isExpired && /* @__PURE__ */ jsx(
15653
+ "div",
15654
+ {
15655
+ "data-slot": "onramp-form-simple-qr-expired-overlay",
15656
+ "data-test-id": "onramp-form-simple-view-qr-expired-overlay",
15657
+ className: twMerge(
15658
+ "absolute inset-0 flex items-center justify-center",
15659
+ "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-primary)_80%,transparent)]",
15660
+ "rounded-[var(--deframe-widget-size-radius-sm)]"
15661
+ ),
15662
+ children: /* @__PURE__ */ jsx(
15663
+ "span",
15664
+ {
15665
+ "data-test-id": "onramp-form-simple-view-qr-expired-text",
15666
+ 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)]",
15667
+ children: "C\xF3digo expirado"
15668
+ }
15669
+ )
15670
+ }
15671
+ )
15672
+ ]
15673
+ }
15674
+ ),
15675
+ /* @__PURE__ */ jsxs(
15676
+ "div",
15677
+ {
15678
+ "data-slot": "onramp-form-simple-pix-code",
15679
+ "data-test-id": "onramp-form-simple-view-pix-code",
15680
+ className: twMerge(
15681
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
15682
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
15683
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
15684
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)]"
15685
+ ),
15686
+ children: [
15687
+ /* @__PURE__ */ jsx(
15688
+ "p",
15689
+ {
15690
+ "data-test-id": "onramp-form-simple-view-pix-code-label",
15691
+ className: "mb-[var(--deframe-widget-size-gap-xs)] text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
15692
+ children: "C\xF3digo PIX"
15693
+ }
15694
+ ),
15695
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
15696
+ /* @__PURE__ */ jsx(
15697
+ "span",
15698
+ {
15699
+ "data-test-id": "onramp-form-simple-view-pix-code-value",
15700
+ 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)]",
15701
+ children: pixCode
15702
+ }
15703
+ ),
15704
+ /* @__PURE__ */ jsxs(
15705
+ "button",
15706
+ {
15707
+ type: "button",
15708
+ "data-test-id": "onramp-form-simple-view-pix-code-copy",
15709
+ "aria-label": copied ? "C\xF3digo copiado" : "Copiar c\xF3digo PIX",
15710
+ onClick: onCopy,
15711
+ className: twMerge(
15712
+ "flex items-center gap-1 flex-shrink-0 px-2 py-1",
15713
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
15714
+ "text-[12px] [font-weight:var(--deframe-widget-font-weight-medium)]",
15715
+ "font-[var(--deframe-widget-font-family)]",
15716
+ "cursor-pointer outline-none",
15717
+ "transition-[background,color] duration-150",
15718
+ 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)]"
15719
+ ),
15720
+ children: [
15721
+ /* @__PURE__ */ jsx(CopyIcon, {}),
15722
+ /* @__PURE__ */ jsx("span", { children: copied ? "Copiado!" : "Copiar" })
15723
+ ]
15724
+ }
15725
+ )
15726
+ ] })
15727
+ ]
15728
+ }
15729
+ ),
15730
+ remainingLabel && /* @__PURE__ */ jsxs(
15731
+ "div",
15732
+ {
15733
+ "data-slot": "onramp-form-simple-timer",
15734
+ "data-test-id": "onramp-form-simple-view-timer",
15735
+ className: "flex items-center justify-center gap-[var(--deframe-widget-size-gap-xs)]",
15736
+ children: [
15737
+ /* @__PURE__ */ jsx(
15738
+ ClockIcon,
15739
+ {
15740
+ className: twMerge(
15741
+ "flex-shrink-0",
15742
+ isExpired ? "text-[color:var(--deframe-widget-color-state-error)]" : "text-[color:var(--deframe-widget-color-text-tertiary)]"
15743
+ )
15744
+ }
15745
+ ),
15746
+ /* @__PURE__ */ jsx(
15747
+ "span",
15748
+ {
15749
+ "data-test-id": "onramp-form-simple-view-timer-label",
15750
+ className: twMerge(
15751
+ "text-[13px] [font-weight:var(--deframe-widget-font-weight-medium)] font-[var(--deframe-widget-font-family)]",
15752
+ isExpired ? "text-[color:var(--deframe-widget-color-state-error)]" : "text-[color:var(--deframe-widget-color-text-tertiary)]"
15753
+ ),
15754
+ children: remainingLabel
15755
+ }
15756
+ )
15757
+ ]
15758
+ }
15759
+ ),
15760
+ isExpired && onRegenerate && /* @__PURE__ */ jsx(
15761
+ PrimaryButton,
15762
+ {
15763
+ type: "button",
15764
+ onClick: onRegenerate,
15765
+ disabled: isRegenerating,
15766
+ className: "w-full h-12 rounded-[var(--deframe-widget-size-radius-sm)] text-[15px]",
15767
+ "aria-label": "Gerar novo c\xF3digo PIX",
15768
+ "data-test-id": "onramp-form-simple-view-regenerate",
15769
+ children: isRegenerating ? "Gerando..." : "Gerar novo c\xF3digo"
15770
+ }
15771
+ )
15772
+ ]
15773
+ },
15774
+ "step-2"
15775
+ )
15776
+ ) })
15777
+ }
15778
+ ),
15779
+ /* @__PURE__ */ jsx(
15780
+ "footer",
15781
+ {
15782
+ "data-slot": "onramp-form-simple-footer",
15783
+ "data-test-id": "onramp-form-simple-view-footer",
15784
+ className: footerBaseClasses,
15785
+ children: !hasPixCode ? /* @__PURE__ */ jsxs(Fragment, { children: [
15786
+ /* @__PURE__ */ jsx(
15787
+ SecondaryButton,
15788
+ {
15789
+ type: "button",
15790
+ className: secondaryButtonClasses,
15791
+ onClick: onBack,
15792
+ "aria-label": "Cancelar dep\xF3sito",
15793
+ "data-test-id": "onramp-form-simple-view-cancel",
15794
+ children: "Cancelar"
15795
+ }
15796
+ ),
15797
+ /* @__PURE__ */ jsx(
15798
+ PrimaryButton,
15799
+ {
15800
+ type: "button",
15801
+ className: "flex-1 h-12 rounded-[var(--deframe-widget-size-radius-sm)] text-[15px]",
15802
+ onClick: onSubmit,
15803
+ disabled: isSubmitDisabled,
15804
+ "aria-label": submitLabel,
15805
+ "data-test-id": "onramp-form-simple-view-submit",
15806
+ children: isProcessing ? "Processando..." : submitLabel
15807
+ }
15808
+ )
15809
+ ] }) : /* @__PURE__ */ jsx(
15810
+ SecondaryButton,
15811
+ {
15812
+ type: "button",
15813
+ className: twMerge(secondaryButtonClasses, "w-full"),
15814
+ onClick: onBack,
15815
+ "aria-label": "Cancelar",
15816
+ "data-test-id": "onramp-form-simple-view-cancel",
15817
+ children: "Cancelar"
15818
+ }
15819
+ )
15820
+ }
15821
+ )
15822
+ ]
15823
+ }
15824
+ );
15825
+ };
15826
+ function OnrampPixcodeView({
15827
+ pixCode,
15828
+ summaryTitle,
15829
+ summaryItems,
15830
+ isLoadingQuote,
15831
+ remainingLabel,
15832
+ isExpired,
15833
+ copied,
15834
+ isRegenerating,
15835
+ onCopy,
15836
+ onRegenerate,
15837
+ qrCodeElement,
15838
+ className
15839
+ }) {
15840
+ return /* @__PURE__ */ jsxs(
15841
+ "div",
15842
+ {
15843
+ className: twMerge(
15844
+ "w-full p-4 mx-auto space-y-6 animate-fade-in flex flex-col flex-1",
15845
+ className
15846
+ ),
15847
+ "data-test-id": "onramp-pixcode-view",
15848
+ children: [
15849
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
15850
+ /* @__PURE__ */ jsx("h2", { className: "text-[21px] font-bold text-[color:var(--deframe-widget-color-text-secondary)] leading-tight", children: "Pague com Pix" }),
15851
+ /* @__PURE__ */ 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" })
15852
+ ] }),
15853
+ /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx("div", { className: "bg-[var(--deframe-widget-color-bg-primary)] p-4 rounded-[var(--deframe-widget-size-radius-lg)]", children: /* @__PURE__ */ jsxs("div", { className: "relative mx-auto w-fit", children: [
15854
+ /* @__PURE__ */ jsx("div", { className: isExpired ? "blur-sm opacity-60 transition" : "transition", children: qrCodeElement }),
15855
+ isExpired && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-center px-4", children: /* @__PURE__ */ 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" }) })
15856
+ ] }) }) }),
15857
+ /* @__PURE__ */ jsx("div", { className: "bg-[var(--deframe-widget-color-bg-secondary)] rounded-[var(--deframe-widget-size-radius-lg)] shadow-sm", children: /* @__PURE__ */ jsx("div", { className: "p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
15858
+ /* @__PURE__ */ jsxs("p", { className: "font-mono text-[12px] text-[color:var(--deframe-widget-color-text-primary)] truncate flex-1", children: [
15859
+ pixCode.substring(0, 50),
15860
+ "..."
15861
+ ] }),
15862
+ /* @__PURE__ */ jsx(
15863
+ "button",
15864
+ {
15865
+ onClick: onCopy,
15866
+ disabled: isExpired,
15867
+ className: twMerge(
15868
+ "text-[12px] font-semibold underline shrink-0",
15869
+ isExpired ? "text-[color:var(--deframe-widget-color-text-tertiary)] cursor-not-allowed" : "text-[color:var(--deframe-widget-color-brand-primary)]"
15870
+ ),
15871
+ "aria-label": copied ? "C\xF3digo copiado" : "Copiar c\xF3digo PIX",
15872
+ "data-test-id": "onramp-pixcode-copy-button",
15873
+ children: copied ? "Copiado!" : "Copiar"
15874
+ }
15875
+ )
15876
+ ] }) }) }),
15877
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2", children: [
15878
+ /* @__PURE__ */ jsxs("svg", { className: "w-4 h-4 text-[color:var(--deframe-widget-color-text-secondary)]", viewBox: "0 0 16 16", fill: "none", children: [
15879
+ /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "6.5", stroke: "#1890FF", strokeWidth: "1" }),
15880
+ /* @__PURE__ */ jsx("path", { d: "M8 4V8L10.5 10.5", stroke: "#1890FF", strokeWidth: "1", strokeLinecap: "round" })
15881
+ ] }),
15882
+ /* @__PURE__ */ 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}` })
15883
+ ] }),
15884
+ isExpired && /* @__PURE__ */ jsx(
15885
+ "button",
15886
+ {
15887
+ type: "button",
15888
+ onClick: onRegenerate,
15889
+ disabled: isRegenerating,
15890
+ className: "text-[12px] font-semibold text-[color:var(--deframe-widget-color-brand-primary)] underline self-center disabled:opacity-50 disabled:cursor-not-allowed",
15891
+ "aria-label": "Gerar novo c\xF3digo Pix",
15892
+ "data-test-id": "onramp-pixcode-regenerate-button",
15893
+ children: isRegenerating ? /* @__PURE__ */ jsxs(Fragment, { children: [
15894
+ "Gerando novo c\xF3digo ",
15895
+ /* @__PURE__ */ jsx(LoadingDots, {})
15896
+ ] }) : "Gerar novo c\xF3digo Pix"
15897
+ }
15898
+ ),
15899
+ isLoadingQuote ? /* @__PURE__ */ 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__ */ jsxs("div", { className: "flex items-center gap-2", children: [
15900
+ /* @__PURE__ */ jsx("div", { className: "h-4 bg-[var(--deframe-widget-color-bg-tertiary)] rounded-[var(--deframe-widget-size-radius-sm)] animate-pulse w-20" }),
15901
+ /* @__PURE__ */ jsx("span", { className: "text-[14px] text-[color:var(--deframe-widget-color-text-secondary)]", children: "\u2248" }),
15902
+ /* @__PURE__ */ jsx("div", { className: "h-4 bg-[var(--deframe-widget-color-bg-tertiary)] rounded-[var(--deframe-widget-size-radius-sm)] animate-pulse w-16" })
15903
+ ] }) }) : /* @__PURE__ */ jsx(
15904
+ SummaryDetails,
15905
+ {
15906
+ title: summaryTitle,
15907
+ items: summaryItems,
15908
+ defaultOpen: true,
15909
+ className: "bg-[var(--deframe-widget-color-bg-secondary)]"
15910
+ }
15911
+ )
15912
+ ]
15913
+ }
15914
+ );
15915
+ }
15916
+ function SuccessIcon3() {
15917
+ return /* @__PURE__ */ jsxs("div", { className: "relative w-20 h-20", children: [
15918
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-[#2ba176] rounded-full opacity-20" }),
15919
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "w-12 h-12 bg-[#2ba176] rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx("svg", { className: "w-5 h-5", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsx(
15920
+ "path",
15921
+ {
15922
+ d: "M10 15V5M10 5L6 9M10 5L14 9",
15923
+ stroke: "#121212",
15924
+ strokeWidth: "2",
15925
+ strokeLinecap: "round",
15926
+ strokeLinejoin: "round"
15927
+ }
15928
+ ) }) }) })
15929
+ ] });
15930
+ }
15931
+ function SuccessHeader({ children }) {
15932
+ return /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center gap-4", children });
15933
+ }
15934
+ function SuccessTitle({ children }) {
15935
+ return /* @__PURE__ */ jsx("h2", { className: "text-[28px] font-extrabold text-[color:var(--deframe-widget-color-text-primary)] leading-tight mb-2", children });
15936
+ }
15937
+ function SuccessDescription({ children }) {
15938
+ return /* @__PURE__ */ jsx("p", { className: "text-[14px] text-[color:var(--deframe-widget-color-text-secondary)]", children });
15939
+ }
15940
+ function DepositCard({ children }) {
15941
+ return /* @__PURE__ */ jsx("div", { className: "bg-[var(--deframe-widget-color-bg-secondary)] rounded-[var(--deframe-widget-size-radius-lg)] shadow-sm", children: /* @__PURE__ */ jsx("div", { className: "p-6", children }) });
15942
+ }
15943
+ function DepositRow({ children }) {
15944
+ return /* @__PURE__ */ jsx("div", { className: "flex items-center gap-3", children });
15945
+ }
15946
+ function DepositIcon() {
15947
+ return /* @__PURE__ */ 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__ */ jsx("span", { className: "text-lg", children: "R" }) });
15948
+ }
15949
+ function DepositInfo({ children }) {
15950
+ return /* @__PURE__ */ jsx("div", { className: "flex flex-col", children });
15951
+ }
15952
+ function OnrampSuccessView({
15953
+ amount = "0",
15954
+ summaryTitle = "",
15955
+ summaryItems = [],
15956
+ onNewDeposit,
15957
+ onGoToDashboard,
15958
+ className
15959
+ }) {
15960
+ return /* @__PURE__ */ jsxs(
15961
+ "div",
15962
+ {
15963
+ className: twMerge(
15964
+ "w-full p-4 mx-auto space-y-6 animate-fade-in flex flex-col flex-1",
15965
+ className
15966
+ ),
15967
+ "data-test-id": "onramp-success-view",
15968
+ children: [
15969
+ /* @__PURE__ */ jsxs(SuccessHeader, { children: [
15970
+ /* @__PURE__ */ jsx(SuccessIcon3, {}),
15971
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
15972
+ /* @__PURE__ */ jsx(SuccessTitle, { children: "Dep\xF3sito via PIX conclu\xEDdo" }),
15973
+ /* @__PURE__ */ jsxs(SuccessDescription, { children: [
15974
+ amount,
15975
+ " BRLA foram adicionados \xE0 sua carteira."
15976
+ ] })
15977
+ ] })
15978
+ ] }),
15979
+ /* @__PURE__ */ jsx(DepositCard, { children: /* @__PURE__ */ jsxs(DepositRow, { children: [
15980
+ /* @__PURE__ */ jsx(DepositIcon, {}),
15981
+ /* @__PURE__ */ jsxs(DepositInfo, { children: [
15982
+ /* @__PURE__ */ jsx("p", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: "Voc\xEA depositou via PIX" }),
15983
+ /* @__PURE__ */ jsxs("p", { className: "text-[14px] font-semibold text-[color:var(--deframe-widget-color-text-secondary)]", children: [
15984
+ amount,
15985
+ " BRLA"
15986
+ ] })
15987
+ ] })
15988
+ ] }) }),
15989
+ /* @__PURE__ */ jsx(
15990
+ SummaryDetails,
15991
+ {
15992
+ title: summaryTitle,
15993
+ items: summaryItems,
15994
+ defaultOpen: false,
15995
+ className: "bg-[var(--deframe-widget-color-bg-secondary)]"
15996
+ }
15997
+ ),
15998
+ /* @__PURE__ */ jsxs("div", { className: "w-full flex items-center my-4 gap-2 mt-auto", children: [
15999
+ /* @__PURE__ */ jsx(
16000
+ SecondaryButton,
16001
+ {
16002
+ onClick: onNewDeposit,
16003
+ "aria-label": "Fazer novo dep\xF3sito",
16004
+ "data-test-id": "onramp-success-new-deposit",
16005
+ children: "Fazer novo dep\xF3sito"
16006
+ }
16007
+ ),
16008
+ /* @__PURE__ */ jsx(
16009
+ PrimaryButton,
16010
+ {
16011
+ onClick: onGoToDashboard,
16012
+ "aria-label": "Ir para carteira",
16013
+ "data-test-id": "onramp-success-go-dashboard",
16014
+ children: "Ir para carteira"
16015
+ }
16016
+ )
16017
+ ] })
16018
+ ]
16019
+ }
16020
+ );
16021
+ }
16022
+ var OnrampSuccessSimpleView = ({
16023
+ onGoToDashboard
16024
+ }) => {
16025
+ React6.useEffect(() => {
16026
+ if (!onGoToDashboard) return;
16027
+ const timer = setTimeout(onGoToDashboard, 5e3);
16028
+ return () => clearTimeout(timer);
16029
+ }, [onGoToDashboard]);
16030
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "onramp-success-simple-view", children: /* @__PURE__ */ jsx(
16031
+ EarnFeedbackOverlaySimpleView,
16032
+ {
16033
+ variant: "success",
16034
+ title: "Dep\xF3sito via PIX Confirmado!",
16035
+ subtitle: "Seu saldo foi atualizado."
16036
+ }
16037
+ ) });
16038
+ };
16039
+ var defaultBackIcon2 = /* @__PURE__ */ 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__ */ jsx("path", { d: "M19 12H5M12 19l-7-7 7-7" }) });
16040
+ function OfframpInputFormView({
16041
+ brlaBalance,
16042
+ amount,
16043
+ onAmountChange,
16044
+ pixKey,
16045
+ onPixKeyChange,
16046
+ onMaxClick,
16047
+ showMaxButton,
16048
+ summaryTitle,
16049
+ summaryItems,
16050
+ isLoadingQuote,
16051
+ amountWarningMessage,
16052
+ hasActiveWithdrawal,
16053
+ completedBanner,
16054
+ error,
16055
+ offrampError,
16056
+ submitLabel,
16057
+ submitDisabled,
16058
+ onSubmit,
16059
+ onBack,
16060
+ backIcon,
16061
+ tokenIconUrl = "/brladigital_32.webp",
16062
+ flagIconUrl = "/brazil-flag-rounded.png",
16063
+ className
16064
+ }) {
16065
+ return /* @__PURE__ */ jsxs(
16066
+ "div",
16067
+ {
16068
+ className: twMerge(
16069
+ "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",
16070
+ className
16071
+ ),
16072
+ "data-test-id": "offramp-input-form-view",
16073
+ children: [
16074
+ /* @__PURE__ */ jsxs("div", { className: "mb-6", children: [
16075
+ /* @__PURE__ */ jsxs(
16076
+ "button",
16077
+ {
16078
+ onClick: onBack,
16079
+ className: "flex items-center gap-2 mb-4 cursor-pointer",
16080
+ "aria-label": "Voltar",
16081
+ "data-test-id": "offramp-input-form-back-button",
16082
+ children: [
16083
+ backIcon || defaultBackIcon2,
16084
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-medium", children: "Voltar" })
16085
+ ]
16086
+ }
16087
+ ),
16088
+ /* @__PURE__ */ jsx("div", { className: "w-full h-1 bg-[var(--deframe-widget-color-border-secondary)] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "h-full bg-[#1FC16B]", style: { width: "25%" } }) })
16089
+ ] }),
16090
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col items-start justify-start gap-6", children: /* @__PURE__ */ jsxs("div", { className: "w-full space-y-6", children: [
16091
+ completedBanner && /* @__PURE__ */ jsx(
16092
+ BannerNotification,
16093
+ {
16094
+ message: completedBanner,
16095
+ variant: "success"
16096
+ }
16097
+ ),
16098
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
16099
+ /* @__PURE__ */ jsx(TextHeading, { variant: "h3", children: "Saque via PIX" }),
16100
+ /* @__PURE__ */ 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." })
16101
+ ] }),
16102
+ /* @__PURE__ */ jsxs(ListItem, { children: [
16103
+ /* @__PURE__ */ jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsx(
16104
+ "img",
16105
+ {
16106
+ src: tokenIconUrl,
16107
+ alt: "Token",
16108
+ className: "w-10 h-10 rounded-full"
16109
+ }
16110
+ ) }),
16111
+ /* @__PURE__ */ jsxs(ListItemContent, { className: "ml-4", children: [
16112
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] ml-2", children: "Saldo em BRLA dispon\xEDvel" }),
16113
+ /* @__PURE__ */ jsxs(TextHeading, { variant: "h5", className: "ml-2", children: [
16114
+ brlaBalance,
16115
+ " BRLA"
16116
+ ] })
16117
+ ] })
16118
+ ] }),
16119
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
16120
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] mb-2", children: "Quanto voc\xEA quer enviar via PIX?" }),
16121
+ /* @__PURE__ */ 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: [
16122
+ /* @__PURE__ */ jsx("img", { src: flagIconUrl, alt: "BRL", className: "w-6 h-6 rounded-full" }),
16123
+ /* @__PURE__ */ jsx(
16124
+ "input",
16125
+ {
16126
+ type: "text",
16127
+ inputMode: "decimal",
16128
+ value: amount ? `R$${amount}` : "",
16129
+ onChange: (e) => {
16130
+ const value = e.target.value.replace(/[^0-9.]/g, "");
16131
+ onAmountChange(value || "");
16132
+ },
16133
+ onWheel: (event) => {
16134
+ event.currentTarget.blur();
16135
+ },
16136
+ placeholder: "R$0.00",
16137
+ className: "w-full bg-transparent text-right text-[28px] font-extrabold text-[color:var(--deframe-widget-color-text-primary)] outline-none",
16138
+ "aria-label": "Valor do saque",
16139
+ "data-test-id": "offramp-input-form-amount"
16140
+ }
16141
+ )
16142
+ ] }),
16143
+ showMaxButton && /* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx(
16144
+ TertiaryButton,
16145
+ {
16146
+ onClick: onMaxClick,
16147
+ className: "text-[length:var(--deframe-widget-font-size-sm)]",
16148
+ "aria-label": "Usar valor m\xE1ximo",
16149
+ children: "Max"
16150
+ }
16151
+ ) }),
16152
+ hasActiveWithdrawal && /* @__PURE__ */ jsx(
16153
+ BannerNotification,
16154
+ {
16155
+ message: "Voc\xEA j\xE1 tem um saque em andamento. Aguarde a conclus\xE3o antes de iniciar outro.",
16156
+ variant: "warning"
16157
+ }
16158
+ ),
16159
+ amountWarningMessage && /* @__PURE__ */ jsx(
16160
+ BannerNotification,
16161
+ {
16162
+ message: amountWarningMessage,
16163
+ variant: "warning"
16164
+ }
16165
+ )
16166
+ ] }),
16167
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
16168
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] mb-2", children: "Qual \xE9 a sua chave PIX?" }),
16169
+ /* @__PURE__ */ jsx(
16170
+ Input2,
16171
+ {
16172
+ type: "text",
16173
+ value: pixKey,
16174
+ onChange: (e) => onPixKeyChange(e.target.value),
16175
+ placeholder: "(CPF, email, telefone ou aleat\xF3ria)",
16176
+ 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)]",
16177
+ "aria-label": "Chave PIX",
16178
+ "data-test-id": "offramp-input-form-pix-key"
16179
+ }
16180
+ ),
16181
+ /* @__PURE__ */ jsx(
16182
+ BannerNotification,
16183
+ {
16184
+ variant: "info",
16185
+ message: "A chave PIX deve estar vinculada ao mesmo CPF do seu cadastro."
16186
+ }
16187
+ )
16188
+ ] }),
16189
+ isLoadingQuote ? /* @__PURE__ */ jsx("div", { className: "bg-[var(--deframe-widget-color-bg-secondary)] p-4 rounded-[var(--deframe-widget-size-radius-sm)]", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
16190
+ /* @__PURE__ */ jsx(Skeleton, { width: 128, height: 16, shimmer: true }),
16191
+ /* @__PURE__ */ jsx(Skeleton, { width: 64, height: 16, shimmer: true })
16192
+ ] }) }) : /* @__PURE__ */ jsx(
16193
+ SummaryDetails,
16194
+ {
16195
+ title: summaryTitle,
16196
+ items: summaryItems,
16197
+ className: "bg-[var(--deframe-widget-color-bg-secondary)]"
16198
+ }
16199
+ ),
16200
+ /* @__PURE__ */ jsx(
16201
+ BannerNotification,
16202
+ {
16203
+ 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.",
16204
+ variant: "info"
16205
+ }
16206
+ ),
16207
+ (error || offrampError) && /* @__PURE__ */ jsx(
16208
+ BannerNotification,
16209
+ {
16210
+ message: error || offrampError || "",
16211
+ variant: "error"
16212
+ }
16213
+ ),
16214
+ /* @__PURE__ */ jsx(
16215
+ PrimaryButton,
16216
+ {
16217
+ onClick: onSubmit,
16218
+ disabled: submitDisabled,
16219
+ "aria-label": "Confirmar saque",
16220
+ "data-test-id": "offramp-input-form-submit",
16221
+ children: submitLabel
16222
+ }
16223
+ )
16224
+ ] }) })
16225
+ ]
16226
+ }
16227
+ );
16228
+ }
16229
+
16230
+ // src/stories/offramp-input-form-view/constants.ts
16231
+ var PIX_KEY_OPTIONS = [
16232
+ { value: "cpf", label: "CPF" },
16233
+ { value: "email", label: "Email" },
16234
+ { value: "phone", label: "Celular" },
16235
+ { value: "random", label: "Aleat\xF3ria" }
16236
+ ];
16237
+ var tabBaseClasses2 = [
16238
+ "flex-1 py-[4px] px-[8px]",
16239
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
16240
+ "border-none outline-none cursor-pointer",
16241
+ "whitespace-nowrap text-center",
16242
+ "font-[var(--deframe-widget-font-family)]",
16243
+ "text-[13px] [line-height:1.4]",
16244
+ "transition-[background,color] duration-150",
16245
+ "bg-transparent"
16246
+ ].join(" ");
16247
+ var activeTabClasses2 = [
16248
+ "[font-weight:var(--deframe-widget-font-weight-semibold)]",
16249
+ "text-[color:var(--deframe-widget-color-brand-primary)]"
16250
+ ].join(" ");
16251
+ var inactiveTabClasses2 = [
16252
+ "[font-weight:var(--deframe-widget-font-weight-regular)]",
16253
+ "text-[color:var(--deframe-widget-color-text-secondary)]",
16254
+ "hover:text-[color:var(--deframe-widget-color-text-primary)]",
16255
+ "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]"
16256
+ ].join(" ");
16257
+ var PixKeySegmentedControl = ({
16258
+ value,
16259
+ onChange
16260
+ }) => {
16261
+ return /* @__PURE__ */ jsx(
16262
+ "div",
16263
+ {
16264
+ role: "tablist",
16265
+ "data-slot": "pix-key-segmented-control",
16266
+ "data-test-id": "pix-key-segmented-control",
16267
+ className: twMerge(
16268
+ "inline-flex w-full",
16269
+ "rounded-[var(--deframe-widget-size-radius-md)]",
16270
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
16271
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
16272
+ "p-[3px] gap-[2px]"
16273
+ ),
16274
+ children: PIX_KEY_OPTIONS.map(({ value: optionValue, label }) => {
16275
+ const isActive = optionValue === value;
16276
+ return /* @__PURE__ */ jsx(
16277
+ "button",
16278
+ {
16279
+ type: "button",
16280
+ role: "tab",
16281
+ "aria-selected": isActive,
16282
+ "aria-label": label,
16283
+ "data-test-id": `pix-key-tab-${optionValue}`,
16284
+ onClick: () => onChange(optionValue),
16285
+ className: twMerge(
16286
+ tabBaseClasses2,
16287
+ isActive ? activeTabClasses2 : inactiveTabClasses2
16288
+ ),
16289
+ children: label
16290
+ },
16291
+ optionValue
16292
+ );
16293
+ })
16294
+ }
16295
+ );
16296
+ };
16297
+ var STORAGE_KEY = "deframe-pix-key-type";
16298
+ var PIX_PLACEHOLDERS = {
16299
+ cpf: "000.000.000-00",
16300
+ email: "seu@email.com",
16301
+ phone: "+55 (11) 99999-9999",
16302
+ random: "Chave aleat\xF3ria"
16303
+ };
16304
+ var OfframpInputFormSimpleView = ({
16305
+ // Base props
16306
+ brlaBalance,
16307
+ amount,
16308
+ onAmountChange,
16309
+ pixKey,
16310
+ onPixKeyChange,
16311
+ amountWarningMessage,
16312
+ hasActiveWithdrawal,
16313
+ completedBanner,
16314
+ error,
16315
+ offrampError,
16316
+ submitLabel,
16317
+ submitDisabled,
16318
+ onSubmit,
16319
+ onBack,
16320
+ className,
16321
+ // Simple-specific props
16322
+ activeTab,
16323
+ cryptoHref,
16324
+ pixHref,
16325
+ onPercentageSelect,
16326
+ maxLabel,
16327
+ onClose
16328
+ }) => {
16329
+ const [pixKeyType, setPixKeyType] = React6__default.useState(() => {
16330
+ if (typeof window === "undefined") return "cpf";
16331
+ return localStorage.getItem(STORAGE_KEY) || "cpf";
16332
+ });
16333
+ function handlePixKeyTypeChange(type) {
16334
+ setPixKeyType(type);
16335
+ localStorage.setItem(STORAGE_KEY, type);
16336
+ }
16337
+ const [cardHovered, setCardHovered] = React6__default.useState(false);
16338
+ const hideTimerRef = React6__default.useRef(void 0);
16339
+ function handleHoverStart() {
16340
+ clearTimeout(hideTimerRef.current);
16341
+ setCardHovered(true);
16342
+ }
16343
+ function handleHoverEnd() {
16344
+ hideTimerRef.current = setTimeout(() => setCardHovered(false), 150);
16345
+ }
16346
+ React6__default.useEffect(() => () => clearTimeout(hideTimerRef.current), []);
16347
+ const hasAmountError = !!amountWarningMessage;
16348
+ const hasPixKeyError = !!error || !!offrampError;
16349
+ const isSubmitDisabledInternal = submitDisabled || !amount || amount === "0" || !pixKey.trim();
16350
+ const panelBaseClasses = [
16351
+ "relative flex flex-col overflow-hidden w-[420px]",
16352
+ "rounded-[var(--deframe-widget-size-radius-md)]",
16353
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
16354
+ "font-[var(--deframe-widget-font-family)]"
16355
+ ].join(" ");
16356
+ const headerBaseClasses = [
16357
+ "flex items-center",
16358
+ "px-[var(--deframe-widget-size-padding-x-md)]",
16359
+ "py-[var(--deframe-widget-size-padding-y-md)]"
16360
+ ].join(" ");
16361
+ const titleBaseClasses = [
16362
+ "flex-1",
16363
+ "text-[15px]",
16364
+ "[font-weight:var(--deframe-widget-font-weight-semibold)]",
16365
+ "text-[color:var(--deframe-widget-color-text-primary)]"
16366
+ ].join(" ");
16367
+ const dividerClasses = "h-px bg-[var(--deframe-widget-color-border-secondary)]";
16368
+ const bodyBaseClasses = [
16369
+ "flex flex-col",
16370
+ "gap-[var(--deframe-widget-size-gap-md)]",
16371
+ "px-[var(--deframe-widget-size-padding-x-md)]",
16372
+ "py-[var(--deframe-widget-size-padding-y-md)]"
16373
+ ].join(" ");
16374
+ const amountCardClasses = twMerge(
16375
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
16376
+ "border",
16377
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
16378
+ "transition-[border-color,background] duration-200",
16379
+ 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)]"
16380
+ );
16381
+ const pixKeyCardClasses = twMerge(
16382
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
16383
+ "border",
16384
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
16385
+ "transition-[border-color,background] duration-200",
16386
+ 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)]"
16387
+ );
16388
+ const footerBaseClasses = [
16389
+ "flex gap-[var(--deframe-widget-size-gap-sm)]",
16390
+ "px-[var(--deframe-widget-size-padding-x-md)]",
16391
+ "pb-[var(--deframe-widget-size-padding-y-md)]"
16392
+ ].join(" ");
16393
+ const cancelButtonClasses = [
16394
+ "flex-1 h-12 rounded-[var(--deframe-widget-size-radius-sm)]",
16395
+ "text-[15px] text-[color:var(--deframe-widget-color-text-secondary)]",
16396
+ "border-[color:var(--deframe-widget-color-border-secondary)]",
16397
+ "outline-none",
16398
+ "transition-[background,color,border-color] duration-150",
16399
+ "hover:opacity-100",
16400
+ "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]",
16401
+ "hover:text-[color:var(--deframe-widget-color-text-primary)]"
16402
+ ].join(" ");
16403
+ const submitButtonClasses = [
16404
+ "flex-1 h-12 rounded-[var(--deframe-widget-size-radius-sm)]",
16405
+ "border-none",
16406
+ "text-[15px]",
16407
+ isSubmitDisabledInternal ? "text-[color:var(--deframe-widget-color-text-primary-disabled)]" : "text-[color:var(--deframe-widget-color-text-primary-dark)]",
16408
+ "outline-none",
16409
+ "transition-[background,color] duration-200"
16410
+ ].join(" ");
16411
+ return /* @__PURE__ */ jsxs(
16412
+ "div",
16413
+ {
16414
+ "data-slot": "offramp-input-form-simple-panel",
16415
+ "data-test-id": "offramp-input-form-simple-view",
16416
+ className: twMerge(panelBaseClasses, className),
16417
+ children: [
16418
+ /* @__PURE__ */ jsxs(
16419
+ "header",
16420
+ {
16421
+ "data-slot": "offramp-input-form-simple-header",
16422
+ "data-test-id": "offramp-input-form-simple-view-header",
16423
+ className: headerBaseClasses,
16424
+ children: [
16425
+ /* @__PURE__ */ jsx(
16426
+ "span",
16427
+ {
16428
+ "data-slot": "offramp-input-form-simple-title",
16429
+ "data-test-id": "offramp-input-form-simple-view-title",
16430
+ className: titleBaseClasses,
16431
+ children: "Sacar"
16432
+ }
16433
+ ),
16434
+ onClose && /* @__PURE__ */ jsx(
16435
+ CloseButton_default,
16436
+ {
16437
+ onClick: onClose,
16438
+ ariaLabel: "Close withdrawal panel",
16439
+ testId: "offramp-input-form-simple-view-close"
16440
+ }
16441
+ )
16442
+ ]
16443
+ }
16444
+ ),
16445
+ /* @__PURE__ */ jsx(
16446
+ "div",
16447
+ {
16448
+ "data-slot": "offramp-input-form-simple-divider",
16449
+ "data-test-id": "offramp-input-form-simple-view-divider",
16450
+ className: dividerClasses
16451
+ }
16452
+ ),
16453
+ /* @__PURE__ */ jsx(
16454
+ FlowTabHeader,
16455
+ {
16456
+ activeTab: activeTab != null ? activeTab : "pix",
16457
+ cryptoHref: cryptoHref != null ? cryptoHref : "/dashboard/withdraw/onchain",
16458
+ pixHref: pixHref != null ? pixHref : "/dashboard/withdraw/offramp"
16459
+ }
16460
+ ),
16461
+ /* @__PURE__ */ jsx(
16462
+ "div",
16463
+ {
16464
+ "data-slot": "offramp-input-form-simple-divider-tabs",
16465
+ "data-test-id": "offramp-input-form-simple-view-divider-tabs",
16466
+ className: dividerClasses
16467
+ }
16468
+ ),
16469
+ /* @__PURE__ */ jsxs(
16470
+ "div",
16471
+ {
16472
+ "data-slot": "offramp-input-form-simple-body",
16473
+ "data-test-id": "offramp-input-form-simple-view-body",
16474
+ className: bodyBaseClasses,
16475
+ children: [
16476
+ /* @__PURE__ */ jsxs(
16477
+ "div",
16478
+ {
16479
+ "data-slot": "offramp-input-form-simple-amount-card",
16480
+ "data-test-id": "offramp-input-form-simple-view-amount-card",
16481
+ onMouseEnter: handleHoverStart,
16482
+ onMouseLeave: handleHoverEnd,
16483
+ className: amountCardClasses,
16484
+ children: [
16485
+ /* @__PURE__ */ jsxs(
16486
+ "div",
16487
+ {
16488
+ "data-slot": "offramp-input-form-simple-amount-top-row",
16489
+ "data-test-id": "offramp-input-form-simple-view-amount-top-row",
16490
+ className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
16491
+ children: [
16492
+ /* @__PURE__ */ jsx(
16493
+ "span",
16494
+ {
16495
+ "data-test-id": "offramp-input-form-simple-view-currency-prefix",
16496
+ 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)]",
16497
+ children: "R$"
16498
+ }
16499
+ ),
16500
+ /* @__PURE__ */ jsx(
16501
+ "div",
16502
+ {
16503
+ "data-test-id": "offramp-input-form-simple-view-input-divider",
16504
+ className: "w-px h-10 bg-[var(--deframe-widget-color-border-secondary)] flex-shrink-0"
16505
+ }
16506
+ ),
16507
+ /* @__PURE__ */ jsx(
16508
+ EarnAmountInputSimpleView,
16509
+ {
16510
+ value: amount,
16511
+ onChange: (e) => onAmountChange(e.target.value),
16512
+ ariaLabel: "Valor do saque",
16513
+ dollarAmountFormatted: ""
16514
+ }
16515
+ )
16516
+ ]
16517
+ }
16518
+ ),
16519
+ /* @__PURE__ */ jsx(
16520
+ "div",
16521
+ {
16522
+ "data-slot": "offramp-input-form-simple-balance-row",
16523
+ "data-test-id": "offramp-input-form-simple-view-balance-row",
16524
+ className: "mt-[var(--deframe-widget-size-gap-sm)]",
16525
+ children: /* @__PURE__ */ jsxs(
16526
+ "span",
16527
+ {
16528
+ className: twMerge(
16529
+ "text-[13px] font-[var(--deframe-widget-font-family)]",
16530
+ hasAmountError ? "text-[color:var(--deframe-widget-color-state-error)]" : "text-[color:var(--deframe-widget-color-text-secondary)]"
16531
+ ),
16532
+ children: [
16533
+ "Saldo: ",
16534
+ brlaBalance,
16535
+ " BRLA"
16536
+ ]
16537
+ }
16538
+ )
16539
+ }
16540
+ ),
16541
+ /* @__PURE__ */ jsx(AnimatePresence, { children: onPercentageSelect && cardHovered && /* @__PURE__ */ jsx(
16542
+ motion.div,
16543
+ {
16544
+ "data-slot": "offramp-input-form-simple-chips-row",
16545
+ "data-test-id": "offramp-input-form-simple-view-chips-row",
16546
+ initial: { opacity: 0, height: 0, marginTop: 0 },
16547
+ animate: { opacity: 1, height: "auto", marginTop: "var(--deframe-widget-size-gap-sm)" },
16548
+ exit: { opacity: 0, height: 0, marginTop: 0 },
16549
+ transition: { duration: 0.15, ease: "easeOut" },
16550
+ style: { overflow: "hidden" },
16551
+ onMouseEnter: handleHoverStart,
16552
+ onMouseLeave: handleHoverEnd,
16553
+ children: /* @__PURE__ */ jsx(
16554
+ EarnPercentageButtonsSimpleView,
16555
+ {
16556
+ onPercentageClick: onPercentageSelect,
16557
+ maxLabel: maxLabel != null ? maxLabel : "M\xE1x."
16558
+ }
16559
+ )
16560
+ }
16561
+ ) }),
16562
+ amountWarningMessage && /* @__PURE__ */ jsx("div", { className: "mt-[var(--deframe-widget-size-gap-sm)]", children: /* @__PURE__ */ jsx(
16563
+ EarnInlineNotificationSimpleView,
16564
+ {
16565
+ variant: "error",
16566
+ message: amountWarningMessage
16567
+ }
16568
+ ) })
16569
+ ]
16570
+ }
16571
+ ),
16572
+ /* @__PURE__ */ jsxs(
16573
+ "div",
16574
+ {
16575
+ "data-slot": "offramp-input-form-simple-pix-key-card",
16576
+ "data-test-id": "offramp-input-form-simple-view-pix-key-card",
16577
+ className: pixKeyCardClasses,
16578
+ children: [
16579
+ /* @__PURE__ */ jsx(
16580
+ PixKeySegmentedControl,
16581
+ {
16582
+ value: pixKeyType,
16583
+ onChange: handlePixKeyTypeChange
16584
+ }
16585
+ ),
16586
+ /* @__PURE__ */ jsx(
16587
+ "div",
16588
+ {
16589
+ "data-slot": "offramp-input-form-simple-pix-divider",
16590
+ "data-test-id": "offramp-input-form-simple-view-pix-divider",
16591
+ className: "h-px bg-[var(--deframe-widget-color-border-secondary)] my-[var(--deframe-widget-size-gap-sm)]"
16592
+ }
16593
+ ),
16594
+ /* @__PURE__ */ jsx(
16595
+ "input",
16596
+ {
16597
+ "data-slot": "offramp-input-form-simple-pix-input",
16598
+ "data-test-id": "offramp-input-form-simple-view-pix-input",
16599
+ type: "text",
16600
+ value: pixKey,
16601
+ onChange: (e) => onPixKeyChange(e.target.value),
16602
+ placeholder: PIX_PLACEHOLDERS[pixKeyType],
16603
+ "aria-label": "Chave PIX",
16604
+ className: twMerge(
16605
+ "w-full bg-transparent outline-none",
16606
+ "text-[13px] [font-weight:var(--deframe-widget-font-weight-regular)]",
16607
+ "font-[var(--deframe-widget-font-family)]",
16608
+ "placeholder:text-[color:var(--deframe-widget-color-text-tertiary)]",
16609
+ "text-[color:var(--deframe-widget-color-text-primary)]",
16610
+ '[font-feature-settings:"tnum"]'
16611
+ ),
16612
+ spellCheck: false,
16613
+ autoComplete: "off"
16614
+ }
16615
+ ),
16616
+ (error || offrampError) && /* @__PURE__ */ jsx("div", { className: "mt-[var(--deframe-widget-size-gap-sm)]", children: /* @__PURE__ */ jsx(
16617
+ EarnInlineNotificationSimpleView,
16618
+ {
16619
+ variant: "error",
16620
+ message: error || offrampError || ""
16621
+ }
16622
+ ) })
16623
+ ]
16624
+ }
16625
+ ),
16626
+ /* @__PURE__ */ jsx(
16627
+ EarnInlineNotificationSimpleView,
16628
+ {
16629
+ variant: "info",
16630
+ message: "A chave PIX deve estar vinculada ao mesmo CPF do seu cadastro."
16631
+ }
16632
+ ),
16633
+ hasActiveWithdrawal && /* @__PURE__ */ jsx(
16634
+ EarnInlineNotificationSimpleView,
16635
+ {
16636
+ variant: "warning",
16637
+ message: "Voc\xEA j\xE1 possui um saque em andamento."
16638
+ }
16639
+ ),
16640
+ completedBanner && /* @__PURE__ */ jsx(
16641
+ EarnInlineNotificationSimpleView,
16642
+ {
16643
+ variant: "success",
16644
+ message: completedBanner
16645
+ }
16646
+ )
16647
+ ]
16648
+ }
16649
+ ),
16650
+ /* @__PURE__ */ jsxs(
16651
+ "footer",
16652
+ {
16653
+ "data-slot": "offramp-input-form-simple-footer",
16654
+ "data-test-id": "offramp-input-form-simple-view-footer",
16655
+ className: footerBaseClasses,
16656
+ children: [
16657
+ /* @__PURE__ */ jsx(
16658
+ SecondaryButton,
16659
+ {
16660
+ type: "button",
16661
+ className: cancelButtonClasses,
16662
+ onClick: onBack,
16663
+ "aria-label": "Cancel withdrawal",
16664
+ "data-test-id": "offramp-input-form-simple-view-cancel",
16665
+ children: "Cancelar"
16666
+ }
16667
+ ),
16668
+ /* @__PURE__ */ jsx(
16669
+ PrimaryButton,
16670
+ {
16671
+ type: "button",
16672
+ className: submitButtonClasses,
16673
+ disabled: isSubmitDisabledInternal,
16674
+ onClick: onSubmit,
16675
+ "aria-label": "Confirmar saque",
16676
+ "data-test-id": "offramp-input-form-simple-view-submit",
16677
+ children: submitLabel
16678
+ }
16679
+ )
16680
+ ]
16681
+ }
16682
+ )
16683
+ ]
16684
+ }
16685
+ );
16686
+ };
16687
+ function ExplorerLink2({ href, label, className }) {
16688
+ return /* @__PURE__ */ jsx(
16689
+ "a",
16690
+ {
16691
+ "data-test-id": "explorer-link",
16692
+ href,
16693
+ target: "_blank",
16694
+ rel: "noopener noreferrer",
16695
+ "aria-label": label || "View on explorer",
16696
+ className: twMerge(
16697
+ "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)]",
16698
+ className
16699
+ ),
16700
+ children: label || href
16701
+ }
16702
+ );
16703
+ }
16704
+ function StepStatusIcon2({ status = "completed" }) {
16705
+ switch (status) {
16706
+ case "completed":
16707
+ return /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-full bg-[var(--deframe-widget-color-bg-secondary)] flex items-center justify-center", children: /* @__PURE__ */ 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__ */ jsx("polyline", { points: "20 6 9 17 4 12" }) }) });
16708
+ case "pending":
16709
+ return /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-full bg-[var(--deframe-widget-color-bg-secondary)] flex items-center justify-center", children: /* @__PURE__ */ 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: [
16710
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
16711
+ /* @__PURE__ */ jsx("polyline", { points: "12 6 12 12 16 14" })
16712
+ ] }) });
16713
+ case "failed":
16714
+ return /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-full bg-[var(--deframe-widget-color-bg-secondary)] flex items-center justify-center", children: /* @__PURE__ */ 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: [
16715
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
16716
+ /* @__PURE__ */ jsx("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
16717
+ /* @__PURE__ */ jsx("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
16718
+ ] }) });
16719
+ }
16720
+ }
16721
+ function StepDisplay2({ step }) {
16722
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4 w-full", children: [
16723
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-primary)] flex-1", children: step.description }),
16724
+ step.explorerUrl && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx(ExplorerLink2, { href: step.explorerUrl, label: "Ver no Explorer", className: "text-[length:var(--deframe-widget-font-size-xs)] whitespace-nowrap" }) })
16725
+ ] });
16726
+ }
16727
+ function PixOfframpProcessingDetails({ breakdown, estimatedTime, className }) {
16728
+ if (!breakdown || breakdown.length === 0) {
16729
+ return null;
16730
+ }
16731
+ const getProcessingSteps = () => {
16732
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col w-full", children: [
16733
+ estimatedTime && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between pb-3 text-[length:var(--deframe-widget-font-size-sm)]", children: [
16734
+ /* @__PURE__ */ jsx("span", { className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: "Tempo estimado" }),
16735
+ /* @__PURE__ */ jsx("span", { className: "font-[var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)]", children: estimatedTime })
16736
+ ] }),
16737
+ breakdown.map((step, index) => /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
16738
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
16739
+ /* @__PURE__ */ jsx(StepStatusIcon2, { status: step.status }),
16740
+ index < breakdown.length - 1 && /* @__PURE__ */ jsx("div", { className: "w-px flex-1 min-h-[10px] bg-[var(--deframe-widget-color-bg-primary)] my-2" })
16741
+ ] }),
16742
+ /* @__PURE__ */ jsx("div", { className: "flex-1 pb-3", children: /* @__PURE__ */ jsx(StepDisplay2, { step }) })
16743
+ ] }, `step-${index}`))
16744
+ ] });
16745
+ };
16746
+ const items = [
16747
+ {
16748
+ label: "",
16749
+ value: getProcessingSteps(),
16750
+ valueClassName: "flex flex-col gap-3 w-full"
16751
+ }
16752
+ ];
16753
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "pix-offramp-processing-details", children: /* @__PURE__ */ jsx(
16754
+ SummaryDetails,
16755
+ {
16756
+ title: "Detalhes",
16757
+ items,
16758
+ defaultOpen: true,
16759
+ className: `bg-[var(--deframe-widget-color-bg-secondary)] ${className || ""}`
16760
+ }
16761
+ ) });
16762
+ }
16763
+ var defaultCloseIcon = /* @__PURE__ */ 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__ */ jsx("path", { d: "M18 6L6 18M6 6l12 12" }) });
16764
+ function OfframpProcessingView({
16765
+ step = "creating_ticket",
16766
+ amount = "0",
16767
+ summaryTitle = "",
16768
+ summaryItems = [],
16769
+ transferTxHash,
16770
+ onClose,
16771
+ closeIcon,
16772
+ tokenIconUrl = "/brladigital_32.webp",
16773
+ className
16774
+ }) {
16775
+ const progressPercent = step === "creating_ticket" ? 50 : step === "transferring" ? 75 : 85;
16776
+ const prepareStatus = step === "creating_ticket" ? "processing" : "done";
16777
+ const signatureStatus = step === "waiting_pix" ? "done" : step === "transferring" ? "processing" : "pending";
16778
+ const sendStatus = "pending";
16779
+ const mapStatus = (status) => {
16780
+ if (status === "done") return "completed";
16781
+ return "pending";
16782
+ };
16783
+ return /* @__PURE__ */ jsxs(
16784
+ "div",
16785
+ {
16786
+ className: twMerge(
16787
+ "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",
16788
+ className
16789
+ ),
16790
+ "data-test-id": "offramp-processing-view",
16791
+ children: [
16792
+ /* @__PURE__ */ jsxs("div", { className: "mb-6", children: [
16793
+ /* @__PURE__ */ jsx(
16794
+ "button",
16795
+ {
16796
+ onClick: onClose,
16797
+ 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",
16798
+ "aria-label": "Fechar",
16799
+ "data-test-id": "offramp-processing-close-button",
16800
+ children: closeIcon || defaultCloseIcon
16801
+ }
16802
+ ),
16803
+ /* @__PURE__ */ jsx("div", { className: "w-full h-1 bg-[var(--deframe-widget-color-border-secondary)] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "h-full bg-[#1FC16B] transition-all duration-300", style: { width: `${progressPercent}%` } }) })
16804
+ ] }),
16805
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col items-start justify-start gap-6", children: /* @__PURE__ */ jsxs("div", { className: "w-full space-y-6", children: [
16806
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center text-center space-y-4", children: [
16807
+ /* @__PURE__ */ jsx("div", { className: "w-20 h-20 bg-[#F6A700] rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx("svg", { className: "w-10 h-10 animate-pulse", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ 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" }) }) }),
16808
+ /* @__PURE__ */ jsxs("div", { children: [
16809
+ /* @__PURE__ */ jsxs(TextHeading, { variant: "h3", className: "mb-2 flex items-center justify-center gap-1", children: [
16810
+ "Estamos enviando seu PIX",
16811
+ /* @__PURE__ */ jsxs("span", { className: "flex gap-0.5", children: [
16812
+ /* @__PURE__ */ jsx("span", { className: "animate-bounce", style: { animationDelay: "0ms", animationDuration: "1.4s" }, children: "." }),
16813
+ /* @__PURE__ */ jsx("span", { className: "animate-bounce", style: { animationDelay: "200ms", animationDuration: "1.4s" }, children: "." }),
16814
+ /* @__PURE__ */ jsx("span", { className: "animate-bounce", style: { animationDelay: "400ms", animationDuration: "1.4s" }, children: "." })
16815
+ ] })
16816
+ ] }),
16817
+ /* @__PURE__ */ 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." })
16818
+ ] })
16819
+ ] }),
16820
+ /* @__PURE__ */ jsxs(ListItem, { children: [
16821
+ /* @__PURE__ */ jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsx(
16822
+ "img",
16823
+ {
16824
+ src: tokenIconUrl,
16825
+ alt: "Token",
16826
+ className: "w-10 h-10 rounded-full"
16827
+ }
16828
+ ) }),
16829
+ /* @__PURE__ */ jsxs(ListItemContent, { className: "ml-4", children: [
16830
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] ml-2", children: "Voc\xEA sacou via PIX" }),
16831
+ /* @__PURE__ */ jsxs(TextHeading, { variant: "h5", className: "ml-2", children: [
16832
+ amount,
16833
+ " BRLA"
16834
+ ] })
16835
+ ] })
16836
+ ] }),
16837
+ /* @__PURE__ */ jsx(
16838
+ SummaryDetails,
16839
+ {
16840
+ title: summaryTitle,
16841
+ items: summaryItems,
16842
+ className: "bg-[var(--deframe-widget-color-bg-secondary)]"
16843
+ }
16844
+ ),
16845
+ /* @__PURE__ */ jsx(
16846
+ PixOfframpProcessingDetails,
16847
+ {
16848
+ estimatedTime: "~2-5 min",
16849
+ breakdown: [
16850
+ {
16851
+ type: "prepare_withdrawal",
16852
+ description: "Preparando seu saque",
16853
+ status: mapStatus(prepareStatus)
16854
+ },
16855
+ {
16856
+ type: "blockchain_signature",
16857
+ description: "Assinatura",
16858
+ status: mapStatus(signatureStatus),
16859
+ explorerUrl: transferTxHash ? `https://polygonscan.com/tx/${transferTxHash}` : void 0
16860
+ },
16861
+ {
16862
+ type: "pix_transfer",
16863
+ description: "Enviando PIX para sua conta",
16864
+ status: mapStatus(sendStatus)
16865
+ }
16866
+ ]
16867
+ }
16868
+ ),
16869
+ /* @__PURE__ */ jsx("div", { className: "w-full space-y-3", children: /* @__PURE__ */ jsxs(PrimaryButton, { disabled: true, "aria-label": "Aguarde processamento", children: [
16870
+ "Aguarde ",
16871
+ /* @__PURE__ */ jsx(LoadingDots, {})
16872
+ ] }) })
16873
+ ] }) })
16874
+ ]
16875
+ }
16876
+ );
16877
+ }
16878
+ var OfframpProcessingSimpleView = () => {
16879
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "offramp-processing-simple-view", children: /* @__PURE__ */ jsx(
16880
+ EarnFeedbackOverlaySimpleView,
16881
+ {
16882
+ variant: "loading",
16883
+ title: "PROCESSANDO SAQUE...",
16884
+ subtitle: "Seu PIX est\xE1 sendo enviado. Aguarde alguns instantes."
16885
+ }
16886
+ ) });
16887
+ };
16888
+ function Card({ children, className }) {
16889
+ return /* @__PURE__ */ jsx(
16890
+ "div",
16891
+ {
16892
+ "data-test-id": "card",
16893
+ className: twMerge(
16894
+ "bg-[var(--deframe-widget-color-bg-secondary)] rounded-[var(--deframe-widget-size-radius-sm)] shadow-sm",
16895
+ className
16896
+ ),
16897
+ children
16898
+ }
16899
+ );
16900
+ }
16901
+ var defaultCloseIcon2 = /* @__PURE__ */ 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__ */ jsx("path", { d: "M18 6L6 18M6 6l12 12" }) });
16902
+ var defaultArrowUpIcon = /* @__PURE__ */ 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__ */ jsx("path", { d: "M12 19V5M5 12l7-7 7 7" }) });
16903
+ function TransactionIdDisplay({ transactionId }) {
16904
+ const truncated = transactionId.length > 16 ? `${transactionId.slice(0, 8)}...${transactionId.slice(-6)}` : transactionId;
16905
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
16906
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "font-mono text-[color:var(--deframe-widget-color-text-primary)] leading-5", children: truncated }),
16907
+ /* @__PURE__ */ jsx(
16908
+ AddressDisplay,
16909
+ {
16910
+ address: transactionId,
16911
+ className: "border-none bg-transparent p-0 gap-0",
16912
+ textClassName: "hidden"
16913
+ }
16914
+ )
16915
+ ] });
16916
+ }
16917
+ function OfframpSuccessView({
16918
+ amount = "0",
16919
+ feesFormatted = "0",
16920
+ transactionId,
16921
+ date = "",
16922
+ onClose,
16923
+ onConfirm,
16924
+ closeIcon,
16925
+ arrowUpIcon,
16926
+ tokenIconUrl = "/brladigital_32.webp",
16927
+ className
16928
+ }) {
16929
+ return /* @__PURE__ */ jsxs(
16930
+ "div",
16931
+ {
16932
+ className: twMerge(
16933
+ "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",
16934
+ className
16935
+ ),
16936
+ "data-test-id": "offramp-success-view",
16937
+ children: [
16938
+ /* @__PURE__ */ jsxs("div", { className: "mb-6", children: [
16939
+ /* @__PURE__ */ jsx(
16940
+ "button",
16941
+ {
16942
+ onClick: onClose,
16943
+ 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",
16944
+ "aria-label": "Fechar",
16945
+ "data-test-id": "offramp-success-close-button",
16946
+ children: closeIcon || defaultCloseIcon2
16947
+ }
16948
+ ),
16949
+ /* @__PURE__ */ jsx("div", { className: "w-full h-1 bg-[#1FC16B] rounded-full" })
16950
+ ] }),
16951
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col items-start justify-start gap-6", children: /* @__PURE__ */ jsxs("div", { className: "w-full space-y-6", children: [
16952
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center text-center space-y-4", children: [
16953
+ /* @__PURE__ */ jsx("div", { className: "w-20 h-20 bg-[#1FC16B]/20 rounded-full flex items-center justify-center", children: arrowUpIcon || defaultArrowUpIcon }),
16954
+ /* @__PURE__ */ jsxs("div", { children: [
16955
+ /* @__PURE__ */ jsx(TextHeading, { variant: "h3", className: "mb-2", children: "PIX enviado com sucesso!" }),
16956
+ /* @__PURE__ */ 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." })
16957
+ ] })
16958
+ ] }),
16959
+ /* @__PURE__ */ jsxs(ListItem, { children: [
16960
+ /* @__PURE__ */ jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsx("img", { src: tokenIconUrl, alt: "Token", className: "w-10 h-10 rounded-full" }) }),
16961
+ /* @__PURE__ */ jsxs(ListItemContent, { className: "ml-4", children: [
16962
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] ml-2", children: "Voc\xEA sacou via PIX" }),
16963
+ /* @__PURE__ */ jsxs(TextHeading, { variant: "h5", className: "ml-2", children: [
16964
+ amount,
16965
+ " BRLA"
16966
+ ] })
16967
+ ] })
16968
+ ] }),
16969
+ /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx("div", { className: "p-4 w-full inline-flex flex-col justify-start items-center gap-2 overflow-hidden", children: /* @__PURE__ */ jsxs("div", { className: "w-full flex flex-col justify-start items-start gap-2", children: [
16970
+ /* @__PURE__ */ jsxs("div", { className: "self-stretch h-6 border-b border-[var(--deframe-widget-color-border-secondary)] inline-flex justify-between items-start", children: [
16971
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] leading-5", children: "Valor do saque" }),
16972
+ /* @__PURE__ */ jsxs(TextBody, { variant: "text-small", className: "font-[var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] leading-5", children: [
16973
+ amount,
16974
+ " BRLA"
16975
+ ] })
16976
+ ] }),
16977
+ /* @__PURE__ */ jsxs("div", { className: "self-stretch h-6 border-b border-[var(--deframe-widget-color-border-secondary)] inline-flex justify-between items-start", children: [
16978
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] leading-5", children: "Taxa" }),
16979
+ /* @__PURE__ */ 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 })
16980
+ ] }),
16981
+ /* @__PURE__ */ jsxs("div", { className: "self-stretch h-6 border-b border-[var(--deframe-widget-color-border-secondary)] inline-flex justify-between items-start", children: [
16982
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] leading-5", children: "Metodo" }),
16983
+ /* @__PURE__ */ 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)" })
16984
+ ] }),
16985
+ /* @__PURE__ */ jsxs("div", { className: "self-stretch h-8 border-b border-[var(--deframe-widget-color-border-secondary)] inline-flex justify-between items-start", children: [
16986
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] leading-5", children: "Status" }),
16987
+ /* @__PURE__ */ jsxs("div", { className: "px-2 py-0.5 bg-[#1FC16B]/10 rounded-3xl flex justify-end items-center gap-2", children: [
16988
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-primary)] leading-5", children: "Sucesso" }),
16989
+ /* @__PURE__ */ jsx("div", { className: "w-2 h-2 bg-teal-600 rounded-full" })
16990
+ ] })
16991
+ ] }),
16992
+ /* @__PURE__ */ jsxs("div", { className: "self-stretch h-6 border-b border-[var(--deframe-widget-color-border-secondary)] inline-flex justify-between items-start", children: [
16993
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] leading-5", children: "ID da Transa\xE7\xE3o" }),
16994
+ /* @__PURE__ */ jsx("div", { className: "flex justify-start items-center gap-2", children: transactionId ? /* @__PURE__ */ jsx(TransactionIdDisplay, { transactionId }) : /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-primary)] leading-5", children: "-" }) })
16995
+ ] }),
16996
+ /* @__PURE__ */ jsxs("div", { className: "self-stretch h-6 border-b border-[var(--deframe-widget-color-border-secondary)] inline-flex justify-between items-start", children: [
16997
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] leading-5", children: "Data" }),
16998
+ /* @__PURE__ */ 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 })
16999
+ ] })
17000
+ ] }) }) }),
17001
+ /* @__PURE__ */ jsx(
17002
+ PrimaryButton,
17003
+ {
17004
+ onClick: onConfirm,
17005
+ "aria-label": "Confirmar",
17006
+ "data-test-id": "offramp-success-confirm-button",
17007
+ children: "Ok, obrigado"
17008
+ }
17009
+ )
17010
+ ] }) })
17011
+ ]
17012
+ }
17013
+ );
17014
+ }
17015
+ var OfframpSuccessSimpleView = ({
17016
+ onClose
17017
+ }) => {
17018
+ React6.useEffect(() => {
17019
+ if (!onClose) return;
17020
+ const timer = setTimeout(onClose, 5e3);
17021
+ return () => clearTimeout(timer);
17022
+ }, [onClose]);
17023
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "offramp-success-simple-view", children: /* @__PURE__ */ jsx(
17024
+ EarnFeedbackOverlaySimpleView,
17025
+ {
17026
+ variant: "success",
17027
+ title: "PIX Enviado com Sucesso!",
17028
+ subtitle: "Seu saque foi conclu\xEDdo e o valor j\xE1 est\xE1 na sua conta."
17029
+ }
17030
+ ) });
17031
+ };
17032
+ var OfframpFailedSimpleView = () => {
17033
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "offramp-failed-simple-view", children: /* @__PURE__ */ jsx(
17034
+ EarnFeedbackOverlaySimpleView,
17035
+ {
17036
+ variant: "error",
17037
+ title: "Saque Falhou",
17038
+ subtitle: "Ocorreu um erro ao processar seu saque. Tente novamente."
17039
+ }
17040
+ ) });
17041
+ };
15079
17042
  var DashboardCard = ({ children, className }) => {
15080
17043
  return /* @__PURE__ */ jsx("div", { "data-test-id": "dashboard-card", className: twMerge("bg-[var(--deframe-widget-color-bg-subtle)] rounded", className), children });
15081
17044
  };
@@ -16361,6 +18324,6 @@ var DashboardViewSimple = ({
16361
18324
  );
16362
18325
  };
16363
18326
 
16364
- export { ActionButton, ActionSheet, AddressDisplay, ApyRange, BackButton, BackgroundContainer, BannerNotification, Chip, ChipGroup, ChoiceCard, ChooseANetworkView, ChooseAStrategyActionsheetView, ChooseAnAssetSwapView, ChooseNetworkAndAssetViewSimple, CloseButton_default as CloseButton, CollapsibleInfoRow, CollapsibleSection, ConfirmSwapButtonView, ConfirmSwapButtonViewSimple, ConnectWalletList, Currency, DashboardBalancesBreakdown, DashboardCard, DashboardInvestmentOpportunitiesView, DashboardPortfolioView, DashboardPortfolioViewSimple, DashboardRecentTransactionsView, DashboardRecentTransactionsViewSimple, DashboardStrategiesListView, DashboardTokenListView, DashboardTokensView, DashboardTokensViewSimple, DashboardTransactionsPlaceholder, DashboardView, DashboardViewSimple, DeframeComponentsProvider, DepositSuccessIcon, DetailsHeader, EarnAmountInputView, EarnBalanceCard, EarnBytecodeErrorView, EarnDepositFailedSimpleView, EarnDepositFailedView, EarnDepositFormView, EarnDepositFormViewSimple, EarnDepositProcessingSimpleView, EarnDepositProcessingView, EarnDepositSuccessSimpleView, EarnDepositSuccessView, EarnDepositWarningSimpleView, EarnDepositWarningView, EarnDesktopView, EarnDesktopViewSimple, EarnExploreGridView, EarnFlowSkeletonSimple, EarnInvestedSectionView, EarnInvestmentDetailsView, EarnInvestmentSummaryView, EarnNoBalanceNotificationView, EarnOverviewView, EarnPercentageButtonsView, EarnPositionCardView, EarnRecentTransactionsView, EarnTokenSelectorView, EarnTxStatusCardView, EarnWithdrawFailedSimpleView, EarnWithdrawFailedView, EarnWithdrawFormView, EarnWithdrawFormViewSimple, EarnWithdrawProcessingSimpleView, EarnWithdrawProcessingView, EarnWithdrawSuccessSimpleView, EarnWithdrawSuccessView, EarnWithdrawTokenSelectorView, EarnWithdrawWarningSimpleView, EarnWithdrawWarningView, Currency as Fiat, FlexCol, FlexRow, GroupedStrategyListView, HighRiskBadge, HistoryDepositDetailsView, HistoryListSkeleton, HistoryListView, HistorySwapDetailsView, HistoryTabEmpty, HistoryWithdrawDetailsView, InfoLabel, InfoRow, InfoRowIconLabel, InfoRowIconValue, InfoRowWithIcon, InfoValue, Input2 as Input, InputField, InputLabel, Input as InputRoot, InvestmentCrossChainProcessingView, KYCActionRow, KYCAddressPage, KYCBasicDataPage, KYCChecklistCard, KYCChecklistItem, KYCDataCard, KYCDocumentPage, KYCEditPage, KYCFieldMessage, KYCFormPage, KYCInfoRow, KYCIntroPage, KYCLoadingPage, KYCMessageBanner, KYCPageHeader, KYCPageSection, KYCPageShell, KYCReviewPage, KYCReviewPageSkeleton, KYCStatusItemCard, KYCStatusPage, KYCStatusPanel, KYCStepIndicator, Label, Link, ListItem, ListItemContent, ListItemLeftSide, ListItemRightSide, LoadingDots, LowRiskBadge, MediumRiskBadge, Navbar, OnchainDepositFormSimpleView, OnchainDepositFormView, OnchainDepositSuccessSimpleView, OnchainDepositSuccessView, OnchainWithdrawChainSelectorView, OnchainWithdrawFailedView, OnchainWithdrawFormSimpleView, OnchainWithdrawFormView, OnchainWithdrawProcessingSimpleView, OnchainWithdrawSignatureWarningSimpleView, OnchainWithdrawSignatureWarningView, OnchainWithdrawSuccessView, PercentageButton, PrimaryButton, ProcessingBadge, ProgressIndicator, ScrollableContent, SearchEmptyState, SearchInput, SecondaryButton, SectionCard, Select, SelectContent, SelectItem, SelectTrigger, Skeleton, StepDisplay, StepStatusIcon, StepStatusText, StrategyDetailsView, StrategyGridCard, SummaryDetails, SummaryDetailsCryptoControlV2, SwapAdvancedSettingsView, SwapAmountInputView, SwapCrossChainProcessingView, SwapFormView, SwapFormViewSimple, SwapFromCardView, SwapFromCardViewSimple, SwapHistoryView, SwapProcessingView, SwapProcessingViewSimple, SwapQuoteDetailsView, SwapSignatureWarningView, SwapSignatureWarningViewSimple, SwapSuccessView, SwapSuccessViewSimple, SwapToCardView, SwapToCardViewSimple, SwapTransactionFailedView, SwapTransactionFailedViewSimple, SwapWidgetFallbackView, Tabs, TabsContent, TabsList, TabsTrigger, TertiaryButton, Text_default as Text, TextAccent, TextBody, TextHeading, Title, TokenWithChainBadge, TransactionProcessingDetails, TransactionScreen, TransactionScreenIcon, TransactionScreenInvestmentCard, WalletBalances, WalletConnectPanel, WalletItem, ConnectWalletList as WalletList, WalletListContainer, WithdrawFailedIcon, WithdrawSuccessIcon, isDustValue, truncateAddress };
18327
+ export { ActionButton, ActionSheet, AddressDisplay, ApyRange, BackButton, BackgroundContainer, BannerNotification, Chip, ChipGroup, ChoiceCard, ChooseANetworkView, ChooseAStrategyActionsheetView, ChooseAnAssetSwapView, ChooseNetworkAndAssetViewSimple, CloseButton_default as CloseButton, CollapsibleInfoRow, CollapsibleSection, ConfirmSwapButtonView, ConfirmSwapButtonViewSimple, ConnectWalletList, Currency, DashboardBalancesBreakdown, DashboardCard, DashboardInvestmentOpportunitiesView, DashboardPortfolioView, DashboardPortfolioViewSimple, DashboardRecentTransactionsView, DashboardRecentTransactionsViewSimple, DashboardStrategiesListView, DashboardTokenListView, DashboardTokensView, DashboardTokensViewSimple, DashboardTransactionsPlaceholder, DashboardView, DashboardViewSimple, DeframeComponentsProvider, DepositSuccessIcon, DetailsHeader, EarnAmountInputView, EarnBalanceCard, EarnBytecodeErrorView, EarnDepositFailedSimpleView, EarnDepositFailedView, EarnDepositFormView, EarnDepositFormViewSimple, EarnDepositProcessingSimpleView, EarnDepositProcessingView, EarnDepositSuccessSimpleView, EarnDepositSuccessView, EarnDepositWarningSimpleView, EarnDepositWarningView, EarnDesktopView, EarnDesktopViewSimple, EarnExploreGridView, EarnFlowSkeletonSimple, EarnInvestedSectionView, EarnInvestmentDetailsView, EarnInvestmentSummaryView, EarnNoBalanceNotificationView, EarnOverviewView, EarnPercentageButtonsView, EarnPositionCardView, EarnRecentTransactionsView, EarnTokenSelectorView, EarnTxStatusCardView, EarnWithdrawFailedSimpleView, EarnWithdrawFailedView, EarnWithdrawFormView, EarnWithdrawFormViewSimple, EarnWithdrawProcessingSimpleView, EarnWithdrawProcessingView, EarnWithdrawSuccessSimpleView, EarnWithdrawSuccessView, EarnWithdrawTokenSelectorView, EarnWithdrawWarningSimpleView, EarnWithdrawWarningView, Currency as Fiat, FlexCol, FlexRow, GroupedStrategyListView, HighRiskBadge, HistoryDepositDetailsView, HistoryListSkeleton, HistoryListView, HistorySwapDetailsView, HistoryTabEmpty, HistoryWithdrawDetailsView, InfoLabel, InfoRow, InfoRowIconLabel, InfoRowIconValue, InfoRowWithIcon, InfoValue, Input2 as Input, InputField, InputLabel, Input as InputRoot, InvestmentCrossChainProcessingView, KYCActionRow, KYCAddressPage, KYCBasicDataPage, KYCChecklistCard, KYCChecklistItem, KYCDataCard, KYCDocumentPage, KYCEditPage, KYCFieldMessage, KYCFormPage, KYCInfoRow, KYCIntroPage, KYCLoadingPage, KYCMessageBanner, KYCPageHeader, KYCPageSection, KYCPageShell, KYCReviewPage, KYCReviewPageSkeleton, KYCStatusItemCard, KYCStatusPage, KYCStatusPanel, KYCStepIndicator, KycLoadingView, KycRequiredView, Label, Link, ListItem, ListItemContent, ListItemLeftSide, ListItemRightSide, LoadingDots, LowRiskBadge, MediumRiskBadge, Navbar, OffchainMethodSelectionView, OfframpFailedSimpleView, OfframpInputFormSimpleView, OfframpInputFormView, OfframpProcessingSimpleView, OfframpProcessingView, OfframpSuccessSimpleView, OfframpSuccessView, OnchainDepositFormSimpleView, OnchainDepositFormView, OnchainDepositSuccessSimpleView, OnchainDepositSuccessView, OnchainWithdrawChainSelectorView, OnchainWithdrawFailedView, OnchainWithdrawFormSimpleView, OnchainWithdrawFormView, OnchainWithdrawProcessingSimpleView, OnchainWithdrawSignatureWarningSimpleView, OnchainWithdrawSignatureWarningView, OnchainWithdrawSuccessView, OnrampFormSimpleView, OnrampFormView, OnrampPixcodeView, OnrampSuccessSimpleView, OnrampSuccessView, PercentageButton, PrimaryButton, ProcessingBadge, ProgressIndicator, ScrollableContent, SearchEmptyState, SearchInput, SecondaryButton, SectionCard, Select, SelectContent, SelectItem, SelectTrigger, Skeleton, StepDisplay, StepStatusIcon, StepStatusText, StrategyDetailsView, StrategyGridCard, SummaryDetails, SummaryDetailsCryptoControlV2, SwapAdvancedSettingsView, SwapAmountInputView, SwapCrossChainProcessingView, SwapFormView, SwapFormViewSimple, SwapFromCardView, SwapFromCardViewSimple, SwapHistoryView, SwapProcessingView, SwapProcessingViewSimple, SwapQuoteDetailsView, SwapSignatureWarningView, SwapSignatureWarningViewSimple, SwapSuccessView, SwapSuccessViewSimple, SwapToCardView, SwapToCardViewSimple, SwapTransactionFailedView, SwapTransactionFailedViewSimple, SwapWidgetFallbackView, Tabs, TabsContent, TabsList, TabsTrigger, TertiaryButton, Text_default as Text, TextAccent, TextBody, TextHeading, Title, TokenWithChainBadge, TransactionProcessingDetails, TransactionScreen, TransactionScreenIcon, TransactionScreenInvestmentCard, WalletBalances, WalletConnectPanel, WalletItem, ConnectWalletList as WalletList, WalletListContainer, WithdrawFailedIcon, WithdrawSuccessIcon, isDustValue, truncateAddress };
16365
18328
  //# sourceMappingURL=index.mjs.map
16366
18329
  //# sourceMappingURL=index.mjs.map