import { useCallback } from "react";
export function useSlashCommands(registry, context) {
    const isSlashCommand = useCallback((input) => {
        return registry.parse(input.trim()) !== null;
    }, [registry]);
    const execute = useCallback(async (input) => {
        return registry.execute(input.trim(), context);
    }, [registry, context]);
    return { isSlashCommand, execute };
}
//# sourceMappingURL=useSlashCommands.js.map