import { getStyleOptions } from './StyleOptionsState';
import { Stylesheet } from './Stylesheet';
import { serializeRuleEntries } from './styleToClassName';
/**
 * Registers a font face.
 * @public
 */
export function fontFace(font) {
    var stylesheet = Stylesheet.getInstance();
    var rule = serializeRuleEntries(getStyleOptions(), font);
    var className = stylesheet.classNameFromKey(rule);
    if (className) {
        return;
    }
    var name = stylesheet.getClassName();
    stylesheet.insertRule("@font-face{" + rule + "}", true);
    stylesheet.cacheClassName(name, rule, [], ['font-face', rule]);
}
//# sourceMappingURL=fontFace.js.map