/**
 * Blog types module
 * Contains type definitions for blog functionality
 */
import type { Lang } from './i18n';

/**
 * Author information interface
 */
export interface Author {
  name: string;
  bio?: string;
  avatar?: string;
  website?: string;
  twitter?: string;
  github?: string;
  linkedin?: string;
}

/**
 * Blog post interface
 */
export interface BlogPost {
  title: string;
  description: string;
  image: string;
  slug: string;
  tags: string[];
  tagId?: string[];
  category?: string[];
  categoryId?: string[];
  date: string;
  readTime: string;
  url?: string;
}

/**
 * Blog post frontmatter properties interface
 */
export interface FrontmatterProps {
  title: string;
  description?: string;
  publishDate?: string;
  date?: string; // Alternative field name for publish date
  author?: string;
  tags?: string[];
  tagId?: string[]; // Tag unique identifier for multilingual tag routing
  category?: string | string[];
  categoryId?: string[] | string; // Category unique identifier for multilingual category routing
  readingTime?: number;
  readTime?: string; // Alternative field name for reading time
}

/**
 * Author card component props
 */
export interface AuthorCardProps {
  lang: Lang;
  author?: Author;
}

/**
 * Share buttons component props
 */
export interface ShareButtonsProps {
  lang: Lang;
  title: string;
  url?: string;
}

/**
 * Blog list component props
 */
export interface BlogListProps {
  posts: BlogPost[];
  lang: Lang;
  baseUrl?: string; // Base URL for blog posts, defaults to '/blog/posts/'
}