/**
 * PDF Section Builder Types
 *
 * Content-only configuration schemas for composable PDF sections.
 * These types define WHAT content to display, not HOW to style it.
 * Styling is handled internally by the section builders.
 */

/**
 * Cover section configuration
 * Content for the proposal cover page
 */
export interface CoverConfig {
  /** Company name (main title) */
  company: string
  /** Contact person name */
  contact: string
  /** Business vertical (e.g., "Marketing & Creative Agency") */
  vertical: string
  /** Solutions summary (e.g., "Client reporting - Content workflows - Lead qualification") */
  solutions: string
  /** Date string (optional, defaults to current date) */
  date?: string
  /** Logo source URL or base64 (optional) */
  logoSrc?: string
}

/**
 * Summary section configuration
 * Content for the executive summary page
 */
export interface SummaryConfig {
  /** Total annual savings amount */
  totalSavings: number
  /** Number of automations proposed */
  automationCount: number
  /** Summary description text */
  description: string
}

/**
 * Automation section configuration
 * Content for a single automation detail page
 */
export interface AutomationConfig {
  /** Automation title (e.g., "Automated Client Reporting") */
  title: string
  /** How the automation works (2-3 sentences) */
  howItWorks: string
  /** Step-by-step workflow with optional human checkpoints */
  workflow: Array<string | { text: string; highlight: boolean }>
  /** Expected impact/benefits (bullet points) */
  impact: string[]
  /** Hours saved per week */
  hoursPerWeek: number
  /** Annual savings in dollars */
  annualSavings: number
}

/**
 * Table summary section configuration
 * Content for the automations summary table page
 */
export interface TableSummaryConfig {
  /** Automation summaries for table rows */
  automations: Array<{
    title: string
    hoursPerWeek: number
    annualSavings: number
  }>
}

/**
 * Investment section configuration
 * Content for the investment and next steps page
 */
export interface InvestmentConfig {
  /** Pricing tier */
  tier: 'tier1' | 'tier2' | 'tier3' | 'custom'
  /** Custom tier description (optional, used when tier is 'custom') */
  customTierDescription?: string
  /** Next steps list (optional, uses defaults if not provided) */
  nextSteps?: string[]
  /** Contact CTA text (optional) */
  contactCta?: string
}

/**
 * Combined summary + investment section configuration
 * Consolidates table summary and investment into a single page
 */
export interface SummaryInvestmentConfig {
  /** Automation summaries for table rows */
  automations: Array<{
    title: string
    hoursPerWeek: number
    annualSavings: number
  }>
  /** Initial fee amount in dollars (one-time implementation fee) */
  initialFee: number
  /** Monthly fee amount in dollars (optional, for ongoing support) */
  monthlyFee?: number
  /** Next steps list (optional, uses defaults if not provided) */
  nextSteps?: string[]
  /** Contact CTA text (optional) */
  contactCta?: string
}

/**
 * Acceptance section configuration
 * Content for the agreement acceptance and signature page
 */
export interface AcceptanceConfig {
  /** Company name for personalization */
  companyName: string
  /** Contact name for personalization */
  contactName: string
  /** Service tier being proposed */
  tier: 'tier1' | 'tier2' | 'tier3' | 'custom'
  /** Initial fee amount in dollars (one-time implementation fee) */
  initialFee: number
  /** Monthly fee amount in dollars (optional, for ongoing support) */
  monthlyFee?: number
}
