import { cx } from '@onbeam/styled-system/css';
import { forwardRef } from 'react';
import { dappInputField, gridBackground, noiseBackground } from '@onbeam/styled-system/recipes';
import { formatUsd } from '@onbeam/utils';
import { jsxs, jsx } from 'react/jsx-runtime';

var i=forwardRef(({className:d,placeholder:s="0.00",currency:n,topRightAddon:m,bottomRightAddon:l,nativeBalance:t,usdBalance:o,hasError:f,...u},I)=>{let c=typeof t<"u"&&typeof n<"u",p=dappInputField();return jsxs("div",{className:cx(gridBackground(),noiseBackground(),p.root,d),"data-error":f,children:[jsxs("div",{className:p.row,children:[jsx("input",{ref:I,className:p.input,placeholder:s,type:"number",step:"any",min:"0",...u}),m]}),jsxs("div",{className:cx(p.row,p.balances),children:[typeof o<"u"&&jsx("span",{children:formatUsd(o,{prefix:"~"})}),jsxs("div",{className:p.nativeBalance,children:[jsx("span",{children:c?`${t} ${n}`:"-"}),l]})]})]})});i.displayName="DappInputField";

export { i as a };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=chunk-CNTWRPOV.js.map