// Types for the Notes/Scratchpad feature
// Simplified from full project management to a brainstorming workspace
// Helper to detect file type from path
export function getFileType(path) {
    const ext = path.split('.').pop()?.toLowerCase() || '';
    const typeMap = {
        'js': 'javascript',
        'mjs': 'javascript',
        'jsx': 'javascript',
        'ts': 'typescript',
        'tsx': 'typescript',
        'py': 'python',
        'go': 'go',
        'rb': 'ruby',
        'php': 'php',
        'sh': 'shell',
        'bash': 'shell',
        'curl': 'shell',
        'md': 'markdown',
        'mdx': 'markdown',
        'mmd': 'mermaid',
        'mermaid': 'mermaid',
        'json': 'json',
        'yaml': 'yaml',
        'yml': 'yaml',
        'txt': 'text'
    };
    return typeMap[ext] || 'text';
}
// Helper to get Monaco language from file type
export function getMonacoLanguage(path) {
    const type = getFileType(path);
    const languageMap = {
        'javascript': 'javascript',
        'typescript': 'typescript',
        'python': 'python',
        'go': 'go',
        'ruby': 'ruby',
        'php': 'php',
        'shell': 'shell',
        'markdown': 'markdown',
        'mermaid': 'markdown',
        'json': 'json',
        'yaml': 'yaml',
        'text': 'plaintext'
    };
    return languageMap[type];
}
// Check if file type supports preview
export function supportsPreview(path) {
    const type = getFileType(path);
    return type === 'markdown' || type === 'mermaid';
}
