"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var HaikuContext_1 = require("./../../HaikuContext");
var dom_1 = require("./../../renderers/dom");
var pkg = require('./../../../package.json');
var VERSION = pkg.version;
function HaikuDOMAdapter(bytecode, config, safeWindow) {
    if (!config) {
        config = {};
    }
    if (!config.options) {
        config.options = {};
    }
    if (!safeWindow) {
        if (typeof window !== 'undefined') {
            safeWindow = window;
        }
    }
    if (config.options.useWebkitPrefix === undefined) {
        if (safeWindow && safeWindow.document) {
            config.options.useWebkitPrefix = 'WebkitAppearance' in safeWindow.document.documentElement.style;
        }
    }
    return HaikuContext_1.default['createComponentFactory'](dom_1.default, bytecode, config, safeWindow);
}
exports.default = HaikuDOMAdapter;
HaikuDOMAdapter['defineOnWindow'] = function () {
    if (typeof window !== 'undefined') {
        if (!window['HaikuPlayer']) {
            window['HaikuPlayer'] = {};
        }
        if (!window['HaikuCore']) {
            window['HaikuCore'] = {};
        }
        window['HaikuPlayer'][VERSION] = HaikuDOMAdapter;
        window['HaikuCore'][VERSION] = HaikuDOMAdapter;
    }
};
HaikuDOMAdapter['defineOnWindow']();
//# sourceMappingURL=HaikuDOMAdapter.js.map