"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CollapsibleSectionStyledExample = void 0;
var tslib_1 = require("tslib");
var React = require("react");
var Utilities_1 = require("@fluentui/react/lib-commonjs/Utilities");
var Styling_1 = require("@fluentui/react/lib-commonjs/Styling");
var FocusZone_1 = require("@fluentui/react/lib-commonjs/FocusZone");
var CollapsibleSection_1 = require("@fluentui/react-experiments/lib-commonjs/CollapsibleSection");
// Workaround to prevent errors on usage of Customizer in this file, without disabling all deprecation checks
// eslint-disable-next-line deprecation/deprecation
var Customizer = Utilities_1.Customizer;
var getPropStyles = function (props, theme) { return ({
    root: [
        {
            background: theme.semanticColors.inputBackground,
        },
    ],
    body: [
        theme.fonts.small,
        {
            background: theme.semanticColors.disabledBackground,
        },
    ],
}); };
var getCustomizerStyles = function (props, theme) { return ({
    body: [
        {
            color: theme.semanticColors.link,
        },
    ],
}); };
var getPropTitleStyles = function (props, theme) { return ({
    text: [theme.fonts.large],
}); };
var getCustomizerTitleStyles = function (props, theme) { return ({
    chevron: { color: theme.semanticColors.link },
    text: { color: theme.semanticColors.link },
}); };
var csCustomizerTheme = Styling_1.createTheme({
    semanticColors: {
        disabledBackground: Styling_1.DefaultPalette.themeLight,
        inputBackground: Styling_1.DefaultPalette.themeLighter,
    },
});
var csPropTheme = Styling_1.createTheme({
    semanticColors: {
        disabledBackground: Styling_1.DefaultPalette.themeDarker,
        inputBackground: Styling_1.DefaultPalette.themeDark,
    },
});
var CollapsibleSectionStyledExample = /** @class */ (function (_super) {
    tslib_1.__extends(CollapsibleSectionStyledExample, _super);
    function CollapsibleSectionStyledExample() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    CollapsibleSectionStyledExample.prototype.render = function () {
        return (React.createElement("div", null,
            React.createElement("p", null, "This is a demonstration of the various levels of theming and styling that have effect on created components, with and without state. Themes and styles should have priority based on how locally they are defined: individual props as highest priority followed by contextual (Customizer) and finally global."),
            React.createElement("p", null, "If everything is working correctly color gradients should gradually get darker within each type of component with any variant having Theme prop looking identical."),
            React.createElement("p", null,
                React.createElement("b", null, "Stateful Components")),
            React.createElement(FocusZone_1.FocusZone, null,
                React.createElement(CollapsibleSection_1.CollapsibleSection, { key: 1, defaultCollapsed: false, title: "No Styling" }, "Body"),
                React.createElement("br", null),
                React.createElement(CollapsibleSection_1.CollapsibleSection, { key: 2, defaultCollapsed: false, title: {
                        text: 'Prop Styles',
                        styles: getPropTitleStyles,
                    }, styles: getPropStyles }, "Body"),
                React.createElement("br", null),
                React.createElement(Customizer, { scopedSettings: {
                        CollapsibleSection: { styles: getCustomizerStyles },
                        CollapsibleSectionTitle: { styles: getCustomizerTitleStyles },
                    } },
                    React.createElement(CollapsibleSection_1.CollapsibleSection, { key: 3, defaultCollapsed: false, title: {
                            text: 'Prop Styles + Customizer Styles',
                            styles: getPropTitleStyles,
                        }, styles: getPropStyles }, "Body")),
                React.createElement("br", null),
                React.createElement(Customizer, { settings: { theme: csCustomizerTheme } },
                    React.createElement(CollapsibleSection_1.CollapsibleSection, { key: 4, defaultCollapsed: false, title: {
                            text: 'Prop Styles + Customizer Theme',
                            styles: getPropTitleStyles,
                        }, styles: getPropStyles }, "Body")),
                React.createElement("br", null),
                React.createElement(CollapsibleSection_1.CollapsibleSection, { key: 5, defaultCollapsed: false, title: {
                        text: 'Prop Styles + Prop Theme',
                        styles: getPropTitleStyles,
                    }, styles: getPropStyles, theme: csPropTheme }, "Body"),
                React.createElement("br", null),
                React.createElement(Customizer, { settings: { theme: csCustomizerTheme } },
                    React.createElement(CollapsibleSection_1.CollapsibleSection, { key: 6, defaultCollapsed: false, title: {
                            text: 'Prop Styles + Customizer Theme + Prop Theme',
                            styles: getPropTitleStyles,
                        }, styles: getPropStyles, theme: csPropTheme }, "Body")),
                React.createElement("p", null,
                    React.createElement("b", null, "Stateless Components")),
                React.createElement(CollapsibleSection_1.CollapsibleSectionStateless, { key: 7, collapsed: false, title: "No Styling" }, "Body"),
                React.createElement("br", null),
                React.createElement(CollapsibleSection_1.CollapsibleSectionStateless, { key: 8, collapsed: false, title: {
                        text: 'Prop Styles',
                        styles: getPropTitleStyles,
                    }, styles: getPropStyles }, "Body"),
                React.createElement("br", null),
                React.createElement(Customizer, { scopedSettings: {
                        CollapsibleSection: { styles: getCustomizerStyles },
                        CollapsibleSectionTitle: { styles: getCustomizerTitleStyles },
                    } },
                    React.createElement(CollapsibleSection_1.CollapsibleSectionStateless, { key: 9, collapsed: false, title: {
                            text: 'Prop Styles + Customizer Styles',
                            styles: getPropTitleStyles,
                        }, styles: getPropStyles }, "Body")),
                React.createElement("br", null),
                React.createElement(Customizer, { settings: { theme: csCustomizerTheme } },
                    React.createElement(CollapsibleSection_1.CollapsibleSectionStateless, { key: 10, collapsed: false, title: {
                            text: 'Prop Styles + Customizer Theme',
                            styles: getPropTitleStyles,
                        }, styles: getPropStyles }, "Body")),
                React.createElement("br", null),
                React.createElement(CollapsibleSection_1.CollapsibleSectionStateless, { key: 11, collapsed: false, title: {
                        text: 'Prop Styles + Prop Theme',
                        styles: getPropTitleStyles,
                    }, styles: getPropStyles, theme: csPropTheme }, "Body"),
                React.createElement("br", null),
                React.createElement(Customizer, { settings: { theme: csCustomizerTheme } },
                    React.createElement(CollapsibleSection_1.CollapsibleSectionStateless, { key: 12, collapsed: false, title: {
                            text: 'Prop Styles + Customizer Theme + Prop Theme',
                            styles: getPropTitleStyles,
                        }, styles: getPropStyles, theme: csPropTheme }, "Body")))));
    };
    return CollapsibleSectionStyledExample;
}(React.Component));
exports.CollapsibleSectionStyledExample = CollapsibleSectionStyledExample;
//# sourceMappingURL=CollapsibleSection.Styled.Example.js.map