const js = require('../../media/javascript.tmLanguage');
const xml = require('../../media/xml.tmLanguage');
const jxml = require('../../media/jxml.tmLanguage');
const json = require('../../media/json.tmLanguage');
const html = require('../../media/html.tmLanguage');
const css = require('../../media/css.tmLanguage');
const markdown = require('../../media/markdown.tmLanguage');
const yaml = require('../../media/yaml.tmLanguage');
const sql = require('../../media/sql.tmLanguage');
const handlebars = require('../../media/handlebars.tmLanguage');
const typescript = require('../../media/typescript.tmLanguage');
const regularExpressions = require('../../media/regularExpressions.tmLanguage');
import * as monaco from 'monaco-editor';
export var MonacoLanguages;
(function (MonacoLanguages) {
    MonacoLanguages["JSON"] = "json";
    MonacoLanguages["JAVASCRIPT"] = "javascript";
    MonacoLanguages["XML"] = "xml";
    MonacoLanguages["JXML"] = "jxml";
    MonacoLanguages["HTML"] = "html";
    MonacoLanguages["CSS"] = "css";
    MonacoLanguages["YAML"] = "yaml";
    MonacoLanguages["MARKDOWN"] = "markdown";
    MonacoLanguages["SQL"] = "sql";
    MonacoLanguages["TS"] = "typescript";
    MonacoLanguages["HANDLEBARS"] = "handlebars";
})(MonacoLanguages || (MonacoLanguages = {}));
export var MonacoLanguageScopes;
(function (MonacoLanguageScopes) {
    MonacoLanguageScopes["JAVASCRIPT"] = "source.js";
    MonacoLanguageScopes["XML"] = "text.xml";
    MonacoLanguageScopes["JXML"] = "text.jxml";
    MonacoLanguageScopes["JSON"] = "source.json";
    MonacoLanguageScopes["HTML"] = "text.html.basic";
    MonacoLanguageScopes["CSS"] = "source.css";
    MonacoLanguageScopes["YAML"] = "source.yaml";
    MonacoLanguageScopes["MARKDOWN"] = "text.html.markdown";
    MonacoLanguageScopes["SQL"] = "source.sql";
    MonacoLanguageScopes["TS"] = "source.ts";
    MonacoLanguageScopes["REGEX"] = "source.js.regexp";
    MonacoLanguageScopes["HANDLEBARS"] = "handlebars.html";
})(MonacoLanguageScopes || (MonacoLanguageScopes = {}));
// Actual extension lookup occurs in
// lib-utils/src/paths.ts#getIdealLanguageFromPath
export const GrammerMapping = {
    [MonacoLanguageScopes.JAVASCRIPT]: {
        format: 'json',
        url: js,
        monaco: MonacoLanguages.JAVASCRIPT
    },
    [MonacoLanguageScopes.XML]: {
        format: 'json',
        url: xml,
        monaco: MonacoLanguages.XML,
        language: {
            id: 'xml',
            extensions: ['.xml', '.dtd', '.ascx', '.csproj', '.config', '.wxi', '.wxl', '.wxs', '.xaml', '.svg', '.svgz'],
            firstLine: '(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)',
            aliases: ['XML', 'xml'],
            mimetypes: ['text/xml', 'application/xml', 'application/xaml+xml', 'application/xml-dtd']
        }
    },
    [MonacoLanguageScopes.JXML]: {
        format: 'json',
        url: jxml,
        monaco: MonacoLanguages.JXML,
        language: {
            id: 'jxml',
            extensions: ['.view.xml'],
            firstLine: '(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)',
            aliases: [],
            mimetypes: ['application/xml']
        }
    },
    [MonacoLanguageScopes.JSON]: {
        format: 'plist',
        url: json,
        monaco: MonacoLanguages.JSON,
        hook: () => {
            monaco.json.jsonDefaults.setModeConfiguration(Object.assign(Object.assign({}, monaco.json.jsonDefaults.modeConfiguration), { tokens: false }));
        }
    },
    [MonacoLanguageScopes.HTML]: {
        format: 'json',
        url: html,
        monaco: MonacoLanguages.HTML,
        language: {
            extensions: ['.html', '.htm', '.shtml', '.xhtml', '.mdoc', '.jsp', '.asp', '.aspx', '.jshtm'],
            aliases: ['HTML', 'htm', 'html', 'xhtml'],
            mimetypes: ['text/html', 'text/x-jshtm', 'text/template', 'text/ng-template']
        }
    },
    [MonacoLanguageScopes.HANDLEBARS]: {
        format: 'plist',
        url: handlebars,
        monaco: MonacoLanguages.HANDLEBARS,
        language: {
            extensions: ['.handlebars'],
            aliases: ['handlebars'],
            mimetypes: ['text/html']
        }
    },
    [MonacoLanguageScopes.CSS]: {
        format: 'plist',
        url: css,
        monaco: MonacoLanguages.CSS,
        language: {
            extensions: ['.css', '.scss'],
            aliases: ['CSS', 'css'],
            mimetypes: ['text/css']
        }
    },
    [MonacoLanguageScopes.YAML]: {
        format: 'json',
        url: yaml,
        monaco: MonacoLanguages.YAML,
        language: {
            extensions: ['.yaml', '.yml', '.lock'],
            aliases: ['YAML', 'yaml', 'YML', 'yml'],
            mimetypes: ['application/x-yaml']
        }
    },
    [MonacoLanguageScopes.MARKDOWN]: {
        format: 'plist',
        url: markdown,
        monaco: MonacoLanguages.MARKDOWN,
        language: {
            extensions: ['.md', '.markdown', '.mdown', '.mkdn', '.mkd', '.mdwn', '.mdtxt', '.mdtext'],
            aliases: ['Markdown', 'markdown']
        }
    },
    [MonacoLanguageScopes.SQL]: {
        format: 'plist',
        url: sql,
        monaco: MonacoLanguages.SQL,
        language: {
            extensions: ['.sql'],
            aliases: ['SQL']
        }
    },
    [MonacoLanguageScopes.TS]: {
        format: 'plist',
        url: typescript,
        monaco: MonacoLanguages.TS,
        language: {
            extensions: ['.ts', '.js', '.tsx', '.jsx'],
            aliases: ['TypeScript', 'JavaScript']
        }
    },
    [MonacoLanguageScopes.REGEX]: {
        format: 'plist',
        url: regularExpressions
    }
};
//# sourceMappingURL=languages.js.map