"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importStar(require("react"));
const react_native_1 = require("react-native");
const Menu_1 = tslib_1.__importDefault(require("@material-ui/core/Menu"));
exports.Menu = (props) => {
    const { children, anchor, onDismiss, visible, style, anchorWrapperStyle } = props, rest = tslib_1.__rest(props, ["children", "anchor", "onDismiss", "visible", "style", "anchorWrapperStyle"]);
    const el = react_1.useRef(null);
    return (react_1.default.createElement(react_1.default.Fragment, null,
        react_1.default.createElement(react_native_1.View, { ref: el, style: anchorWrapperStyle }, anchor),
        react_1.default.createElement(Menu_1.default, Object.assign({ anchorEl: react_native_1.findNodeHandle(el.current), keepMounted: true, open: !!visible, onClose: onDismiss, style: style }, rest), children)));
};
