/**
 * Sets up a `<div>` to contain the window titlebar. The div must have id of FSBLHeader.
 *
 * This can occur either in an app's content (for injected title bars) or in a dedicated
 * window titlebar app (browserview titlebars). In both cases the titlebar is simply
 * injected so that it is the first element in the document's body. Note that this is
 * called by the WindowTitleBar.tsx template _after_ the DOM content has been loaded.
 */
export const getOrCreateWindowTitleBarContainer = () => {
    // If the page already has a spot for the header then return
    const existingFSBLHeader = document.getElementById("FSBLHeader");
    if (existingFSBLHeader)
        return existingFSBLHeader;
    // Otherwise, create one and put it in the right place at the top of the body
    const fsblHeader = document.createElement("div");
    fsblHeader.setAttribute("id", "FSBLHeader");
    if (document.body.firstChild)
        document.body.insertBefore(fsblHeader, document.body.firstChild);
    else
        document.body.appendChild(fsblHeader);
    return fsblHeader;
};
//# sourceMappingURL=getOrCreateWindowTitleBarContainer.js.map