import { getDocument } from '@uifabric-vue/utilities';
var STYLE_PREFIX = '__fabric__';
var VAR_PREFIX = 'fabric';
export function registerCSSVars(key, obj) {
    var document = getDocument();
    if (!document)
        return obj;
    var id = "".concat(STYLE_PREFIX).concat(key);
    var style = document.getElementById(id);
    if (!style) {
        style = document.createElement('style');
        style.id = "".concat(STYLE_PREFIX).concat(key);
        document.head.appendChild(style);
    }
    var properties = {};
    var css = [];
    for (var key_1 in obj) {
        var value = obj[key_1];
        properties[key_1] = "var(--".concat(VAR_PREFIX, "-").concat(key_1, ")");
        css.push("--".concat(VAR_PREFIX, "-").concat(key_1, ": ").concat(value, ";"));
    }
    style.innerHTML = "\n:root {\n  ".concat(css.join('\n  '), "\n}");
    return properties;
}
//# sourceMappingURL=registerCSSVars.js.map