import { __extends } from "tslib";
import { Platform } from 'react-native';
import { createAndroidTheme } from '@fluentui-react-native/android-theme';
import { createAppleTheme } from '@fluentui-react-native/apple-theme';
import { createDefaultTheme } from '@fluentui-react-native/default-theme';
import { ThemeReference } from '@fluentui-react-native/theme';
import { applyBrand } from './applyBrand';
import { applyTheme } from './applyTheme';
var themeOptions = { paletteName: 'TaskPane', appearance: 'dynamic' };
// Default applies to win32
var baseTheme = Platform.select({
    android: createAndroidTheme(themeOptions),
    ios: createAppleTheme(),
    macos: createAppleTheme(),
    default: createDefaultTheme(themeOptions),
});
var supportsHighContrastTokens = Platform.select({
    android: false,
    ios: false,
    macos: false,
    default: true,
});
export var lightnessOptions = [
    { label: 'Auto', value: 'dynamic' },
    { label: 'Light', value: 'light' },
    { label: 'Dark', value: 'dark' },
    supportsHighContrastTokens && { label: 'High Contrast', value: 'highContrast' },
];
var TesterThemeReference = /** @class */ (function (_super) {
    __extends(TesterThemeReference, _super);
    function TesterThemeReference() {
        var _this = _super.call(this, baseTheme, function (parent) { return applyTheme(parent, _this._themeName, _this.options.appearance); }, function (parent) { return applyBrand(parent, _this._brand); }) || this;
        _this._themeName = Platform.OS === 'win32' ? 'Office' : 'Default';
        _this._brand = 'Default';
        _this.baseTheme = baseTheme;
        _this.options = themeOptions;
        return _this;
    }
    Object.defineProperty(TesterThemeReference.prototype, "themeName", {
        /** get/set the currently active theme */
        get: function () {
            return this._themeName;
        },
        set: function (newTheme) {
            if (newTheme !== this._themeName) {
                this._themeName = newTheme;
                this.invalidate();
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(TesterThemeReference.prototype, "appearance", {
        /** get/set the theme appearance */
        get: function () {
            return this.options.appearance;
        },
        set: function (lightness) {
            if (lightness !== this.options.appearance) {
                this.options.appearance = lightness;
                this.baseTheme.invalidate();
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(TesterThemeReference.prototype, "brand", {
        /** get/set the applied brand */
        get: function () {
            return this._brand;
        },
        set: function (newBrand) {
            if (newBrand !== this._brand) {
                this._brand = newBrand;
                this.invalidate();
            }
        },
        enumerable: false,
        configurable: true
    });
    return TesterThemeReference;
}(ThemeReference));
export { TesterThemeReference };
export var testerTheme = new TesterThemeReference();
//# sourceMappingURL=CustomThemes.js.map