"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ShimmerTest = exports.RoundedCornerClipCheckShimmer = exports.CustomizeAndTokenPropsShimmers = void 0;
const React = __importStar(require("react"));
const react_native_1 = require("react-native");
const e2e_testing_1 = require("@fluentui-react-native/e2e-testing");
const experimental_shimmer_1 = require("@fluentui-react-native/experimental-shimmer");
const stack_1 = require("@fluentui-react-native/stack");
const ShimmerE2ETest_1 = require("./ShimmerE2ETest");
const ShimmerTestElementSets_1 = require("./ShimmerTestElementSets");
const styles_1 = require("../Common/styles");
const Test_1 = require("../Test");
const TestCompareCustomizeShimmer = experimental_shimmer_1.Shimmer.customize({
    shimmerWaveColor: 'blue',
    shimmerColor: 'orange',
    backgroundColor: 'red',
});
const shimmerStyles = react_native_1.StyleSheet.create({
    smallCustomizedShimmer: { height: 100, width: '50%', borderWidth: 2, borderColor: 'black' },
    smallRoundedCustomizedShimmer: { height: 100, width: 150, borderRadius: 20, borderWidth: 2, borderColor: 'black' },
    mediumShimmer: { width: 300, height: 100 },
    largeShimmer: { width: 800, height: 400 },
});
const CustomizeAndTokenPropsShimmers = () => {
    return (React.createElement(stack_1.Stack, { style: { margin: 4 } },
        React.createElement(TestCompareCustomizeShimmer, { elements: (0, ShimmerTestElementSets_1.shimmerRectsAndCircle)(), duration: 2000, delay: 1000, style: shimmerStyles.smallCustomizedShimmer }),
        React.createElement(experimental_shimmer_1.Shimmer, { elements: (0, ShimmerTestElementSets_1.shimmerRectsAndCircle)(), duration: 2000, delay: 1000, style: shimmerStyles.smallCustomizedShimmer, shimmerWaveColor: "blue", shimmerColor: "orange", backgroundColor: "red" })));
};
exports.CustomizeAndTokenPropsShimmers = CustomizeAndTokenPropsShimmers;
const RoundedCornerClipCheckShimmer = () => {
    return (React.createElement(stack_1.Stack, { style: { margin: 4 } },
        React.createElement(experimental_shimmer_1.Shimmer, { elements: (0, ShimmerTestElementSets_1.shimmerRectsAndCircle)(), duration: 2000, delay: 1000, style: shimmerStyles.smallRoundedCustomizedShimmer, backgroundColor: "teal" })));
};
exports.RoundedCornerClipCheckShimmer = RoundedCornerClipCheckShimmer;
const RectShimmers = () => {
    return (React.createElement(stack_1.Stack, { style: styles_1.stackStyle },
        React.createElement(experimental_shimmer_1.Shimmer, { elements: (0, ShimmerTestElementSets_1.shimmerRectsAndRect)(), style: shimmerStyles.mediumShimmer })));
};
const RectCircleShimmers = () => {
    return (React.createElement(stack_1.Stack, { style: styles_1.stackStyle },
        React.createElement(experimental_shimmer_1.Shimmer, { elements: (0, ShimmerTestElementSets_1.shimmerRectsAndCircle)(), duration: 3000, delay: 1000, style: shimmerStyles.mediumShimmer })));
};
const CustomizedShimmer = () => {
    return (React.createElement(stack_1.Stack, { style: styles_1.stackStyle },
        React.createElement(exports.CustomizeAndTokenPropsShimmers, null),
        React.createElement(exports.RoundedCornerClipCheckShimmer, null)));
};
const ShimmerBorderRadii = () => {
    return (React.createElement(stack_1.Stack, { style: styles_1.stackStyle },
        React.createElement(experimental_shimmer_1.Shimmer, { elements: (0, ShimmerTestElementSets_1.shimmerBorderRadiusTests)(), duration: 3000, style: shimmerStyles.largeShimmer })));
};
const shimmerSections = [
    {
        name: 'Shimmer Rects',
        testID: e2e_testing_1.SHIMMER_TESTPAGE,
        component: RectShimmers,
    },
    {
        name: 'Shimmer Rects and Circle',
        testID: e2e_testing_1.SHIMMER_TESTPAGE,
        component: RectCircleShimmers,
    },
    ...react_native_1.Platform.select({
        android: [null],
        default: [
            {
                name: 'Border Radius Tests',
                testID: e2e_testing_1.SHIMMER_TESTPAGE,
                component: ShimmerBorderRadii,
            },
            {
                name: 'Customized Shimmer',
                testID: e2e_testing_1.SHIMMER_TESTPAGE,
                component: CustomizedShimmer,
            },
        ],
    }),
    {
        name: 'Shimmer for E2E Testing',
        component: ShimmerE2ETest_1.E2ETestingShimmer,
    },
];
const ShimmerTest = () => {
    const status = {
        win32Status: 'Production',
        uwpStatus: 'Backlog',
        iosStatus: 'Production',
        macosStatus: 'Production',
        androidStatus: 'Production',
    };
    const description = 'Shimmer is a temporary animation placeholder for when a service call takes time to return data but the rest of the UI should continue rendering.';
    return React.createElement(Test_1.Test, { name: "Shimmer Test", description: description, sections: shimmerSections, status: status });
};
exports.ShimmerTest = ShimmerTest;
//# sourceMappingURL=ShimmerTest.js.map