import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Dialog, DialogBody, DialogContent, DialogHeader, DialogTrigger } from "../../../dialog";
import { TokenListView } from ".";
export const MobileTokenSelect = (props)=>{
    return /*#__PURE__*/ _jsxs(Dialog, {
        open: props.open,
        onOpenChange: props.onOpenChange,
        children: [
            /*#__PURE__*/ _jsx(DialogTrigger, {
                disabled: props.disabled,
                asChild: true,
                children: props.trigger
            }),
            /*#__PURE__*/ _jsxs(DialogContent, {
                className: "orderly-token-select-dialog",
                onCloseAutoFocus: (event)=>{
                    event.preventDefault();
                    props.onClosed?.();
                },
                onOpenAutoFocus: (event)=>event.preventDefault(),
                closable: true,
                children: [
                    /*#__PURE__*/ _jsx(DialogHeader, {
                        className: "after:orderly-hidden",
                        children: "Select token"
                    }),
                    /*#__PURE__*/ _jsx(DialogBody, {
                        children: /*#__PURE__*/ _jsx(TokenListView, {
                            tokens: props.tokens,
                            fetchBalance: props.fetchBalance,
                            onItemClick: (token)=>{
                                props.onTokenChange?.(token);
                                props.onOpenChange(false);
                            }
                        })
                    })
                ]
            })
        ]
    });
};

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