"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ButtonFocusTest_deprecated = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const react_native_1 = require("@fluentui/react-native");
const stack_1 = require("@fluentui-react-native/stack");
const styles_1 = require("../../Common/styles");
const ButtonFocusTest_deprecated = () => {
    const [state, setState] = React.useState({
        focused: false,
    });
    const buttonRef = React.useRef(null);
    const onFocus = React.useCallback(() => {
        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