import{jsx as r,jsxs as t}from"react/jsx-runtime";import{ButtonContainer as k}from"../containers/button.js";import"../containers/card.js";import"../../lib/cn.js";import N from"../icons/ico-arrow-down.js";import W from"../icons/ico-arrow-up.js";import j from"../icons/ico-lightning-fill.js";import R from"../icons/ico-lock-unlocked-fill.js";import"../primitives/button.js";import"../primitives/checkbox.js";import"../primitives/dropdown-selector.js";import"../primitives/popover.js";import"../primitives/radio.js";import"../primitives/segmented-control.js";import"../primitives/switch.js";import n from"../primitives/text.js";import{Children as S,cloneElement as F,useRef as E,useCallback as P}from"react";import"../utils/client-asset-logo.js";import"react-qrcode-logo";import"../utils/secured-by-magic.js";import"../containers/header.js";import"../containers/menu.js";import"../containers/modal.js";import"../containers/overlay.js";import"../feedback/callout.js";import{Skeleton as d}from"../feedback/skeleton.js";import"../primitives/portal.js";import"../../hooks/useToast.js";import"../feedback/tooltip.js";import{createSlot as q,createHost as z}from"create-slots";const B={send:{title:"Send",primaryTextColor:"var(--color-text-primary)",secondaryTextColor:"var(--color-text-secondary)",icon:W,iconColor:"var(--color-negative-darker)",skeletonWidth:"89px"},receive:{title:"Receive",primaryTextColor:"var(--color-positive-base)",secondaryTextColor:"var(--color-positive-lighter)",icon:N,iconColor:"var(--color-positive-base)",skeletonWidth:"89px"},networkFee:{title:"Network Fee",primaryTextColor:"var(--color-text-primary)",secondaryTextColor:"var(--color-text-secondary)",icon:j,iconColor:"var(--color-brand-base)",skeletonWidth:"54px"},spendingCap:{title:"Spending Cap",primaryTextColor:"var(--color-warning-base)",secondaryTextColor:"var(--color-warning-base)",icon:R,iconColor:"var(--color-warning-base)",skeletonWidth:"89px"}},x=q(({children:i,...o})=>r("div",{className:"flex items-center justify-center",children:S.map(i,l=>F(l,o))})),H=i=>{const{variant:o,primaryText:l,secondaryText:s,children:h,onPress:c,loading:a,showTitle:f=!0}=i,{title:v,primaryTextColor:m,secondaryTextColor:y,icon:w,iconColor:C,skeletonWidth:p}=B[o],g=o==="send"||o==="networkFee",T=E(null),u=P(()=>{c?.()},[c]);return z(h,b=>{const e=b.get(x);return t("div",{className:"flex flex-row items-center w-full justify-between",children:[t("div",{className:"flex flex-row items-center gap-2",children:[r(w,{width:16,height:16,color:C}),f&&r(n,{size:"sm",fontWeight:"medium",children:v})]}),t("div",{className:"flex flex-row items-center gap-4",children:[s&&r(n,{styles:{color:y},children:s}),g?r(k,{ref:T,className:"px-4 py-2.5 bg-surface-secondary",borderRadius:"0.75rem",onPress:u,...i,children:t("div",{className:"flex flex-row items-center gap-3",children:[a?r(d,{width:p}):r(n,{styles:{color:m},children:l}),e&&{...e,props:{...e.props,width:32,height:32}}]})}):t("div",{className:"flex flex-row items-center gap-3",children:[a?r(d,{width:p}):r(n,{styles:{color:m},children:l}),e&&{...e,props:{...e.props,width:32,height:32}}]})]})]})})},I=Object.assign(H,{TokenIcon:x});export{I as TransactionRow};
//# sourceMappingURL=transaction-row.js.map
