import { PhotoAttachment } from './photos';

// Blog post type definitions (aligned with Rails BlogPostSerializer)
export interface BlogPost {
  id: number;
  title: string;
  slug: string;
  status: string;
  published_at?: string;
  excerpt_markdown?: string;
  content_markdown: string;
  featured: boolean;
  seo_title?: string;
  seo_description?: string;
  seo_keywords?: string;
  created_at: string;
  updated_at: string;
  photo_attachments?: PhotoAttachment[];
  blog_post_authors?: BlogPostAuthor[];
  blog_post_tags?: BlogPostTag[];
}

export interface BlogPostParams {
  status?: string;
  author_id?: number;
  tag_id?: number;
  q?: string;
  page?: number;
  per_page?: number;
  featured?: boolean;
}

export type BlogPostResponse = BlogPost[];

export interface BlogPostAuthor {
  id: number;
  name: string;
  slug: string;
  bio_markdown?: string;
  active: boolean;
  created_at: string;
  updated_at: string;
  photo_attachments?: PhotoAttachment[];
}

export interface BlogPostTag {
  id: number;
  name: string;
  slug: string;
  description?: string;
  created_at: string;
  updated_at: string;
}
