export interface HatchThemeConfig {
  // Branding options
  branding: {
    hideDate?: boolean;
    showAnniversary?: boolean;
    companyName?: string;
    founded?: number;
    currentYear?: number;
  };
  
  // Color customization
  colors: {
    primary?: string;
    secondary?: string;
    accent?: string;
    background?: string;
  };
  
  // Contact information
  contact: {
    email?: string;
    docs?: string;
    website?: string;
    phone?: string;
  };
  
  // Layout preferences
  layout: {
    headerHeight?: string;
    footerHeight?: string;
    contentPadding?: string;
    borderRadius?: string;
  };
  
  // Animation settings
  animations: {
    enabled?: boolean;
    speed?: string;
    easing?: string;
  };
}

export const defaultConfig: HatchThemeConfig = {
  branding: {
    hideDate: true,
    showAnniversary: true,
    companyName: 'HATCH ADVISORY',
    founded: 1955,
    currentYear: new Date().getFullYear()
  },
  colors: {
    primary: '#E84B37',
    secondary: '#FF8C00',
    accent: '#007BFF',
    background: '#FFFFFF'
  },
  contact: {
    email: 'contact@hatch.com',
    docs: 'hatch.com/docs',
    website: 'www.hatch.com'
  },
  layout: {
    headerHeight: '70px',
    footerHeight: '40px',
    contentPadding: '2rem',
    borderRadius: '12px'
  },
  animations: {
    enabled: true,
    speed: '0.3s',
    easing: 'ease'
  }
}

export function mergeConfig(userConfig: Partial<HatchThemeConfig> = {}): HatchThemeConfig {
  return {
    branding: { ...defaultConfig.branding, ...userConfig.branding },
    colors: { ...defaultConfig.colors, ...userConfig.colors },
    contact: { ...defaultConfig.contact, ...userConfig.contact },
    layout: { ...defaultConfig.layout, ...userConfig.layout },
    animations: { ...defaultConfig.animations, ...userConfig.animations }
  }
}

export function getAnniversaryYears(config: HatchThemeConfig): number {
  return config.branding.currentYear! - config.branding.founded!
}
