import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { InfoIcon } from "../../../icon";
import { modal } from "../../../modal";
import { useMediaQuery } from "@orderly.network/hooks";
import { MEDIA_TABLET } from "@orderly.network/types";
import { Tooltip, TooltipArrow, TooltipContent, TooltipTrigger } from "@radix-ui/react-tooltip";
export const RememberMe = ()=>{
    const isTable = useMediaQuery(MEDIA_TABLET);
    return isTable ? /*#__PURE__*/ _jsx(MobileRememberMe, {}) : /*#__PURE__*/ _jsx(DesktopRememberMe, {});
};
export const MobileRememberMe = ()=>{
    const showRememberHint = ()=>{
        modal.alert({
            title: "Remember me",
            message: /*#__PURE__*/ _jsx("span", {
                className: "orderly-text-3xs orderly-text-base-contrast/60",
                children: "Toggle this option to skip these steps next time you want to trade."
            })
        });
    };
    return /*#__PURE__*/ _jsxs("div", {
        className: "orderly-text-base-contrast-54 orderly-text-xs  desktop:orderly-text-base",
        onClick: showRememberHint,
        children: [
            /*#__PURE__*/ _jsx("span", {
                children: "Remember me"
            }),
            /*#__PURE__*/ _jsx(InfoIcon, {
                className: "orderly-inline-block orderly-ml-2",
                size: 14
            })
        ]
    });
};
export const DesktopRememberMe = ()=>{
    return /*#__PURE__*/ _jsxs(Tooltip, {
        children: [
            /*#__PURE__*/ _jsx(TooltipTrigger, {
                asChild: true,
                children: /*#__PURE__*/ _jsxs("div", {
                    className: "orderly-text-base-contrast-54 orderly-text-xs desktop:orderly-text-base orderly-cursor-pointer",
                    children: [
                        /*#__PURE__*/ _jsx("span", {
                            children: "Remember me"
                        }),
                        /*#__PURE__*/ _jsx(InfoIcon, {
                            className: "orderly-inline-block orderly-ml-2",
                            size: 14
                        })
                    ]
                })
            }),
            /*#__PURE__*/ _jsxs(TooltipContent, {
                align: "center",
                className: "orderly-max-w-[300px] orderly-z-20 orderly-text-base-contrast orderly-select-none orderly-rounded orderly-bg-base-400 orderly-p-3 orderly-text-4xs",
                children: [
                    /*#__PURE__*/ _jsx("span", {
                        className: "orderly-text-3xs orderly-text-base-contrast/60",
                        children: "Toggle this option to skip these steps next time you want to trade."
                    }),
                    /*#__PURE__*/ _jsx(TooltipArrow, {
                        className: "orderly-fill-base-400"
                    })
                ]
            })
        ]
    });
};

//# sourceMappingURL=rememberMe.js.map