@deframe-sdk/components 0.1.29 → 0.1.31

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
@@ -1759,7 +1759,7 @@ var BannerNotification = (_a) => {
1759
1759
  const bannerClasses = twMerge(
1760
1760
  baseClasses,
1761
1761
  typeClasses[t],
1762
- variantTextClasses[v],
1762
+ t === "toast" ? "text-white" : variantTextClasses[v],
1763
1763
  isExiting && "opacity-0 -translate-y-2",
1764
1764
  className
1765
1765
  );
@@ -7593,6 +7593,68 @@ var StrategyGridCard = ({
7593
7593
  ]
7594
7594
  }
7595
7595
  );
7596
+ var strategyCardClasses = [
7597
+ "w-full",
7598
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
7599
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
7600
+ "rounded-[var(--deframe-widget-size-radius-md)]",
7601
+ "p-[var(--deframe-widget-size-padding-x-md)]",
7602
+ "flex flex-row items-center justify-between",
7603
+ "gap-[var(--deframe-widget-size-gap-md)]",
7604
+ "hover:border-[color:var(--deframe-widget-color-border-primary)]",
7605
+ "transition-colors"
7606
+ ].join(" ");
7607
+ var StrategyGridCardSimple = ({
7608
+ logoUrl,
7609
+ title,
7610
+ chainName,
7611
+ apyFormatted,
7612
+ riskLevel,
7613
+ onInvestClick,
7614
+ labels
7615
+ }) => {
7616
+ var _a, _b, _c, _d, _e;
7617
+ const investLabel = (_a = labels == null ? void 0 : labels.investLabel) != null ? _a : "Depositar";
7618
+ const riskBadgeMap = {
7619
+ low: /* @__PURE__ */ jsx(LowRiskBadge, { label: (_b = labels == null ? void 0 : labels.riskLow) != null ? _b : "Risco Baixo" }),
7620
+ medium: /* @__PURE__ */ jsx(MediumRiskBadge, { label: (_c = labels == null ? void 0 : labels.riskMedium) != null ? _c : "Risco M\xE9dio" }),
7621
+ high: /* @__PURE__ */ jsx(HighRiskBadge, { label: (_d = labels == null ? void 0 : labels.riskHigh) != null ? _d : "Risco Alto" })
7622
+ };
7623
+ return /* @__PURE__ */ jsxs(
7624
+ "article",
7625
+ {
7626
+ "data-slot": "strategy-grid-card-simple",
7627
+ "data-test-id": "strategy-grid-card-simple",
7628
+ className: strategyCardClasses,
7629
+ children: [
7630
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] min-w-0", children: [
7631
+ /* @__PURE__ */ jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--deframe-widget-color-bg-tertiary)] flex items-center justify-center overflow-hidden shrink-0", children: /* @__PURE__ */ jsx("img", { alt: title, src: logoUrl, referrerPolicy: "no-referrer", className: "w-full h-full object-contain" }) }),
7632
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
7633
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] leading-[var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)] truncate", children: title }),
7634
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-text-secondary)] leading-[var(--deframe-widget-font-leading-xs)]", children: chainName })
7635
+ ] })
7636
+ ] }),
7637
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
7638
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-xs)] [font-weight:var(--deframe-widget-font-weight-medium)] uppercase tracking-[0.08em] text-[color:var(--deframe-widget-color-text-tertiary)]", children: (_e = labels == null ? void 0 : labels.apyLabel) != null ? _e : "Rendimento" }),
7639
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-lg)] [font-weight:var(--deframe-widget-font-weight-bold)] text-[color:var(--deframe-widget-color-brand-primary)] font-[var(--deframe-widget-font-family)] leading-none mt-[2px]", children: apyFormatted })
7640
+ ] }),
7641
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] flex-shrink-0", children: [
7642
+ /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 whitespace-nowrap", children: riskBadgeMap[riskLevel] }),
7643
+ /* @__PURE__ */ jsx(
7644
+ PrimaryButton,
7645
+ {
7646
+ "data-test-id": "strategy-grid-card-simple-invest",
7647
+ "aria-label": `${investLabel} ${title}`,
7648
+ onClick: onInvestClick,
7649
+ className: "h-9 text-[13px] px-[var(--deframe-widget-size-padding-x-md)]",
7650
+ children: investLabel
7651
+ }
7652
+ )
7653
+ ] })
7654
+ ]
7655
+ }
7656
+ );
7657
+ };
7596
7658
  var BackButton = ({ onClick, ariaLabel = "Back", className }) => {
7597
7659
  const baseClasses = "w-12 h-12 rounded-[var(--deframe-widget-size-radius-full)] flex items-center justify-center text-[color:var(--deframe-widget-color-text-secondary)] hover:text-[color:var(--deframe-widget-color-brand-primary)] transition-colors cursor-pointer";
7598
7660
  return /* @__PURE__ */ jsx(
@@ -7754,551 +7816,1315 @@ var GroupedStrategyListView = ({
7754
7816
  ] })
7755
7817
  ] });
7756
7818
  };
7757
- var DateLabel = ({ children }) => {
7758
- return /* @__PURE__ */ jsx("div", { className: "text-text-sm-mobile font-poppins text-[color:var(--deframe-widget-color-text-secondary)] dark:text-[color:var(--deframe-widget-color-text-secondary-dark)]", children });
7759
- };
7760
- var ArrowBadge = ({ isDeposit }) => {
7761
- return /* @__PURE__ */ jsx("div", { className: "absolute bottom-[-2px] right-[-2px] w-[15px] h-[15px] rounded-full bg-[var(--deframe-widget-color-bg-secondary)] dark:bg-[var(--deframe-widget-color-bg-secondary-dark)] flex items-center justify-center border border-[color:var(--deframe-widget-color-bg-secondary)] dark:border-[color:var(--deframe-widget-color-bg-secondary-dark)]", children: isDeposit ? /* @__PURE__ */ jsx(MdArrowDownward, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-primary)] dark:text-[color:var(--deframe-widget-color-text-primary-dark)]" }) : /* @__PURE__ */ jsx(MdArrowUpward, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-primary)] dark:text-[color:var(--deframe-widget-color-text-primary-dark)]" }) });
7762
- };
7763
- var TokenIconWithBadge2 = ({ src, alt, isDeposit }) => {
7764
- const fallbackText = encodeURIComponent((alt || "TOK").slice(0, 3).toUpperCase());
7765
- const fallbackSrc = `https://placehold.co/40x40?text=${fallbackText}`;
7766
- const resolvedSrc = src || fallbackSrc;
7767
- return /* @__PURE__ */ jsxs("div", { className: "relative flex-shrink-0", children: [
7768
- /* @__PURE__ */ jsx("div", { className: "w-10 h-10 rounded-xl bg-[var(--deframe-widget-color-bg-tertiary)] dark:bg-[var(--deframe-widget-color-bg-tertiary-dark)] flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ jsx(
7769
- "img",
7770
- {
7771
- src: resolvedSrc,
7772
- alt,
7773
- className: "w-full h-full object-cover",
7774
- onError: (e) => {
7775
- e.target.src = fallbackSrc;
7776
- }
7777
- }
7778
- ) }),
7779
- /* @__PURE__ */ jsx(ArrowBadge, { isDeposit })
7780
- ] });
7781
- };
7782
- var SwapIconWithBadge = ({ src, alt }) => {
7783
- const fallbackText = encodeURIComponent((alt || "TOK").slice(0, 3).toUpperCase());
7784
- const fallbackSrc = `https://placehold.co/40x40?text=${fallbackText}`;
7785
- const resolvedSrc = src || fallbackSrc;
7786
- return /* @__PURE__ */ jsxs("div", { className: "relative flex-shrink-0", children: [
7787
- /* @__PURE__ */ jsx("div", { className: "w-10 h-10 rounded-xl bg-[var(--deframe-widget-color-bg-tertiary)] dark:bg-[var(--deframe-widget-color-bg-tertiary-dark)] flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ jsx(
7788
- "img",
7789
- {
7790
- src: resolvedSrc,
7791
- alt,
7792
- className: "w-full h-full object-cover",
7793
- onError: (e) => {
7794
- e.target.src = fallbackSrc;
7795
- }
7796
- }
7797
- ) }),
7798
- /* @__PURE__ */ jsx("div", { className: "absolute bottom-[-2px] right-[-2px] w-[15px] h-[15px] rounded-full bg-[var(--deframe-widget-color-bg-secondary)] dark:bg-[var(--deframe-widget-color-bg-secondary-dark)] flex items-center justify-center border border-[color:var(--deframe-widget-color-bg-secondary)] dark:border-[color:var(--deframe-widget-color-bg-secondary-dark)]", children: /* @__PURE__ */ jsx(MdArrowUpward, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-primary)] dark:text-[color:var(--deframe-widget-color-text-primary-dark)]" }) })
7799
- ] });
7800
- };
7801
- var AmountDisplay = ({ amount, usdAmount }) => {
7802
- return /* @__PURE__ */ jsxs(Fragment, { children: [
7803
- /* @__PURE__ */ jsx(Label, { className: "text-accent-sm-mobile whitespace-nowrap", children: amount }),
7804
- usdAmount ? /* @__PURE__ */ jsx(Label, { variant: "secondary", className: "whitespace-nowrap", children: usdAmount }) : null
7805
- ] });
7806
- };
7807
- var HistoryListView = ({
7808
- groups,
7809
- showLoadMore,
7810
- onLoadMore,
7811
- loadMoreLabel,
7812
- itemClassName
7819
+ var DEFAULT_COLOR_TOKEN = "var(--deframe-widget-color-brand-primary)";
7820
+ var ImageBannerCard = ({
7821
+ imageUrl,
7822
+ alt,
7823
+ onClick,
7824
+ apyFormatted,
7825
+ description,
7826
+ colorToken = DEFAULT_COLOR_TOKEN
7813
7827
  }) => {
7814
- if (groups.length === 0) {
7815
- return null;
7816
- }
7817
- return /* @__PURE__ */ jsxs("div", { className: "self-stretch flex flex-col gap-[16px]", children: [
7818
- groups.map((group) => /* @__PURE__ */ jsxs("div", { className: "self-stretch flex flex-col gap-sm", children: [
7819
- /* @__PURE__ */ jsx(DateLabel, { children: group.dateLabel }),
7820
- group.items.map((item) => /* @__PURE__ */ jsxs(
7821
- ListItem,
7822
- {
7823
- onClick: () => item.onClick(),
7824
- containerClassName: twMerge("!rounded-xs !border-0 !min-h-[72px]", itemClassName),
7825
- children: [
7826
- /* @__PURE__ */ jsx(ListItemLeftSide, { children: item.isSwap ? /* @__PURE__ */ jsx(SwapIconWithBadge, { src: item.iconUrl, alt: item.iconAlt }) : /* @__PURE__ */ jsx(
7827
- TokenIconWithBadge2,
7828
- {
7829
- src: item.iconUrl,
7830
- alt: item.iconAlt,
7831
- isDeposit: item.isDeposit
7832
- }
7833
- ) }),
7834
- /* @__PURE__ */ jsxs(ListItemContent, { children: [
7835
- /* @__PURE__ */ jsx(Label, { className: "text-text-lg-mobile", children: item.title }),
7836
- /* @__PURE__ */ jsx(Label, { variant: "secondary", className: "text-[color:var(--deframe-widget-color-text-tertiary)] dark:text-[color:var(--deframe-widget-color-text-tertiary-dark)]", children: item.subtitle }),
7837
- item.status === "PENDING" && item.statusLabel ? /* @__PURE__ */ jsx("div", { className: "mt-[6px]", children: /* @__PURE__ */ jsx(
7838
- ProcessingBadge,
7828
+ const isClickable = !!onClick;
7829
+ return /* @__PURE__ */ jsx(
7830
+ "button",
7831
+ {
7832
+ type: "button",
7833
+ "data-slot": "image-banner-card",
7834
+ "data-test-id": "image-banner-card",
7835
+ "aria-label": alt,
7836
+ onClick,
7837
+ className: twMerge(
7838
+ "relative w-full overflow-hidden text-left",
7839
+ "rounded-[var(--deframe-widget-size-radius-md)]",
7840
+ "border",
7841
+ "transition-[transform,opacity] duration-150",
7842
+ isClickable ? "cursor-pointer active:scale-[0.98]" : "cursor-default"
7843
+ ),
7844
+ style: {
7845
+ background: `linear-gradient(to right, color-mix(in srgb, ${colorToken} 10%, #080a0e) 0%, #080a0e 55%, #050507 100%)`,
7846
+ borderColor: `color-mix(in srgb, ${colorToken} 22%, transparent)`
7847
+ },
7848
+ children: /* @__PURE__ */ jsxs("div", { className: "relative flex flex-row items-stretch w-full", children: [
7849
+ /* @__PURE__ */ jsxs(
7850
+ "div",
7851
+ {
7852
+ className: "flex flex-col gap-[var(--deframe-widget-size-gap-xs)] z-[1] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-xl)]",
7853
+ style: { flex: imageUrl ? "0 0 55%" : "1 1 auto" },
7854
+ children: [
7855
+ /* @__PURE__ */ jsx(
7856
+ "span",
7839
7857
  {
7840
- label: item.statusLabel,
7841
- title: item.statusTitle,
7842
- size: "compact"
7858
+ "data-test-id": "image-banner-card-name",
7859
+ className: "text-[length:var(--deframe-widget-font-size-xs)] [font-weight:var(--deframe-widget-font-weight-medium)] font-[var(--deframe-widget-font-family)] uppercase tracking-[0.08em]",
7860
+ style: { color: `color-mix(in srgb, ${colorToken} 80%, var(--deframe-widget-color-text-secondary))` },
7861
+ children: alt
7843
7862
  }
7844
- ) }) : null
7845
- ] }),
7846
- /* @__PURE__ */ jsx(ListItemRightSide, { children: /* @__PURE__ */ jsx(AmountDisplay, { amount: item.amountFormatted, usdAmount: item.amountUsd }) })
7847
- ]
7848
- },
7849
- item.id
7850
- ))
7851
- ] }, group.dateLabel)),
7852
- showLoadMore && /* @__PURE__ */ jsx("div", { className: "flex justify-center pt-sm", children: /* @__PURE__ */ jsx(TertiaryButton, { onClick: onLoadMore, children: loadMoreLabel }) })
7853
- ] });
7854
- };
7855
- var OverviewEarnWidgetTabSkeleton = () => {
7856
- return /* @__PURE__ */ jsxs("div", { className: "w-full flex flex-col gap-md", children: [
7857
- /* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "40px", variant: "rect" }),
7858
- /* @__PURE__ */ jsxs("div", { className: "flex gap-sm", children: [
7859
- /* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "144px", variant: "rect" }),
7860
- /* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "144px", variant: "rect" })
7861
- ] }),
7862
- /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
7863
- /* @__PURE__ */ jsx(Skeleton, { width: "128px", height: "20px", variant: "text", className: "mb-sm" }),
7864
- /* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "80px", variant: "rect" })
7865
- ] }),
7866
- /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
7867
- /* @__PURE__ */ jsx(Skeleton, { width: "96px", height: "20px", variant: "text", className: "mb-sm" }),
7868
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-sm", children: [
7869
- /* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "64px", variant: "rect" }),
7870
- /* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "64px", variant: "rect" }),
7871
- /* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "64px", variant: "rect" }),
7872
- /* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "64px", variant: "rect" })
7863
+ ),
7864
+ apyFormatted && /* @__PURE__ */ jsxs("div", { "data-test-id": "image-banner-card-apy", className: "flex items-baseline gap-[4px]", children: [
7865
+ /* @__PURE__ */ jsx(
7866
+ "span",
7867
+ {
7868
+ className: "text-[38px] [font-weight:var(--deframe-widget-font-weight-bold)] font-[var(--deframe-widget-font-family)] leading-[1]",
7869
+ style: { color: colorToken },
7870
+ children: apyFormatted
7871
+ }
7872
+ ),
7873
+ /* @__PURE__ */ jsx(
7874
+ "span",
7875
+ {
7876
+ className: "text-[length:var(--deframe-widget-font-size-xs)] [font-weight:var(--deframe-widget-font-weight-semibold)] font-[var(--deframe-widget-font-family)] uppercase tracking-[0.1em]",
7877
+ style: { color: `color-mix(in srgb, ${colorToken} 60%, transparent)` },
7878
+ children: "APY"
7879
+ }
7880
+ )
7881
+ ] }),
7882
+ description && /* @__PURE__ */ jsx(
7883
+ "span",
7884
+ {
7885
+ "data-test-id": "image-banner-card-description",
7886
+ className: "text-[length:var(--deframe-widget-font-size-xs)] leading-[var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
7887
+ children: description
7888
+ }
7889
+ )
7890
+ ]
7891
+ }
7892
+ ),
7893
+ imageUrl && /* @__PURE__ */ jsxs(
7894
+ "div",
7895
+ {
7896
+ "data-test-id": "image-banner-card-image-wrapper",
7897
+ className: "relative flex-1 overflow-hidden",
7898
+ style: { minHeight: 160 },
7899
+ children: [
7900
+ /* @__PURE__ */ jsx(
7901
+ "img",
7902
+ {
7903
+ "data-test-id": "image-banner-card-image",
7904
+ src: imageUrl,
7905
+ alt: "",
7906
+ "aria-hidden": "true",
7907
+ className: "absolute inset-0 w-full h-full object-cover object-center"
7908
+ }
7909
+ ),
7910
+ /* @__PURE__ */ jsx(
7911
+ "div",
7912
+ {
7913
+ className: "absolute inset-0",
7914
+ style: {
7915
+ background: "linear-gradient(to right, #080a0e 0%, transparent 40%)"
7916
+ }
7917
+ }
7918
+ )
7919
+ ]
7920
+ }
7921
+ )
7873
7922
  ] })
7874
- ] })
7875
- ] });
7923
+ }
7924
+ );
7876
7925
  };
7877
- var EarnOverviewView = ({
7878
- selectedTab,
7879
- onTabChange,
7880
- labels,
7881
- overview,
7882
- explore,
7883
- history
7926
+ var GRID_COLS = "grid grid-cols-[1fr_100px_130px] gap-x-[var(--deframe-widget-size-gap-md)]";
7927
+ var HISTORY_PAGE_SIZE = 5;
7928
+ var HISTORY_CONFIG = {
7929
+ deposit: { label: "Depositado", color: "var(--deframe-widget-color-state-info)" },
7930
+ withdraw: { label: "Sacado", color: "var(--deframe-widget-color-text-secondary)" },
7931
+ interest: { label: "Juros Recebidos", color: "var(--deframe-widget-color-brand-primary)" }
7932
+ };
7933
+ var EarnHubStrategyCard = ({
7934
+ logoUrl,
7935
+ assetName,
7936
+ network,
7937
+ investedFormatted,
7938
+ earningsFormatted,
7939
+ isLoading,
7940
+ onInvestClick,
7941
+ onWithdrawClick,
7942
+ history = [],
7943
+ labels
7884
7944
  }) => {
7885
- return /* @__PURE__ */ jsx(BackgroundContainer, { className: "flex flex-col flex-1 min-h-0 px-0", children: /* @__PURE__ */ jsxs(Tabs, { value: selectedTab, onValueChange: onTabChange, variant: "default", className: "flex flex-col flex-1 min-h-0", children: [
7886
- /* @__PURE__ */ jsxs(TabsList, { className: "justify-between w-full", children: [
7887
- /* @__PURE__ */ jsx(TabsTrigger, { value: "overview", className: "flex-1", children: labels.tabs.overview }),
7888
- /* @__PURE__ */ jsx(TabsTrigger, { value: "explore", className: "flex-1", children: labels.tabs.explore }),
7889
- /* @__PURE__ */ jsx(TabsTrigger, { value: "history", className: "flex-1", children: labels.tabs.history })
7890
- ] }),
7891
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 w-full min-h-0 px-md pt-md", children: [
7892
- /* @__PURE__ */ jsx(TabsContent, { value: "overview", className: "flex flex-col flex-1 min-h-0", children: overview.isLoading ? /* @__PURE__ */ jsx(OverviewEarnWidgetTabSkeleton, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
7893
- /* @__PURE__ */ jsx(WalletBalances, { cards: overview.walletBalances }),
7894
- /* @__PURE__ */ jsx(GroupedStrategyListView, __spreadValues({}, overview.groupedStrategies))
7895
- ] }) }),
7896
- /* @__PURE__ */ jsxs(TabsContent, { value: "explore", children: [
7897
- /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 w-full mb-4 h-12", children: /* @__PURE__ */ jsx(
7898
- SearchInput,
7945
+ var _a, _b, _c, _d, _e;
7946
+ const [expanded, setExpanded] = React6__default.useState(false);
7947
+ const [showAll, setShowAll] = React6__default.useState(false);
7948
+ const investLabel = (_a = labels == null ? void 0 : labels.investLabel) != null ? _a : "Depositar";
7949
+ const withdrawLabel = (_b = labels == null ? void 0 : labels.withdrawLabel) != null ? _b : "Sacar";
7950
+ const historyTitle = (_c = labels == null ? void 0 : labels.historyTitle) != null ? _c : "Hist\xF3rico";
7951
+ const visibleHistory = showAll ? history : history.slice(0, HISTORY_PAGE_SIZE);
7952
+ const hasMore = history.length > HISTORY_PAGE_SIZE && !showAll;
7953
+ return /* @__PURE__ */ jsxs(
7954
+ "li",
7955
+ {
7956
+ "data-slot": "earn-hub-strategy-card",
7957
+ "data-test-id": "earn-hub-strategy-card",
7958
+ className: "border-t border-[color:var(--deframe-widget-color-border-secondary)] list-none",
7959
+ children: [
7960
+ /* @__PURE__ */ jsxs(
7961
+ "div",
7899
7962
  {
7900
- value: explore.searchValue,
7901
- onChange: (value) => explore.onSearchChange(value),
7902
- placeholder: explore.searchPlaceholder
7963
+ "data-slot": "earn-hub-strategy-card-main",
7964
+ onClick: () => setExpanded((v) => !v),
7965
+ className: twMerge(
7966
+ GRID_COLS,
7967
+ "items-center cursor-pointer",
7968
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[13px]",
7969
+ "transition-colors duration-150",
7970
+ "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]"
7971
+ ),
7972
+ children: [
7973
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] min-w-0", children: [
7974
+ /* @__PURE__ */ jsx("div", { className: "w-[36px] h-[36px] rounded-full bg-[var(--deframe-widget-color-bg-tertiary)] flex items-center justify-center overflow-hidden shrink-0", children: /* @__PURE__ */ jsx("img", { alt: assetName, src: logoUrl, referrerPolicy: "no-referrer", className: "w-full h-full object-contain" }) }),
7975
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
7976
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] leading-[var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)] truncate", children: assetName }),
7977
+ network && /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-text-secondary)] leading-[var(--deframe-widget-font-leading-xs)]", children: network })
7978
+ ] })
7979
+ ] }),
7980
+ /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: isLoading ? /* @__PURE__ */ jsx(Skeleton, { variant: "rect", width: 40, height: 16 }) : /* @__PURE__ */ jsx(
7981
+ "span",
7982
+ {
7983
+ className: "text-[length:var(--deframe-widget-font-size-md)] [font-weight:var(--deframe-widget-font-weight-bold)] font-[var(--deframe-widget-font-family)] leading-none",
7984
+ style: { color: "var(--deframe-widget-color-brand-primary)" },
7985
+ children: earningsFormatted
7986
+ }
7987
+ ) }),
7988
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-[var(--deframe-widget-size-gap-xs)]", children: [
7989
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col items-end", children: isLoading ? /* @__PURE__ */ jsx(Skeleton, { variant: "rect", width: 60, height: 16 }) : investedFormatted ? /* @__PURE__ */ jsxs(Fragment, { children: [
7990
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] leading-[var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)]", children: investedFormatted }),
7991
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-text-secondary)] leading-[var(--deframe-widget-font-leading-xs)]", children: (_d = labels == null ? void 0 : labels.investedLabel) != null ? _d : "investido" })
7992
+ ] }) : /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-text-tertiary)]", children: "\u2014" }) }),
7993
+ /* @__PURE__ */ jsx(
7994
+ "svg",
7995
+ {
7996
+ width: "16",
7997
+ height: "16",
7998
+ viewBox: "0 0 16 16",
7999
+ fill: "none",
8000
+ "aria-hidden": "true",
8001
+ className: twMerge(
8002
+ "flex-shrink-0 text-[color:var(--deframe-widget-color-text-tertiary)] transition-transform duration-200",
8003
+ expanded && "rotate-180"
8004
+ ),
8005
+ children: /* @__PURE__ */ jsx("path", { d: "M4 6L8 10L12 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
8006
+ }
8007
+ )
8008
+ ] })
8009
+ ]
7903
8010
  }
7904
- ) }),
7905
- explore.isLoading ? /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
7906
- explore.loadingLabel,
7907
- /* @__PURE__ */ jsx(LoadingDots, {})
7908
- ] }) : explore.error ? /* @__PURE__ */ jsxs("div", { className: "p-4 text-center text-red-500", children: [
7909
- explore.errorLabel,
7910
- ": ",
7911
- explore.error.message
7912
- ] }) : explore.hasFilters && explore.strategies.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "w-full py-md bg-bg-default dark:bg-bg-default-dark rounded-lg flex flex-col gap-sm flex-shrink-0", children: [
7913
- /* @__PURE__ */ jsx(
7914
- ChipGroup,
7915
- {
7916
- options: explore.chipOptions,
7917
- selected: explore.selectedCategory,
7918
- onSelect: (value) => explore.onCategorySelect(value)
7919
- }
7920
- ),
7921
- /* @__PURE__ */ jsx(SearchEmptyState, { title: explore.emptySearchTitle, description: explore.emptySearchDescription })
7922
- ] }) : /* @__PURE__ */ jsxs("div", { className: "w-full py-md bg-bg-default dark:bg-bg-default-dark rounded-lg flex flex-col gap-sm flex-shrink-0", children: [
7923
- /* @__PURE__ */ jsx(
7924
- ChipGroup,
7925
- {
7926
- options: explore.chipOptions,
7927
- selected: explore.selectedCategory,
7928
- onSelect: (value) => explore.onCategorySelect(value)
7929
- }
7930
- ),
7931
- /* @__PURE__ */ jsx(TextHeading, { variant: "h5", children: explore.bestPerformanceLabel }),
7932
- /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-sm", children: explore.strategies.map((s) => /* @__PURE__ */ jsxs(ListItem, { onClick: () => s.onClick(), children: [
7933
- /* @__PURE__ */ jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsx("img", { src: s.logoUrl, alt: s.subtitle, className: "w-10 h-10 rounded-full" }) }),
7934
- /* @__PURE__ */ jsxs(ListItemContent, { children: [
7935
- /* @__PURE__ */ jsx(TextBody, { children: s.title }),
7936
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: s.subtitle })
7937
- ] }),
7938
- /* @__PURE__ */ jsx(ListItemRightSide, { children: /* @__PURE__ */ jsx(TextBody, { children: s.apyFormatted }) })
7939
- ] }, s.id)) })
7940
- ] })
7941
- ] }),
7942
- /* @__PURE__ */ jsx(TabsContent, { value: "history", children: history.isLoading ? /* @__PURE__ */ jsx(HistoryListSkeleton, {}) : history.isEmpty ? /* @__PURE__ */ jsx("div", { className: "w-full h-[90vh] py-md bg-bg-default dark:bg-bg-default-dark rounded-lg flex flex-col justify-center items-center gap-sm overflow-hidden", children: /* @__PURE__ */ jsxs("div", { className: "w-full flex flex-col justify-center items-center gap-md", children: [
7943
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col justify-center items-center gap-md text-center", children: [
7944
- /* @__PURE__ */ jsx("div", { className: "w-20 h-20 bg-bg-muted dark:bg-bg-muted-dark rounded-full flex justify-center items-center", children: /* @__PURE__ */ jsx(PiClockCountdownBold, { className: "w-10 h-10 text-text-tertiary dark:text-text-tertiary-dark" }) }),
7945
- /* @__PURE__ */ jsx(TextHeading, { variant: "h3", children: history.emptyTitle })
7946
- ] }),
7947
- /* @__PURE__ */ jsx("div", { className: "self-stretch text-center", children: /* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: history.emptyDescription }) })
7948
- ] }) }) : /* @__PURE__ */ jsx(
7949
- HistoryListView,
7950
- {
7951
- groups: history.groups,
7952
- showLoadMore: history.showLoadMore,
7953
- onLoadMore: () => history.onLoadMore(),
7954
- loadMoreLabel: history.loadMoreLabel
7955
- }
7956
- ) })
7957
- ] })
7958
- ] }) });
7959
- };
7960
- var EarnInvestmentSummaryView = ({
7961
- overviewDescription,
7962
- totalInvestedLabel,
7963
- totalInvestedValue,
7964
- totalReturnLabel,
7965
- totalReturnValue,
7966
- processingBadgeLabel,
7967
- processingBadgeTitle,
7968
- className
7969
- }) => {
7970
- return /* @__PURE__ */ jsxs("section", { className: twMerge("flex flex-col gap-md p-lg bg-[var(--deframe-widget-color-bg-subtle)] rounded", className), children: [
7971
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] dark:text-[color:var(--deframe-widget-color-text-secondary-dark)]", children: overviewDescription }),
7972
- /* @__PURE__ */ jsx(
7973
- WalletBalances,
7974
- {
7975
- cards: [
8011
+ ),
8012
+ expanded && /* @__PURE__ */ jsxs(
8013
+ "div",
7976
8014
  {
7977
- label: totalInvestedLabel,
7978
- value: totalInvestedValue,
7979
- badge: processingBadgeLabel ? /* @__PURE__ */ jsx(
7980
- ProcessingBadge,
7981
- {
7982
- label: processingBadgeLabel,
7983
- title: processingBadgeTitle
7984
- }
7985
- ) : void 0
7986
- },
7987
- { label: totalReturnLabel, value: totalReturnValue }
7988
- ],
7989
- variant: "raised",
7990
- className: "grid grid-cols-2 gap-md !mt-0"
7991
- }
7992
- )
7993
- ] });
8015
+ "data-test-id": "earn-hub-strategy-card-detail",
8016
+ className: "px-[var(--deframe-widget-size-padding-x-md)] pb-[var(--deframe-widget-size-padding-y-md)]",
8017
+ children: [
8018
+ /* @__PURE__ */ jsxs(
8019
+ "div",
8020
+ {
8021
+ className: "flex gap-[var(--deframe-widget-size-gap-sm)] mb-[var(--deframe-widget-size-gap-md)]",
8022
+ onClick: (e) => e.stopPropagation(),
8023
+ children: [
8024
+ onWithdrawClick != null && /* @__PURE__ */ jsx(
8025
+ SecondaryButton,
8026
+ {
8027
+ className: "h-9 text-[13px] flex-1",
8028
+ onClick: onWithdrawClick,
8029
+ children: withdrawLabel
8030
+ }
8031
+ ),
8032
+ onInvestClick != null && /* @__PURE__ */ jsx(
8033
+ PrimaryButton,
8034
+ {
8035
+ className: "h-9 text-[13px] flex-1",
8036
+ onClick: onInvestClick,
8037
+ children: investLabel
8038
+ }
8039
+ )
8040
+ ]
8041
+ }
8042
+ ),
8043
+ history.length > 0 && /* @__PURE__ */ jsxs("div", { "data-test-id": "earn-hub-strategy-card-history", children: [
8044
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-xs)] [font-weight:var(--deframe-widget-font-weight-medium)] uppercase tracking-[0.08em] text-[color:var(--deframe-widget-color-text-tertiary)]", children: historyTitle }),
8045
+ /* @__PURE__ */ jsx("ol", { className: "list-none m-0 p-0", children: visibleHistory.map((entry) => {
8046
+ var _a2;
8047
+ const config = (_a2 = HISTORY_CONFIG[entry.type]) != null ? _a2 : HISTORY_CONFIG.deposit;
8048
+ const isClickable = !!entry.onClick;
8049
+ return /* @__PURE__ */ jsxs(
8050
+ "li",
8051
+ {
8052
+ "data-test-id": "earn-hub-strategy-card-history-entry",
8053
+ onClick: entry.onClick ? () => entry.onClick() : void 0,
8054
+ className: twMerge(
8055
+ "flex items-center justify-between gap-[var(--deframe-widget-size-gap-md)]",
8056
+ "py-[10px]",
8057
+ "border-t border-[color:var(--deframe-widget-color-border-tertiary)]",
8058
+ isClickable && "cursor-pointer hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_40%,transparent)] rounded-[var(--deframe-widget-size-radius-xs)]"
8059
+ ),
8060
+ children: [
8061
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] min-w-0", children: [
8062
+ /* @__PURE__ */ jsx(
8063
+ "span",
8064
+ {
8065
+ className: "w-[6px] h-[6px] rounded-full flex-shrink-0",
8066
+ style: { background: config.color }
8067
+ }
8068
+ ),
8069
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)] leading-none flex-shrink-0", children: entry.date }),
8070
+ /* @__PURE__ */ jsx(
8071
+ "span",
8072
+ {
8073
+ className: "text-[length:var(--deframe-widget-font-size-xs)] [font-weight:var(--deframe-widget-font-weight-medium)] font-[var(--deframe-widget-font-family)] leading-none",
8074
+ style: { color: config.color },
8075
+ children: config.label
8076
+ }
8077
+ )
8078
+ ] }),
8079
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-xs)] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] font-[var(--deframe-widget-font-family)] leading-none flex-shrink-0", children: entry.amount })
8080
+ ]
8081
+ },
8082
+ entry.id
8083
+ );
8084
+ }) }),
8085
+ hasMore && /* @__PURE__ */ jsx(
8086
+ "button",
8087
+ {
8088
+ type: "button",
8089
+ onClick: () => setShowAll(true),
8090
+ className: twMerge(
8091
+ "mt-[var(--deframe-widget-size-gap-sm)] w-full",
8092
+ "text-[length:var(--deframe-widget-font-size-xs)] [font-weight:var(--deframe-widget-font-weight-medium)]",
8093
+ "text-[color:var(--deframe-widget-color-text-secondary)]",
8094
+ "font-[var(--deframe-widget-font-family)]",
8095
+ "hover:text-[color:var(--deframe-widget-color-brand-primary)]",
8096
+ "transition-colors duration-150 cursor-pointer",
8097
+ "py-[var(--deframe-widget-size-padding-y-xs)]",
8098
+ "border-t border-[color:var(--deframe-widget-color-border-tertiary)]",
8099
+ "outline-none bg-transparent border-x-0 border-b-0"
8100
+ ),
8101
+ children: (_e = labels == null ? void 0 : labels.showMoreLabel) != null ? _e : `Ver mais (${history.length - HISTORY_PAGE_SIZE} itens)`
8102
+ }
8103
+ )
8104
+ ] })
8105
+ ]
8106
+ }
8107
+ )
8108
+ ]
8109
+ }
8110
+ );
7994
8111
  };
7995
- var EarnInvestedSectionView = ({
7996
- sectionTitle,
7997
- items,
7998
- onItemClick,
7999
- className
8000
- }) => {
8001
- if (items.length === 0) {
8002
- return null;
8003
- }
8112
+ var SimpleEmptyState = () => {
8004
8113
  return /* @__PURE__ */ jsxs(
8005
- "section",
8114
+ "div",
8006
8115
  {
8007
- className: twMerge(
8008
- "flex flex-col gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-lg)]",
8009
- "bg-[var(--deframe-widget-color-bg-subtle)] rounded-[var(--deframe-widget-size-radius-sm)]",
8010
- className
8011
- ),
8116
+ "data-slot": "earn-empty-state",
8117
+ "data-test-id": "earn-empty-state",
8118
+ className: "flex flex-col items-center justify-center gap-[var(--deframe-widget-size-gap-sm)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-xl)] border-t border-[color:var(--deframe-widget-color-border-secondary)]",
8012
8119
  children: [
8013
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: sectionTitle }),
8014
- /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]", children: items.map((item, index) => {
8015
- const isLast = index === items.length - 1;
8016
- return /* @__PURE__ */ jsxs(
8017
- "button",
8018
- {
8019
- type: "button",
8020
- onClick: () => onItemClick == null ? void 0 : onItemClick(item.strategyId),
8021
- className: twMerge(
8022
- "flex items-center gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-md)] bg-[var(--deframe-widget-color-bg-raised)] rounded-[var(--deframe-widget-size-radius-sm)]",
8023
- "transition-colors cursor-pointer text-left w-full",
8024
- !isLast && "border-b border-[var(--deframe-widget-color-border-secondary)]"
8025
- ),
8026
- children: [
8027
- /* @__PURE__ */ jsx(
8028
- "img",
8029
- {
8030
- src: item.logoUrl,
8031
- alt: item.assetName,
8032
- className: "w-10 h-10 rounded-[var(--deframe-widget-size-radius-full)] flex-shrink-0"
8033
- }
8034
- ),
8035
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 min-w-0", children: [
8036
- /* @__PURE__ */ jsx(TextBody, { className: "font-medium truncate", children: item.assetName }),
8037
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-tertiary)] truncate", children: item.subtitle })
8038
- ] }),
8039
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-end flex-shrink-0", children: [
8040
- /* @__PURE__ */ jsx(TextBody, { className: "font-medium", children: item.balanceFormatted }),
8041
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: item.profitFormatted })
8042
- ] })
8043
- ]
8120
+ /* @__PURE__ */ jsx(
8121
+ "div",
8122
+ {
8123
+ className: "flex h-[48px] w-[48px] items-center justify-center rounded-full",
8124
+ style: {
8125
+ background: "color-mix(in srgb, var(--deframe-widget-color-brand-primary) 10%, transparent)",
8126
+ color: "var(--deframe-widget-color-brand-primary)"
8044
8127
  },
8045
- item.strategyId
8046
- );
8047
- }) })
8128
+ children: /* @__PURE__ */ jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
8129
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "8", r: "4", stroke: "currentColor", strokeWidth: "1.5" }),
8130
+ /* @__PURE__ */ jsx("path", { d: "M4 20c0-4 3.6-7 8-7s8 3 8 7", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
8131
+ ] })
8132
+ }
8133
+ ),
8134
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-xs)] text-center", children: [
8135
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-md)] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] font-[var(--deframe-widget-font-family)]", children: "Nenhuma caixinha ativa" }),
8136
+ /* @__PURE__ */ jsx("span", { className: "max-w-[240px] text-[length:var(--deframe-widget-font-size-sm)] leading-[var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]", children: "Escolha uma das caixinhas acima para come\xE7ar a render." })
8137
+ ] })
8048
8138
  ]
8049
8139
  }
8050
8140
  );
8051
8141
  };
8052
- var EarnExploreGridView = ({
8053
- sectionTitle,
8054
- loadingLabel,
8055
- errorLabel,
8056
- emptySearchTitle,
8057
- emptySearchDescription,
8142
+ var EARN_CATEGORY_DEFINITIONS = [
8143
+ {
8144
+ id: "dolar",
8145
+ imageUrl: "/mascot-usd.png",
8146
+ alt: "Caixinha de D\xF3lar",
8147
+ title: "Caixinha de D\xF3lar",
8148
+ assetFilter: ["USDC", "USDT", "DAI", "thbill"]
8149
+ },
8150
+ {
8151
+ id: "real",
8152
+ imageUrl: "/mascot-brl.png",
8153
+ alt: "Caixinha de Real",
8154
+ title: "Caixinha de Real",
8155
+ assetFilter: ["BRLA"]
8156
+ }
8157
+ ];
8158
+ var wrapperBaseClasses = [
8159
+ "w-full max-w-[900px] mx-auto flex flex-col",
8160
+ "gap-[var(--deframe-widget-size-gap-md)]"
8161
+ ].join(" ");
8162
+ var statCardClasses = [
8163
+ "w-full self-start flex flex-col gap-[var(--deframe-widget-size-gap-sm)]",
8164
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
8165
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
8166
+ "rounded-[var(--deframe-widget-size-radius-md)]",
8167
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]"
8168
+ ].join(" ");
8169
+ var statCardLabelClasses = [
8170
+ "text-[color:var(--deframe-widget-color-text-tertiary)]",
8171
+ "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)]",
8172
+ "uppercase tracking-[0.08em] [line-height:1.4]"
8173
+ ].join(" ");
8174
+ var statCardValueDefaultClasses = [
8175
+ "text-[color:var(--deframe-widget-color-text-primary)]",
8176
+ "text-[28px] [font-weight:var(--deframe-widget-font-weight-bold)] [line-height:1.15]"
8177
+ ].join(" ");
8178
+ var statCardValuePositiveClasses = [
8179
+ "text-[color:var(--deframe-widget-color-brand-primary)]",
8180
+ "text-[28px] [font-weight:var(--deframe-widget-font-weight-bold)] [line-height:1.15]"
8181
+ ].join(" ");
8182
+ var statCardDescriptionClasses = [
8183
+ "text-[color:var(--deframe-widget-color-text-secondary)]",
8184
+ "text-[13px] [line-height:1.45]"
8185
+ ].join(" ");
8186
+ var listPanelClasses = [
8187
+ "w-full self-start flex flex-col",
8188
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
8189
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
8190
+ "rounded-[var(--deframe-widget-size-radius-md)]",
8191
+ "overflow-hidden"
8192
+ ].join(" ");
8193
+ var sectionHeaderClasses = [
8194
+ "flex items-center justify-between",
8195
+ "px-[var(--deframe-widget-size-padding-x-md)]",
8196
+ "pt-[var(--deframe-widget-size-padding-y-md)]",
8197
+ "pb-[var(--deframe-widget-size-padding-y-sm)]"
8198
+ ].join(" ");
8199
+ var sectionTitleClasses = [
8200
+ "text-[color:var(--deframe-widget-color-text-primary)]",
8201
+ "text-[length:var(--deframe-widget-font-size-md)]",
8202
+ "[font-weight:var(--deframe-widget-font-weight-semibold)]",
8203
+ "font-[var(--deframe-widget-font-family)]",
8204
+ "leading-[var(--deframe-widget-font-leading-md)]"
8205
+ ].join(" ");
8206
+ var columnHeaderClasses = [
8207
+ "text-[length:var(--deframe-widget-font-size-xs)]",
8208
+ "[font-weight:var(--deframe-widget-font-weight-medium)]",
8209
+ "uppercase tracking-[0.08em]",
8210
+ "text-[color:var(--deframe-widget-color-text-tertiary)]",
8211
+ "leading-[var(--deframe-widget-font-leading-xs)]"
8212
+ ].join(" ");
8213
+ var GRID_COLS2 = "grid grid-cols-[1fr_100px_130px] gap-x-[var(--deframe-widget-size-gap-md)]";
8214
+ var BANNER_COLORS = [
8215
+ "var(--deframe-widget-color-brand-primary)",
8216
+ "var(--deframe-widget-color-brand-secondary)"
8217
+ ];
8218
+ var STABLECOIN_SYMBOLS = /* @__PURE__ */ new Set(["USDC", "USDT", "DAI"]);
8219
+ var DEFAULT_POSITIONS = { positions: [], summary: { totalUnderlyingBalanceUSD: 0, totalProfitInUSD: 0 } };
8220
+ var defaultFormatCurrency = (amount) => `$${amount.toFixed(2)}`;
8221
+ var EarnDesktopViewSimple = ({
8222
+ positions = DEFAULT_POSITIONS,
8223
+ strategies = [],
8224
+ historyItems = [],
8225
+ formatCurrency = defaultFormatCurrency,
8226
+ locale = "pt-BR",
8227
+ onDeposit,
8228
+ onWithdraw,
8229
+ onDetails,
8230
+ onHistoryDetail,
8231
+ onHistory,
8058
8232
  isLoading,
8059
- error,
8060
- strategies,
8061
- searchBar,
8062
- chipGroup,
8063
- hasFilters,
8064
- onStrategyClick,
8065
8233
  className
8066
8234
  }) => {
8067
- const showEmptyState = hasFilters && strategies.length === 0;
8068
- if (isLoading) {
8069
- return /* @__PURE__ */ jsxs(
8070
- "section",
8071
- {
8072
- className: twMerge(
8073
- "flex flex-col gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-lg)]",
8074
- "bg-[var(--deframe-widget-color-bg-subtle)] rounded-[var(--deframe-widget-size-radius-sm)]",
8075
- className
8076
- ),
8077
- children: [
8078
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: sectionTitle }),
8079
- /* @__PURE__ */ jsxs("div", { className: "text-[color:var(--deframe-widget-color-text-secondary)] flex items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
8080
- loadingLabel,
8081
- /* @__PURE__ */ jsx(LoadingDots, {})
8082
- ] })
8083
- ]
8235
+ const [activeCategoryId, setActiveCategoryId] = React6__default.useState(null);
8236
+ const totalEarnings = React6__default.useMemo(
8237
+ () => positions.positions.reduce((sum, p) => sum + p.spotPosition.profitInUSD, 0),
8238
+ [positions.positions]
8239
+ );
8240
+ const statsCards = React6__default.useMemo(() => [
8241
+ { label: "Total Investido", value: formatCurrency(positions.summary.totalUnderlyingBalanceUSD), badge: "Soma de todos os dep\xF3sitos ativos." },
8242
+ { label: "Juros Acumulados", value: formatCurrency(totalEarnings), badge: "Rendimentos acumulados desde o in\xEDcio." }
8243
+ ], [positions.summary.totalUnderlyingBalanceUSD, totalEarnings, formatCurrency]);
8244
+ const categoryBanners = React6__default.useMemo(() => {
8245
+ return EARN_CATEGORY_DEFINITIONS.map((cat) => {
8246
+ var _a;
8247
+ const upperFilter = new Set(cat.assetFilter.map((a) => a.toUpperCase()));
8248
+ let bestApy = null;
8249
+ for (const s of strategies) {
8250
+ if (upperFilter.has(s.assetName.toUpperCase()) && s.apy > ((_a = bestApy == null ? void 0 : bestApy.apy) != null ? _a : 0)) {
8251
+ bestApy = s;
8252
+ }
8084
8253
  }
8085
- );
8254
+ const isStablecoin = cat.assetFilter.some((a) => STABLECOIN_SYMBOLS.has(a.toUpperCase()));
8255
+ return {
8256
+ id: cat.id,
8257
+ imageUrl: cat.imageUrl,
8258
+ alt: cat.title,
8259
+ apyFormatted: bestApy == null ? void 0 : bestApy.apyFormatted,
8260
+ description: isStablecoin ? "Rendimento em stablecoins" : "Rendimento em reais",
8261
+ handleClick: () => setActiveCategoryId(cat.id)
8262
+ };
8263
+ });
8264
+ }, [strategies]);
8265
+ const historyByAsset = React6__default.useMemo(() => {
8266
+ var _a, _b, _c, _d;
8267
+ const map = /* @__PURE__ */ new Map();
8268
+ for (const item of historyItems) {
8269
+ const isDeposit = item.type.includes("DEPOSIT");
8270
+ const assetIn = (_a = item.amounts) == null ? void 0 : _a.assetIn;
8271
+ const symbol = (_d = assetIn && "token" in assetIn ? (_c = (_b = assetIn.token) == null ? void 0 : _b.symbol) == null ? void 0 : _c.toUpperCase() : null) != null ? _d : "";
8272
+ if (!symbol) continue;
8273
+ const amount = assetIn && "amountInUSD" in assetIn && assetIn.amountInUSD ? formatCurrency(parseFloat(assetIn.amountInUSD)) : assetIn && "amountHumanized" in assetIn ? `${assetIn.amountHumanized} ${symbol}` : "";
8274
+ const date = new Date(item.createdAt).toLocaleString(locale, {
8275
+ day: "2-digit",
8276
+ month: "2-digit",
8277
+ year: "numeric",
8278
+ hour: "2-digit",
8279
+ minute: "2-digit"
8280
+ });
8281
+ const entry = {
8282
+ id: item.id,
8283
+ date,
8284
+ type: isDeposit ? "deposit" : "withdraw",
8285
+ amount,
8286
+ onClick: onHistoryDetail ? () => onHistoryDetail(item.id, isDeposit) : void 0
8287
+ };
8288
+ if (!map.has(symbol)) map.set(symbol, []);
8289
+ map.get(symbol).push(entry);
8290
+ }
8291
+ return map;
8292
+ }, [historyItems, locale, formatCurrency, onHistoryDetail]);
8293
+ const strategyRows = React6__default.useMemo(() => {
8294
+ return positions.positions.filter((p) => p.spotPosition.underlyingBalanceUSD > 0.01).map((p) => {
8295
+ var _a;
8296
+ return {
8297
+ logoUrl: p.strategy.logourl,
8298
+ assetName: p.strategy.assetName,
8299
+ network: p.strategy.network,
8300
+ investedFormatted: formatCurrency(p.spotPosition.underlyingBalanceUSD),
8301
+ earningsFormatted: `${(p.spotPosition.apy * 100).toFixed(2)}%`,
8302
+ isLoading: false,
8303
+ history: (_a = historyByAsset.get(p.strategy.assetName.toUpperCase())) != null ? _a : [],
8304
+ onInvestClick: onDeposit ? () => onDeposit(p.strategy.id) : () => {
8305
+ },
8306
+ onWithdrawClick: onWithdraw ? () => onWithdraw(p.strategy.id) : () => {
8307
+ },
8308
+ onDetailsClick: onDetails ? () => onDetails(p.strategy.id) : () => {
8309
+ }
8310
+ };
8311
+ });
8312
+ }, [positions.positions, formatCurrency, historyByAsset, onDeposit, onWithdraw, onDetails]);
8313
+ if (isLoading) {
8314
+ return /* @__PURE__ */ jsxs("div", { "data-test-id": "earn-hub-view-simple-loading", className: twMerge(wrapperBaseClasses, className), children: [
8315
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-[var(--deframe-widget-size-gap-sm)]", children: [0, 1].map((i) => /* @__PURE__ */ jsx(Skeleton, { variant: "rect", width: "100%", height: 100 }, i)) }),
8316
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-[var(--deframe-widget-size-gap-sm)]", children: [0, 1].map((i) => /* @__PURE__ */ jsx(Skeleton, { variant: "rect", width: "100%", height: 160 }, i)) }),
8317
+ /* @__PURE__ */ jsx(Skeleton, { variant: "rect", width: "100%", height: 200 })
8318
+ ] });
8086
8319
  }
8087
- if (error) {
8088
- return /* @__PURE__ */ jsxs(
8089
- "section",
8320
+ if (activeCategoryId) {
8321
+ return /* @__PURE__ */ jsx(
8322
+ GroupedStrategyListViewSimple,
8090
8323
  {
8091
- className: twMerge(
8092
- "flex flex-col gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-lg)]",
8093
- "bg-[var(--deframe-widget-color-bg-subtle)] rounded-[var(--deframe-widget-size-radius-sm)]",
8094
- className
8095
- ),
8096
- children: [
8097
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: sectionTitle }),
8098
- /* @__PURE__ */ jsx("div", { className: "text-[color:var(--deframe-widget-color-state-error)]", children: errorLabel })
8099
- ]
8324
+ categoryId: activeCategoryId,
8325
+ strategies,
8326
+ isLoading,
8327
+ onBack: () => setActiveCategoryId(null),
8328
+ onDeposit,
8329
+ onWithdraw,
8330
+ className
8100
8331
  }
8101
8332
  );
8102
8333
  }
8103
- return /* @__PURE__ */ jsxs(
8104
- "section",
8105
- {
8106
- className: twMerge(
8107
- "flex flex-col gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-lg)]",
8108
- "bg-[var(--deframe-widget-color-bg-subtle)] rounded-[var(--deframe-widget-size-radius-sm)]",
8109
- className
8110
- ),
8111
- children: [
8112
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: sectionTitle }),
8113
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]", children: [
8114
- searchBar,
8115
- chipGroup
8116
- ] }),
8117
- showEmptyState && /* @__PURE__ */ jsx("div", { className: "lg:h-[440px] flex items-center justify-center", children: /* @__PURE__ */ jsx(SearchEmptyState, { title: emptySearchTitle, description: emptySearchDescription }) }),
8118
- !showEmptyState && /* @__PURE__ */ jsx(
8334
+ return /* @__PURE__ */ jsxs("div", { "data-test-id": "earn-hub-view-simple", className: twMerge(wrapperBaseClasses, className), children: [
8335
+ /* @__PURE__ */ jsx(
8336
+ "div",
8337
+ {
8338
+ "data-test-id": "earn-hub-view-simple-header",
8339
+ className: "flex items-center justify-between gap-[var(--deframe-widget-size-gap-md)]",
8340
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-xs)]", children: [
8341
+ /* @__PURE__ */ jsx(
8342
+ "h1",
8343
+ {
8344
+ "data-test-id": "earn-hub-view-simple-title",
8345
+ className: "text-[color:var(--deframe-widget-color-text-primary)] text-[length:var(--deframe-widget-font-size-xxl)] [font-weight:var(--deframe-widget-font-weight-bold)] leading-[var(--deframe-widget-font-leading-xxl)] font-[var(--deframe-widget-font-family)]",
8346
+ children: "Caixinha"
8347
+ }
8348
+ ),
8349
+ /* @__PURE__ */ jsx(
8350
+ "p",
8351
+ {
8352
+ "data-test-id": "earn-hub-view-simple-subtitle",
8353
+ className: "text-[color:var(--deframe-widget-color-text-secondary)] text-[length:var(--deframe-widget-font-size-sm)] leading-[var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)]",
8354
+ children: "Invista e deixe seu dinheiro render."
8355
+ }
8356
+ )
8357
+ ] })
8358
+ }
8359
+ ),
8360
+ /* @__PURE__ */ jsx(
8361
+ "div",
8362
+ {
8363
+ "data-test-id": "earn-hub-view-simple-stats",
8364
+ className: "grid grid-cols-2 gap-[var(--deframe-widget-size-gap-sm)]",
8365
+ children: statsCards.map((card, i) => /* @__PURE__ */ jsxs("article", { className: twMerge(statCardClasses, "self-stretch"), children: [
8366
+ /* @__PURE__ */ jsx("p", { className: statCardLabelClasses, children: card.label }),
8367
+ /* @__PURE__ */ jsx("p", { className: i > 0 ? statCardValuePositiveClasses : statCardValueDefaultClasses, children: card.value }),
8368
+ /* @__PURE__ */ jsx("p", { className: statCardDescriptionClasses, children: card.badge })
8369
+ ] }, card.label))
8370
+ }
8371
+ ),
8372
+ /* @__PURE__ */ jsx(
8373
+ "div",
8374
+ {
8375
+ "data-test-id": "earn-hub-view-simple-categories",
8376
+ className: "grid grid-cols-2 gap-[var(--deframe-widget-size-gap-sm)]",
8377
+ children: categoryBanners.map((cat, i) => /* @__PURE__ */ jsx(
8378
+ ImageBannerCard,
8379
+ {
8380
+ imageUrl: cat.imageUrl,
8381
+ alt: cat.alt,
8382
+ apyFormatted: cat.apyFormatted,
8383
+ description: cat.description,
8384
+ onClick: cat.handleClick,
8385
+ colorToken: BANNER_COLORS[i % BANNER_COLORS.length]
8386
+ },
8387
+ cat.alt
8388
+ ))
8389
+ }
8390
+ ),
8391
+ /* @__PURE__ */ jsxs("div", { className: listPanelClasses, children: [
8392
+ /* @__PURE__ */ jsxs("div", { className: sectionHeaderClasses, children: [
8393
+ /* @__PURE__ */ jsx("h3", { "data-test-id": "earn-hub-view-simple-strategies-title", className: sectionTitleClasses, children: "Suas Caixinhas" }),
8394
+ onHistory && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] flex-shrink-0", children: /* @__PURE__ */ jsx(
8395
+ "button",
8396
+ {
8397
+ type: "button",
8398
+ "aria-label": "Hist\xF3rico",
8399
+ "data-test-id": "earn-hub-simple-history-button",
8400
+ onClick: onHistory,
8401
+ className: twMerge(
8402
+ "inline-flex items-center justify-center",
8403
+ "w-9 h-9",
8404
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
8405
+ "border-none bg-transparent",
8406
+ "cursor-pointer outline-none flex-shrink-0",
8407
+ "text-[color:var(--deframe-widget-color-text-secondary)]",
8408
+ "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_92%,transparent)]",
8409
+ "transition-[background] duration-150"
8410
+ ),
8411
+ children: /* @__PURE__ */ jsxs(
8412
+ "svg",
8413
+ {
8414
+ viewBox: "0 0 24 24",
8415
+ width: "20",
8416
+ height: "20",
8417
+ fill: "none",
8418
+ stroke: "currentColor",
8419
+ strokeWidth: "2",
8420
+ strokeLinecap: "round",
8421
+ strokeLinejoin: "round",
8422
+ "aria-hidden": "true",
8423
+ children: [
8424
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
8425
+ /* @__PURE__ */ jsx("polyline", { points: "12 6 12 12 16 14" })
8426
+ ]
8427
+ }
8428
+ )
8429
+ }
8430
+ ) })
8431
+ ] }),
8432
+ strategyRows.length === 0 ? /* @__PURE__ */ jsx(SimpleEmptyState, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
8433
+ /* @__PURE__ */ jsx(
8119
8434
  "div",
8120
8435
  {
8121
- className: "explore-strategies-grid grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-[var(--deframe-widget-size-gap-md)] overflow-y-auto pr-[var(--deframe-widget-size-padding-x-sm)] h-[440px] auto-rows-[136px]",
8122
- children: strategies.map((strategy) => /* @__PURE__ */ jsx(
8123
- StrategyGridCard,
8436
+ "data-test-id": "earn-hub-view-simple-columns",
8437
+ className: twMerge(
8438
+ GRID_COLS2,
8439
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)]",
8440
+ "border-t border-[color:var(--deframe-widget-color-border-secondary)]"
8441
+ ),
8442
+ children: ["CAIXINHA", "RENDIMENTO", "INVESTIDO"].map((label, i) => /* @__PURE__ */ jsx(
8443
+ "span",
8124
8444
  {
8125
- logoUrl: strategy.logoUrl,
8126
- title: strategy.title,
8127
- subtitle: strategy.subtitle,
8128
- apyFormatted: strategy.apyFormatted,
8129
- apyLabel: strategy.apyLabel,
8130
- onClick: () => onStrategyClick == null ? void 0 : onStrategyClick(strategy.id)
8445
+ className: twMerge(
8446
+ columnHeaderClasses,
8447
+ i === 1 && "text-center",
8448
+ i === 2 && "text-right"
8449
+ ),
8450
+ children: label
8131
8451
  },
8132
- strategy.id
8452
+ label
8133
8453
  ))
8134
8454
  }
8135
- )
8136
- ]
8137
- }
8138
- );
8455
+ ),
8456
+ /* @__PURE__ */ jsx("ol", { "data-test-id": "earn-hub-view-simple-strategy-list", className: "list-none m-0 p-0", children: strategyRows.map((s) => /* @__PURE__ */ jsx(EarnHubStrategyCard, __spreadValues({}, s), s.assetName)) })
8457
+ ] })
8458
+ ] })
8459
+ ] });
8139
8460
  };
8140
- var EarnRecentTransactionsView = ({
8141
- sectionTitle,
8142
- viewAllLabel,
8461
+ var wrapperBaseClasses2 = [
8462
+ "w-full flex flex-col",
8463
+ "gap-[var(--deframe-widget-size-gap-md)]",
8464
+ "font-[var(--deframe-widget-font-family)]"
8465
+ ].join(" ");
8466
+ var titleClasses = [
8467
+ "text-[color:var(--deframe-widget-color-text-primary)]",
8468
+ "text-[length:var(--deframe-widget-font-size-xxl)]",
8469
+ "[font-weight:var(--deframe-widget-font-weight-bold)]",
8470
+ "leading-[var(--deframe-widget-font-leading-xxl)]",
8471
+ "font-[var(--deframe-widget-font-family)]"
8472
+ ].join(" ");
8473
+ var backButtonClasses = [
8474
+ "inline-flex items-center gap-[var(--deframe-widget-size-gap-xs)]",
8475
+ "text-[color:var(--deframe-widget-color-text-secondary)]",
8476
+ "hover:text-[color:var(--deframe-widget-color-text-primary)]",
8477
+ "text-[length:var(--deframe-widget-font-size-sm)]",
8478
+ "[font-weight:var(--deframe-widget-font-weight-medium)]",
8479
+ "transition-colors cursor-pointer",
8480
+ "font-[var(--deframe-widget-font-family)]",
8481
+ "border-none bg-transparent outline-none p-0"
8482
+ ].join(" ");
8483
+ var emptyBoxClasses = [
8484
+ "w-full flex flex-col items-center justify-center",
8485
+ "gap-[var(--deframe-widget-size-gap-sm)]",
8486
+ "px-[var(--deframe-widget-size-padding-x-md)]",
8487
+ "py-[var(--deframe-widget-size-padding-y-xl)]",
8488
+ "rounded-[var(--deframe-widget-size-radius-md)]",
8489
+ "border border-dashed border-[color:var(--deframe-widget-color-border-secondary)]",
8490
+ "bg-[color:var(--deframe-widget-color-bg-secondary)]"
8491
+ ].join(" ");
8492
+ var GroupedStrategyListViewSimple = ({
8493
+ categoryId,
8494
+ strategies = [],
8143
8495
  isLoading,
8144
- hasMore,
8145
- hasItems,
8146
- historyList,
8147
- emptyTitle,
8148
- emptyDescription,
8149
- onViewAll,
8496
+ onBack,
8497
+ onDeposit,
8498
+ onWithdraw,
8150
8499
  className
8151
8500
  }) => {
8152
- return /* @__PURE__ */ jsxs(
8153
- "section",
8154
- {
8155
- className: twMerge(
8156
- "flex flex-col gap-md p-lg",
8157
- "bg-[var(--deframe-widget-color-bg-subtle)] rounded",
8158
- className
8159
- ),
8160
- children: [
8161
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
8162
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] dark:text-[color:var(--deframe-widget-color-text-secondary-dark)]", children: sectionTitle }),
8163
- hasMore && onViewAll && /* @__PURE__ */ jsx(
8164
- "button",
8165
- {
8166
- type: "button",
8167
- onClick: onViewAll,
8168
- className: "text-brand-primary dark:text-brand-primary-dark hover:underline",
8169
- children: /* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: viewAllLabel })
8170
- }
8171
- )
8172
- ] }),
8173
- isLoading ? /* @__PURE__ */ jsx(HistoryListSkeleton, {}) : hasItems ? historyList : /* @__PURE__ */ jsx(HistoryTabEmpty, { title: emptyTitle, description: emptyDescription })
8174
- ]
8501
+ var _a;
8502
+ const category = EARN_CATEGORY_DEFINITIONS.find((c) => c.id === categoryId);
8503
+ const categoryTitle = (_a = category == null ? void 0 : category.title) != null ? _a : "Estrat\xE9gias";
8504
+ const allClaimedAssets = React6__default.useMemo(() => {
8505
+ const claimed = /* @__PURE__ */ new Set();
8506
+ for (const cat of EARN_CATEGORY_DEFINITIONS) {
8507
+ if (cat.assetFilter.length > 0) {
8508
+ for (const symbol of cat.assetFilter) {
8509
+ claimed.add(symbol.toUpperCase());
8510
+ }
8511
+ }
8175
8512
  }
8176
- );
8177
- };
8178
- var EarnDesktopView = ({
8179
- isLoading,
8180
- loadingSkeleton,
8181
- summary,
8182
- invested,
8183
- explore,
8184
- transactions
8185
- }) => {
8513
+ return claimed;
8514
+ }, []);
8515
+ const filteredStrategies = React6__default.useMemo(() => {
8516
+ const assetFilter = category == null ? void 0 : category.assetFilter;
8517
+ if (!assetFilter || assetFilter.length === 0) {
8518
+ return strategies.filter((s) => !allClaimedAssets.has(s.assetName.toUpperCase()));
8519
+ }
8520
+ const upperFilter = new Set(assetFilter.map((a) => a.toUpperCase()));
8521
+ return strategies.filter((s) => upperFilter.has(s.assetName.toUpperCase()));
8522
+ }, [strategies, category, allClaimedAssets]);
8186
8523
  if (isLoading) {
8187
- if (loadingSkeleton) {
8188
- return /* @__PURE__ */ jsx(Fragment, { children: loadingSkeleton });
8189
- }
8190
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)] w-full flex-1 min-h-0 animate-pulse px-[var(--deframe-widget-size-padding-x-lg)] py-[var(--deframe-widget-size-padding-y-lg)]", children: [
8191
- /* @__PURE__ */ jsx("div", { className: "h-24 rounded bg-[var(--deframe-widget-color-bg-secondary)]" }),
8192
- /* @__PURE__ */ jsx("div", { className: "h-40 rounded bg-[var(--deframe-widget-color-bg-secondary)]" }),
8193
- /* @__PURE__ */ jsx("div", { className: "h-60 rounded bg-[var(--deframe-widget-color-bg-secondary)]" })
8524
+ return /* @__PURE__ */ jsxs("div", { "data-test-id": "grouped-strategy-list-view-simple-loading", className: twMerge(wrapperBaseClasses2, className), children: [
8525
+ /* @__PURE__ */ jsx(Skeleton, { variant: "rect", width: "40%", height: 24 }),
8526
+ /* @__PURE__ */ jsx(Skeleton, { variant: "rect", width: "100%", height: 80 }),
8527
+ /* @__PURE__ */ jsx(Skeleton, { variant: "rect", width: "100%", height: 80 })
8194
8528
  ] });
8195
8529
  }
8196
- return /* @__PURE__ */ jsxs("div", { className: "text-[color:var(--deframe-widget-color-text-primary)] flex flex-col relative overflow-y-auto w-full flex-1 min-h-0 pb-[var(--deframe-widget-size-padding-y-lg)] gap-[var(--deframe-widget-size-gap-md)]", children: [
8197
- /* @__PURE__ */ jsx(EarnInvestmentSummaryView, __spreadValues({}, summary)),
8198
- /* @__PURE__ */ jsx(EarnInvestedSectionView, __spreadValues({}, invested)),
8199
- /* @__PURE__ */ jsx(EarnExploreGridView, __spreadValues({}, explore)),
8200
- /* @__PURE__ */ jsx(EarnRecentTransactionsView, __spreadValues({}, transactions))
8201
- ] });
8202
- };
8203
- var EarnInvestmentDetailsView = (props) => {
8204
- if (props.isLoading) {
8205
- return /* @__PURE__ */ jsx(BackgroundContainer, { children: props.loadingSkeleton });
8206
- }
8207
- const {
8208
- title,
8209
- onBack,
8210
- tokenIcon,
8211
- fiatBalance,
8212
- profitAmount,
8213
- tokenAmount,
8214
- investedLabel,
8215
- earningsLabel,
8216
- summaryTitle,
8217
- summaryItems,
8218
- pastActivitiesTitle,
8219
- transactions,
8220
- onTransactionClick,
8221
- showMoreButton,
8222
- onLoadMore,
8223
- loadMoreLabel,
8224
- depositLabel,
8225
- onDeposit,
8226
- withdrawLabel,
8227
- onWithdraw
8228
- } = props;
8229
- return /* @__PURE__ */ jsxs(BackgroundContainer, { children: [
8230
- /* @__PURE__ */ jsxs(Navbar, { children: [
8231
- /* @__PURE__ */ jsx(BackButton, { onClick: onBack }),
8232
- /* @__PURE__ */ jsx(TextHeading, { variant: "h1", children: title })
8233
- ] }),
8234
- /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col min-h-0 px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)] gap-[var(--deframe-widget-size-gap-md)]", children: [
8235
- /* @__PURE__ */ jsx(
8236
- EarnBalanceCard,
8530
+ return /* @__PURE__ */ jsxs("div", { "data-test-id": "grouped-strategy-list-view-simple", className: twMerge(wrapperBaseClasses2, className), children: [
8531
+ /* @__PURE__ */ jsxs("div", { "data-test-id": "grouped-strategy-list-view-simple-header", children: [
8532
+ /* @__PURE__ */ jsxs(
8533
+ "button",
8237
8534
  {
8238
- tokenIcon,
8239
- fiatBalance,
8240
- profitAmount,
8241
- tokenAmount,
8242
- investedLabel,
8243
- earningsLabel
8535
+ type: "button",
8536
+ "data-test-id": "grouped-strategy-list-view-simple-back",
8537
+ "aria-label": "Voltar",
8538
+ onClick: onBack,
8539
+ className: backButtonClasses,
8540
+ children: [
8541
+ /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M10 4L6 8L10 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
8542
+ "Voltar"
8543
+ ]
8244
8544
  }
8245
8545
  ),
8546
+ /* @__PURE__ */ jsx("h2", { "data-test-id": "grouped-strategy-list-view-simple-title", className: twMerge(titleClasses, "mt-[var(--deframe-widget-size-gap-sm)]"), children: categoryTitle }),
8246
8547
  /* @__PURE__ */ jsx(
8247
- SummaryDetails,
8548
+ TextBody,
8248
8549
  {
8249
- title: summaryTitle,
8250
- items: summaryItems,
8251
- defaultOpen: true,
8252
- className: "bg-[var(--deframe-widget-color-bg-secondary)] lg:!bg-[var(--deframe-widget-color-bg-primary)]"
8550
+ "data-test-id": "grouped-strategy-list-view-simple-subtitle",
8551
+ variant: "text-small",
8552
+ className: "text-[color:var(--deframe-widget-color-text-secondary)] mt-[var(--deframe-widget-size-gap-xs)]",
8553
+ children: "Escolha uma estrat\xE9gia para investir."
8253
8554
  }
8254
- ),
8255
- /* @__PURE__ */ jsxs("div", { className: "w-full rounded-[var(--deframe-widget-size-radius-sm)] flex flex-col gap-[var(--deframe-widget-size-gap-sm)] flex-shrink-0", children: [
8256
- /* @__PURE__ */ jsx(TextHeading, { variant: "h5", children: pastActivitiesTitle }),
8257
- /* @__PURE__ */ jsxs("div", { className: "investment-activities-list flex flex-col gap-[var(--deframe-widget-size-gap-sm)] overflow-y-auto max-h-[280px] pr-[var(--deframe-widget-size-padding-x-sm)]", children: [
8258
- transactions.map((tx) => /* @__PURE__ */ jsxs(
8259
- ListItem,
8260
- {
8261
- onClick: () => onTransactionClick(tx.id),
8262
- children: [
8263
- /* @__PURE__ */ jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsx("img", { src: tokenIcon, alt: "Token", className: "w-10 h-10 rounded-[var(--deframe-widget-size-radius-full)]" }) }),
8264
- /* @__PURE__ */ jsxs(ListItemContent, { children: [
8265
- /* @__PURE__ */ jsx(TextBody, { children: tx.action }),
8266
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: tx.date })
8267
- ] }),
8268
- /* @__PURE__ */ jsxs(ListItemRightSide, { children: [
8269
- /* @__PURE__ */ jsx(TextBody, { children: tx.usdAmount }),
8270
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: tx.tokenAmount })
8271
- ] })
8272
- ]
8273
- },
8274
- `tx-history-${tx.id}`
8275
- )),
8276
- showMoreButton && /* @__PURE__ */ jsx("div", { className: "flex justify-center items-center w-full py-4 flex-shrink-0", children: /* @__PURE__ */ jsx(TertiaryButton, { onClick: onLoadMore, children: loadMoreLabel }) })
8277
- ] })
8278
- ] })
8555
+ )
8279
8556
  ] }),
8280
- /* @__PURE__ */ jsx("div", { className: "sticky bottom-0 left-0 right-0 border-t border-[var(--deframe-widget-color-border-secondary)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]", children: /* @__PURE__ */ jsxs("div", { className: "flex justify-between gap-[var(--deframe-widget-size-gap-md)]", children: [
8281
- /* @__PURE__ */ jsx(PrimaryButton, { onClick: onDeposit, className: "w-full", children: depositLabel }),
8282
- /* @__PURE__ */ jsx(PrimaryButton, { onClick: onWithdraw, className: "w-full", children: withdrawLabel })
8283
- ] }) })
8557
+ filteredStrategies.length === 0 ? /* @__PURE__ */ jsx("div", { "data-test-id": "grouped-strategy-list-view-simple-empty", className: emptyBoxClasses, children: /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]", children: "Nenhuma estrat\xE9gia dispon\xEDvel no momento." }) }) : /* @__PURE__ */ jsx(
8558
+ "div",
8559
+ {
8560
+ "data-test-id": "grouped-strategy-list-view-simple-items",
8561
+ className: "flex flex-col gap-[var(--deframe-widget-size-gap-sm)]",
8562
+ children: filteredStrategies.map((s) => /* @__PURE__ */ jsx(
8563
+ StrategyGridCardSimple,
8564
+ {
8565
+ logoUrl: s.logourl,
8566
+ title: s.assetName,
8567
+ subtitle: s.assetName,
8568
+ chainName: s.network,
8569
+ apyFormatted: s.apyFormatted,
8570
+ apyLabel: "Rendimento",
8571
+ riskLevel: "low",
8572
+ onInvestClick: onDeposit ? () => onDeposit(s.id) : () => {
8573
+ },
8574
+ onWithdrawClick: onWithdraw ? () => onWithdraw(s.id) : () => {
8575
+ }
8576
+ },
8577
+ s.id
8578
+ ))
8579
+ }
8580
+ )
8284
8581
  ] });
8285
8582
  };
8286
- var EarnTokenSelectorView = ({
8287
- selectedToken,
8288
- onTokenClick,
8289
- onNetworkAndAssetClick,
8290
- onNetworkClick,
8291
- isLoading,
8292
- selectTokenLabel,
8293
- chainLabel,
8294
- chainImage,
8295
- chainDirectionLabel,
8296
- chainDisabledTitle,
8297
- isNetworkDisabled = false,
8298
- currentNetworkSelected
8299
- }) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[10px]", children: [
8300
- /* @__PURE__ */ jsx("div", { className: "flex gap-[10px] w-full", children: /* @__PURE__ */ jsx(
8301
- "button",
8583
+ var DateLabel = ({ children }) => {
8584
+ return /* @__PURE__ */ jsx("div", { className: "text-text-sm-mobile font-poppins text-[color:var(--deframe-widget-color-text-secondary)] dark:text-[color:var(--deframe-widget-color-text-secondary-dark)]", children });
8585
+ };
8586
+ var ArrowBadge = ({ isDeposit }) => {
8587
+ return /* @__PURE__ */ jsx("div", { className: "absolute bottom-[-2px] right-[-2px] w-[15px] h-[15px] rounded-full bg-[var(--deframe-widget-color-bg-secondary)] dark:bg-[var(--deframe-widget-color-bg-secondary-dark)] flex items-center justify-center border border-[color:var(--deframe-widget-color-bg-secondary)] dark:border-[color:var(--deframe-widget-color-bg-secondary-dark)]", children: isDeposit ? /* @__PURE__ */ jsx(MdArrowDownward, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-primary)] dark:text-[color:var(--deframe-widget-color-text-primary-dark)]" }) : /* @__PURE__ */ jsx(MdArrowUpward, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-primary)] dark:text-[color:var(--deframe-widget-color-text-primary-dark)]" }) });
8588
+ };
8589
+ var TokenIconWithBadge2 = ({ src, alt, isDeposit }) => {
8590
+ const fallbackText = encodeURIComponent((alt || "TOK").slice(0, 3).toUpperCase());
8591
+ const fallbackSrc = `https://placehold.co/40x40?text=${fallbackText}`;
8592
+ const resolvedSrc = src || fallbackSrc;
8593
+ return /* @__PURE__ */ jsxs("div", { className: "relative flex-shrink-0", children: [
8594
+ /* @__PURE__ */ jsx("div", { className: "w-10 h-10 rounded-xl bg-[var(--deframe-widget-color-bg-tertiary)] dark:bg-[var(--deframe-widget-color-bg-tertiary-dark)] flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ jsx(
8595
+ "img",
8596
+ {
8597
+ src: resolvedSrc,
8598
+ alt,
8599
+ className: "w-full h-full object-cover",
8600
+ onError: (e) => {
8601
+ e.target.src = fallbackSrc;
8602
+ }
8603
+ }
8604
+ ) }),
8605
+ /* @__PURE__ */ jsx(ArrowBadge, { isDeposit })
8606
+ ] });
8607
+ };
8608
+ var SwapIconWithBadge = ({ src, alt }) => {
8609
+ const fallbackText = encodeURIComponent((alt || "TOK").slice(0, 3).toUpperCase());
8610
+ const fallbackSrc = `https://placehold.co/40x40?text=${fallbackText}`;
8611
+ const resolvedSrc = src || fallbackSrc;
8612
+ return /* @__PURE__ */ jsxs("div", { className: "relative flex-shrink-0", children: [
8613
+ /* @__PURE__ */ jsx("div", { className: "w-10 h-10 rounded-xl bg-[var(--deframe-widget-color-bg-tertiary)] dark:bg-[var(--deframe-widget-color-bg-tertiary-dark)] flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ jsx(
8614
+ "img",
8615
+ {
8616
+ src: resolvedSrc,
8617
+ alt,
8618
+ className: "w-full h-full object-cover",
8619
+ onError: (e) => {
8620
+ e.target.src = fallbackSrc;
8621
+ }
8622
+ }
8623
+ ) }),
8624
+ /* @__PURE__ */ jsx("div", { className: "absolute bottom-[-2px] right-[-2px] w-[15px] h-[15px] rounded-full bg-[var(--deframe-widget-color-bg-secondary)] dark:bg-[var(--deframe-widget-color-bg-secondary-dark)] flex items-center justify-center border border-[color:var(--deframe-widget-color-bg-secondary)] dark:border-[color:var(--deframe-widget-color-bg-secondary-dark)]", children: /* @__PURE__ */ jsx(MdArrowUpward, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-primary)] dark:text-[color:var(--deframe-widget-color-text-primary-dark)]" }) })
8625
+ ] });
8626
+ };
8627
+ var AmountDisplay = ({ amount, usdAmount }) => {
8628
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
8629
+ /* @__PURE__ */ jsx(Label, { className: "text-accent-sm-mobile whitespace-nowrap", children: amount }),
8630
+ usdAmount ? /* @__PURE__ */ jsx(Label, { variant: "secondary", className: "whitespace-nowrap", children: usdAmount }) : null
8631
+ ] });
8632
+ };
8633
+ var HistoryListView = ({
8634
+ groups,
8635
+ showLoadMore,
8636
+ onLoadMore,
8637
+ loadMoreLabel,
8638
+ itemClassName
8639
+ }) => {
8640
+ if (groups.length === 0) {
8641
+ return null;
8642
+ }
8643
+ return /* @__PURE__ */ jsxs("div", { className: "self-stretch flex flex-col gap-[16px]", children: [
8644
+ groups.map((group) => /* @__PURE__ */ jsxs("div", { className: "self-stretch flex flex-col gap-sm", children: [
8645
+ /* @__PURE__ */ jsx(DateLabel, { children: group.dateLabel }),
8646
+ group.items.map((item) => /* @__PURE__ */ jsxs(
8647
+ ListItem,
8648
+ {
8649
+ onClick: () => item.onClick(),
8650
+ containerClassName: twMerge("!rounded-xs !border-0 !min-h-[72px]", itemClassName),
8651
+ children: [
8652
+ /* @__PURE__ */ jsx(ListItemLeftSide, { children: item.isSwap ? /* @__PURE__ */ jsx(SwapIconWithBadge, { src: item.iconUrl, alt: item.iconAlt }) : /* @__PURE__ */ jsx(
8653
+ TokenIconWithBadge2,
8654
+ {
8655
+ src: item.iconUrl,
8656
+ alt: item.iconAlt,
8657
+ isDeposit: item.isDeposit
8658
+ }
8659
+ ) }),
8660
+ /* @__PURE__ */ jsxs(ListItemContent, { children: [
8661
+ /* @__PURE__ */ jsx(Label, { className: "text-text-lg-mobile", children: item.title }),
8662
+ /* @__PURE__ */ jsx(Label, { variant: "secondary", className: "text-[color:var(--deframe-widget-color-text-tertiary)] dark:text-[color:var(--deframe-widget-color-text-tertiary-dark)]", children: item.subtitle }),
8663
+ item.status === "PENDING" && item.statusLabel ? /* @__PURE__ */ jsx("div", { className: "mt-[6px]", children: /* @__PURE__ */ jsx(
8664
+ ProcessingBadge,
8665
+ {
8666
+ label: item.statusLabel,
8667
+ title: item.statusTitle,
8668
+ size: "compact"
8669
+ }
8670
+ ) }) : null
8671
+ ] }),
8672
+ /* @__PURE__ */ jsx(ListItemRightSide, { children: /* @__PURE__ */ jsx(AmountDisplay, { amount: item.amountFormatted, usdAmount: item.amountUsd }) })
8673
+ ]
8674
+ },
8675
+ item.id
8676
+ ))
8677
+ ] }, group.dateLabel)),
8678
+ showLoadMore && /* @__PURE__ */ jsx("div", { className: "flex justify-center pt-sm", children: /* @__PURE__ */ jsx(TertiaryButton, { onClick: onLoadMore, children: loadMoreLabel }) })
8679
+ ] });
8680
+ };
8681
+ var OverviewEarnWidgetTabSkeleton = () => {
8682
+ return /* @__PURE__ */ jsxs("div", { className: "w-full flex flex-col gap-md", children: [
8683
+ /* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "40px", variant: "rect" }),
8684
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-sm", children: [
8685
+ /* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "144px", variant: "rect" }),
8686
+ /* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "144px", variant: "rect" })
8687
+ ] }),
8688
+ /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
8689
+ /* @__PURE__ */ jsx(Skeleton, { width: "128px", height: "20px", variant: "text", className: "mb-sm" }),
8690
+ /* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "80px", variant: "rect" })
8691
+ ] }),
8692
+ /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
8693
+ /* @__PURE__ */ jsx(Skeleton, { width: "96px", height: "20px", variant: "text", className: "mb-sm" }),
8694
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-sm", children: [
8695
+ /* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "64px", variant: "rect" }),
8696
+ /* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "64px", variant: "rect" }),
8697
+ /* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "64px", variant: "rect" }),
8698
+ /* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "64px", variant: "rect" })
8699
+ ] })
8700
+ ] })
8701
+ ] });
8702
+ };
8703
+ var EarnOverviewView = ({
8704
+ selectedTab,
8705
+ onTabChange,
8706
+ labels,
8707
+ overview,
8708
+ explore,
8709
+ history
8710
+ }) => {
8711
+ return /* @__PURE__ */ jsx(BackgroundContainer, { className: "flex flex-col flex-1 min-h-0 px-0", children: /* @__PURE__ */ jsxs(Tabs, { value: selectedTab, onValueChange: onTabChange, variant: "default", className: "flex flex-col flex-1 min-h-0", children: [
8712
+ /* @__PURE__ */ jsxs(TabsList, { className: "justify-between w-full", children: [
8713
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "overview", className: "flex-1", children: labels.tabs.overview }),
8714
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "explore", className: "flex-1", children: labels.tabs.explore }),
8715
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "history", className: "flex-1", children: labels.tabs.history })
8716
+ ] }),
8717
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 w-full min-h-0 px-md pt-md", children: [
8718
+ /* @__PURE__ */ jsx(TabsContent, { value: "overview", className: "flex flex-col flex-1 min-h-0", children: overview.isLoading ? /* @__PURE__ */ jsx(OverviewEarnWidgetTabSkeleton, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
8719
+ /* @__PURE__ */ jsx(WalletBalances, { cards: overview.walletBalances }),
8720
+ /* @__PURE__ */ jsx(GroupedStrategyListView, __spreadValues({}, overview.groupedStrategies))
8721
+ ] }) }),
8722
+ /* @__PURE__ */ jsxs(TabsContent, { value: "explore", children: [
8723
+ /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 w-full mb-4 h-12", children: /* @__PURE__ */ jsx(
8724
+ SearchInput,
8725
+ {
8726
+ value: explore.searchValue,
8727
+ onChange: (value) => explore.onSearchChange(value),
8728
+ placeholder: explore.searchPlaceholder
8729
+ }
8730
+ ) }),
8731
+ explore.isLoading ? /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
8732
+ explore.loadingLabel,
8733
+ /* @__PURE__ */ jsx(LoadingDots, {})
8734
+ ] }) : explore.error ? /* @__PURE__ */ jsxs("div", { className: "p-4 text-center text-red-500", children: [
8735
+ explore.errorLabel,
8736
+ ": ",
8737
+ explore.error.message
8738
+ ] }) : explore.hasFilters && explore.strategies.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "w-full py-md bg-bg-default dark:bg-bg-default-dark rounded-lg flex flex-col gap-sm flex-shrink-0", children: [
8739
+ /* @__PURE__ */ jsx(
8740
+ ChipGroup,
8741
+ {
8742
+ options: explore.chipOptions,
8743
+ selected: explore.selectedCategory,
8744
+ onSelect: (value) => explore.onCategorySelect(value)
8745
+ }
8746
+ ),
8747
+ /* @__PURE__ */ jsx(SearchEmptyState, { title: explore.emptySearchTitle, description: explore.emptySearchDescription })
8748
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "w-full py-md bg-bg-default dark:bg-bg-default-dark rounded-lg flex flex-col gap-sm flex-shrink-0", children: [
8749
+ /* @__PURE__ */ jsx(
8750
+ ChipGroup,
8751
+ {
8752
+ options: explore.chipOptions,
8753
+ selected: explore.selectedCategory,
8754
+ onSelect: (value) => explore.onCategorySelect(value)
8755
+ }
8756
+ ),
8757
+ /* @__PURE__ */ jsx(TextHeading, { variant: "h5", children: explore.bestPerformanceLabel }),
8758
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-sm", children: explore.strategies.map((s) => /* @__PURE__ */ jsxs(ListItem, { onClick: () => s.onClick(), children: [
8759
+ /* @__PURE__ */ jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsx("img", { src: s.logoUrl, alt: s.subtitle, className: "w-10 h-10 rounded-full" }) }),
8760
+ /* @__PURE__ */ jsxs(ListItemContent, { children: [
8761
+ /* @__PURE__ */ jsx(TextBody, { children: s.title }),
8762
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: s.subtitle })
8763
+ ] }),
8764
+ /* @__PURE__ */ jsx(ListItemRightSide, { children: /* @__PURE__ */ jsx(TextBody, { children: s.apyFormatted }) })
8765
+ ] }, s.id)) })
8766
+ ] })
8767
+ ] }),
8768
+ /* @__PURE__ */ jsx(TabsContent, { value: "history", children: history.isLoading ? /* @__PURE__ */ jsx(HistoryListSkeleton, {}) : history.isEmpty ? /* @__PURE__ */ jsx("div", { className: "w-full h-[90vh] py-md bg-bg-default dark:bg-bg-default-dark rounded-lg flex flex-col justify-center items-center gap-sm overflow-hidden", children: /* @__PURE__ */ jsxs("div", { className: "w-full flex flex-col justify-center items-center gap-md", children: [
8769
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col justify-center items-center gap-md text-center", children: [
8770
+ /* @__PURE__ */ jsx("div", { className: "w-20 h-20 bg-bg-muted dark:bg-bg-muted-dark rounded-full flex justify-center items-center", children: /* @__PURE__ */ jsx(PiClockCountdownBold, { className: "w-10 h-10 text-text-tertiary dark:text-text-tertiary-dark" }) }),
8771
+ /* @__PURE__ */ jsx(TextHeading, { variant: "h3", children: history.emptyTitle })
8772
+ ] }),
8773
+ /* @__PURE__ */ jsx("div", { className: "self-stretch text-center", children: /* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: history.emptyDescription }) })
8774
+ ] }) }) : /* @__PURE__ */ jsx(
8775
+ HistoryListView,
8776
+ {
8777
+ groups: history.groups,
8778
+ showLoadMore: history.showLoadMore,
8779
+ onLoadMore: () => history.onLoadMore(),
8780
+ loadMoreLabel: history.loadMoreLabel
8781
+ }
8782
+ ) })
8783
+ ] })
8784
+ ] }) });
8785
+ };
8786
+ var EarnInvestmentSummaryView = ({
8787
+ overviewDescription,
8788
+ totalInvestedLabel,
8789
+ totalInvestedValue,
8790
+ totalReturnLabel,
8791
+ totalReturnValue,
8792
+ processingBadgeLabel,
8793
+ processingBadgeTitle,
8794
+ className
8795
+ }) => {
8796
+ return /* @__PURE__ */ jsxs("section", { className: twMerge("flex flex-col gap-md p-lg bg-[var(--deframe-widget-color-bg-subtle)] rounded", className), children: [
8797
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] dark:text-[color:var(--deframe-widget-color-text-secondary-dark)]", children: overviewDescription }),
8798
+ /* @__PURE__ */ jsx(
8799
+ WalletBalances,
8800
+ {
8801
+ cards: [
8802
+ {
8803
+ label: totalInvestedLabel,
8804
+ value: totalInvestedValue,
8805
+ badge: processingBadgeLabel ? /* @__PURE__ */ jsx(
8806
+ ProcessingBadge,
8807
+ {
8808
+ label: processingBadgeLabel,
8809
+ title: processingBadgeTitle
8810
+ }
8811
+ ) : void 0
8812
+ },
8813
+ { label: totalReturnLabel, value: totalReturnValue }
8814
+ ],
8815
+ variant: "raised",
8816
+ className: "grid grid-cols-2 gap-md !mt-0"
8817
+ }
8818
+ )
8819
+ ] });
8820
+ };
8821
+ var EarnInvestedSectionView = ({
8822
+ sectionTitle,
8823
+ items,
8824
+ onItemClick,
8825
+ className
8826
+ }) => {
8827
+ if (items.length === 0) {
8828
+ return null;
8829
+ }
8830
+ return /* @__PURE__ */ jsxs(
8831
+ "section",
8832
+ {
8833
+ className: twMerge(
8834
+ "flex flex-col gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-lg)]",
8835
+ "bg-[var(--deframe-widget-color-bg-subtle)] rounded-[var(--deframe-widget-size-radius-sm)]",
8836
+ className
8837
+ ),
8838
+ children: [
8839
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: sectionTitle }),
8840
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]", children: items.map((item, index) => {
8841
+ const isLast = index === items.length - 1;
8842
+ return /* @__PURE__ */ jsxs(
8843
+ "button",
8844
+ {
8845
+ type: "button",
8846
+ onClick: () => onItemClick == null ? void 0 : onItemClick(item.strategyId),
8847
+ className: twMerge(
8848
+ "flex items-center gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-md)] bg-[var(--deframe-widget-color-bg-raised)] rounded-[var(--deframe-widget-size-radius-sm)]",
8849
+ "transition-colors cursor-pointer text-left w-full",
8850
+ !isLast && "border-b border-[var(--deframe-widget-color-border-secondary)]"
8851
+ ),
8852
+ children: [
8853
+ /* @__PURE__ */ jsx(
8854
+ "img",
8855
+ {
8856
+ src: item.logoUrl,
8857
+ alt: item.assetName,
8858
+ className: "w-10 h-10 rounded-[var(--deframe-widget-size-radius-full)] flex-shrink-0"
8859
+ }
8860
+ ),
8861
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 min-w-0", children: [
8862
+ /* @__PURE__ */ jsx(TextBody, { className: "font-medium truncate", children: item.assetName }),
8863
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-tertiary)] truncate", children: item.subtitle })
8864
+ ] }),
8865
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-end flex-shrink-0", children: [
8866
+ /* @__PURE__ */ jsx(TextBody, { className: "font-medium", children: item.balanceFormatted }),
8867
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: item.profitFormatted })
8868
+ ] })
8869
+ ]
8870
+ },
8871
+ item.strategyId
8872
+ );
8873
+ }) })
8874
+ ]
8875
+ }
8876
+ );
8877
+ };
8878
+ var EarnExploreGridView = ({
8879
+ sectionTitle,
8880
+ loadingLabel,
8881
+ errorLabel,
8882
+ emptySearchTitle,
8883
+ emptySearchDescription,
8884
+ isLoading,
8885
+ error,
8886
+ strategies,
8887
+ searchBar,
8888
+ chipGroup,
8889
+ hasFilters,
8890
+ onStrategyClick,
8891
+ className
8892
+ }) => {
8893
+ const showEmptyState = hasFilters && strategies.length === 0;
8894
+ if (isLoading) {
8895
+ return /* @__PURE__ */ jsxs(
8896
+ "section",
8897
+ {
8898
+ className: twMerge(
8899
+ "flex flex-col gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-lg)]",
8900
+ "bg-[var(--deframe-widget-color-bg-subtle)] rounded-[var(--deframe-widget-size-radius-sm)]",
8901
+ className
8902
+ ),
8903
+ children: [
8904
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: sectionTitle }),
8905
+ /* @__PURE__ */ jsxs("div", { className: "text-[color:var(--deframe-widget-color-text-secondary)] flex items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
8906
+ loadingLabel,
8907
+ /* @__PURE__ */ jsx(LoadingDots, {})
8908
+ ] })
8909
+ ]
8910
+ }
8911
+ );
8912
+ }
8913
+ if (error) {
8914
+ return /* @__PURE__ */ jsxs(
8915
+ "section",
8916
+ {
8917
+ className: twMerge(
8918
+ "flex flex-col gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-lg)]",
8919
+ "bg-[var(--deframe-widget-color-bg-subtle)] rounded-[var(--deframe-widget-size-radius-sm)]",
8920
+ className
8921
+ ),
8922
+ children: [
8923
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: sectionTitle }),
8924
+ /* @__PURE__ */ jsx("div", { className: "text-[color:var(--deframe-widget-color-state-error)]", children: errorLabel })
8925
+ ]
8926
+ }
8927
+ );
8928
+ }
8929
+ return /* @__PURE__ */ jsxs(
8930
+ "section",
8931
+ {
8932
+ className: twMerge(
8933
+ "flex flex-col gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-lg)]",
8934
+ "bg-[var(--deframe-widget-color-bg-subtle)] rounded-[var(--deframe-widget-size-radius-sm)]",
8935
+ className
8936
+ ),
8937
+ children: [
8938
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: sectionTitle }),
8939
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]", children: [
8940
+ searchBar,
8941
+ chipGroup
8942
+ ] }),
8943
+ showEmptyState && /* @__PURE__ */ jsx("div", { className: "lg:h-[440px] flex items-center justify-center", children: /* @__PURE__ */ jsx(SearchEmptyState, { title: emptySearchTitle, description: emptySearchDescription }) }),
8944
+ !showEmptyState && /* @__PURE__ */ jsx(
8945
+ "div",
8946
+ {
8947
+ className: "explore-strategies-grid grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-[var(--deframe-widget-size-gap-md)] overflow-y-auto pr-[var(--deframe-widget-size-padding-x-sm)] h-[440px] auto-rows-[136px]",
8948
+ children: strategies.map((strategy) => /* @__PURE__ */ jsx(
8949
+ StrategyGridCard,
8950
+ {
8951
+ logoUrl: strategy.logoUrl,
8952
+ title: strategy.title,
8953
+ subtitle: strategy.subtitle,
8954
+ apyFormatted: strategy.apyFormatted,
8955
+ apyLabel: strategy.apyLabel,
8956
+ onClick: () => onStrategyClick == null ? void 0 : onStrategyClick(strategy.id)
8957
+ },
8958
+ strategy.id
8959
+ ))
8960
+ }
8961
+ )
8962
+ ]
8963
+ }
8964
+ );
8965
+ };
8966
+ var EarnRecentTransactionsView = ({
8967
+ sectionTitle,
8968
+ viewAllLabel,
8969
+ isLoading,
8970
+ hasMore,
8971
+ hasItems,
8972
+ historyList,
8973
+ emptyTitle,
8974
+ emptyDescription,
8975
+ onViewAll,
8976
+ className
8977
+ }) => {
8978
+ return /* @__PURE__ */ jsxs(
8979
+ "section",
8980
+ {
8981
+ className: twMerge(
8982
+ "flex flex-col gap-md p-lg",
8983
+ "bg-[var(--deframe-widget-color-bg-subtle)] rounded",
8984
+ className
8985
+ ),
8986
+ children: [
8987
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
8988
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)] dark:text-[color:var(--deframe-widget-color-text-secondary-dark)]", children: sectionTitle }),
8989
+ hasMore && onViewAll && /* @__PURE__ */ jsx(
8990
+ "button",
8991
+ {
8992
+ type: "button",
8993
+ onClick: onViewAll,
8994
+ className: "text-brand-primary dark:text-brand-primary-dark hover:underline",
8995
+ children: /* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: viewAllLabel })
8996
+ }
8997
+ )
8998
+ ] }),
8999
+ isLoading ? /* @__PURE__ */ jsx(HistoryListSkeleton, {}) : hasItems ? historyList : /* @__PURE__ */ jsx(HistoryTabEmpty, { title: emptyTitle, description: emptyDescription })
9000
+ ]
9001
+ }
9002
+ );
9003
+ };
9004
+ var EarnDesktopView = ({
9005
+ isLoading,
9006
+ loadingSkeleton,
9007
+ summary,
9008
+ invested,
9009
+ explore,
9010
+ transactions
9011
+ }) => {
9012
+ if (isLoading) {
9013
+ if (loadingSkeleton) {
9014
+ return /* @__PURE__ */ jsx(Fragment, { children: loadingSkeleton });
9015
+ }
9016
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)] w-full flex-1 min-h-0 animate-pulse px-[var(--deframe-widget-size-padding-x-lg)] py-[var(--deframe-widget-size-padding-y-lg)]", children: [
9017
+ /* @__PURE__ */ jsx("div", { className: "h-24 rounded bg-[var(--deframe-widget-color-bg-secondary)]" }),
9018
+ /* @__PURE__ */ jsx("div", { className: "h-40 rounded bg-[var(--deframe-widget-color-bg-secondary)]" }),
9019
+ /* @__PURE__ */ jsx("div", { className: "h-60 rounded bg-[var(--deframe-widget-color-bg-secondary)]" })
9020
+ ] });
9021
+ }
9022
+ return /* @__PURE__ */ jsxs("div", { className: "text-[color:var(--deframe-widget-color-text-primary)] flex flex-col relative overflow-y-auto w-full flex-1 min-h-0 pb-[var(--deframe-widget-size-padding-y-lg)] gap-[var(--deframe-widget-size-gap-md)]", children: [
9023
+ /* @__PURE__ */ jsx(EarnInvestmentSummaryView, __spreadValues({}, summary)),
9024
+ /* @__PURE__ */ jsx(EarnInvestedSectionView, __spreadValues({}, invested)),
9025
+ /* @__PURE__ */ jsx(EarnExploreGridView, __spreadValues({}, explore)),
9026
+ /* @__PURE__ */ jsx(EarnRecentTransactionsView, __spreadValues({}, transactions))
9027
+ ] });
9028
+ };
9029
+ var EarnInvestmentDetailsView = (props) => {
9030
+ if (props.isLoading) {
9031
+ return /* @__PURE__ */ jsx(BackgroundContainer, { children: props.loadingSkeleton });
9032
+ }
9033
+ const {
9034
+ title,
9035
+ onBack,
9036
+ tokenIcon,
9037
+ fiatBalance,
9038
+ profitAmount,
9039
+ tokenAmount,
9040
+ investedLabel,
9041
+ earningsLabel,
9042
+ summaryTitle,
9043
+ summaryItems,
9044
+ pastActivitiesTitle,
9045
+ transactions,
9046
+ onTransactionClick,
9047
+ showMoreButton,
9048
+ onLoadMore,
9049
+ loadMoreLabel,
9050
+ depositLabel,
9051
+ onDeposit,
9052
+ withdrawLabel,
9053
+ onWithdraw
9054
+ } = props;
9055
+ return /* @__PURE__ */ jsxs(BackgroundContainer, { children: [
9056
+ /* @__PURE__ */ jsxs(Navbar, { children: [
9057
+ /* @__PURE__ */ jsx(BackButton, { onClick: onBack }),
9058
+ /* @__PURE__ */ jsx(TextHeading, { variant: "h1", children: title })
9059
+ ] }),
9060
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col min-h-0 px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)] gap-[var(--deframe-widget-size-gap-md)]", children: [
9061
+ /* @__PURE__ */ jsx(
9062
+ EarnBalanceCard,
9063
+ {
9064
+ tokenIcon,
9065
+ fiatBalance,
9066
+ profitAmount,
9067
+ tokenAmount,
9068
+ investedLabel,
9069
+ earningsLabel
9070
+ }
9071
+ ),
9072
+ /* @__PURE__ */ jsx(
9073
+ SummaryDetails,
9074
+ {
9075
+ title: summaryTitle,
9076
+ items: summaryItems,
9077
+ defaultOpen: true,
9078
+ className: "bg-[var(--deframe-widget-color-bg-secondary)] lg:!bg-[var(--deframe-widget-color-bg-primary)]"
9079
+ }
9080
+ ),
9081
+ /* @__PURE__ */ jsxs("div", { className: "w-full rounded-[var(--deframe-widget-size-radius-sm)] flex flex-col gap-[var(--deframe-widget-size-gap-sm)] flex-shrink-0", children: [
9082
+ /* @__PURE__ */ jsx(TextHeading, { variant: "h5", children: pastActivitiesTitle }),
9083
+ /* @__PURE__ */ jsxs("div", { className: "investment-activities-list flex flex-col gap-[var(--deframe-widget-size-gap-sm)] overflow-y-auto max-h-[280px] pr-[var(--deframe-widget-size-padding-x-sm)]", children: [
9084
+ transactions.map((tx) => /* @__PURE__ */ jsxs(
9085
+ ListItem,
9086
+ {
9087
+ onClick: () => onTransactionClick(tx.id),
9088
+ children: [
9089
+ /* @__PURE__ */ jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsx("img", { src: tokenIcon, alt: "Token", className: "w-10 h-10 rounded-[var(--deframe-widget-size-radius-full)]" }) }),
9090
+ /* @__PURE__ */ jsxs(ListItemContent, { children: [
9091
+ /* @__PURE__ */ jsx(TextBody, { children: tx.action }),
9092
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: tx.date })
9093
+ ] }),
9094
+ /* @__PURE__ */ jsxs(ListItemRightSide, { children: [
9095
+ /* @__PURE__ */ jsx(TextBody, { children: tx.usdAmount }),
9096
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: tx.tokenAmount })
9097
+ ] })
9098
+ ]
9099
+ },
9100
+ `tx-history-${tx.id}`
9101
+ )),
9102
+ showMoreButton && /* @__PURE__ */ jsx("div", { className: "flex justify-center items-center w-full py-4 flex-shrink-0", children: /* @__PURE__ */ jsx(TertiaryButton, { onClick: onLoadMore, children: loadMoreLabel }) })
9103
+ ] })
9104
+ ] })
9105
+ ] }),
9106
+ /* @__PURE__ */ jsx("div", { className: "sticky bottom-0 left-0 right-0 border-t border-[var(--deframe-widget-color-border-secondary)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]", children: /* @__PURE__ */ jsxs("div", { className: "flex justify-between gap-[var(--deframe-widget-size-gap-md)]", children: [
9107
+ /* @__PURE__ */ jsx(PrimaryButton, { onClick: onDeposit, className: "w-full", children: depositLabel }),
9108
+ /* @__PURE__ */ jsx(PrimaryButton, { onClick: onWithdraw, className: "w-full", children: withdrawLabel })
9109
+ ] }) })
9110
+ ] });
9111
+ };
9112
+ var EarnTokenSelectorView = ({
9113
+ selectedToken,
9114
+ onTokenClick,
9115
+ onNetworkAndAssetClick,
9116
+ onNetworkClick,
9117
+ isLoading,
9118
+ selectTokenLabel,
9119
+ chainLabel,
9120
+ chainImage,
9121
+ chainDirectionLabel,
9122
+ chainDisabledTitle,
9123
+ isNetworkDisabled = false,
9124
+ currentNetworkSelected
9125
+ }) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[10px]", children: [
9126
+ /* @__PURE__ */ jsx("div", { className: "flex gap-[10px] w-full", children: /* @__PURE__ */ jsx(
9127
+ "button",
8302
9128
  {
8303
9129
  type: "button",
8304
9130
  onClick: onNetworkAndAssetClick != null ? onNetworkAndAssetClick : onTokenClick,
@@ -9852,7 +10678,7 @@ function EarnFormSkeleton() {
9852
10678
  "px-[var(--deframe-widget-size-padding-x-md)]",
9853
10679
  "py-[var(--deframe-widget-size-padding-y-md)]"
9854
10680
  ].join(" ");
9855
- const titleClasses = [
10681
+ const titleClasses2 = [
9856
10682
  "flex-1",
9857
10683
  "text-[15px]",
9858
10684
  "[font-weight:var(--deframe-widget-font-weight-semibold)]",
@@ -9882,7 +10708,7 @@ function EarnFormSkeleton() {
9882
10708
  "data-test-id": "earn-form-skeleton",
9883
10709
  className: "flex flex-col font-[var(--deframe-widget-font-family)]",
9884
10710
  children: [
9885
- /* @__PURE__ */ jsx("div", { "data-test-id": "earn-form-skeleton-header", className: headerClasses, children: /* @__PURE__ */ jsx("span", { className: titleClasses, children: "Deposit" }) }),
10711
+ /* @__PURE__ */ jsx("div", { "data-test-id": "earn-form-skeleton-header", className: headerClasses, children: /* @__PURE__ */ jsx("span", { className: titleClasses2, children: "Deposit" }) }),
9886
10712
  /* @__PURE__ */ jsx("div", { "data-test-id": "earn-form-skeleton-divider", className: dividerClasses }),
9887
10713
  /* @__PURE__ */ jsx("div", { "data-test-id": "earn-form-skeleton-body", className: bodyClasses, children: /* @__PURE__ */ jsxs("div", { "data-test-id": "earn-form-skeleton-input-card", className: inputCardClasses, children: [
9888
10714
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
@@ -9983,7 +10809,7 @@ function EarnFeedbackOverlaySimpleView({
9983
10809
  "flex flex-col items-center",
9984
10810
  "gap-[var(--deframe-widget-size-gap-sm)] text-center"
9985
10811
  );
9986
- const titleClasses = twMerge(
10812
+ const titleClasses2 = twMerge(
9987
10813
  isLoading ? "[font-size:12px] [line-height:1.25] [letter-spacing:0.10em] uppercase [font-weight:var(--deframe-widget-font-weight-semibold)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-brand-primary)]" : "text-[22px] font-bold text-[color:var(--deframe-widget-color-text-primary)] leading-[1.25]"
9988
10814
  );
9989
10815
  const subtitleClasses = twMerge(
@@ -10028,7 +10854,7 @@ function EarnFeedbackOverlaySimpleView({
10028
10854
  {
10029
10855
  "data-test-id": "earn-feedback-title",
10030
10856
  "data-slot": "earn-feedback-title",
10031
- className: titleClasses,
10857
+ className: titleClasses2,
10032
10858
  children: title
10033
10859
  }
10034
10860
  ),
@@ -11056,10 +11882,304 @@ function OnchainDepositFormView({
11056
11882
  children: submitLabel
11057
11883
  }
11058
11884
  )
11059
- ] })
11885
+ ] })
11886
+ }
11887
+ );
11888
+ }
11889
+ var OnchainDepositFormSimpleView = ({
11890
+ // Token selector
11891
+ selectedToken,
11892
+ onTokenClick,
11893
+ selectedChain,
11894
+ // Address
11895
+ depositAddress,
11896
+ onAddressCopy,
11897
+ // Navigation
11898
+ onBack,
11899
+ onClose,
11900
+ // Labels
11901
+ labels,
11902
+ // Tab switcher
11903
+ activeTab,
11904
+ cryptoHref,
11905
+ pixHref
11906
+ }) => {
11907
+ var _a;
11908
+ const hasToken = selectedToken != null;
11909
+ const showAddressSection = hasToken && !!depositAddress;
11910
+ const panelBaseClasses = [
11911
+ "relative flex flex-col overflow-hidden w-[420px]",
11912
+ "rounded-[var(--deframe-widget-size-radius-md)]",
11913
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
11914
+ "font-[var(--deframe-widget-font-family)]"
11915
+ ].join(" ");
11916
+ const headerBaseClasses = [
11917
+ "flex items-center",
11918
+ "px-[var(--deframe-widget-size-padding-x-md)]",
11919
+ "py-[var(--deframe-widget-size-padding-y-md)]"
11920
+ ].join(" ");
11921
+ const titleBaseClasses = [
11922
+ "flex-1",
11923
+ "text-[15px]",
11924
+ "[font-weight:var(--deframe-widget-font-weight-semibold)]",
11925
+ "text-[color:var(--deframe-widget-color-text-primary)]"
11926
+ ].join(" ");
11927
+ const dividerClasses = "h-px bg-[var(--deframe-widget-color-border-secondary)]";
11928
+ const bodyBaseClasses = [
11929
+ "flex flex-col",
11930
+ "gap-[var(--deframe-widget-size-gap-md)]",
11931
+ "px-[var(--deframe-widget-size-padding-x-md)]",
11932
+ "py-[var(--deframe-widget-size-padding-y-md)]"
11933
+ ].join(" ");
11934
+ return /* @__PURE__ */ jsxs(
11935
+ "div",
11936
+ {
11937
+ "data-slot": "onchain-deposit-simple-panel",
11938
+ "data-test-id": "onchain-deposit-form-simple-view",
11939
+ className: panelBaseClasses,
11940
+ children: [
11941
+ /* @__PURE__ */ jsxs(
11942
+ "header",
11943
+ {
11944
+ "data-slot": "onchain-deposit-simple-header",
11945
+ "data-test-id": "onchain-deposit-form-simple-view-header",
11946
+ className: headerBaseClasses,
11947
+ children: [
11948
+ /* @__PURE__ */ jsx(
11949
+ "span",
11950
+ {
11951
+ "data-slot": "onchain-deposit-simple-title",
11952
+ "data-test-id": "onchain-deposit-form-simple-view-title",
11953
+ className: titleBaseClasses,
11954
+ children: labels.title
11955
+ }
11956
+ ),
11957
+ onClose && /* @__PURE__ */ jsx(
11958
+ CloseButton_default,
11959
+ {
11960
+ onClick: onClose,
11961
+ ariaLabel: "Close deposit panel",
11962
+ testId: "onchain-deposit-form-simple-view-close"
11963
+ }
11964
+ )
11965
+ ]
11966
+ }
11967
+ ),
11968
+ /* @__PURE__ */ jsx(
11969
+ "div",
11970
+ {
11971
+ "data-slot": "onchain-deposit-simple-divider",
11972
+ "data-test-id": "onchain-deposit-form-simple-view-divider",
11973
+ className: dividerClasses
11974
+ }
11975
+ ),
11976
+ /* @__PURE__ */ jsx(
11977
+ "nav",
11978
+ {
11979
+ "data-slot": "onchain-deposit-simple-tabs",
11980
+ "data-test-id": "onchain-deposit-form-simple-view-tabs",
11981
+ className: "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)]",
11982
+ children: /* @__PURE__ */ jsxs(
11983
+ "div",
11984
+ {
11985
+ role: "tablist",
11986
+ "data-test-id": "onchain-deposit-form-simple-view-tablist",
11987
+ className: twMerge(
11988
+ "inline-flex w-full rounded-[var(--deframe-widget-size-radius-md)]",
11989
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
11990
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
11991
+ "p-[3px] gap-[2px]"
11992
+ ),
11993
+ children: [
11994
+ /* @__PURE__ */ jsx(
11995
+ "a",
11996
+ {
11997
+ href: cryptoHref != null ? cryptoHref : "/dashboard/deposit/onchain",
11998
+ role: "tab",
11999
+ "aria-selected": activeTab === "crypto",
12000
+ "aria-current": activeTab === "crypto" ? "page" : void 0,
12001
+ "aria-label": "Cripto",
12002
+ "data-test-id": "onchain-deposit-form-simple-view-tab-crypto",
12003
+ className: twMerge(
12004
+ "inline-flex flex-1 items-center justify-center",
12005
+ "gap-[var(--deframe-widget-size-gap-xs)]",
12006
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
12007
+ "border-[length:var(--deframe-widget-size-border-sm)] border-solid border-transparent",
12008
+ "outline-none whitespace-nowrap transition-[background,color,border-color] duration-150",
12009
+ "font-[var(--deframe-widget-font-family)] [font-weight:var(--deframe-widget-font-weight-medium)]",
12010
+ "py-[5px] px-[var(--deframe-widget-size-padding-x-lg)]",
12011
+ "[font-size:var(--deframe-widget-font-size-md)] [line-height:var(--deframe-widget-font-leading-md)]",
12012
+ 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)]"
12013
+ ),
12014
+ children: "Cripto"
12015
+ }
12016
+ ),
12017
+ /* @__PURE__ */ jsx(
12018
+ "a",
12019
+ {
12020
+ href: pixHref != null ? pixHref : "/dashboard/deposit/onramp",
12021
+ role: "tab",
12022
+ "aria-selected": activeTab === "pix",
12023
+ "aria-current": activeTab === "pix" ? "page" : void 0,
12024
+ "aria-label": "PIX",
12025
+ "data-test-id": "onchain-deposit-form-simple-view-tab-pix",
12026
+ className: twMerge(
12027
+ "inline-flex flex-1 items-center justify-center",
12028
+ "gap-[var(--deframe-widget-size-gap-xs)]",
12029
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
12030
+ "border-[length:var(--deframe-widget-size-border-sm)] border-solid border-transparent",
12031
+ "outline-none whitespace-nowrap transition-[background,color,border-color] duration-150",
12032
+ "font-[var(--deframe-widget-font-family)] [font-weight:var(--deframe-widget-font-weight-medium)]",
12033
+ "py-[5px] px-[var(--deframe-widget-size-padding-x-lg)]",
12034
+ "[font-size:var(--deframe-widget-font-size-md)] [line-height:var(--deframe-widget-font-leading-md)]",
12035
+ 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)]"
12036
+ ),
12037
+ children: "PIX"
12038
+ }
12039
+ )
12040
+ ]
12041
+ }
12042
+ )
12043
+ }
12044
+ ),
12045
+ /* @__PURE__ */ jsx(
12046
+ "div",
12047
+ {
12048
+ "data-slot": "onchain-deposit-simple-divider-tabs",
12049
+ "data-test-id": "onchain-deposit-form-simple-view-divider-tabs",
12050
+ className: dividerClasses
12051
+ }
12052
+ ),
12053
+ /* @__PURE__ */ jsxs(
12054
+ "div",
12055
+ {
12056
+ "data-slot": "onchain-deposit-simple-body",
12057
+ "data-test-id": "onchain-deposit-form-simple-view-body",
12058
+ className: bodyBaseClasses,
12059
+ children: [
12060
+ /* @__PURE__ */ jsxs(
12061
+ "div",
12062
+ {
12063
+ "data-slot": "onchain-deposit-simple-token-card",
12064
+ "data-test-id": "onchain-deposit-form-simple-view-token-card",
12065
+ className: twMerge(
12066
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
12067
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
12068
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
12069
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]"
12070
+ ),
12071
+ children: [
12072
+ /* @__PURE__ */ jsx(
12073
+ EarnTokenSelectorSimpleView,
12074
+ {
12075
+ selectedToken,
12076
+ onTokenClick,
12077
+ onNetworkAndAssetClick: onTokenClick,
12078
+ isLoading: false,
12079
+ selectTokenLabel: "SELECIONE AQUI",
12080
+ chainLabel: (_a = selectedChain == null ? void 0 : selectedChain.name) != null ? _a : "",
12081
+ chainImage: selectedChain == null ? void 0 : selectedChain.iconUrl
12082
+ }
12083
+ ),
12084
+ !hasToken && /* @__PURE__ */ jsx(
12085
+ "p",
12086
+ {
12087
+ "data-slot": "onchain-deposit-simple-empty-hint",
12088
+ "data-test-id": "onchain-deposit-form-simple-view-empty-hint",
12089
+ className: "mt-[var(--deframe-widget-size-gap-sm)] text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
12090
+ children: labels.tokenPlaceholder
12091
+ }
12092
+ )
12093
+ ]
12094
+ }
12095
+ ),
12096
+ /* @__PURE__ */ jsx(AnimatePresence, { children: showAddressSection && /* @__PURE__ */ jsxs(
12097
+ motion.div,
12098
+ {
12099
+ "data-slot": "onchain-deposit-simple-address-section",
12100
+ "data-test-id": "onchain-deposit-form-simple-view-address-section",
12101
+ initial: { opacity: 0, height: 0 },
12102
+ animate: { opacity: 1, height: "auto" },
12103
+ exit: { opacity: 0, height: 0 },
12104
+ transition: { duration: 0.2, ease: "easeOut" },
12105
+ style: { overflow: "hidden" },
12106
+ className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]",
12107
+ children: [
12108
+ /* @__PURE__ */ jsxs(
12109
+ "div",
12110
+ {
12111
+ "data-slot": "onchain-deposit-simple-address-card",
12112
+ "data-test-id": "onchain-deposit-form-simple-view-address-card",
12113
+ className: twMerge(
12114
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
12115
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
12116
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
12117
+ "px-[var(--deframe-widget-size-padding-x-md)] pt-[var(--deframe-widget-size-padding-y-sm)] pb-[var(--deframe-widget-size-padding-y-md)]"
12118
+ ),
12119
+ children: [
12120
+ /* @__PURE__ */ jsx(
12121
+ "p",
12122
+ {
12123
+ "data-test-id": "onchain-deposit-form-simple-view-address-label",
12124
+ className: "mb-[var(--deframe-widget-size-gap-sm)] text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
12125
+ children: "Endere\xE7o de dep\xF3sito"
12126
+ }
12127
+ ),
12128
+ /* @__PURE__ */ jsx(
12129
+ AddressDisplay,
12130
+ {
12131
+ address: depositAddress,
12132
+ onCopy: onAddressCopy
12133
+ }
12134
+ )
12135
+ ]
12136
+ }
12137
+ ),
12138
+ /* @__PURE__ */ jsx(
12139
+ EarnInlineNotificationSimpleView,
12140
+ {
12141
+ variant: "warning",
12142
+ message: labels.warnBannerTokenChain
12143
+ }
12144
+ )
12145
+ ]
12146
+ }
12147
+ ) })
12148
+ ]
12149
+ }
12150
+ ),
12151
+ /* @__PURE__ */ jsx(
12152
+ "footer",
12153
+ {
12154
+ "data-slot": "onchain-deposit-simple-footer",
12155
+ "data-test-id": "onchain-deposit-form-simple-view-footer",
12156
+ className: "px-[var(--deframe-widget-size-padding-x-md)] pb-[var(--deframe-widget-size-padding-y-md)]",
12157
+ children: /* @__PURE__ */ jsx(
12158
+ SecondaryButton,
12159
+ {
12160
+ type: "button",
12161
+ className: [
12162
+ "w-full h-12 rounded-[var(--deframe-widget-size-radius-sm)]",
12163
+ "text-[15px] text-[color:var(--deframe-widget-color-text-secondary)]",
12164
+ "border-[color:var(--deframe-widget-color-border-secondary)]",
12165
+ "outline-none",
12166
+ "transition-[background,color,border-color] duration-150",
12167
+ "hover:opacity-100",
12168
+ "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]",
12169
+ "hover:text-[color:var(--deframe-widget-color-text-primary)]"
12170
+ ].join(" "),
12171
+ onClick: onBack,
12172
+ "aria-label": labels.backLabel,
12173
+ "data-test-id": "onchain-deposit-form-simple-view-cancel",
12174
+ children: labels.backLabel
12175
+ }
12176
+ )
12177
+ }
12178
+ )
12179
+ ]
11060
12180
  }
11061
12181
  );
11062
- }
12182
+ };
11063
12183
 
11064
12184
  // src/utils/truncate-address.ts
11065
12185
  function truncateAddress(address, startChars = 6, endChars = 4) {
@@ -11193,333 +12313,703 @@ function OnchainDepositSuccessView({
11193
12313
  /* @__PURE__ */ jsxs(
11194
12314
  "div",
11195
12315
  {
11196
- className: "w-full mt-4 bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
11197
- "data-test-id": "onchain-deposit-success-details",
11198
- children: [
11199
- /* @__PURE__ */ jsxs(
11200
- "button",
12316
+ className: "w-full mt-4 bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
12317
+ "data-test-id": "onchain-deposit-success-details",
12318
+ children: [
12319
+ /* @__PURE__ */ jsxs(
12320
+ "button",
12321
+ {
12322
+ onClick: () => setShowDetails(!showDetails),
12323
+ className: "flex justify-between items-center w-full text-left cursor-pointer p-4",
12324
+ "aria-label": labels.detailsTitle,
12325
+ "data-test-id": "onchain-deposit-success-details-toggle",
12326
+ children: [
12327
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] font-semibold", children: labels.detailsTitle }),
12328
+ /* @__PURE__ */ jsx(
12329
+ MdOutlineExpandMore,
12330
+ {
12331
+ className: twMerge(
12332
+ "transition-transform text-[color:var(--deframe-widget-color-text-secondary)]",
12333
+ showDetails && "rotate-180"
12334
+ )
12335
+ }
12336
+ )
12337
+ ]
12338
+ }
12339
+ ),
12340
+ showDetails && /* @__PURE__ */ jsxs("div", { className: "px-4 pb-4", children: [
12341
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4 w-full", children: [
12342
+ /* @__PURE__ */ jsx("p", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-primary)] font-medium", children: labels.estimatedTimeLabel }),
12343
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.estimatedTimeValue })
12344
+ ] }),
12345
+ /* @__PURE__ */ jsx("div", { className: "mt-4 flex flex-col", children: labels.steps.map((step, index) => {
12346
+ var _a, _b;
12347
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
12348
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
12349
+ /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-full bg-[var(--deframe-widget-color-bg-tertiary)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx(IoCheckmarkOutline, { className: "w-4 h-4 text-[color:var(--deframe-widget-color-state-success)]" }) }),
12350
+ index < labels.steps.length - 1 && /* @__PURE__ */ jsx("div", { className: "w-[2px] h-6 bg-[var(--deframe-widget-color-state-success)]" })
12351
+ ] }),
12352
+ /* @__PURE__ */ jsxs("div", { className: twMerge("flex flex-col", index < labels.steps.length - 1 && "pb-2"), children: [
12353
+ /* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: step.label }),
12354
+ /* @__PURE__ */ jsx(
12355
+ "span",
12356
+ {
12357
+ className: twMerge(
12358
+ "text-[12px] font-semibold",
12359
+ step.statusText && "text-[color:var(--deframe-widget-color-state-success)]"
12360
+ ),
12361
+ children: (_b = step.statusText) != null ? _b : (_a = labels.steps[index]) == null ? void 0 : _a.label
12362
+ }
12363
+ )
12364
+ ] })
12365
+ ] }, step.label);
12366
+ }) })
12367
+ ] })
12368
+ ]
12369
+ }
12370
+ ),
12371
+ /* @__PURE__ */ jsx("div", { className: "w-full mt-8", children: /* @__PURE__ */ jsx(PrimaryButton, { onClick: onViewHistory, "data-test-id": "onchain-deposit-success-action", children: labels.viewHistoryLabel }) })
12372
+ ] }) })
12373
+ ]
12374
+ }
12375
+ );
12376
+ }
12377
+ var OnchainDepositSuccessSimpleView = ({
12378
+ onClose
12379
+ }) => {
12380
+ React6.useEffect(() => {
12381
+ if (!onClose) return;
12382
+ const timer = setTimeout(onClose, 5e3);
12383
+ return () => clearTimeout(timer);
12384
+ }, [onClose]);
12385
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "onchain-deposit-success-simple-view", children: /* @__PURE__ */ jsx(
12386
+ EarnFeedbackOverlaySimpleView,
12387
+ {
12388
+ variant: "success",
12389
+ title: "Dep\xF3sito Confirmado!",
12390
+ subtitle: "Seu saldo foi atualizado."
12391
+ }
12392
+ ) });
12393
+ };
12394
+ function OnchainWithdrawFormView({
12395
+ selectedToken,
12396
+ onTokenClick,
12397
+ isProcessing,
12398
+ chainCount,
12399
+ selectedChain,
12400
+ onNetworkClick,
12401
+ formattedBalance,
12402
+ amount,
12403
+ onAmountChange,
12404
+ isAmountInputDisabled,
12405
+ onMaxClick,
12406
+ showMaxButton,
12407
+ formattedAmountUsd,
12408
+ destinationNetwork,
12409
+ destinationAddress,
12410
+ onDestinationAddressChange,
12411
+ txDetails,
12412
+ isBelowMinAmount,
12413
+ walletError,
12414
+ transferError,
12415
+ showWarning,
12416
+ warningLabel,
12417
+ isSubmitDisabled,
12418
+ onSubmit,
12419
+ submitLabel,
12420
+ onBack,
12421
+ labels,
12422
+ className
12423
+ }) {
12424
+ const [showTxDetails, setShowTxDetails] = useState(false);
12425
+ return /* @__PURE__ */ jsx(
12426
+ "div",
12427
+ {
12428
+ className: twMerge(
12429
+ "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 p-6 lg:p-12",
12430
+ className
12431
+ ),
12432
+ "data-test-id": "onchain-withdraw-form-view",
12433
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col w-full px-2 py-0.5 rounded gap-1", children: [
12434
+ /* @__PURE__ */ jsx(
12435
+ SecondaryButton,
12436
+ {
12437
+ onClick: onBack,
12438
+ className: "mb-4 !border-0 max-w-[84px]",
12439
+ "aria-label": labels.backLabel,
12440
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
12441
+ /* @__PURE__ */ jsx(MdOutlineArrowBack, { className: "w-5 h-5 text-[color:var(--deframe-widget-color-text-primary)]" }),
12442
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-primary)]", children: labels.backLabel })
12443
+ ] })
12444
+ }
12445
+ ),
12446
+ /* @__PURE__ */ jsx(TextHeading, { variant: "h2", children: labels.title }),
12447
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: labels.subtitle }),
12448
+ /* @__PURE__ */ jsx(
12449
+ "div",
12450
+ {
12451
+ className: "my-4 p-[var(--deframe-widget-size-padding-x-md)] w-full bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
12452
+ "data-test-id": "onchain-withdraw-token-card",
12453
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-[var(--deframe-widget-size-gap-md)] items-center", children: [
12454
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-sm)] flex-1", children: [
12455
+ /* @__PURE__ */ jsxs(
12456
+ "button",
12457
+ {
12458
+ onClick: onTokenClick,
12459
+ disabled: isProcessing,
12460
+ className: "h-[56px] border border-[var(--deframe-widget-color-border-secondary)] rounded overflow-hidden transition-colors flex items-center px-[var(--deframe-widget-size-padding-x-sm)] py-[6px] w-full cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",
12461
+ "data-test-id": "onchain-withdraw-token-button",
12462
+ "aria-label": labels.tokenPlaceholder,
12463
+ children: [
12464
+ selectedToken ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] flex-1", children: [
12465
+ /* @__PURE__ */ jsx(
12466
+ "img",
12467
+ {
12468
+ src: selectedToken.logoURI || "",
12469
+ alt: selectedToken.symbol,
12470
+ className: "w-6 h-6 rounded-full object-cover"
12471
+ }
12472
+ ),
12473
+ /* @__PURE__ */ jsx("div", { className: "text-left", children: /* @__PURE__ */ jsx(TextBody, { variant: "text-large", className: "font-semibold", children: selectedToken.symbol }) })
12474
+ ] }) : /* @__PURE__ */ jsx("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] flex-1", children: /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.tokenPlaceholder }) }),
12475
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsx(MdOutlineArrowDropDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
12476
+ ]
12477
+ }
12478
+ ),
12479
+ /* @__PURE__ */ jsxs(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-tertiary)]", children: [
12480
+ labels.balancePrefix,
12481
+ ": ",
12482
+ formattedBalance
12483
+ ] }),
12484
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center gap-[var(--deframe-widget-size-gap-xs)]", children: [
12485
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "tracking-wide text-[color:var(--deframe-widget-color-text-tertiary)]", children: labels.chainDirectionLabel }),
12486
+ chainCount === 0 || !selectedChain ? /* @__PURE__ */ jsxs(
12487
+ "button",
12488
+ {
12489
+ disabled: true,
12490
+ className: "ml-6 bg-[var(--deframe-widget-color-bg-tertiary)] rounded-full flex items-center gap-[var(--deframe-widget-size-gap-xs)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] opacity-50 cursor-not-allowed",
12491
+ "data-test-id": "onchain-withdraw-chain-disabled",
12492
+ children: [
12493
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.chainPlaceholder }),
12494
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsx(MdOutlineArrowDropDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
12495
+ ]
12496
+ }
12497
+ ) : chainCount > 1 ? /* @__PURE__ */ jsxs(
12498
+ "button",
12499
+ {
12500
+ onClick: onNetworkClick,
12501
+ className: "ml-6 bg-[var(--deframe-widget-color-bg-tertiary)] border border-[var(--deframe-widget-color-border-tertiary)] rounded-full flex items-center gap-[var(--deframe-widget-size-gap-xs)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] transition-colors cursor-pointer",
12502
+ "data-test-id": "onchain-withdraw-chain-dropdown",
12503
+ "aria-label": labels.chainPlaceholder,
12504
+ children: [
12505
+ /* @__PURE__ */ jsx(
12506
+ "img",
12507
+ {
12508
+ src: selectedChain.iconUrl,
12509
+ alt: selectedChain.name,
12510
+ className: "w-3 h-3 rounded-full object-cover"
12511
+ }
12512
+ ),
12513
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: selectedChain.name }),
12514
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsx(MdOutlineArrowDropDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
12515
+ ]
12516
+ }
12517
+ ) : /* @__PURE__ */ jsxs(
12518
+ "div",
12519
+ {
12520
+ className: "ml-6 bg-[var(--deframe-widget-color-bg-tertiary)] border border-[var(--deframe-widget-color-border-tertiary)] rounded-lg flex items-center gap-[var(--deframe-widget-size-gap-xs)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)]",
12521
+ "data-test-id": "onchain-withdraw-chain-static",
12522
+ children: [
12523
+ /* @__PURE__ */ jsx(
12524
+ "img",
12525
+ {
12526
+ src: selectedChain.iconUrl,
12527
+ alt: selectedChain.name,
12528
+ className: "w-3 h-3 rounded-full object-cover"
12529
+ }
12530
+ ),
12531
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: selectedChain.name })
12532
+ ]
12533
+ }
12534
+ )
12535
+ ] })
12536
+ ] }),
12537
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 items-end justify-center gap-[var(--deframe-widget-size-gap-xs)] relative", children: [
12538
+ /* @__PURE__ */ jsx(
12539
+ Input2,
12540
+ {
12541
+ id: "withdraw-amount-input",
12542
+ placeholder: "0.00",
12543
+ inputMode: "decimal",
12544
+ autoComplete: "off",
12545
+ "aria-label": "Amount to withdraw",
12546
+ min: "0",
12547
+ step: "any",
12548
+ type: "number",
12549
+ value: amount,
12550
+ onChange: (e) => onAmountChange(e.target.value),
12551
+ onWheel: (event) => {
12552
+ event.currentTarget.blur();
12553
+ },
12554
+ disabled: isAmountInputDisabled,
12555
+ className: "text-h2-mobile font-extrabold bg-transparent outline-none text-right w-full min-w-[120px] placeholder:text-[color:var(--deframe-widget-color-placeholder-primary)] text-[color:var(--deframe-widget-color-text-primary)] [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none disabled:opacity-50 disabled:cursor-not-allowed",
12556
+ "data-test-id": "onchain-withdraw-amount-input"
12557
+ }
12558
+ ),
12559
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-tertiary)]", children: formattedAmountUsd }),
12560
+ showMaxButton && /* @__PURE__ */ jsx(
12561
+ "button",
12562
+ {
12563
+ onClick: onMaxClick,
12564
+ className: "absolute top-0 right-0 text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-brand-primary)] cursor-pointer -translate-y-6",
12565
+ "data-test-id": "onchain-withdraw-max-button",
12566
+ "aria-label": "Max",
12567
+ children: "Max"
12568
+ }
12569
+ )
12570
+ ] })
12571
+ ] })
12572
+ }
12573
+ ),
12574
+ /* @__PURE__ */ jsxs("div", { className: "mb-4", "data-test-id": "onchain-withdraw-destination-network", children: [
12575
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "mb-2", children: labels.destinationNetworkLabel }),
12576
+ /* @__PURE__ */ jsx(
12577
+ "div",
12578
+ {
12579
+ className: twMerge(
12580
+ "flex items-center gap-2 border border-[var(--deframe-widget-color-border-secondary)] rounded p-4 w-full",
12581
+ !destinationNetwork ? "opacity-50 cursor-not-allowed" : "bg-[var(--deframe-widget-color-bg-tertiary)]"
12582
+ ),
12583
+ children: destinationNetwork ? /* @__PURE__ */ jsxs(Fragment, { children: [
12584
+ /* @__PURE__ */ jsx(
12585
+ "img",
11201
12586
  {
11202
- onClick: () => setShowDetails(!showDetails),
11203
- className: "flex justify-between items-center w-full text-left cursor-pointer p-4",
11204
- "aria-label": labels.detailsTitle,
11205
- "data-test-id": "onchain-deposit-success-details-toggle",
11206
- children: [
11207
- /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] font-semibold", children: labels.detailsTitle }),
11208
- /* @__PURE__ */ jsx(
11209
- MdOutlineExpandMore,
11210
- {
11211
- className: twMerge(
11212
- "transition-transform text-[color:var(--deframe-widget-color-text-secondary)]",
11213
- showDetails && "rotate-180"
11214
- )
11215
- }
11216
- )
11217
- ]
12587
+ src: destinationNetwork.iconUrl,
12588
+ alt: destinationNetwork.name,
12589
+ className: "w-5 h-5 rounded-full object-cover"
11218
12590
  }
11219
12591
  ),
11220
- showDetails && /* @__PURE__ */ jsxs("div", { className: "px-4 pb-4", children: [
11221
- /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4 w-full", children: [
11222
- /* @__PURE__ */ jsx("p", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-primary)] font-medium", children: labels.estimatedTimeLabel }),
11223
- /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.estimatedTimeValue })
11224
- ] }),
11225
- /* @__PURE__ */ jsx("div", { className: "mt-4 flex flex-col", children: labels.steps.map((step, index) => {
11226
- var _a, _b;
11227
- return /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
11228
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
11229
- /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-full bg-[var(--deframe-widget-color-bg-tertiary)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx(IoCheckmarkOutline, { className: "w-4 h-4 text-[color:var(--deframe-widget-color-state-success)]" }) }),
11230
- index < labels.steps.length - 1 && /* @__PURE__ */ jsx("div", { className: "w-[2px] h-6 bg-[var(--deframe-widget-color-state-success)]" })
11231
- ] }),
11232
- /* @__PURE__ */ jsxs("div", { className: twMerge("flex flex-col", index < labels.steps.length - 1 && "pb-2"), children: [
11233
- /* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: step.label }),
11234
- /* @__PURE__ */ jsx(
11235
- "span",
11236
- {
11237
- className: twMerge(
11238
- "text-[12px] font-semibold",
11239
- step.statusText && "text-[color:var(--deframe-widget-color-state-success)]"
11240
- ),
11241
- children: (_b = step.statusText) != null ? _b : (_a = labels.steps[index]) == null ? void 0 : _a.label
11242
- }
11243
- )
11244
- ] })
11245
- ] }, step.label);
11246
- }) })
11247
- ] })
11248
- ]
12592
+ /* @__PURE__ */ jsx("span", { children: destinationNetwork.name }),
12593
+ /* @__PURE__ */ jsx("span", { className: "ml-auto text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.destinationNetworkSameHint })
12594
+ ] }) : /* @__PURE__ */ jsx("span", { className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.destinationNetworkEmpty })
11249
12595
  }
11250
- ),
11251
- /* @__PURE__ */ jsx("div", { className: "w-full mt-8", children: /* @__PURE__ */ jsx(PrimaryButton, { onClick: onViewHistory, "data-test-id": "onchain-deposit-success-action", children: labels.viewHistoryLabel }) })
11252
- ] }) })
11253
- ]
12596
+ )
12597
+ ] }),
12598
+ /* @__PURE__ */ jsx("div", { className: "mb-4", "data-test-id": "onchain-withdraw-destination-address", children: /* @__PURE__ */ jsx(
12599
+ Input2,
12600
+ {
12601
+ type: "text",
12602
+ label: labels.destinationAddressLabel,
12603
+ placeholder: labels.destinationAddressPlaceholder,
12604
+ value: destinationAddress,
12605
+ onChange: (e) => onDestinationAddressChange(e.target.value),
12606
+ disabled: isProcessing,
12607
+ className: "w-full px-4 py-3 bg-[var(--deframe-widget-color-bg-secondary)] border border-[var(--deframe-widget-color-border-secondary)] rounded outline-none disabled:opacity-50 disabled:cursor-not-allowed"
12608
+ }
12609
+ ) }),
12610
+ /* @__PURE__ */ jsx(BannerNotification, { message: labels.infoBanner, variant: "info", className: "gap-3" }),
12611
+ isBelowMinAmount && /* @__PURE__ */ jsx(BannerNotification, { message: labels.minAmountWarning, variant: "warning", className: "gap-3" }),
12612
+ txDetails !== null && /* @__PURE__ */ jsxs(
12613
+ "div",
12614
+ {
12615
+ className: "my-4 p-6 w-full bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
12616
+ "data-test-id": "onchain-withdraw-tx-details",
12617
+ children: [
12618
+ /* @__PURE__ */ jsxs(
12619
+ "button",
12620
+ {
12621
+ onClick: () => setShowTxDetails((v) => !v),
12622
+ className: "flex justify-between items-center w-full text-left cursor-pointer",
12623
+ "aria-label": labels.txDetailsTitle,
12624
+ "data-test-id": "onchain-withdraw-tx-details-toggle",
12625
+ children: [
12626
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-large", className: "font-semibold", children: labels.txDetailsTitle }),
12627
+ /* @__PURE__ */ jsx(MdOutlineExpandMore, { className: twMerge("transition-transform", showTxDetails && "rotate-180") })
12628
+ ]
12629
+ }
12630
+ ),
12631
+ showTxDetails && /* @__PURE__ */ jsxs("div", { className: "mt-4 space-y-3", children: [
12632
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
12633
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.txDetailsAmountLabel }),
12634
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "font-semibold", children: txDetails.formattedAmount })
12635
+ ] }),
12636
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
12637
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.txDetailsFeeLabel }),
12638
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "font-semibold", children: txDetails.formattedFee })
12639
+ ] }),
12640
+ /* @__PURE__ */ jsxs("div", { className: "border-t border-[var(--deframe-widget-color-border-secondary)] pt-3 flex justify-between items-center", children: [
12641
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.txDetailsReceiveLabel }),
12642
+ /* @__PURE__ */ jsx(TextBody, { variant: "text-large", className: "font-bold", children: txDetails.formattedReceive })
12643
+ ] })
12644
+ ] })
12645
+ ]
12646
+ }
12647
+ ),
12648
+ walletError && /* @__PURE__ */ jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsx(BannerNotification, { message: walletError, variant: "error" }) }),
12649
+ transferError && /* @__PURE__ */ jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsx(BannerNotification, { message: transferError, variant: "error", className: "gap-3" }) }),
12650
+ showWarning && /* @__PURE__ */ jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsx(BannerNotification, { message: warningLabel, variant: "warning" }) }),
12651
+ /* @__PURE__ */ jsx(PrimaryButton, { disabled: isSubmitDisabled, onClick: onSubmit, "data-test-id": "onchain-withdraw-submit", children: isProcessing ? /* @__PURE__ */ jsxs(Fragment, { children: [
12652
+ submitLabel,
12653
+ " ",
12654
+ /* @__PURE__ */ jsx(LoadingDots, {})
12655
+ ] }) : submitLabel })
12656
+ ] })
11254
12657
  }
11255
12658
  );
11256
12659
  }
11257
- function OnchainWithdrawFormView({
12660
+ var OnchainWithdrawFormSimpleView = ({
12661
+ // Token selector
11258
12662
  selectedToken,
11259
12663
  onTokenClick,
11260
- isProcessing,
11261
- chainCount,
11262
12664
  selectedChain,
11263
- onNetworkClick,
11264
- formattedBalance,
12665
+ // Amount
11265
12666
  amount,
11266
12667
  onAmountChange,
11267
- isAmountInputDisabled,
11268
- onMaxClick,
11269
- showMaxButton,
11270
12668
  formattedAmountUsd,
11271
- destinationNetwork,
12669
+ formattedBalance,
12670
+ // Percentage (new optional props)
12671
+ onPercentageClick,
12672
+ maxLabel,
12673
+ // Destination address
11272
12674
  destinationAddress,
11273
12675
  onDestinationAddressChange,
11274
- txDetails,
12676
+ // Errors
11275
12677
  isBelowMinAmount,
11276
12678
  walletError,
11277
12679
  transferError,
11278
- showWarning,
11279
- warningLabel,
12680
+ // Submit
11280
12681
  isSubmitDisabled,
12682
+ isProcessing,
11281
12683
  onSubmit,
11282
12684
  submitLabel,
12685
+ // Navigation
11283
12686
  onBack,
11284
- labels,
11285
- className
11286
- }) {
11287
- const [showTxDetails, setShowTxDetails] = useState(false);
11288
- return /* @__PURE__ */ jsx(
12687
+ onClose,
12688
+ // Labels
12689
+ labels
12690
+ }) => {
12691
+ var _a;
12692
+ const hasToken = selectedToken != null;
12693
+ const hasAmountError = !!walletError || isBelowMinAmount;
12694
+ const hasAddressError = !!transferError;
12695
+ const isSubmitDisabledInternal = !hasToken || isSubmitDisabled || isProcessing || !amount || amount === "0" || amount === "" || !destinationAddress.trim();
12696
+ const [cardHovered, setCardHovered] = React6__default.useState(false);
12697
+ const hideTimerRef = React6__default.useRef(void 0);
12698
+ function handleHoverStart() {
12699
+ clearTimeout(hideTimerRef.current);
12700
+ setCardHovered(true);
12701
+ }
12702
+ function handleHoverEnd() {
12703
+ hideTimerRef.current = setTimeout(() => setCardHovered(false), 150);
12704
+ }
12705
+ React6__default.useEffect(() => () => clearTimeout(hideTimerRef.current), []);
12706
+ const panelBaseClasses = [
12707
+ "relative flex flex-col overflow-hidden w-[420px]",
12708
+ "rounded-[var(--deframe-widget-size-radius-md)]",
12709
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
12710
+ "font-[var(--deframe-widget-font-family)]"
12711
+ ].join(" ");
12712
+ const headerBaseClasses = [
12713
+ "flex items-center",
12714
+ "px-[var(--deframe-widget-size-padding-x-md)]",
12715
+ "py-[var(--deframe-widget-size-padding-y-md)]"
12716
+ ].join(" ");
12717
+ const titleBaseClasses = [
12718
+ "flex-1",
12719
+ "text-[15px]",
12720
+ "[font-weight:var(--deframe-widget-font-weight-semibold)]",
12721
+ "text-[color:var(--deframe-widget-color-text-primary)]"
12722
+ ].join(" ");
12723
+ const dividerClasses = "h-px bg-[var(--deframe-widget-color-border-secondary)]";
12724
+ const bodyBaseClasses = [
12725
+ "flex flex-col",
12726
+ "gap-[var(--deframe-widget-size-gap-md)]",
12727
+ "px-[var(--deframe-widget-size-padding-x-md)]",
12728
+ "py-[var(--deframe-widget-size-padding-y-md)]"
12729
+ ].join(" ");
12730
+ const inputCardClasses = twMerge(
12731
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
12732
+ "border",
12733
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
12734
+ "transition-[border-color,background] duration-200",
12735
+ 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)]"
12736
+ );
12737
+ const addressCardClasses = twMerge(
12738
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
12739
+ "border",
12740
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
12741
+ "transition-[border-color,background] duration-200",
12742
+ hasAddressError ? "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)]"
12743
+ );
12744
+ const footerBaseClasses = [
12745
+ "flex gap-[var(--deframe-widget-size-gap-sm)]",
12746
+ "px-[var(--deframe-widget-size-padding-x-md)]",
12747
+ "pb-[var(--deframe-widget-size-padding-y-md)]"
12748
+ ].join(" ");
12749
+ const cancelButtonClasses = [
12750
+ "flex-1 h-12 rounded-[var(--deframe-widget-size-radius-sm)]",
12751
+ "text-[15px] text-[color:var(--deframe-widget-color-text-secondary)]",
12752
+ "border-[color:var(--deframe-widget-color-border-secondary)]",
12753
+ "outline-none",
12754
+ "transition-[background,color,border-color] duration-150",
12755
+ "hover:opacity-100",
12756
+ "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]",
12757
+ "hover:text-[color:var(--deframe-widget-color-text-primary)]"
12758
+ ].join(" ");
12759
+ const submitButtonClasses = [
12760
+ "flex-1 h-12 rounded-[var(--deframe-widget-size-radius-sm)]",
12761
+ "border-none",
12762
+ "text-[15px]",
12763
+ isSubmitDisabledInternal ? "text-[color:var(--deframe-widget-color-text-primary-disabled)]" : "text-[color:var(--deframe-widget-color-text-primary-dark)]",
12764
+ "outline-none",
12765
+ "transition-[background,color] duration-200"
12766
+ ].join(" ");
12767
+ return /* @__PURE__ */ jsxs(
11289
12768
  "div",
11290
12769
  {
11291
- className: twMerge(
11292
- "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 p-6 lg:p-12",
11293
- className
11294
- ),
11295
- "data-test-id": "onchain-withdraw-form-view",
11296
- children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col w-full px-2 py-0.5 rounded gap-1", children: [
11297
- /* @__PURE__ */ jsx(
11298
- SecondaryButton,
12770
+ "data-slot": "onchain-withdraw-simple-panel",
12771
+ "data-test-id": "onchain-withdraw-form-simple-view",
12772
+ className: panelBaseClasses,
12773
+ children: [
12774
+ /* @__PURE__ */ jsxs(
12775
+ "header",
11299
12776
  {
11300
- onClick: onBack,
11301
- className: "mb-4 !border-0 max-w-[84px]",
11302
- "aria-label": labels.backLabel,
11303
- children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
11304
- /* @__PURE__ */ jsx(MdOutlineArrowBack, { className: "w-5 h-5 text-[color:var(--deframe-widget-color-text-primary)]" }),
11305
- /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-primary)]", children: labels.backLabel })
11306
- ] })
12777
+ "data-slot": "onchain-withdraw-simple-header",
12778
+ "data-test-id": "onchain-withdraw-form-simple-view-header",
12779
+ className: headerBaseClasses,
12780
+ children: [
12781
+ /* @__PURE__ */ jsx(
12782
+ "span",
12783
+ {
12784
+ "data-slot": "onchain-withdraw-simple-title",
12785
+ "data-test-id": "onchain-withdraw-form-simple-view-title",
12786
+ className: titleBaseClasses,
12787
+ children: labels.title
12788
+ }
12789
+ ),
12790
+ onClose && /* @__PURE__ */ jsx(
12791
+ CloseButton_default,
12792
+ {
12793
+ onClick: onClose,
12794
+ ariaLabel: "Close withdrawal panel",
12795
+ testId: "onchain-withdraw-form-simple-view-close"
12796
+ }
12797
+ )
12798
+ ]
11307
12799
  }
11308
12800
  ),
11309
- /* @__PURE__ */ jsx(TextHeading, { variant: "h2", children: labels.title }),
11310
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: labels.subtitle }),
11311
12801
  /* @__PURE__ */ jsx(
11312
12802
  "div",
11313
12803
  {
11314
- className: "my-4 p-[var(--deframe-widget-size-padding-x-md)] w-full bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
11315
- "data-test-id": "onchain-withdraw-token-card",
11316
- children: /* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-[var(--deframe-widget-size-gap-md)] items-center", children: [
11317
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-sm)] flex-1", children: [
11318
- /* @__PURE__ */ jsxs(
11319
- "button",
11320
- {
11321
- onClick: onTokenClick,
11322
- disabled: isProcessing,
11323
- className: "h-[56px] border border-[var(--deframe-widget-color-border-secondary)] rounded overflow-hidden transition-colors flex items-center px-[var(--deframe-widget-size-padding-x-sm)] py-[6px] w-full cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",
11324
- "data-test-id": "onchain-withdraw-token-button",
11325
- "aria-label": labels.tokenPlaceholder,
11326
- children: [
11327
- selectedToken ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] flex-1", children: [
11328
- /* @__PURE__ */ jsx(
11329
- "img",
11330
- {
11331
- src: selectedToken.logoURI || "",
11332
- alt: selectedToken.symbol,
11333
- className: "w-6 h-6 rounded-full object-cover"
11334
- }
11335
- ),
11336
- /* @__PURE__ */ jsx("div", { className: "text-left", children: /* @__PURE__ */ jsx(TextBody, { variant: "text-large", className: "font-semibold", children: selectedToken.symbol }) })
11337
- ] }) : /* @__PURE__ */ jsx("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] flex-1", children: /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.tokenPlaceholder }) }),
11338
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsx(MdOutlineArrowDropDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
11339
- ]
11340
- }
11341
- ),
11342
- /* @__PURE__ */ jsxs(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-tertiary)]", children: [
11343
- labels.balancePrefix,
11344
- ": ",
11345
- formattedBalance
11346
- ] }),
11347
- /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center gap-[var(--deframe-widget-size-gap-xs)]", children: [
11348
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "tracking-wide text-[color:var(--deframe-widget-color-text-tertiary)]", children: labels.chainDirectionLabel }),
11349
- chainCount === 0 || !selectedChain ? /* @__PURE__ */ jsxs(
11350
- "button",
11351
- {
11352
- disabled: true,
11353
- className: "ml-6 bg-[var(--deframe-widget-color-bg-tertiary)] rounded-full flex items-center gap-[var(--deframe-widget-size-gap-xs)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] opacity-50 cursor-not-allowed",
11354
- "data-test-id": "onchain-withdraw-chain-disabled",
11355
- children: [
11356
- /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.chainPlaceholder }),
11357
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsx(MdOutlineArrowDropDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
11358
- ]
11359
- }
11360
- ) : chainCount > 1 ? /* @__PURE__ */ jsxs(
11361
- "button",
11362
- {
11363
- onClick: onNetworkClick,
11364
- className: "ml-6 bg-[var(--deframe-widget-color-bg-tertiary)] border border-[var(--deframe-widget-color-border-tertiary)] rounded-full flex items-center gap-[var(--deframe-widget-size-gap-xs)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] transition-colors cursor-pointer",
11365
- "data-test-id": "onchain-withdraw-chain-dropdown",
11366
- "aria-label": labels.chainPlaceholder,
11367
- children: [
11368
- /* @__PURE__ */ jsx(
11369
- "img",
12804
+ "data-slot": "onchain-withdraw-simple-divider",
12805
+ "data-test-id": "onchain-withdraw-form-simple-view-divider",
12806
+ className: dividerClasses
12807
+ }
12808
+ ),
12809
+ /* @__PURE__ */ jsxs(
12810
+ "div",
12811
+ {
12812
+ "data-slot": "onchain-withdraw-simple-body",
12813
+ "data-test-id": "onchain-withdraw-form-simple-view-body",
12814
+ className: bodyBaseClasses,
12815
+ children: [
12816
+ /* @__PURE__ */ jsxs(
12817
+ "div",
12818
+ {
12819
+ "data-slot": "onchain-withdraw-simple-input-card",
12820
+ "data-test-id": "onchain-withdraw-form-simple-view-input-card",
12821
+ onMouseEnter: hasToken ? handleHoverStart : void 0,
12822
+ onMouseLeave: hasToken ? handleHoverEnd : void 0,
12823
+ className: inputCardClasses,
12824
+ children: [
12825
+ /* @__PURE__ */ jsxs(
12826
+ "div",
12827
+ {
12828
+ "data-slot": "onchain-withdraw-simple-input-top-row",
12829
+ "data-test-id": "onchain-withdraw-form-simple-view-top-row",
12830
+ className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
12831
+ children: [
12832
+ /* @__PURE__ */ jsx(
12833
+ EarnTokenSelectorSimpleView,
12834
+ {
12835
+ selectedToken,
12836
+ onTokenClick,
12837
+ onNetworkAndAssetClick: onTokenClick,
12838
+ isLoading: false,
12839
+ selectTokenLabel: "SELECIONE AQUI",
12840
+ chainLabel: (_a = selectedChain == null ? void 0 : selectedChain.name) != null ? _a : "",
12841
+ chainImage: selectedChain == null ? void 0 : selectedChain.iconUrl
12842
+ }
12843
+ ),
12844
+ /* @__PURE__ */ jsx(
12845
+ "div",
12846
+ {
12847
+ "data-test-id": "onchain-withdraw-form-simple-view-input-divider",
12848
+ className: "w-px h-10 bg-[var(--deframe-widget-color-border-secondary)] flex-shrink-0"
12849
+ }
12850
+ ),
12851
+ /* @__PURE__ */ jsx(
12852
+ EarnAmountInputSimpleView,
12853
+ {
12854
+ value: amount,
12855
+ onChange: (e) => onAmountChange(e.target.value),
12856
+ ariaLabel: "Amount to withdraw",
12857
+ dollarAmountFormatted: formattedAmountUsd
12858
+ }
12859
+ )
12860
+ ]
12861
+ }
12862
+ ),
12863
+ hasToken && formattedBalance && /* @__PURE__ */ jsx(
12864
+ "div",
12865
+ {
12866
+ "data-slot": "onchain-withdraw-simple-balance-row",
12867
+ "data-test-id": "onchain-withdraw-form-simple-view-balance-row",
12868
+ className: "mt-[var(--deframe-widget-size-gap-sm)]",
12869
+ children: /* @__PURE__ */ jsx("span", { className: "text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]", children: /* @__PURE__ */ jsxs(
12870
+ "span",
11370
12871
  {
11371
- src: selectedChain.iconUrl,
11372
- alt: selectedChain.name,
11373
- className: "w-3 h-3 rounded-full object-cover"
12872
+ className: hasAmountError ? "text-[color:var(--deframe-widget-color-state-error)]" : "text-[color:var(--deframe-widget-color-text-secondary)]",
12873
+ children: [
12874
+ labels.balancePrefix,
12875
+ ": ",
12876
+ formattedBalance
12877
+ ]
11374
12878
  }
11375
- ),
11376
- /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: selectedChain.name }),
11377
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsx(MdOutlineArrowDropDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
11378
- ]
11379
- }
11380
- ) : /* @__PURE__ */ jsxs(
11381
- "div",
11382
- {
11383
- className: "ml-6 bg-[var(--deframe-widget-color-bg-tertiary)] border border-[var(--deframe-widget-color-border-tertiary)] rounded-lg flex items-center gap-[var(--deframe-widget-size-gap-xs)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)]",
11384
- "data-test-id": "onchain-withdraw-chain-static",
11385
- children: [
11386
- /* @__PURE__ */ jsx(
11387
- "img",
12879
+ ) })
12880
+ }
12881
+ ),
12882
+ !hasToken && /* @__PURE__ */ jsx(
12883
+ "p",
12884
+ {
12885
+ "data-slot": "onchain-withdraw-simple-empty-hint",
12886
+ "data-test-id": "onchain-withdraw-form-simple-view-empty-hint",
12887
+ className: "mt-[var(--deframe-widget-size-gap-sm)] text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
12888
+ children: labels.tokenPlaceholder
12889
+ }
12890
+ ),
12891
+ /* @__PURE__ */ jsx(AnimatePresence, { children: hasToken && onPercentageClick && cardHovered && /* @__PURE__ */ jsx(
12892
+ motion.div,
12893
+ {
12894
+ "data-slot": "onchain-withdraw-simple-chips-row",
12895
+ "data-test-id": "onchain-withdraw-form-simple-view-chips-row",
12896
+ initial: { opacity: 0, height: 0, marginTop: 0 },
12897
+ animate: { opacity: 1, height: "auto", marginTop: "var(--deframe-widget-size-gap-sm)" },
12898
+ exit: { opacity: 0, height: 0, marginTop: 0 },
12899
+ transition: { duration: 0.15, ease: "easeOut" },
12900
+ style: { overflow: "hidden" },
12901
+ onMouseEnter: handleHoverStart,
12902
+ onMouseLeave: handleHoverEnd,
12903
+ children: /* @__PURE__ */ jsx(
12904
+ EarnPercentageButtonsSimpleView,
11388
12905
  {
11389
- src: selectedChain.iconUrl,
11390
- alt: selectedChain.name,
11391
- className: "w-3 h-3 rounded-full object-cover"
12906
+ onPercentageClick,
12907
+ maxLabel: maxLabel != null ? maxLabel : "M\xE1x."
11392
12908
  }
12909
+ )
12910
+ }
12911
+ ) }),
12912
+ (walletError || isBelowMinAmount) && /* @__PURE__ */ jsx("div", { className: "mt-[var(--deframe-widget-size-gap-sm)]", children: /* @__PURE__ */ jsx(
12913
+ EarnInlineNotificationSimpleView,
12914
+ {
12915
+ variant: "error",
12916
+ message: walletError != null ? walletError : labels.minAmountWarning
12917
+ }
12918
+ ) })
12919
+ ]
12920
+ }
12921
+ ),
12922
+ /* @__PURE__ */ jsxs(
12923
+ "div",
12924
+ {
12925
+ "data-slot": "onchain-withdraw-simple-address-card",
12926
+ "data-test-id": "onchain-withdraw-form-simple-view-address-card",
12927
+ className: addressCardClasses,
12928
+ children: [
12929
+ /* @__PURE__ */ jsx(
12930
+ "p",
12931
+ {
12932
+ "data-slot": "onchain-withdraw-simple-address-label",
12933
+ "data-test-id": "onchain-withdraw-form-simple-view-address-label",
12934
+ className: "mb-[var(--deframe-widget-size-gap-sm)] text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
12935
+ children: labels.destinationAddressLabel
12936
+ }
12937
+ ),
12938
+ /* @__PURE__ */ jsx(
12939
+ "input",
12940
+ {
12941
+ "data-slot": "onchain-withdraw-simple-address-input",
12942
+ "data-test-id": "onchain-withdraw-form-simple-view-address-input",
12943
+ type: "text",
12944
+ value: destinationAddress,
12945
+ onChange: (e) => onDestinationAddressChange(e.target.value),
12946
+ placeholder: labels.destinationAddressPlaceholder,
12947
+ disabled: isProcessing,
12948
+ "aria-label": labels.destinationAddressLabel,
12949
+ className: twMerge(
12950
+ "w-full bg-transparent outline-none",
12951
+ "text-[13px] [font-weight:var(--deframe-widget-font-weight-regular)]",
12952
+ "font-[var(--deframe-widget-font-family)]",
12953
+ "placeholder:text-[color:var(--deframe-widget-color-text-tertiary)]",
12954
+ "text-[color:var(--deframe-widget-color-text-primary)]",
12955
+ '[font-feature-settings:"tnum"]',
12956
+ "disabled:opacity-50 disabled:cursor-not-allowed"
11393
12957
  ),
11394
- /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: selectedChain.name })
11395
- ]
11396
- }
11397
- )
11398
- ] })
11399
- ] }),
11400
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 items-end justify-center gap-[var(--deframe-widget-size-gap-xs)] relative", children: [
11401
- /* @__PURE__ */ jsx(
11402
- Input2,
11403
- {
11404
- id: "withdraw-amount-input",
11405
- placeholder: "0.00",
11406
- inputMode: "decimal",
11407
- autoComplete: "off",
11408
- "aria-label": "Amount to withdraw",
11409
- min: "0",
11410
- step: "any",
11411
- type: "number",
11412
- value: amount,
11413
- onChange: (e) => onAmountChange(e.target.value),
11414
- onWheel: (event) => {
11415
- event.currentTarget.blur();
11416
- },
11417
- disabled: isAmountInputDisabled,
11418
- className: "text-h2-mobile font-extrabold bg-transparent outline-none text-right w-full min-w-[120px] placeholder:text-[color:var(--deframe-widget-color-placeholder-primary)] text-[color:var(--deframe-widget-color-text-primary)] [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none disabled:opacity-50 disabled:cursor-not-allowed",
11419
- "data-test-id": "onchain-withdraw-amount-input"
11420
- }
11421
- ),
11422
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-tertiary)]", children: formattedAmountUsd }),
11423
- showMaxButton && /* @__PURE__ */ jsx(
11424
- "button",
11425
- {
11426
- onClick: onMaxClick,
11427
- className: "absolute top-0 right-0 text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-brand-primary)] cursor-pointer -translate-y-6",
11428
- "data-test-id": "onchain-withdraw-max-button",
11429
- "aria-label": "Max",
11430
- children: "Max"
11431
- }
11432
- )
11433
- ] })
11434
- ] })
11435
- }
11436
- ),
11437
- /* @__PURE__ */ jsxs("div", { className: "mb-4", "data-test-id": "onchain-withdraw-destination-network", children: [
11438
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "mb-2", children: labels.destinationNetworkLabel }),
11439
- /* @__PURE__ */ jsx(
11440
- "div",
11441
- {
11442
- className: twMerge(
11443
- "flex items-center gap-2 border border-[var(--deframe-widget-color-border-secondary)] rounded p-4 w-full",
11444
- !destinationNetwork ? "opacity-50 cursor-not-allowed" : "bg-[var(--deframe-widget-color-bg-tertiary)]"
12958
+ spellCheck: false,
12959
+ autoComplete: "off"
12960
+ }
12961
+ ),
12962
+ transferError && /* @__PURE__ */ jsx("div", { className: "mt-[var(--deframe-widget-size-gap-sm)]", children: /* @__PURE__ */ jsx(EarnInlineNotificationSimpleView, { variant: "error", message: transferError }) })
12963
+ ]
12964
+ }
11445
12965
  ),
11446
- children: destinationNetwork ? /* @__PURE__ */ jsxs(Fragment, { children: [
11447
- /* @__PURE__ */ jsx(
11448
- "img",
11449
- {
11450
- src: destinationNetwork.iconUrl,
11451
- alt: destinationNetwork.name,
11452
- className: "w-5 h-5 rounded-full object-cover"
11453
- }
11454
- ),
11455
- /* @__PURE__ */ jsx("span", { children: destinationNetwork.name }),
11456
- /* @__PURE__ */ jsx("span", { className: "ml-auto text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.destinationNetworkSameHint })
11457
- ] }) : /* @__PURE__ */ jsx("span", { className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.destinationNetworkEmpty })
11458
- }
11459
- )
11460
- ] }),
11461
- /* @__PURE__ */ jsx("div", { className: "mb-4", "data-test-id": "onchain-withdraw-destination-address", children: /* @__PURE__ */ jsx(
11462
- Input2,
11463
- {
11464
- type: "text",
11465
- label: labels.destinationAddressLabel,
11466
- placeholder: labels.destinationAddressPlaceholder,
11467
- value: destinationAddress,
11468
- onChange: (e) => onDestinationAddressChange(e.target.value),
11469
- disabled: isProcessing,
11470
- className: "w-full px-4 py-3 bg-[var(--deframe-widget-color-bg-secondary)] border border-[var(--deframe-widget-color-border-secondary)] rounded outline-none disabled:opacity-50 disabled:cursor-not-allowed"
12966
+ /* @__PURE__ */ jsx(
12967
+ EarnInlineNotificationSimpleView,
12968
+ {
12969
+ variant: "warning",
12970
+ message: labels.infoBanner
12971
+ }
12972
+ )
12973
+ ]
11471
12974
  }
11472
- ) }),
11473
- /* @__PURE__ */ jsx(BannerNotification, { message: labels.infoBanner, variant: "info", className: "gap-3" }),
11474
- isBelowMinAmount && /* @__PURE__ */ jsx(BannerNotification, { message: labels.minAmountWarning, variant: "warning", className: "gap-3" }),
11475
- txDetails !== null && /* @__PURE__ */ jsxs(
11476
- "div",
12975
+ ),
12976
+ /* @__PURE__ */ jsxs(
12977
+ "footer",
11477
12978
  {
11478
- className: "my-4 p-6 w-full bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
11479
- "data-test-id": "onchain-withdraw-tx-details",
12979
+ "data-slot": "onchain-withdraw-simple-footer",
12980
+ "data-test-id": "onchain-withdraw-form-simple-view-footer",
12981
+ className: footerBaseClasses,
11480
12982
  children: [
11481
- /* @__PURE__ */ jsxs(
11482
- "button",
12983
+ onBack && /* @__PURE__ */ jsx(
12984
+ SecondaryButton,
11483
12985
  {
11484
- onClick: () => setShowTxDetails((v) => !v),
11485
- className: "flex justify-between items-center w-full text-left cursor-pointer",
11486
- "aria-label": labels.txDetailsTitle,
11487
- "data-test-id": "onchain-withdraw-tx-details-toggle",
11488
- children: [
11489
- /* @__PURE__ */ jsx(TextBody, { variant: "text-large", className: "font-semibold", children: labels.txDetailsTitle }),
11490
- /* @__PURE__ */ jsx(MdOutlineExpandMore, { className: twMerge("transition-transform", showTxDetails && "rotate-180") })
11491
- ]
12986
+ type: "button",
12987
+ className: cancelButtonClasses,
12988
+ onClick: onBack,
12989
+ "aria-label": "Cancel withdrawal",
12990
+ "data-test-id": "onchain-withdraw-form-simple-view-cancel",
12991
+ children: labels.backLabel
11492
12992
  }
11493
12993
  ),
11494
- showTxDetails && /* @__PURE__ */ jsxs("div", { className: "mt-4 space-y-3", children: [
11495
- /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
11496
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.txDetailsAmountLabel }),
11497
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "font-semibold", children: txDetails.formattedAmount })
11498
- ] }),
11499
- /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
11500
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.txDetailsFeeLabel }),
11501
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "font-semibold", children: txDetails.formattedFee })
11502
- ] }),
11503
- /* @__PURE__ */ jsxs("div", { className: "border-t border-[var(--deframe-widget-color-border-secondary)] pt-3 flex justify-between items-center", children: [
11504
- /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.txDetailsReceiveLabel }),
11505
- /* @__PURE__ */ jsx(TextBody, { variant: "text-large", className: "font-bold", children: txDetails.formattedReceive })
11506
- ] })
11507
- ] })
12994
+ /* @__PURE__ */ jsx(
12995
+ PrimaryButton,
12996
+ {
12997
+ type: "button",
12998
+ className: submitButtonClasses,
12999
+ disabled: isSubmitDisabledInternal,
13000
+ onClick: onSubmit,
13001
+ "aria-label": submitLabel,
13002
+ "data-test-id": "onchain-withdraw-form-simple-view-submit",
13003
+ children: submitLabel
13004
+ }
13005
+ )
11508
13006
  ]
11509
13007
  }
11510
- ),
11511
- walletError && /* @__PURE__ */ jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsx(BannerNotification, { message: walletError, variant: "error" }) }),
11512
- transferError && /* @__PURE__ */ jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsx(BannerNotification, { message: transferError, variant: "error", className: "gap-3" }) }),
11513
- showWarning && /* @__PURE__ */ jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsx(BannerNotification, { message: warningLabel, variant: "warning" }) }),
11514
- /* @__PURE__ */ jsx(PrimaryButton, { disabled: isSubmitDisabled, onClick: onSubmit, "data-test-id": "onchain-withdraw-submit", children: isProcessing ? /* @__PURE__ */ jsxs(Fragment, { children: [
11515
- submitLabel,
11516
- " ",
11517
- /* @__PURE__ */ jsx(LoadingDots, {})
11518
- ] }) : submitLabel })
11519
- ] })
13008
+ )
13009
+ ]
11520
13010
  }
11521
13011
  );
11522
- }
13012
+ };
11523
13013
  function OnchainWithdrawChainSelectorView({
11524
13014
  actionSheetId,
11525
13015
  isOpen,
@@ -11904,6 +13394,297 @@ function OnchainWithdrawFailedView({
11904
13394
  }
11905
13395
  );
11906
13396
  }
13397
+ var OnchainWithdrawProcessingSimpleView = ({
13398
+ onClose: _onClose
13399
+ }) => {
13400
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "onchain-withdraw-processing-simple-view", children: /* @__PURE__ */ jsx(
13401
+ EarnFeedbackOverlaySimpleView,
13402
+ {
13403
+ variant: "loading",
13404
+ title: "PROCESSANDO SAQUE...",
13405
+ subtitle: "Aguarde enquanto sua transa\xE7\xE3o \xE9 confirmada."
13406
+ }
13407
+ ) });
13408
+ };
13409
+ function WithdrawSignatureWarningIcon() {
13410
+ return /* @__PURE__ */ jsx(
13411
+ "div",
13412
+ {
13413
+ className: "w-20 h-20 rounded-full flex items-center justify-center",
13414
+ style: { background: "linear-gradient(180deg, #F6A700 0%, #F59E0B 100%)" },
13415
+ "data-test-id": "withdraw-signature-warning-icon",
13416
+ "data-slot": "withdraw-signature-warning-icon",
13417
+ children: /* @__PURE__ */ jsx("svg", { className: "w-8 h-8", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
13418
+ "path",
13419
+ {
13420
+ d: "M12 9V13M12 17H12.01M10.29 3.86L1.82 18A2 2 0 003.54 21H20.46A2 2 0 0022.18 18L13.71 3.86A2 2 0 0010.29 3.86Z",
13421
+ stroke: "#121212",
13422
+ strokeWidth: "2",
13423
+ strokeLinecap: "round",
13424
+ strokeLinejoin: "round"
13425
+ }
13426
+ ) })
13427
+ }
13428
+ );
13429
+ }
13430
+ function OnchainWithdrawSignatureWarningView({
13431
+ tokenSymbol,
13432
+ tokenLogoURI,
13433
+ formattedAmount,
13434
+ chainName,
13435
+ chainIconUrl,
13436
+ destinationAddress,
13437
+ blockchainCost,
13438
+ onCancel,
13439
+ onTryAgain,
13440
+ className
13441
+ }) {
13442
+ const [showDetails, setShowDetails] = useState(true);
13443
+ return /* @__PURE__ */ jsxs(
13444
+ "div",
13445
+ {
13446
+ className: twMerge(
13447
+ "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",
13448
+ className
13449
+ ),
13450
+ "data-test-id": "onchain-withdraw-signature-warning-view",
13451
+ children: [
13452
+ /* @__PURE__ */ jsx(
13453
+ "button",
13454
+ {
13455
+ onClick: onCancel,
13456
+ className: "absolute top-4 right-4 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 cursor-pointer",
13457
+ "aria-label": "Fechar",
13458
+ "data-test-id": "onchain-withdraw-signature-warning-close",
13459
+ children: /* @__PURE__ */ jsx(MdOutlineClose, { className: "w-6 h-6" })
13460
+ }
13461
+ ),
13462
+ /* @__PURE__ */ jsx("div", { className: "p-6 lg:p-12", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col w-full items-center", children: [
13463
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
13464
+ /* @__PURE__ */ jsx(WithdrawSignatureWarningIcon, {}),
13465
+ /* @__PURE__ */ jsx(
13466
+ "h2",
13467
+ {
13468
+ className: "text-[28px] [font-weight:var(--deframe-widget-font-weight-extrabold)] text-[color:var(--deframe-widget-color-text-primary)] leading-tight",
13469
+ "data-test-id": "onchain-withdraw-signature-warning-title",
13470
+ children: "Saque n\xE3o assinado"
13471
+ }
13472
+ ),
13473
+ /* @__PURE__ */ jsx(
13474
+ "p",
13475
+ {
13476
+ className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)] text-center",
13477
+ "data-test-id": "onchain-withdraw-signature-warning-subtitle",
13478
+ children: "A assinatura da transa\xE7\xE3o foi cancelada. Nenhum valor foi enviado."
13479
+ }
13480
+ )
13481
+ ] }),
13482
+ /* @__PURE__ */ jsx(
13483
+ "div",
13484
+ {
13485
+ className: "w-full mt-8 p-5 bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
13486
+ "data-test-id": "onchain-withdraw-signature-warning-summary",
13487
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4", children: [
13488
+ /* @__PURE__ */ jsxs("div", { className: "relative shrink-0", "data-test-id": "onchain-withdraw-signature-warning-token-icon", children: [
13489
+ /* @__PURE__ */ jsx("div", { className: "w-[32px] h-[32px] rounded-full bg-[var(--deframe-widget-color-bg-tertiary)] flex items-center justify-center overflow-hidden", children: tokenLogoURI ? /* @__PURE__ */ jsx("img", { src: tokenLogoURI, alt: tokenSymbol, className: "w-[32px] h-[32px] object-cover" }) : /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] [font-weight:var(--deframe-widget-font-weight-bold)]", children: tokenSymbol.slice(0, 2).toUpperCase() }) }),
13490
+ chainIconUrl && /* @__PURE__ */ jsx("div", { className: "absolute -bottom-1 -right-1", children: /* @__PURE__ */ jsx(
13491
+ "img",
13492
+ {
13493
+ src: chainIconUrl,
13494
+ alt: chainName,
13495
+ className: "w-[16px] h-[16px] rounded-full object-cover",
13496
+ "data-test-id": "onchain-withdraw-signature-warning-chain-icon"
13497
+ }
13498
+ ) })
13499
+ ] }),
13500
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 min-w-0", children: [
13501
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[4px]", children: [
13502
+ /* @__PURE__ */ jsx(
13503
+ "span",
13504
+ {
13505
+ className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]",
13506
+ "data-test-id": "onchain-withdraw-signature-warning-sending-label",
13507
+ children: "Voc\xEA est\xE1 enviando"
13508
+ }
13509
+ ),
13510
+ /* @__PURE__ */ jsxs(
13511
+ "span",
13512
+ {
13513
+ className: "text-[20px] [font-weight:var(--deframe-widget-font-weight-semibold)] leading-tight",
13514
+ "data-test-id": "onchain-withdraw-signature-warning-amount",
13515
+ children: [
13516
+ formattedAmount,
13517
+ " ",
13518
+ tokenSymbol
13519
+ ]
13520
+ }
13521
+ )
13522
+ ] }),
13523
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[4px] mt-4", children: [
13524
+ /* @__PURE__ */ jsx(
13525
+ "span",
13526
+ {
13527
+ className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]",
13528
+ "data-test-id": "onchain-withdraw-signature-warning-destination-label",
13529
+ children: "Para o endere\xE7o"
13530
+ }
13531
+ ),
13532
+ /* @__PURE__ */ jsx(
13533
+ "span",
13534
+ {
13535
+ className: "text-[length:var(--deframe-widget-font-size-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)] break-all leading-snug",
13536
+ "data-test-id": "onchain-withdraw-signature-warning-destination-address",
13537
+ children: destinationAddress
13538
+ }
13539
+ )
13540
+ ] })
13541
+ ] })
13542
+ ] })
13543
+ }
13544
+ ),
13545
+ /* @__PURE__ */ jsxs(
13546
+ "div",
13547
+ {
13548
+ className: "w-full mt-4 bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
13549
+ "data-test-id": "onchain-withdraw-signature-warning-details",
13550
+ children: [
13551
+ /* @__PURE__ */ jsxs(
13552
+ "button",
13553
+ {
13554
+ onClick: () => setShowDetails(!showDetails),
13555
+ className: "flex justify-between items-center w-full text-left cursor-pointer p-4",
13556
+ "aria-label": "Detalhes da transa\xE7\xE3o",
13557
+ "data-test-id": "onchain-withdraw-signature-warning-details-toggle",
13558
+ children: [
13559
+ /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)]", children: "Detalhes da transa\xE7\xE3o" }),
13560
+ /* @__PURE__ */ jsx(
13561
+ MdOutlineExpandMore,
13562
+ {
13563
+ className: twMerge(
13564
+ "transition-transform text-[color:var(--deframe-widget-color-text-secondary)]",
13565
+ showDetails && "rotate-180"
13566
+ )
13567
+ }
13568
+ )
13569
+ ]
13570
+ }
13571
+ ),
13572
+ showDetails && /* @__PURE__ */ jsxs("div", { className: "px-4 pb-4", "data-test-id": "onchain-withdraw-signature-warning-details-content", children: [
13573
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2 border-b border-[color:var(--deframe-widget-color-border-secondary)]", children: [
13574
+ /* @__PURE__ */ jsx(
13575
+ "span",
13576
+ {
13577
+ className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]",
13578
+ "data-test-id": "onchain-withdraw-signature-warning-withdraw-amount-label",
13579
+ children: "Valor de retirada"
13580
+ }
13581
+ ),
13582
+ /* @__PURE__ */ jsxs(
13583
+ "span",
13584
+ {
13585
+ className: "text-[12px] [font-weight:var(--deframe-widget-font-weight-semibold)]",
13586
+ "data-test-id": "onchain-withdraw-signature-warning-withdraw-amount-value",
13587
+ children: [
13588
+ formattedAmount,
13589
+ " ",
13590
+ tokenSymbol
13591
+ ]
13592
+ }
13593
+ )
13594
+ ] }),
13595
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2 border-b border-[color:var(--deframe-widget-color-border-secondary)]", children: [
13596
+ /* @__PURE__ */ jsx(
13597
+ "span",
13598
+ {
13599
+ className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]",
13600
+ "data-test-id": "onchain-withdraw-signature-warning-blockchain-cost-label",
13601
+ children: "Custo da blockchain"
13602
+ }
13603
+ ),
13604
+ /* @__PURE__ */ jsx(
13605
+ "span",
13606
+ {
13607
+ className: "text-[12px] [font-weight:var(--deframe-widget-font-weight-semibold)]",
13608
+ "data-test-id": "onchain-withdraw-signature-warning-blockchain-cost-value",
13609
+ children: blockchainCost
13610
+ }
13611
+ )
13612
+ ] }),
13613
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2", children: [
13614
+ /* @__PURE__ */ jsx(
13615
+ "span",
13616
+ {
13617
+ className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]",
13618
+ "data-test-id": "onchain-withdraw-signature-warning-receive-label",
13619
+ children: "Voc\xEA receber\xE1"
13620
+ }
13621
+ ),
13622
+ /* @__PURE__ */ jsxs(
13623
+ "span",
13624
+ {
13625
+ className: "text-[12px] [font-weight:var(--deframe-widget-font-weight-semibold)]",
13626
+ "data-test-id": "onchain-withdraw-signature-warning-receive-value",
13627
+ children: [
13628
+ formattedAmount,
13629
+ " ",
13630
+ tokenSymbol
13631
+ ]
13632
+ }
13633
+ )
13634
+ ] })
13635
+ ] })
13636
+ ]
13637
+ }
13638
+ ),
13639
+ /* @__PURE__ */ jsxs(
13640
+ "div",
13641
+ {
13642
+ className: "w-full mt-8 flex gap-3",
13643
+ "data-test-id": "onchain-withdraw-signature-warning-actions",
13644
+ children: [
13645
+ /* @__PURE__ */ jsx(
13646
+ SecondaryButton,
13647
+ {
13648
+ className: "flex-1",
13649
+ onClick: onCancel,
13650
+ "data-test-id": "onchain-withdraw-signature-warning-cancel",
13651
+ children: "Cancelar"
13652
+ }
13653
+ ),
13654
+ /* @__PURE__ */ jsx(
13655
+ PrimaryButton,
13656
+ {
13657
+ className: "flex-1",
13658
+ onClick: onTryAgain,
13659
+ "data-test-id": "onchain-withdraw-signature-warning-retry",
13660
+ children: "Tente novamente"
13661
+ }
13662
+ )
13663
+ ]
13664
+ }
13665
+ )
13666
+ ] }) })
13667
+ ]
13668
+ }
13669
+ );
13670
+ }
13671
+ var OnchainWithdrawSignatureWarningSimpleView = ({
13672
+ onCancel
13673
+ }) => {
13674
+ React6.useEffect(() => {
13675
+ if (!onCancel) return;
13676
+ const timer = setTimeout(onCancel, 5e3);
13677
+ return () => clearTimeout(timer);
13678
+ }, [onCancel]);
13679
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "onchain-withdraw-signature-warning-simple-view", children: /* @__PURE__ */ jsx(
13680
+ EarnFeedbackOverlaySimpleView,
13681
+ {
13682
+ variant: "warning",
13683
+ title: "Saque n\xE3o assinado",
13684
+ subtitle: "A assinatura da transa\xE7\xE3o foi cancelada."
13685
+ }
13686
+ ) });
13687
+ };
11907
13688
  var DashboardCard = ({ children, className }) => {
11908
13689
  return /* @__PURE__ */ jsx("div", { "data-test-id": "dashboard-card", className: twMerge("bg-[var(--deframe-widget-color-bg-subtle)] rounded", className), children });
11909
13690
  };
@@ -12405,7 +14186,7 @@ function HistoryButton2({ onClick }) {
12405
14186
  }
12406
14187
  );
12407
14188
  }
12408
- var GRID_COLS = "grid grid-cols-[40px_1fr_auto] sm:grid-cols-[1fr_160px_130px] gap-x-[var(--deframe-widget-size-gap-sm)] sm:gap-x-[var(--deframe-widget-size-gap-md)]";
14189
+ var GRID_COLS3 = "grid grid-cols-[40px_1fr_auto] sm:grid-cols-[1fr_160px_130px] gap-x-[var(--deframe-widget-size-gap-sm)] sm:gap-x-[var(--deframe-widget-size-gap-md)]";
12409
14190
  function IconCircle3({ item, size = 36, className }) {
12410
14191
  const [imgError, setImgError] = React6__default.useState(false);
12411
14192
  if (item.iconUrl && !imgError) {
@@ -12505,7 +14286,7 @@ function AssetListSkeletonRow({ index }) {
12505
14286
  {
12506
14287
  "data-test-id": "asset-list-skeleton-row",
12507
14288
  className: twMerge(
12508
- GRID_COLS,
14289
+ GRID_COLS3,
12509
14290
  "items-center",
12510
14291
  "px-[var(--deframe-widget-size-padding-x-md)] py-[11px]",
12511
14292
  "border-t border-[color:var(--deframe-widget-color-border-secondary)]"
@@ -12551,7 +14332,7 @@ function AssetListSkeletonContent() {
12551
14332
  "div",
12552
14333
  {
12553
14334
  className: twMerge(
12554
- GRID_COLS,
14335
+ GRID_COLS3,
12555
14336
  "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)]",
12556
14337
  "border-t border-[color:var(--deframe-widget-color-border-secondary)]"
12557
14338
  ),
@@ -12660,7 +14441,7 @@ var DashboardTokensViewSimple = ({
12660
14441
  {
12661
14442
  "data-test-id": "asset-list-columns",
12662
14443
  className: twMerge(
12663
- GRID_COLS,
14444
+ GRID_COLS3,
12664
14445
  "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)]",
12665
14446
  "border-t border-[color:var(--deframe-widget-color-border-secondary)]"
12666
14447
  ),
@@ -12686,7 +14467,7 @@ var DashboardTokensViewSimple = ({
12686
14467
  "data-test-id": "asset-list-item",
12687
14468
  onClick: handleItemClick,
12688
14469
  className: twMerge(
12689
- GRID_COLS,
14470
+ GRID_COLS3,
12690
14471
  "items-center",
12691
14472
  "px-[var(--deframe-widget-size-padding-x-md)] py-[11px]",
12692
14473
  "border-t border-[color:var(--deframe-widget-color-border-secondary)]",
@@ -13189,6 +14970,6 @@ var DashboardViewSimple = ({
13189
14970
  );
13190
14971
  };
13191
14972
 
13192
- export { ActionButton, ActionSheet, AddressDisplay, ApyRange, BackButton, BackgroundContainer, BannerNotification, Chip, ChipGroup, 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, 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, InvestmentCrossChainProcessingView, Label, Link, ListItem, ListItemContent, ListItemLeftSide, ListItemRightSide, LoadingDots, LowRiskBadge, MediumRiskBadge, Navbar, OnchainDepositFormView, OnchainDepositSuccessView, OnchainWithdrawChainSelectorView, OnchainWithdrawFailedView, OnchainWithdrawFormView, 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 };
14973
+ export { ActionButton, ActionSheet, AddressDisplay, ApyRange, BackButton, BackgroundContainer, BannerNotification, Chip, ChipGroup, 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, InvestmentCrossChainProcessingView, 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 };
13193
14974
  //# sourceMappingURL=index.mjs.map
13194
14975
  //# sourceMappingURL=index.mjs.map