import * as React from 'react';
import { View } from 'react-native';
import { RadioButton, RadioGroup, Separator } from '@fluentui/react-native';
import { RadioGroupLegacyE2ETest } from './RadioGroupLegacyE2ETest';
import { RADIOGROUP_TESTPAGE } from '../../../../E2E/src/RadioGroupLegacy/consts';
import { Test } from '../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(View, null,
        React.createElement(RadioGroup, { label: "Uncontrolled RadioGroup", defaultSelectedKey: "X", onChange: onChange },
            React.createElement(RadioButton, { content: "Option W", buttonKey: "W", accessibilityLabel: "Test Accessibility Label" }),
            React.createElement(RadioButton, { content: "Option X", buttonKey: "X" }),
            React.createElement(RadioButton, { content: "Option Y (disabled)", buttonKey: "C", disabled: true }),
            React.createElement(RadioButton, { content: "Option Z", buttonKey: "Z" })),
        React.createElement(Separator, null),
        React.createElement(RadioGroup, { label: "Controlled RadioGroup", selectedKey: selectedKey, onChange: onChange2 },
            React.createElement(View, null,
                React.createElement(RadioButton, { content: "Option A", buttonKey: "A", accessibilityLabel: "Test Accessibility Label", accessibilityPositionInSet: 1, accessibilitySetSize: 4 }),
                React.createElement(RadioButton, { content: "Option B", buttonKey: "B", accessibilityPositionInSet: 2, accessibilitySetSize: 4 }),
                React.createElement(RadioButton, { content: "Option C", buttonKey: "C", accessibilityPositionInSet: 3, accessibilitySetSize: 4 }),
                React.createElement(RadioButton, { content: "Option D", buttonKey: "D", accessibilityPositionInSet: 4, accessibilitySetSize: 4 })))));
};
var radioGroupSections = [
    {
        name: 'Basic RadioGroup Usage',
        testID: RADIOGROUP_TESTPAGE,
        component: BasicRadioGroup,
    },
];
var e2eSections = [
    {
        name: 'RadioGroup for E2E Testing',
        component: RadioGroupLegacyE2ETest,
    },
];
export var RadioGroupLegacyTest = function () {
    var status = {
        win32Status: 'Beta',
        uwpStatus: 'Experimental',
        iosStatus: 'Experimental',
        macosStatus: 'Beta',
        androidStatus: 'Backlog',
    };
    var description = 'No description.';
    return (React.createElement(Test, { name: "RadioGroup Legacy Test", description: description, sections: radioGroupSections, status: status, e2eSections: e2eSections }));
};
//# sourceMappingURL=RadioGroupLegacyTest.js.map