"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "MobileTokenSelect", {
    enumerable: true,
    get: function() {
        return MobileTokenSelect;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _dialog = require("../../../dialog");
const _ = require(".");
const MobileTokenSelect = (props)=>{
    return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_dialog.Dialog, {
        open: props.open,
        onOpenChange: props.onOpenChange,
        children: [
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_dialog.DialogTrigger, {
                disabled: props.disabled,
                asChild: true,
                children: props.trigger
            }),
            /*#__PURE__*/ (0, _jsxruntime.jsxs)(_dialog.DialogContent, {
                className: "orderly-token-select-dialog",
                onCloseAutoFocus: (event)=>{
                    event.preventDefault();
                    props.onClosed?.();
                },
                onOpenAutoFocus: (event)=>event.preventDefault(),
                closable: true,
                children: [
                    /*#__PURE__*/ (0, _jsxruntime.jsx)(_dialog.DialogHeader, {
                        className: "after:orderly-hidden",
                        children: "Select token"
                    }),
                    /*#__PURE__*/ (0, _jsxruntime.jsx)(_dialog.DialogBody, {
                        children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_.TokenListView, {
                            tokens: props.tokens,
                            fetchBalance: props.fetchBalance,
                            onItemClick: (token)=>{
                                props.onTokenChange?.(token);
                                props.onOpenChange(false);
                            }
                        })
                    })
                ]
            })
        ]
    });
};

//# sourceMappingURL=tokenSelect.mobile.js.map