export interface RenderResult {
  filename: string;
  contentType: string;
  buffer: Buffer;
}

export interface DiagramBundle {
  type: "diagram-bundle";
  svgBase64: string;
  pngBase64: string;
  mermaidSource: string;
  stripped: boolean;
}

export interface IconSetBundle {
  type: "icon-set-bundle";
  style: "outline" | "filled" | "rounded";
  icons: Array<{
    name: string;
    svgSource: string;
    pngs: Record<string, string>; // "16" | "32" | "64" -> base64
  }>;
}

export interface ThemePaletteBundle {
  type: "theme-palette-bundle";
  seedHex: string;
  palette: PaletteRole[];
  exports: { css: string; tailwind: string; vscode: string; json: string };
}

export interface PaletteRole {
  name: string;
  dark: { oklch: string; hex: string; wcagAA: boolean };
  light: { oklch: string; hex: string; wcagAA: boolean };
}

export interface WallpaperBundle {
  type: "wallpaper-bundle";
  platform: string;
  width: number;
  height: number;
  pngBase64: string;
  prompt: string;
}

export interface AppIconBundle {
  type: "app-icon-bundle";
  sizes: Array<{ size: number; pngBase64: string }>;
  prompt: string;
}

export interface SocialPostBundle {
  type: "social-post-bundle";
  platform: string;
  post: string;
  hashtags: string[];
  slides?: string[];
  charLimit: number;
}

export interface ConvertBundle {
  type: "convert-bundle";
  outputFilename: string;
  outputMime: string;
  outputBase64: string;
  method: "direct" | "ai-bridge";
}

export interface PdfDocumentBundle {
  type: "pdf-document-bundle";
  docType: string;
  title: string;
  pdfBase64: string;
}

export interface BrandKitBundle {
  type: "brand-kit-bundle";
  spec: {
    name: string;
    tagline: string;
    primaryColor: string;
    secondaryColor: string;
    fontStyle: string;
    industry: string;
  };
  logoSvgBase64: string;
  avatarPngs: Record<string, string>;
  socialImages: Record<string, string>;
  signatureHtml: string;
  letterheadHtml: string;
  guidelinesPdfBase64: string;
  zipBase64: string;
}

export interface PresentationBundle {
  type: "presentation-bundle";
  presentationType: "pitch-deck" | "demo-video";
  title: string;
  slideCount: number;
  durationInFrames: number;
  fps: number;
  mp4Base64: string;
  inputProps: Record<string, unknown>;
}

export type ContentBundle = DiagramBundle | IconSetBundle | ThemePaletteBundle | WallpaperBundle | AppIconBundle | SocialPostBundle | ConvertBundle | PdfDocumentBundle | BrandKitBundle | PresentationBundle;
