"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ButtonFocusTest_deprecated = void 0;
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var react_native_1 = require("@fluentui/react-native");
var stack_1 = require("@fluentui-react-native/stack");
var styles_1 = require("../../Common/styles");
var ButtonFocusTest_deprecated = function () {
    var _a = React.useState({
        focused: false,
    }), state = _a[0], setState = _a[1];
    var buttonRef = React.useRef(null);
    var onFocus = React.useCallback(function () {
        setState({ focused: !state.focused });
        if (buttonRef.current && !state.focused) {
            buttonRef.current.focus();
        }
    }, [state, setState]);
    return (React.createElement(stack_1.Stack, { style: styles_1.stackStyle },
        React.createElement(react_native_1.Button, { content: state.focused ? 'Focused' : 'Not Focused', componentRef: buttonRef, accessibilityLabel: "overridden button name" }),
        React.createElement(react_native_1.Button, { content: "Click to focus", onClick: onFocus, tooltip: "button tooltip" }),
        React.createElement(react_native_1.Button, { content: "Disabled Button", onClick: onFocus, tooltip: "disabled button", disabled: true })));
};
exports.ButtonFocusTest_deprecated = ButtonFocusTest_deprecated;
//# sourceMappingURL=ButtonFocusTest.js.map