"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 _chunkWASX7O5Ecjs = require('./chunk-WASX7O5E.cjs');var _chunkGTUFJBGYcjs = require('./chunk-GTUFJBGY.cjs');var _chunk5KRCPBZRcjs = require('./chunk-5KRCPBZR.cjs');var _chunk3CNSKST2cjs = require('./chunk-3CNSKST2.cjs');var _chunk5NXYDZPPcjs = require('./chunk-5NXYDZPP.cjs');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var v=_chunk3CNSKST2cjs.a.call(void 0, "EulAmountInput",["input","label","maxBtn","price","product","root","customRadius","noBottomRadius","noTopRadius","disabled"]),I=o=>_chunk5KRCPBZRcjs.e.call(void 0, "EulAmountInput",{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 =v;var B=_chunk3CNSKST2cjs.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]};
    }
  `),h=_chunk3CNSKST2cjs.m.call(void 0, "input")(({theme:o})=>_chunk5NXYDZPPcjs.p`
    width: 100%;
    padding: 0;
    margin: 0;
    color: ${o.palette.common.white};
    font-size: ${o.typography.input1.fontSize};
    font-family: ${o.typography.fontFamily};
    line-height: ${o.typography.input1.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;
    }
  `),R=_chunk3CNSKST2cjs.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 k(o){let{asset:w,balance:c,className:C,isBalanceLoading:d,isLoading:m,label:A,maxLabel:T,onChange:N,onClickMax:g,product:b,usdValue:f,...S}=o,a=I(o);return _jsxruntime.jsxs.call(void 0, B,{className:_clsx2.default.call(void 0, C,a.root),children:[_jsxruntime.jsxs.call(void 0, _chunk5NXYDZPPcjs.s,{alignItems:"center",display:"flex",gap:4,justifyContent:"space-between",width:"100%",children:[_jsxruntime.jsx.call(void 0, _chunkGTUFJBGYcjs.b,{className:_clsx2.default.call(void 0, a.label),color:"secondary",component:"span",variant:"body2",children:A}),m&&_jsxruntime.jsx.call(void 0, _chunkWASX7O5Ecjs.b,{height:12,width:123}),b&&!m&&_jsxruntime.jsx.call(void 0, _chunkGTUFJBGYcjs.b,{className:_clsx2.default.call(void 0, a.product),component:"span",variant:"body2",children:b})]}),_jsxruntime.jsxs.call(void 0, _chunk5NXYDZPPcjs.s,{alignItems:"center",display:"flex",gap:4,pt:1,width:"100%",children:[_jsxruntime.jsx.call(void 0, h,{...S,className:_clsx2.default.call(void 0, a.input),onChange:y=>_optionalChain([N, 'optionalCall', _ => _(isNaN(y.target.valueAsNumber)?void 0:y.target.valueAsNumber)]),type:"number"}),w]}),_jsxruntime.jsxs.call(void 0, _chunk5NXYDZPPcjs.s,{alignItems:"center",display:"flex",gap:4,height:20,justifyContent:"space-between",width:"100%",children:[_jsxruntime.jsx.call(void 0, _chunkGTUFJBGYcjs.b,{className:_clsx2.default.call(void 0, a.price),color:"secondary",component:"span",children:f?`~ ${f}`:"-"}),c&&!d&&_jsxruntime.jsx.call(void 0, _chunkGTUFJBGYcjs.b,{className:_clsx2.default.call(void 0, a.balance),component:"span",variant:"body2",children:_jsxruntime.jsxs.call(void 0, _chunk5NXYDZPPcjs.s,{alignItems:"center",display:"flex",gap:2,children:[c,g&&_jsxruntime.jsx.call(void 0, R,{className:_clsx2.default.call(void 0, a.maxBtn),onClick:g,children:T||"Max"})]})}),d&&_jsxruntime.jsx.call(void 0, _chunkWASX7O5Ecjs.b,{height:14,width:168})]})]})}exports.a = n; exports.b = k;
