"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
var _chunk565ELFJRcjs = require('./chunk-565ELFJR.cjs');var _chunkW5TOJT6Bcjs = require('./chunk-W5TOJT6B.cjs');var _chunkX26E67JFcjs = require('./chunk-X26E67JF.cjs');var _chunkQLDZ7HKUcjs = require('./chunk-QLDZ7HKU.cjs');var _chunk5NXYDZPPcjs = require('./chunk-5NXYDZPP.cjs');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var z=_chunkQLDZ7HKUcjs.a.call(void 0, "EulAmountInput",["input","label","maxBtn","price","header","product","root","customRadius","noBottomRadius","noTopRadius","disabled"]),B=o=>_chunkX26E67JFcjs.e.call(void 0, "EulAmountInput",{header:["header"],input:["input",o.disabled&&"disabled"],label:["label"],maxBtn:["maxBtn"],price:["price"],product:["product"],root:["root",Boolean(o.noBottomRadius||o.noTopRadius)&&"customRadius",!!o.noTopRadius&&"noTopRadius",!!o.noBottomRadius&&"noBottomRadius"]}),n= exports.a =z;var R=_chunkQLDZ7HKUcjs.m.call(void 0, "label")(({theme:o})=>_chunk5NXYDZPPcjs.p`
    display: flex;
    flex-direction: column;
    gap: ${o.spacing(2)};
    align-items: flex-start;
    align-self: stretch;
    padding: ${o.spacing(4)};
    background: ${o.palette.background[200]};
    border-radius: ${o.spacing(2)};
    outline: transparent solid ${o.spacing(.5)};
    outline-offset: ${o.spacing(-.5)};
    transition: ${o.transitions.create(["background-color","outline-color"])};

    &.${n.noBottomRadius} {
      border-radius: ${o.spacing(2,2,0,0)};
    }

    &.${n.noTopRadius} {
      border-radius: ${o.spacing(0,0,2,2)};
    }

    &.${n.noTopRadius}.${n.noBottomRadius} {
      border-radius: 0;
    }

    &:hover {
      background: ${o.palette.background[200]};
    }

    &:focus-within:not(.${n.customRadius}) {
      outline-color: ${o.palette.teal[600]};
    }
  `),k=_chunkQLDZ7HKUcjs.m.call(void 0, "input")(({theme:o})=>_chunk5NXYDZPPcjs.p`
    width: 100%;
    padding: 0;
    margin: 0;
    color: ${o.palette.common.white};
    font-size: ${o.typography.input2.fontSize};
    font-family: ${o.typography.fontFamily};
    line-height: ${o.typography.input2.lineHeight};
    background: none;
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    -moz-appearance: textfield;

    &:focus {
      outline: none;
      box-shadow: none;
    }

    &::placeholder {
      color: ${o.palette.background[700]};
      opacity: 1;
    }

    &.${n.disabled} {
      color: ${o.palette.background[800]};
    }

    &::-webkit-outer-spin-button,
    &::-webkit-inner-spin-button {
      margin: 0;
      -webkit-appearance: none;
    }
  `),w=_chunkQLDZ7HKUcjs.m.call(void 0, "button")(({theme:o})=>_chunk5NXYDZPPcjs.p`
    padding: ${o.spacing(0,1)};
    color: ${o.palette.teal[700]};
    font: inherit;
    font-size: ${o.typography.pxToRem(14)};
    line-height: ${o.typography.pxToRem(20)};
    background: none;
    border: none;
    box-shadow: none;
    cursor: pointer;
    appearance: none;

    &:focus {
      outline: none;
    }

    &::-moz-focus-inner {
      border: 0;
    }
  `);var _jsxruntime = require('react/jsx-runtime');function C(o){let{asset:A,balance:i,className:T,heading:f,isBalanceLoading:d,isLoading:y,label:S,maxLabel:v,onChange:N,onClickMax:b,product:x,usdValue:c,...$}=o,t=B(o);return _jsxruntime.jsxs.call(void 0, R,{className:_clsx2.default.call(void 0, T,t.root),children:[_jsxruntime.jsxs.call(void 0, _chunk5NXYDZPPcjs.s,{children:[f&&_jsxruntime.jsx.call(void 0, _chunkW5TOJT6Bcjs.b,{className:_clsx2.default.call(void 0, t.heading),color:"secondary",component:"span",fontWeight:600,variant:"body2",children:f}),_jsxruntime.jsxs.call(void 0, _chunk5NXYDZPPcjs.s,{alignItems:"flex-end",display:"flex",gap:4,justifyContent:"space-between",width:"100%",children:[_jsxruntime.jsx.call(void 0, _chunkW5TOJT6Bcjs.b,{className:_clsx2.default.call(void 0, t.label),color:"secondary",component:"span",variant:"body2",children:S}),y&&_jsxruntime.jsx.call(void 0, _chunk565ELFJRcjs.b,{height:12,width:123}),x&&!y&&_jsxruntime.jsx.call(void 0, _chunkW5TOJT6Bcjs.b,{className:_clsx2.default.call(void 0, t.product),component:"span",variant:"body2",children:x})]})]}),_jsxruntime.jsxs.call(void 0, _chunk5NXYDZPPcjs.s,{alignItems:"center",display:"flex",gap:4,pt:1,width:"100%",children:[_jsxruntime.jsx.call(void 0, k,{...$,className:_clsx2.default.call(void 0, t.input),onChange:m=>_optionalChain([N, 'optionalCall', _ => _(m.target.value?/^\d*\.?\d*$/.test(m.target.value)?m.target.value:$.value:void 0)])}),A]}),c||i||!i&&d&&_jsxruntime.jsxs.call(void 0, _chunk5NXYDZPPcjs.s,{alignItems:"flex-end",display:"flex",gap:4,height:20,justifyContent:"space-between",width:"100%",children:[c&&_jsxruntime.jsxs.call(void 0, _chunkW5TOJT6Bcjs.b,{className:_clsx2.default.call(void 0, t.price),color:"secondary",component:"span",children:["~ $",c]}),i&&!d&&_jsxruntime.jsx.call(void 0, _chunkW5TOJT6Bcjs.b,{className:_clsx2.default.call(void 0, t.balance),component:"span",variant:"body2",children:_jsxruntime.jsxs.call(void 0, _chunk5NXYDZPPcjs.s,{alignItems:"center",display:"flex",gap:2,children:[i,b&&_jsxruntime.jsx.call(void 0, w,{className:_clsx2.default.call(void 0, t.maxBtn),onClick:b,children:v||"Max"})]})}),d&&_jsxruntime.jsx.call(void 0, _chunk565ELFJRcjs.b,{height:14,width:168})]})]})}exports.a = n; exports.b = C;
