'use strict';

var css = require('@onbeam/styled-system/css');
var react = require('react');
var recipes = require('@onbeam/styled-system/recipes');
var utils = require('@onbeam/utils');
var jsxRuntime = require('react/jsx-runtime');

var i=react.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=recipes.dappInputField();return jsxRuntime.jsxs("div",{className:css.cx(recipes.gridBackground(),recipes.noiseBackground(),p.root,d),"data-error":f,children:[jsxRuntime.jsxs("div",{className:p.row,children:[jsxRuntime.jsx("input",{ref:I,className:p.input,placeholder:s,type:"number",step:"any",min:"0",...u}),m]}),jsxRuntime.jsxs("div",{className:css.cx(p.row,p.balances),children:[typeof o<"u"&&jsxRuntime.jsx("span",{children:utils.formatUsd(o,{prefix:"~"})}),jsxRuntime.jsxs("div",{className:p.nativeBalance,children:[jsxRuntime.jsx("span",{children:c?`${t} ${n}`:"-"}),l]})]})]})});i.displayName="DappInputField";

exports.a = i;
//# sourceMappingURL=out.js.map
//# sourceMappingURL=chunk-MS3MZHII.cjs.map