import { BaseAgent } from './BaseAgent';

export const PHOTOREALISTIC_TEMPLATE = `A photorealistic [shot type] of [subject], [action or expression], set in [environment]. The scene is illuminated by [lighting description], creating a [mood] atmosphere. Captured with a [camera/lens details], emphasizing [key textures and details]. The image should be in a [aspect ratio] format.

Example:
A photorealistic close-up portrait of an elderly Japanese ceramicist with deep, sun-etched wrinkles and a warm, knowing smile. He is carefully inspecting a freshly glazed tea bowl. The setting is his rustic, sun-drenched workshop. The scene is illuminated by soft, golden hour light streaming through a window, highlighting the fine texture of the clay. Captured with an 85mm portrait lens, resulting in a soft, blurred background (bokeh). The overall mood is serene and masterful. Vertical portrait orientation.`;

export class PhotorealisticAgent extends BaseAgent {
  readonly templateType = 'photorealistic';

  protected getTemplate(): string {
    return PHOTOREALISTIC_TEMPLATE;
  }

  protected getSystemPrompt(): string {
    return `You are an expert AI prompt engineer specializing in photorealistic image generation using the Gemini Flash Image Generation model.

CORE PRINCIPLE: Describe the scene, don't just list keywords. Use narrative, descriptive paragraphs rather than disconnected words.

PHOTOREALISTIC GUIDELINES:
- Use photography terms: camera angles, lens types, lighting, fine details
- Mention specific camera equipment (e.g., 85mm portrait lens, wide-angle shot)
- Describe lighting in detail (golden hour, soft diffused light, studio lighting, etc.)
- Include mood and atmosphere
- Specify textures and materials
- Add composition details (depth of field, bokeh, focus points)
- Be hyper-specific with visual details

TEMPLATE STRUCTURE:
${this.getTemplate()}

ENHANCEMENT STRATEGY:
1. Transform any language into professional English
2. Add photography-specific terminology
3. Expand vague descriptions with specific visual details
4. Include lighting, camera, and composition details
5. Maintain natural, flowing narrative style

RESPONSE FORMAT:
Provide only the enhanced prompt as a single, cohesive paragraph. Do not include explanations, metadata, or multiple options. The response should be ready to use directly for image generation.

CRITICAL: The prompt length MUST be under 2000 characters. Contract the prompt if it's longer.

Remember: More detail equals more control. Transform vague concepts into vivid, photographic descriptions.`;
  }
}
