import { __assign } from "tslib";
import * as React from 'react';
import { View } from 'react-native';
import { Checkbox, Text } from '@fluentui/react-native';
import { Stack } from '@fluentui-react-native/stack';
import { CHECKBOX_TEST_COMPONENT, CHECKBOX_ON_PRESS, CHECKBOX_NO_A11Y_LABEL_COMPONENT, CHECKBOX_TEST_COMPONENT_LABEL, CHECKBOX_ACCESSIBILITY_LABEL, } from '../../../../E2E/src/CheckboxLegacy/consts';
import { stackStyle } from '../Common/styles';
import { testProps } from '../Common/TestProps';
export var CheckboxLegacyE2ETest = function () {
    var _a = React.useState(false), checkboxPressed = _a[0], setCheckboxPressed = _a[1];
    var onClick = React.useCallback(function (checked) {
        setCheckboxPressed(checked);
    }, [setCheckboxPressed]);
    return (React.createElement(View, null,
        React.createElement(Stack, { style: stackStyle },
            React.createElement(Checkbox, __assign({ accessibilityLabel: CHECKBOX_ACCESSIBILITY_LABEL, disabled: false, label: "Testing accessibilityLabel", onChange: onClick }, testProps(CHECKBOX_TEST_COMPONENT))),
            React.createElement(Checkbox, __assign({ label: CHECKBOX_TEST_COMPONENT_LABEL }, testProps(CHECKBOX_NO_A11Y_LABEL_COMPONENT))),
            checkboxPressed ? (React.createElement(Text /* For Android E2E testing purposes, testProps must be passed in after accessibilityLabel. */, __assign({}, testProps(CHECKBOX_ON_PRESS)), "Checkbox Selected")) : null)));
};
//# sourceMappingURL=CheckboxLegacyE2ETest.js.map