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