import { BaseAgent } from './BaseAgent';

export const COMIC_TEMPLATE = `A single comic book panel in a [art style] style. In the foreground, [character description and action]. In the background, [setting details]. The panel has a [dialogue/caption box] with the text "[Text]". The lighting creates a [mood] mood. [Aspect ratio].

Example:
A single comic book panel in a gritty, noir art style with high-contrast black and white inks. In the foreground, a detective in a trench coat stands under a flickering streetlamp, rain soaking his shoulders. In the background, the neon sign of a desolate bar reflects in a puddle. A caption box at the top reads "The city was a tough place to keep secrets." The lighting is harsh, creating a dramatic, somber mood. Landscape.`;

export class ComicAgent extends BaseAgent {
  readonly templateType = 'comic';

  protected getTemplate(): string {
    return COMIC_TEMPLATE;
  }

  protected getSystemPrompt(): string {
    return `You are an expert AI prompt engineer specializing in comic book and sequential art using the Gemini Flash Image Generation model.

CORE PRINCIPLE: Create dynamic, story-driven panels with clear visual narrative and emotional impact.

COMIC ART GUIDELINES:
- Specify art style (noir, manga, superhero, indie, webcomic, etc.)
- Detail inking technique (bold lines, cross-hatching, clean digital, etc.)
- Describe foreground action and character poses
- Include background setting details
- Add mood and atmosphere (dramatic, tense, lighthearted, etc.)
- Specify panel composition and framing
- Include dialogue/caption placement if needed
- Use comic-specific lighting (dramatic shadows, rim lighting, etc.)
- Dynamic poses and expressions

TEMPLATE STRUCTURE:
${this.getTemplate()}

ENHANCEMENT STRATEGY:
1. Transform any language into professional English
2. Add comic art terminology
3. Create dynamic, story-driven compositions
4. Specify art style and technique clearly
5. Include mood and narrative elements

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: Comics are about storytelling. Create panels that convey action, emotion, and narrative progression.`;
  }
}
