"use strict";

Object.defineProperty(exports, "__esModule", {
    value: !0
}), exports.of = exports.TextHeaderStyle = exports.Style = void 0;

const vutils_1 = require("@visactor/vutils"), MultilineTextHeaderStyle_1 = require("./style/MultilineTextHeaderStyle");

Object.defineProperty(exports, "TextHeaderStyle", {
    enumerable: !0,
    get: function() {
        return MultilineTextHeaderStyle_1.TextHeaderStyle;
    }
});

const Style_1 = require("./style/Style");

Object.defineProperty(exports, "Style", {
    enumerable: !0,
    get: function() {
        return Style_1.Style;
    }
});

const CheckboxStyle_1 = require("./style/CheckboxStyle");

function of(headerStyle, defaultHeaderStyle, styleArg, StyleClass, globalAutoWrapText, theme) {
    var _a;
    return headerStyle || defaultHeaderStyle ? headerStyle instanceof Style_1.Style ? headerStyle : "function" == typeof headerStyle ? of(headerStyle(styleArg), defaultHeaderStyle, styleArg, StyleClass, globalAutoWrapText, theme) : (headerStyle || (headerStyle = {}), 
    globalAutoWrapText && !(0, vutils_1.isValid)(headerStyle.autoWrapText) && (headerStyle.autoWrapText = !0), 
    StyleClass === CheckboxStyle_1.CheckboxStyle ? new CheckboxStyle_1.CheckboxStyle(null != headerStyle ? headerStyle : {}, null != defaultHeaderStyle ? defaultHeaderStyle : {}, null !== (_a = theme.checkboxStyle) && void 0 !== _a ? _a : {}) : new StyleClass(null != headerStyle ? headerStyle : {}, null != defaultHeaderStyle ? defaultHeaderStyle : {})) : StyleClass.DEFAULT;
}

exports.of = of;