"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CommandLanguage = void 0;
class CommandLanguage {
    parse(input) {
        const trimmed = input.trim();
        if (trimmed.startsWith('/')) {
            const parts = trimmed.slice(1).split(/\s+/).filter(Boolean);
            return {
                kind: 'slash',
                command: parts[0],
                subcommand: parts[1],
                args: parts.slice(2)
            };
        }
        const mentionMatch = trimmed.match(/^@([a-zA-Z0-9._-]+)(?:\s+(.*))?$/);
        if (mentionMatch) {
            return {
                kind: 'mention',
                target: mentionMatch[1],
                args: mentionMatch[2] ? [mentionMatch[2]] : []
            };
        }
        return { kind: 'none' };
    }
}
exports.CommandLanguage = CommandLanguage;
