"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.StrokeWidthTest = void 0;
const React = __importStar(require("react"));
const react_native_1 = require("react-native");
const react_native_2 = require("@fluentui/react-native");
const e2e_testing_1 = require("@fluentui-react-native/e2e-testing");
const framework_1 = require("@fluentui-react-native/framework");
const stack_1 = require("@fluentui-react-native/stack");
const theme_tokens_1 = require("@fluentui-react-native/theme-tokens");
const themed_stylesheet_1 = require("@fluentui-react-native/themed-stylesheet");
const theming_utils_1 = require("@fluentui-react-native/theming-utils");
const styles_1 = require("../Common/styles");
const Test_1 = require("../Test");
const getThemedStyles = (0, themed_stylesheet_1.themedStyleSheet)((t) => {
    const isLightMode = (0, theming_utils_1.getCurrentAppearance)(t.host.appearance, 'light') === 'light';
    return {
        root: {
            paddingBottom: 16,
        },
        exampleStrokeBackground: {
            height: 100,
            backgroundColor: isLightMode ? theme_tokens_1.globalTokens.color.grey80 : theme_tokens_1.globalTokens.color.grey10,
            display: 'flex',
            marginTop: 8,
        },
    };
});
const StrokeWidthTestComponent = (props) => {
    const theme = (0, framework_1.useFluentTheme)();
    const styles = getThemedStyles(theme);
    const isLightMode = (0, theming_utils_1.getCurrentAppearance)(theme.host.appearance, 'light') === 'light';
    const exampleStrokeStyle = React.useMemo(() => ({
        height: 50,
        borderBottomWidth: props.strokeWidth,
        borderColor: isLightMode ? theme_tokens_1.globalTokens.color.grey10 : theme_tokens_1.globalTokens.color.grey80,
    }), [props.strokeWidth, isLightMode]);
    return (React.createElement(react_native_1.View, { style: styles.root },
        React.createElement(react_native_2.Text, { variant: "bodySemibold" }, props.name + ': ' + props.strokeWidth + 'pt'),
        React.createElement(react_native_1.View, { style: styles.exampleStrokeBackground },
            React.createElement(react_native_1.View, { style: exampleStrokeStyle }))));
};
const StrokeWidthTestRamp = () => {
    return (React.createElement(react_native_1.View, null,
        React.createElement(stack_1.Stack, { style: styles_1.stackStyle },
            React.createElement(StrokeWidthTestComponent, { name: "widthNone", strokeWidth: theme_tokens_1.globalTokens.stroke.widthNone }),
            React.createElement(StrokeWidthTestComponent, { name: "width05", strokeWidth: theme_tokens_1.globalTokens.stroke.width05 }),
            React.createElement(StrokeWidthTestComponent, { name: "width10", strokeWidth: theme_tokens_1.globalTokens.stroke.width10 }),
            React.createElement(StrokeWidthTestComponent, { name: "width15", strokeWidth: theme_tokens_1.globalTokens.stroke.width15 }),
            React.createElement(StrokeWidthTestComponent, { name: "width20", strokeWidth: theme_tokens_1.globalTokens.stroke.width20 }),
            React.createElement(StrokeWidthTestComponent, { name: "width30", strokeWidth: theme_tokens_1.globalTokens.stroke.width30 }),
            React.createElement(StrokeWidthTestComponent, { name: "width40", strokeWidth: theme_tokens_1.globalTokens.stroke.width40 }),
            React.createElement(StrokeWidthTestComponent, { name: "width60", strokeWidth: theme_tokens_1.globalTokens.stroke.width60 }))));
};
const strokeWidthSections = [
    {
        name: 'Basic Usage',
        testID: e2e_testing_1.STROKEWIDTH_TESTPAGE,
        component: StrokeWidthTestRamp,
    },
];
const StrokeWidthTest = () => {
    const status = {
        win32Status: 'Production',
        uwpStatus: 'Production',
        iosStatus: 'Production',
        macosStatus: 'Production',
        androidStatus: 'Production',
    };
    const description = 'This showcases the different global stroke width tokens available in Fluent UI.';
    return React.createElement(Test_1.Test, { name: "Stroke Width Tokens Test", description: description, sections: strokeWidthSections, status: status });
};
exports.StrokeWidthTest = StrokeWidthTest;
//# sourceMappingURL=StrokeWidthTest.js.map