import * as React from 'react';
import { Switch, View } from 'react-native';
import { Text } from '@fluentui/react-native';
import { NativeAvatar } from '@fluentui-react-native/experimental-avatar/';
import { Stack } from '@fluentui-react-native/stack';
import { testImageSource, rainbowGradientSource } from './testImageSources';
import { NATIVE_AVATAR_TESTPAGE } from '../../../../E2E/src/Avatar/consts';
import { commonTestStyles as commonStyles } from '../Common/styles';
import { Test } from '../Test';
export var BasicAvatar = function () {
    var _a = React.useState(true), showImage = _a[0], setShowImage = _a[1];
    var _b = React.useState(false), showPresence = _b[0], setShowPresence = _b[1];
    var _c = React.useState(false), showRing = _c[0], setShowRing = _c[1];
    return (React.createElement(View, { style: commonStyles.root },
        React.createElement(View, { style: commonStyles.settings },
            React.createElement(View, { style: commonStyles.switch },
                React.createElement(Text, null, "Show image"),
                React.createElement(Switch, { value: showImage, onValueChange: setShowImage })),
            React.createElement(View, { style: commonStyles.switch },
                React.createElement(Text, null, "Show presence"),
                React.createElement(Switch, { value: showPresence, onValueChange: setShowPresence })),
            React.createElement(View, { style: commonStyles.switch },
                React.createElement(Text, null, "Show Ring"),
                React.createElement(Switch, { value: showRing, onValueChange: setShowRing }))),
        React.createElement(NativeAvatar, { primaryText: "Kat Larrson", secondaryText: "Kat.Larrson@example.com", imageSource: showImage ? testImageSource : undefined, presence: showPresence ? 'available' : null, isRingVisible: showRing, size: 'size72' })));
};
export var CustomizeColors = function () {
    var _a = React.useState(false), showCustomRingColor = _a[0], setShowCustomRingColor = _a[1];
    var _b = React.useState(false), showCustomForeground = _b[0], setShowCustomForeground = _b[1];
    var _c = React.useState(false), showCustomBackground = _c[0], setShowCustomBackground = _c[1];
    var _d = React.useState(false), showCustomBorderImage = _d[0], setShowCustomBorderImage = _d[1];
    var _e = React.useState(false), showRingGap = _e[0], setShowRingGap = _e[1];
    return (React.createElement(View, { style: commonStyles.root },
        React.createElement(View, { style: commonStyles.settings },
            React.createElement(View, { style: commonStyles.switch },
                React.createElement(Text, null, "Custom foreground"),
                React.createElement(Switch, { value: showCustomForeground, onValueChange: setShowCustomForeground })),
            React.createElement(View, { style: commonStyles.switch },
                React.createElement(Text, null, "Custom background"),
                React.createElement(Switch, { value: showCustomBackground, onValueChange: setShowCustomBackground })),
            React.createElement(View, { style: commonStyles.switch },
                React.createElement(Text, null, "Custom ring color"),
                React.createElement(Switch, { value: showCustomRingColor, onValueChange: setShowCustomRingColor })),
            React.createElement(View, { style: commonStyles.switch },
                React.createElement(Text, null, "Custom Border Image"),
                React.createElement(Switch, { value: showCustomBorderImage, onValueChange: setShowCustomBorderImage })),
            React.createElement(View, { style: commonStyles.switch },
                React.createElement(Text, null, "Show Ring Gap"),
                React.createElement(Switch, { value: showRingGap, onValueChange: setShowRingGap }))),
        React.createElement(NativeAvatar, { primaryText: "Kat Larrson", secondaryText: "Kat.Larrson@example.com", ringColor: showCustomRingColor ? 'red' : null, foregroundColor: showCustomForeground ? 'green' : null, backgroundColor: showCustomBackground ? 'blue' : null, customBorderImageSource: showCustomBorderImage ? rainbowGradientSource : null, isRingVisible: true, hasRingInnerGap: showRingGap, size: 'size72' })));
};
var AvatarSizeRamp = function () {
    var allSizes = ['size16', 'size20', 'size24', 'size32', 'size40', 'size56', 'size72'];
    return (React.createElement(Stack, { style: { flexDirection: 'row' } }, allSizes.map(function (size, index) { return (React.createElement(NativeAvatar, { key: index, primaryText: "Kat Larrson", secondaryText: "Kat.Larrson@example.com", size: size })); })));
};
var avatarSections = [
    {
        name: 'Basic Avatar',
        testID: NATIVE_AVATAR_TESTPAGE,
        component: BasicAvatar,
    },
    {
        name: 'Custom Colors',
        testID: NATIVE_AVATAR_TESTPAGE,
        component: CustomizeColors,
    },
    {
        name: 'Size Ramp',
        component: AvatarSizeRamp,
    },
];
export var NativeAvatarTest = function () {
    var status = {
        win32Status: 'Backlog',
        uwpStatus: 'Backlog',
        iosStatus: 'Beta',
        macosStatus: 'Experimental',
        androidStatus: 'Backlog',
    };
    var description = 'AvatarView is a visual representation of a user, entity, or group. If an image is supplied, it is cropped to a circle of the requested size. If an image is not supplied, initials are extracted from the given name and email address provided and displayed on a colorful background.';
    return React.createElement(Test, { name: "Avatar Test", description: description, sections: avatarSections, status: status });
};
//# sourceMappingURL=NativeAvatarTest.js.map