"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.E2EChipTest = void 0;
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var react_native_1 = require("react-native");
var chip_1 = require("@fluentui-react-native/chip");
var text_1 = require("@fluentui-react-native/text");
var consts_1 = require("../../../../E2E/src/Chip/consts");
var TestProps_1 = require("../Common/TestProps");
var E2EChipTest = function () {
    var _a = React.useState(consts_1.CHIP_CALLBACK_TEXT_START_STATE), text = _a[0], setText = _a[1];
    var showTextOnSelection = React.useCallback(function (_e, isSelected) { return setText(isSelected ? consts_1.CHIP_CALLBACK_TEXT_END_STATE : consts_1.CHIP_CALLBACK_TEXT_START_STATE); }, []);
    return (React.createElement(react_native_1.View, null,
        React.createElement(text_1.Text, tslib_1.__assign({}, (0, TestProps_1.testProps)(consts_1.CHIP_TEXT)), text),
        React.createElement(chip_1.Chip
        /* For Android E2E testing purposes, testProps must be passed in after accessibilityLabel. */
        , tslib_1.__assign({}, (0, TestProps_1.testProps)(consts_1.CHIP_TEST_COMPONENT), { chipColor: "success", showCloseIcon: true, onSelectionChange: showTextOnSelection }), "Basic Chip")));
};
exports.E2EChipTest = E2EChipTest;
//# sourceMappingURL=E2EChipTest.js.map