import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import Input from "../input";
import Select from "../select";
import { Row } from "../grid";
import { Wrapper } from "./styled";
const InputToken = ({ onChange, inputWidth, selectWidth, amount, token, tokens: tokenList, title, preselectedToken, error, subscript, dpLimit, }) => {
    return (_jsx(Wrapper, { width: `${parseInt(inputWidth ?? "266px") + parseInt(selectWidth ?? "100px")}px`, children: _jsxs(Row, { children: [_jsx(Input, { placeholder: "0.0", amount: true, value: amount, onChange: (amount) => {
                        onChange?.(amount, token);
                    }, subscript: subscript, title: title, width: inputWidth ?? "266px", error: !!error, dpLimit: dpLimit }), _jsx(Select, { onSelect: (key) => {
                        onChange?.(amount, key);
                    }, title: _jsx("div", { style: { height: title ? "20px" : "0" } }), width: selectWidth ?? "100px", preselectedKey: preselectedToken, error: !!error, children: tokenList?.map((curr) => (_jsx(Select.Option, { children: curr.toUpperCase() }, curr))) })] }) }));
};
export default InputToken;
//# sourceMappingURL=index.js.map