import * as React from 'react';
import { View, Switch } from 'react-native';
import { Text } from '@fluentui/react-native';
import { ACTIVITY_INDICATOR_TESTPAGE } from '@fluentui-react-native/e2e-testing';
import { ActivityIndicator } from '@fluentui-react-native/experimental-activity-indicator';
import { Stack } from '@fluentui-react-native/stack';
import { stackStyle, commonTestStyles as commonStyles } from '../Common/styles';
import { Test } from '../Test';
const BasicActivityIndicator = () => {
    const [animating, setAnimating] = React.useState(true);
    const [hidesWhenStopped, setHidesWhenStopped] = React.useState(true);
    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 }))));
};
const ActivityIndicatorMainTest = () => {
    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" })));
};
const CustomizedActivityIndicator = ActivityIndicator.customize({
    activityIndicatorColor: 'orange',
    size: 'large',
});
const CustomizedActivityIndicatorTest = () => {
    return (React.createElement(Stack, { style: stackStyle },
        React.createElement(Text, null, "Customized Activity Indicator"),
        React.createElement(CustomizedActivityIndicator, null)));
};
const 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 const ActivityIndicatorTest = () => {
    const status = {
        win32Status: 'Deprecated',
        uwpStatus: 'Deprecated',
        iosStatus: 'Deprecated',
        macosStatus: 'Deprecated',
        androidStatus: 'Deprecated',
    };
    const 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