import { __assign } from "tslib";
import * as React from 'react';
import { Text, View } from 'react-native';
import { MenuButton } from '@fluentui-react-native/experimental-menu-button';
import { viewWrapperStyle, columnStyle, rowStyle, textColor } from './MenuButtonV1TestStyles';
import { menuItems } from './testData';
import { MENUBUTTONV1_TEST_COMPONENT, MENUBUTTONV1_ACCESSIBILITY_LABEL, MENUBUTTONV1_NO_A11Y_LABEL_COMPONENT, MENUBUTTONV1_TEST_COMPONENT_LABEL, } from '../../../../E2E/src/MenuButtonV1/consts';
import { testProps } from '../Common/TestProps';
export var MenuButtonV1E2ETest = function () {
    var _a = React.useState(null), lastMenuItemClicked = _a[0], setLastMenuItemClicked = _a[1];
    var onItemClick = React.useCallback(function (key) {
        setLastMenuItemClicked(key);
    }, [setLastMenuItemClicked]);
    var 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: __assign(__assign({}, rowStyle), { paddingHorizontal: 5 }) },
                    React.createElement(View, { style: columnStyle },
                        React.createElement(MenuButton, __assign({ content: "Standard MenuButton with Accessibility Label", menuItems: menuItems, onItemClick: onItemClick, contextualMenu: contextualMenuProps, accessibilityLabel: MENUBUTTONV1_ACCESSIBILITY_LABEL }, testProps(MENUBUTTONV1_TEST_COMPONENT))))),
                React.createElement(View, { style: __assign(__assign({}, rowStyle), { paddingHorizontal: 5 }) },
                    React.createElement(View, { style: columnStyle },
                        React.createElement(MenuButton, __assign({ content: MENUBUTTONV1_TEST_COMPONENT_LABEL, menuItems: menuItems, onItemClick: onItemClick, contextualMenu: contextualMenuProps }, testProps(MENUBUTTONV1_NO_A11Y_LABEL_COMPONENT)))))))));
};
//# sourceMappingURL=MenuButtonV1E2ETest.js.map