// Map of file extensions to their preview type
const previewExtensionMap = {
    // Browser-native preview
    avi: 'browser',
    bmp: 'browser',
    csv: 'browser', // CSV shows as plain text
    gif: 'browser',
    heic: 'browser',
    html: 'browser',
    jpeg: 'browser',
    jpg: 'browser',
    json: 'browser',
    mp3: 'browser',
    mp4: 'browser',
    mov: 'browser',
    ogg: 'browser',
    pdf: 'browser',
    png: 'browser',
    svg: 'browser',
    svgz: 'browser',
    txt: 'browser',
    wav: 'browser',
    wmv: 'browser',
    xml: 'browser',
    // File viewer preview
    eml: 'fileViewer',
    // SharePoint PDF preview
    doc: 'sharepoint',
    docx: 'sharepoint',
    dot: 'sharepoint',
    dotx: 'sharepoint',
    odp: 'sharepoint',
    ods: 'sharepoint',
    pot: 'sharepoint',
    ppt: 'sharepoint',
    pptx: 'sharepoint',
    pps: 'sharepoint',
    ppsx: 'sharepoint',
    xls: 'sharepoint',
    xlsb: 'sharepoint',
    xlsm: 'sharepoint',
    xlsx: 'sharepoint',
    odt: 'sharepoint',
};
/**
 * Determines how a file can be previewed.
 *
 * @param extension - The file extension (case-insensitive).
 * @returns The preview type.
 */
export function getPreviewType(extension) {
    return previewExtensionMap[extension.toLowerCase()] || 'unsupported';
}
