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