"use strict";
var pathModule = require("path");
var Helper = require("./helper");
var Leaf = require("../../build/leaf.export");
function getElementTypeStringByTagName(name) {
    var map = {
        "a": "HTMLAnchorElement",
        "audio": "HTMLAudioElement",
        "body": "HTMLBodyElement",
        "button": "HTMLButtonElement",
        "canvas": "HTMLCanvasElement",
        "content": "HTMLContentElement",
        "div": "HTMLDivElement",
        "embeded": "HTMLEmbedElement",
        "form": "HTMLFormElement",
        "head": "HTMLHeadElement",
        "h1": "HTMLHeadingElement",
        "html": "HTMLHtmlElement",
        "iframe": "HTMLIFrameElement",
        "img": "HTMLImageElement",
        "input": "HTMLInputElement",
        "li": "HTMLLIElement",
        "label": "HTMLLabelElement",
        "link": "HTMLLinkElement",
        "ol": "HTMLOListElement",
        "object": "HTMLObjectElement",
        "p": "HTMLParagraphElement",
        "picture": "HTMLPictureElement",
        "pre": "HTMLPreElement",
        "progress": "HTMLProgressElement",
        "quote": "HTMLQuoteElement",
        "script": "HTMLScriptElement",
        "select": "HTMLSelectElement",
        "span": "HTMLSpanElement",
        "style": "HTMLStyleElement",
        "template": "HTMLTemplateElement",
        "textarea": "HTMLTextAreaElement",
        "title": "HTMLTitleElement",
        "ul": "HTMLUListElement",
        "video": "HTMLVideoElement"
    };
    return map[name.toLowerCase()] || "HTMLDivElement";
}
exports.getElementTypeStringByTagName = getElementTypeStringByTagName;
function pathToName(path) {
    var ext = pathModule.extname(path);
    var base = pathModule.basename(path, ext);
    return base;
}
exports.pathToName = pathToName;
function pathToResourceResolution(path) {
    var ext = pathModule.extname(path);
    var dir = pathModule.dirname(path);
    var base = pathModule.basename(path, ext);
    var full = pathModule.join(dir, base);
    full = pathModule.normalize(full);
    return full.split("/").filter(function (item) { return !!item; }).map(function (item) { return item[0].toUpperCase() + item.slice(1); }).join(".");
}
exports.pathToResourceResolution = pathToResourceResolution;
function pathToId(path) {
    var name = pathModule.basename(path);
    return Leaf.Util.camelToSlug(name) + "-" + Helper.hash(path).slice(0, 6);
}
exports.pathToId = pathToId;
//# sourceMappingURL=coreLogic.js.map