import * as React from 'react';
import { View, Switch } from 'react-native';
import { Text } from '@fluentui/react-native';
import { ActivityIndicator } from '@fluentui-react-native/experimental-activity-indicator';
import { Stack } from '@fluentui-react-native/stack';
import { ACTIVITY_INDICATOR_TESTPAGE } from '../../../../E2E/src/ActivityIndicator/consts';
import { stackStyle, commonTestStyles as commonStyles } from '../Common/styles';
import { Test } from '../Test';
var BasicActivityIndicator = function () {
    var _a = React.useState(true), animating = _a[0], setAnimating = _a[1];
    var _b = React.useState(true), hidesWhenStopped = _b[0], setHidesWhenStopped = _b[1];
    return (React.createElement(Stack, { style: stackStyle },
        React.createElement(View, { style: commonStyles.root },
            React.createElement(View, { style: commonStyles.settings },
                React.createElement(View, { style: commonStyles.switch },
                    React.createElement(Text, null, "Animating"),
                    React.createElement(Switch, { value: animating, onValueChange: setAnimating })),
                React.createElement(View, { style: commonStyles.switch },
                    React.createElement(Text, null, "HidesWhenStopped"),
                    React.createElement(Switch, { value: hidesWhenStopped, onValueChange: setHidesWhenStopped }))),
            React.createElement(ActivityIndicator, { animating: animating, hidesWhenStopped: hidesWhenStopped }))));
};
var ActivityIndicatorMainTest = function () {
    return (React.createElement(Stack, { style: stackStyle },
        React.createElement(Text, null, "Extra Small"),
        React.createElement(ActivityIndicator, { size: "xSmall" }),
        React.createElement(Text, null, "Small"),
        React.createElement(ActivityIndicator, { size: "small" }),
        React.createElement(Text, null, "Medium"),
        React.createElement(ActivityIndicator, { size: "medium" }),
        React.createElement(Text, null, "Large"),
        React.createElement(ActivityIndicator, { size: "large" }),
        React.createElement(Text, null, "Extra Large"),
        React.createElement(ActivityIndicator, { size: "xLarge" }),
        React.createElement(Text, null, "Size=xLarge and Line Thickness=large"),
        React.createElement(ActivityIndicator, { size: "xLarge", lineThickness: "large" }),
        React.createElement(Text, null, "Color props"),
        React.createElement(ActivityIndicator, { activityIndicatorColor: "orange", accessibilityLabel: "orange progressbar" })));
};
var CustomizedActivityIndicator = ActivityIndicator.customize({
    activityIndicatorColor: 'orange',
    size: 'large',
});
var CustomizedActivityIndicatorTest = function () {
    return (React.createElement(Stack, { style: stackStyle },
        React.createElement(Text, null, "Customized Activity Indicator"),
        React.createElement(CustomizedActivityIndicator, null)));
};
var activityIndicatorSections = [
    {
        name: 'Base ActivityIndicator',
        testID: ACTIVITY_INDICATOR_TESTPAGE,
        component: BasicActivityIndicator,
    },
    {
        name: 'ActivityIndicator',
        testID: ACTIVITY_INDICATOR_TESTPAGE,
        component: ActivityIndicatorMainTest,
    },
    {
        name: 'Customized ActivityIndicator',
        testID: ACTIVITY_INDICATOR_TESTPAGE,
        component: CustomizedActivityIndicatorTest,
    },
];
export var ActivityIndicatorTest = function () {
    var status = {
        win32Status: 'Backlog',
        uwpStatus: 'Backlog',
        iosStatus: 'Beta',
        macosStatus: 'Backlog',
        androidStatus: 'Beta',
    };
    var description = 'ActivityIndicator is a visual representation that data is being loaded. It is implemented with a View wrapping an Animated SVG. The View is to ensure that AccessibilityRole works. AccessibilityRole currently does not work on SVGs.';
    return React.createElement(Test, { name: "ActivityIndicator Test", description: description, sections: activityIndicatorSections, status: status });
};
//# sourceMappingURL=ActivityIndicatorTest.js.map