import { ValidationResult } from './types';

export function validatePromptLength(prompt: string, maxLength: number = 2000): ValidationResult {
  if (!prompt || prompt.trim().length === 0) {
    return {
      valid: false,
      error: 'Prompt cannot be empty',
    };
  }

  if (prompt.length > maxLength) {
    return {
      valid: false,
      error: `Prompt exceeds maximum length of ${maxLength} characters (current: ${prompt.length})`,
    };
  }

  return { valid: true };
}
