import { CALIBRE_INPUT_FORMAT, CALIBRE_OUTPUT_FORMAT, LIBRE_OFFICE_INPUT_FORMAT, LIBRE_OFFICE_OUTPUT_FORMAT, PANDOC_INPUT_FORMAT, PANDOC_OUTPUT_FORMAT, CONVERT_LATEX_TO_PNG_INPUT_FORMAT, CONVERT_LATEX_TO_PNG_OUTPUT_FORMAT, PUPPETEER_OUTPUT_FORMAT, } from '../../../../code/type/index.js';
export function supportConvertDocument(a, b) {
    return (supportConvertLatexToPng(a, b) ||
        supportConvertDocumentWithCalibre(a, b) ||
        supportConvertDocumentWithPandoc(a, b) ||
        supportConvertDocumentWithLibreOffice(a, b));
}
export function supportConvertLatexToPng(a, b) {
    if (a === b) {
        return false;
    }
    if (!CONVERT_LATEX_TO_PNG_INPUT_FORMAT.includes(a)) {
        return false;
    }
    if (!CONVERT_LATEX_TO_PNG_OUTPUT_FORMAT.includes(b)) {
        return false;
    }
    return true;
}
export function supportConvertMarkdownWithPuppeteer(a, b) {
    if (a === b) {
        return false;
    }
    if (a !== 'md') {
        return false;
    }
    if (!PUPPETEER_OUTPUT_FORMAT.includes(b)) {
        return false;
    }
    return true;
}
export function supportConvertTxtWithPuppeteer(a, b) {
    if (a === b) {
        return false;
    }
    if (a !== 'txt') {
        return false;
    }
    if (!PUPPETEER_OUTPUT_FORMAT.includes(b)) {
        return false;
    }
    return true;
}
export function supportConvertDocumentWithCalibre(a, b) {
    if (a === b) {
        return false;
    }
    if (!CALIBRE_INPUT_FORMAT.includes(a)) {
        return false;
    }
    if (!CALIBRE_OUTPUT_FORMAT.includes(b)) {
        return false;
    }
    return true;
}
export function supportConvertDocumentWithPandoc(a, b) {
    if (a === b) {
        return false;
    }
    if (!PANDOC_INPUT_FORMAT.includes(a)) {
        return false;
    }
    if (!PANDOC_OUTPUT_FORMAT.includes(b)) {
        return false;
    }
    return true;
}
export function supportConvertDocumentWithLibreOffice(a, b) {
    if (a === b) {
        return false;
    }
    if (!LIBRE_OFFICE_INPUT_FORMAT.includes(a)) {
        return false;
    }
    if (!LIBRE_OFFICE_OUTPUT_FORMAT.includes(b)) {
        return false;
    }
    return true;
}
//# sourceMappingURL=shared.js.map