import {loadTemplate, readHTML} from "./templates";

let $ = require('jquery')

export function openHelpOverlay(resourceName: string){
    let body = $("body");

    let content = readHTML(resourceName);
    let obj = {"content": content};

    let loadedTemplate = loadTemplate("help-overlay.mustache", obj, (x)=>{});
    let wrapper = $(loadedTemplate);

    body.append(wrapper)
}

export function closeOverlay(){
    $("#help-overlay").remove();
}