"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RadioGroupLegacyTest = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const react_native_1 = require("react-native");
const react_native_2 = require("@fluentui/react-native");
const e2e_testing_1 = require("@fluentui-react-native/e2e-testing");
const RadioGroupLegacyE2ETest_1 = require("./RadioGroupLegacyE2ETest");
const Test_1 = require("../Test");
const BasicRadioGroup = () => {
    // Client's example onChange function
    const onChange = (key) => {
        console.log(key);
    };
    const [selectedKey, setSelectedKey] = React.useState('C');
    const onChange2 = React.useCallback((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 })))));
};
const radioGroupSections = [
    {
        name: 'Basic RadioGroup Usage',
        testID: e2e_testing_1.RADIOGROUP_TESTPAGE,
        component: BasicRadioGroup,
    },
];
const e2eSections = [
    {
        name: 'RadioGroup for E2E Testing',
        component: RadioGroupLegacyE2ETest_1.RadioGroupLegacyE2ETest,
    },
];
const RadioGroupLegacyTest = () => {
    const status = {
        win32Status: 'Deprecated',
        uwpStatus: 'Deprecated',
        iosStatus: 'Deprecated',
        macosStatus: 'Deprecated',
        androidStatus: 'Deprecated',
    };
    const 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