import{jsx as r,jsxs as i}from"react/jsx-runtime";import{ButtonContainer as S}from"../containers/button.js";import"../containers/card.js";import{css as j}from"@styled/css";import{Center as R,HStack as n}from"@styled/jsx";import{token as o}from"@styled/tokens";import F from"../icons/ico-arrow-down.js";import z from"../icons/ico-arrow-up.js";import B from"../icons/ico-lightning-fill.js";import H 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 p from"../primitives/text.js";import{Children as N,cloneElement as P,useRef as $,useCallback as E}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"../feedback/progress-bar.js";import{Skeleton as x}from"../feedback/skeleton.js";import"../primitives/portal.js";import"../../hooks/useToast.js";import"../../recipes/toast.js";import"../feedback/tooltip.js";import{createSlot as I,createHost as O}from"create-slots";const _={send:{title:"Send",primaryTextColor:o("colors.text.primary"),secondaryTextColor:o("colors.text.secondary"),icon:z,iconColor:o("colors.negative.darker"),skeletonWidth:"89px"},receive:{title:"Receive",primaryTextColor:o("colors.positive.base"),secondaryTextColor:`${o("colors.positive.lighter")}`,icon:F,iconColor:o("colors.positive.base"),skeletonWidth:"89px"},networkFee:{title:"Network Fee",primaryTextColor:o("colors.text.primary"),secondaryTextColor:o("colors.text.secondary"),icon:B,iconColor:o("colors.brand.base"),skeletonWidth:"54px"},spendingCap:{title:"Spending Cap",primaryTextColor:o("colors.warning.base"),secondaryTextColor:o("colors.warning.base"),icon:H,iconColor:o("colors.warning.base"),skeletonWidth:"89px"}},y=I(({children:s,...t})=>r(R,{children:N.map(s,l=>P(l,t))})),q=s=>{const{variant:t,primaryText:l,secondaryText:c,children:C,onPress:m,loading:a,showTitle:f=!0}=s,{title:g,primaryTextColor:d,secondaryTextColor:w,icon:T,iconColor:k,skeletonWidth:h}=_[t],b=t==="send"||t==="networkFee",u=$(null),v=E(()=>{m?.()},[m]);return O(C,W=>{const e=W.get(y);return i(n,{w:"full",justify:"space-between",children:[i(n,{gap:2,children:[r(T,{width:16,height:16,color:k}),f&&r(p,{size:"sm",fontWeight:"medium",children:g})]}),i(n,{gap:4,children:[c&&r(p,{styles:{color:w},children:c}),b?r(S,{ref:u,className:j({px:4,py:2.5,bg:"surface.secondary"}),borderRadius:"0.75rem",onPress:v,...s,children:i(n,{gap:3,children:[a?r(x,{width:h}):r(p,{styles:{color:d},children:l}),e&&{...e,props:{...e.props,width:32,height:32}}]})}):i(n,{gap:3,children:[a?r(x,{width:h}):r(p,{styles:{color:d},children:l}),e&&{...e,props:{...e.props,width:32,height:32}}]})]})]})})},A=Object.assign(q,{TokenIcon:y});export{A as TransactionRow};
//# sourceMappingURL=transaction-row.js.map
