import * as React from 'react';
import { View } from 'react-native';
import { RadioButton, RadioGroup, Separator } from '@fluentui/react-native';
import { RADIOGROUP_TESTPAGE } from '@fluentui-react-native/e2e-testing';
import { RadioGroupLegacyE2ETest } from './RadioGroupLegacyE2ETest';
import { Test } from '../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(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 })))));
};
const radioGroupSections = [
    {
        name: 'Basic RadioGroup Usage',
        testID: RADIOGROUP_TESTPAGE,
        component: BasicRadioGroup,
    },
];
const e2eSections = [
    {
        name: 'RadioGroup for E2E Testing',
        component: RadioGroupLegacyE2ETest,
    },
];
export const RadioGroupLegacyTest = () => {
    const status = {
        win32Status: 'Deprecated',
        uwpStatus: 'Deprecated',
        iosStatus: 'Deprecated',
        macosStatus: 'Deprecated',
        androidStatus: 'Deprecated',
    };
    const description = 'No description.';
    return (React.createElement(Test, { name: "RadioGroup Legacy Test", description: description, sections: radioGroupSections, status: status, e2eSections: e2eSections }));
};
//# sourceMappingURL=RadioGroupLegacyTest.js.map