"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MenuTriggerChildRef = void 0;
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var react_native_1 = require("@fluentui/react-native");
var menu_1 = require("@fluentui-react-native/menu");
var stack_1 = require("@fluentui-react-native/stack");
var styles_1 = require("../Common/styles");
var MenuTriggerChildRef = function () {
    var ref = React.useRef(null);
    var onClick = React.useCallback(function () {
        var _a;
        (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.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