import * as React from 'react';
import { Text, View } from 'react-native';
import { MenuButton } from '@fluentui/react-native';
import { MENU_BUTTON_TEST_COMPONENT, MENU_BUTTON_ACCESSIBILITY_LABEL, MENU_BUTTON_NO_A11Y_LABEL_COMPONENT, MENU_BUTTON_TEST_COMPONENT_LABEL, } from '@fluentui-react-native/e2e-testing';
import { viewWrapperStyle, columnStyle, rowStyle, textColor } from './MenuButtonLegacyTestStyles';
import { menuItems } from './testData';
import { testProps } from '../Common/TestProps';
export const MenuButtonLegacyE2ETest = () => {
    const [lastMenuItemClicked, setLastMenuItemClicked] = React.useState(null);
    const onItemClick = React.useCallback((key) => {
        setLastMenuItemClicked(key);
    }, [setLastMenuItemClicked]);
    const contextualMenuProps = {
        accessibilityLabel: 'MenuButton',
        shouldFocusOnMount: true,
        shouldFocusOnContainer: false,
    };
    return (React.createElement(View, null,
        React.createElement(View, { style: viewWrapperStyle },
            React.createElement(View, { style: columnStyle },
                React.createElement(Text, null,
                    React.createElement(Text, null, "Last Menu Item Clicked: "),
                    lastMenuItemClicked > 0 ? React.createElement(Text, { style: textColor }, lastMenuItemClicked) : React.createElement(Text, { style: textColor }, "none")),
                React.createElement(View, { style: { ...rowStyle, paddingHorizontal: 5 } },
                    React.createElement(View, { style: columnStyle },
                        React.createElement(MenuButton, { content: "Standard MenuButton with Accessibility Label", menuItems: menuItems, onItemClick: onItemClick, contextualMenu: contextualMenuProps, accessibilityLabel: MENU_BUTTON_ACCESSIBILITY_LABEL, ...testProps(MENU_BUTTON_TEST_COMPONENT) }))),
                React.createElement(View, { style: { ...rowStyle, paddingHorizontal: 5 } },
                    React.createElement(View, { style: columnStyle },
                        React.createElement(MenuButton, { content: MENU_BUTTON_TEST_COMPONENT_LABEL, menuItems: menuItems, onItemClick: onItemClick, contextualMenu: contextualMenuProps, ...testProps(MENU_BUTTON_NO_A11Y_LABEL_COMPONENT) })))))));
};
//# sourceMappingURL=MenuButtonLegacyE2ETest.js.map