define(["require", "exports", "tslib", "react", "@fluentui/react-theme-provider"], function (require, exports, tslib_1, React, react_theme_provider_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.default = {
        title: 'ThemeProvider',
    };
    var lightTheme = {
        tokens: {
            color: {
                body: {
                    background: 'white',
                    contentColor: 'black',
                    fontFamily: 'Segoe UI',
                },
            },
        },
    };
    var darkTheme = {
        tokens: {
            color: {
                body: {
                    background: 'black',
                    contentColor: 'white',
                },
            },
        },
    };
    var themeWithStylesheets = {
        stylesheets: ['.foo { font-family: var(--body-customFont); }'],
        tokens: {
            body: {
                customFont: 'Courier New',
            },
        },
    };
    exports.NestedTheming = function () {
        var _a = React.useState(true), isLight = _a[0], setIsLight = _a[1];
        return (React.createElement(react_theme_provider_1.ThemeProvider, { className: "root", applyTo: "body", theme: isLight ? lightTheme : darkTheme },
            React.createElement("button", { onClick: function () { return setIsLight(function (l) { return !l; }); } }, "Toggle theme"),
            React.createElement("div", null,
                "I am ",
                isLight ? 'light theme' : 'dark theme'),
            React.createElement(react_theme_provider_1.ThemeProvider, { theme: isLight ? darkTheme : lightTheme },
                React.createElement("div", null,
                    "I am a nested ",
                    isLight ? 'dark theme' : 'light theme'))));
    };
    exports.TestStylesheets = function () { return (React.createElement(react_theme_provider_1.ThemeProvider, { className: "foo", theme: themeWithStylesheets },
        React.createElement("span", null, "I am courier new."))); };
    var ThemedContentFC = function () {
        var theme = react_theme_provider_1.useTheme();
        console.log('theme from useTheme', theme);
        return null;
    };
    var ThemedContent = /** @class */ (function (_super) {
        tslib_1.__extends(ThemedContent, _super);
        function ThemedContent() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        ThemedContent.prototype.render = function () {
            return (React.createElement(react_theme_provider_1.ThemeContext.Consumer, null, function (theme) {
                console.log('theme from context consumer', theme);
                return null;
            }));
        };
        return ThemedContent;
    }(React.Component));
    exports.AccessTheme = function () { return (React.createElement(react_theme_provider_1.ThemeProvider, { className: "foo", theme: themeWithStylesheets },
        React.createElement(ThemedContent, null),
        React.createElement(ThemedContentFC, null),
        React.createElement("div", null, "See console log"))); };
});
//# sourceMappingURL=ThemeProvider.stories.js.map