"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MenuTriggerChildRef = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const react_native_1 = require("@fluentui/react-native");
const menu_1 = require("@fluentui-react-native/menu");
const stack_1 = require("@fluentui-react-native/stack");
const styles_1 = require("../Common/styles");
const MenuTriggerChildRef = () => {
    const ref = React.useRef(null);
    const onClick = React.useCallback(() => {
        ref?.current?.focus();
    }, [ref]);
    return (React.createElement(stack_1.Stack, { style: styles_1.stackStyle },
        React.createElement(react_native_1.ButtonV1, { onClick: onClick }, "Click to focus Menu trigger"),
        React.createElement(menu_1.Menu, null,
            React.createElement(menu_1.MenuTrigger, null,
                React.createElement(react_native_1.ButtonV1, { componentRef: ref }, "The Menu")),
            React.createElement(menu_1.MenuPopover, null,
                React.createElement(menu_1.MenuList, null,
                    React.createElement(menu_1.MenuItem, null, "A plain MenuItem"))))));
};
exports.MenuTriggerChildRef = MenuTriggerChildRef;
//# sourceMappingURL=MenuRefs.js.map