/**
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 * @format
 */
'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.FluentTesterApp = void 0;
const React = __importStar(require("react"));
const react_native_1 = require("react-native");
const experimental_appearance_additions_1 = require("@fluentui-react-native/experimental-appearance-additions");
const theme_1 = require("@fluentui-react-native/theme");
const FluentTester_1 = require("./FluentTester");
const index_1 = require("./theme/index");
const FluentTesterApp = (props) => {
    const sizeClass = (0, experimental_appearance_additions_1.useHorizontalSizeClass)();
    const isMobile = react_native_1.Platform.OS === 'android' || (react_native_1.Platform.OS === 'ios' && react_native_1.Platform.isPad === false);
    // If on iPad we are presented in a Split View or Slide Over context, show the single pane view.
    const shouldShowSinglePane = isMobile || (!isMobile && sizeClass === 'compact');
    const customTheme = new theme_1.ThemeReference(index_1.testerTheme, () => {
        return {
            colors: { brandBackground2: 'red' }, // Overrides the buttonBackground color token, all other colors are kept in-tact.
        };
    }, () => {
        return {
            colors: {
                hostColorPink: 'pink',
                hostColorBrandText: 'purple',
                hostColorButtonBackground: 'yellow', // New custom color key.
            },
            spacing: {
                s1: '10px',
            },
        };
    }, () => {
        // Any other recipe.
        return {
            colors: {
                yellowBrandColor: 'yellow',
                hostColorButtonBackground: 'green', // Overrides custom color key 'hostColorButtonBackground' - it is green in theme now.
            },
        };
    });
    // Use the custom colors for Android and iOS.
    const fluentTesterTheme = isMobile ? customTheme : index_1.testerTheme;
    return (React.createElement(theme_1.ThemeProvider, { theme: fluentTesterTheme },
        React.createElement(FluentTester_1.FluentTester, { enableSinglePaneView: shouldShowSinglePane, ...props })));
};
exports.FluentTesterApp = FluentTesterApp;
//# sourceMappingURL=FluentTesterApp.js.map