/**
 * Email Template Component Types
 *
 * These components are designed for email-safe output:
 * - Table-based layout
 * - Inline styles
 * - No JavaScript or dynamic content
 */

// Email Layout Props
export interface EmailLayoutProps {
  backgroundColor: string;
  contentBackgroundColor: string;
}

// Email Header Props
export interface EmailHeaderProps {
  logoUrl?: string;
  businessName: string;
  preheader?: string;
}

// Email Heading Props
export interface EmailHeadingProps {
  text: string;
  level: 'h1' | 'h2' | 'h3';
  align: 'left' | 'center' | 'right';
}

// Email Text Props
export interface EmailTextProps {
  content: string;
  align: 'left' | 'center' | 'right';
}

// Email Button Props
export interface EmailButtonProps {
  text: string;
  href: string;
  variant: 'primary' | 'secondary';
  align: 'left' | 'center' | 'right';
}

// Email Divider Props
export interface EmailDividerProps {
  // No props needed - simple horizontal line
}

// Email Spacer Props
export interface EmailSpacerProps {
  size: 'sm' | 'md' | 'lg';
}

// Email Image Props
export interface EmailImageProps {
  src: string;
  alt: string;
  maxWidth: string;
  align: 'left' | 'center' | 'right';
}

// Email Panel Props (highlighted box)
export interface EmailPanelProps {
  content: string;
  backgroundColor: string;
}

// Email Two Column Props
export interface EmailTwoColumnProps {
  leftContent: string;
  rightContent: string;
  gap: string;
}

// Email Footer Props
export interface EmailFooterProps {
  address?: string;
  phone?: string;
  email?: string;
  website?: string;
}

// All email component props
export type EmailComponentProps = {
  EmailLayout: EmailLayoutProps;
  EmailHeader: EmailHeaderProps;
  EmailHeading: EmailHeadingProps;
  EmailText: EmailTextProps;
  EmailButton: EmailButtonProps;
  EmailDivider: EmailDividerProps;
  EmailSpacer: EmailSpacerProps;
  EmailImage: EmailImageProps;
  EmailPanel: EmailPanelProps;
  EmailTwoColumn: EmailTwoColumnProps;
  EmailFooter: EmailFooterProps;
};

// Email-specific Puck data structure
export interface EmailPuckData {
  content: Array<{
    type: keyof EmailComponentProps;
    props: Partial<EmailComponentProps[keyof EmailComponentProps]> & { id?: string };
  }>;
  root: Record<string, unknown>;
}
