"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RadioGroupLegacyTest = void 0;
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var react_native_1 = require("react-native");
var react_native_2 = require("@fluentui/react-native");
var RadioGroupLegacyE2ETest_1 = require("./RadioGroupLegacyE2ETest");
var consts_1 = require("../../../../E2E/src/RadioGroupLegacy/consts");
var Test_1 = require("../Test");
var BasicRadioGroup = function () {
    // Client's example onChange function
    var onChange = function (key) {
        console.log(key);
    };
    var _a = React.useState('C'), selectedKey = _a[0], setSelectedKey = _a[1];
    var onChange2 = React.useCallback(function (key) {
        if (key == 'A') {
            setSelectedKey('A');
        }
        else if (key == 'B') {
            setSelectedKey('B');
        }
        else if (key == 'C') {
            setSelectedKey('C');
        }
        else if (key == 'D') {
            setSelectedKey('D');
        }
    }, []);
    return (React.createElement(react_native_1.View, null,
        React.createElement(react_native_2.RadioGroup, { label: "Uncontrolled RadioGroup", defaultSelectedKey: "X", onChange: onChange },
            React.createElement(react_native_2.RadioButton, { content: "Option W", buttonKey: "W", accessibilityLabel: "Test Accessibility Label" }),
            React.createElement(react_native_2.RadioButton, { content: "Option X", buttonKey: "X" }),
            React.createElement(react_native_2.RadioButton, { content: "Option Y (disabled)", buttonKey: "C", disabled: true }),
            React.createElement(react_native_2.RadioButton, { content: "Option Z", buttonKey: "Z" })),
        React.createElement(react_native_2.Separator, null),
        React.createElement(react_native_2.RadioGroup, { label: "Controlled RadioGroup", selectedKey: selectedKey, onChange: onChange2 },
            React.createElement(react_native_1.View, null,
                React.createElement(react_native_2.RadioButton, { content: "Option A", buttonKey: "A", accessibilityLabel: "Test Accessibility Label", accessibilityPositionInSet: 1, accessibilitySetSize: 4 }),
                React.createElement(react_native_2.RadioButton, { content: "Option B", buttonKey: "B", accessibilityPositionInSet: 2, accessibilitySetSize: 4 }),
                React.createElement(react_native_2.RadioButton, { content: "Option C", buttonKey: "C", accessibilityPositionInSet: 3, accessibilitySetSize: 4 }),
                React.createElement(react_native_2.RadioButton, { content: "Option D", buttonKey: "D", accessibilityPositionInSet: 4, accessibilitySetSize: 4 })))));
};
var radioGroupSections = [
    {
        name: 'Basic RadioGroup Usage',
        testID: consts_1.RADIOGROUP_TESTPAGE,
        component: BasicRadioGroup,
    },
];
var e2eSections = [
    {
        name: 'RadioGroup for E2E Testing',
        component: RadioGroupLegacyE2ETest_1.RadioGroupLegacyE2ETest,
    },
];
var RadioGroupLegacyTest = function () {
    var status = {
        win32Status: 'Beta',
        uwpStatus: 'Experimental',
        iosStatus: 'Experimental',
        macosStatus: 'Beta',
        androidStatus: 'Backlog',
    };
    var description = 'No description.';
    return (React.createElement(Test_1.Test, { name: "RadioGroup Legacy Test", description: description, sections: radioGroupSections, status: status, e2eSections: e2eSections }));
};
exports.RadioGroupLegacyTest = RadioGroupLegacyTest;
//# sourceMappingURL=RadioGroupLegacyTest.js.map