import * as React from 'react';
import { View } from 'react-native';
import { Chip } from '@fluentui-react-native/chip';
import { CHIP_CALLBACK_TEXT_END_STATE, CHIP_CALLBACK_TEXT_START_STATE, CHIP_TEST_COMPONENT, CHIP_TEXT, } from '@fluentui-react-native/e2e-testing';
import { Text } from '@fluentui-react-native/text';
import { testProps } from '../Common/TestProps';
export const E2EChipTest = () => {
    const [text, setText] = React.useState(CHIP_CALLBACK_TEXT_START_STATE);
    const showTextOnSelection = React.useCallback((_e, isSelected) => setText(isSelected ? CHIP_CALLBACK_TEXT_END_STATE : CHIP_CALLBACK_TEXT_START_STATE), []);
    return (React.createElement(View, null,
        React.createElement(Text, { ...testProps(CHIP_TEXT) }, text),
        React.createElement(Chip
        /* For Android E2E testing purposes, testProps must be passed in after accessibilityLabel. */
        , { ...testProps(CHIP_TEST_COMPONENT), chipColor: "success", showCloseIcon: true, onSelectionChange: showTextOnSelection }, "Basic Chip")));
};
//# sourceMappingURL=E2EChipTest.js.map