export interface BlogPostSection {
  id: string
  text?: string | null
  image?: string | null
}

export type BlogCategory =
  | 'books-magazine'
  | 'clothing-shoes'
  | 'collectibles-art'
  | 'toys-hobbies'

export const CATEGORY_LABELS: Record<BlogCategory, string> = {
  'books-magazine': 'Books & Magazine',
  'clothing-shoes': 'Clothing & Shoes',
  'collectibles-art': 'Collectibles & Art',
  'toys-hobbies': 'Toys & Hobbies'
}

export interface BlogPost {
  id: number
  title: string
  slug: string
  previewImage?: string | null
  linkUrl?: string | null
  sections: BlogPostSection[]
  footer?: string | null
  isEditorsPick: boolean
  category?: BlogCategory | null
  excerpt?: string
  createdAt: string
  updatedAt: string
}

export interface ApiResponse<T> {
  data: T
  error?: string
}

export interface ApiListResponse<T> {
  data: T[]
  error?: string
}
