"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.E2EChipTest = void 0;
const React = __importStar(require("react"));
const react_native_1 = require("react-native");
const chip_1 = require("@fluentui-react-native/chip");
const e2e_testing_1 = require("@fluentui-react-native/e2e-testing");
const text_1 = require("@fluentui-react-native/text");
const TestProps_1 = require("../Common/TestProps");
const E2EChipTest = () => {
    const [text, setText] = React.useState(e2e_testing_1.CHIP_CALLBACK_TEXT_START_STATE);
    const showTextOnSelection = React.useCallback((_e, isSelected) => setText(isSelected ? e2e_testing_1.CHIP_CALLBACK_TEXT_END_STATE : e2e_testing_1.CHIP_CALLBACK_TEXT_START_STATE), []);
    return (React.createElement(react_native_1.View, null,
        React.createElement(text_1.Text, { ...(0, TestProps_1.testProps)(e2e_testing_1.CHIP_TEXT) }, text),
        React.createElement(chip_1.Chip
        /* For Android E2E testing purposes, testProps must be passed in after accessibilityLabel. */
        , { ...(0, TestProps_1.testProps)(e2e_testing_1.CHIP_TEST_COMPONENT), chipColor: "success", showCloseIcon: true, onSelectionChange: showTextOnSelection }, "Basic Chip")));
};
exports.E2EChipTest = E2EChipTest;
//# sourceMappingURL=E2EChipTest.js.map