export interface ResearchMapData {
  audience_summary?: string
  content_goal?: string
  questions?: string[]
  pillars?: string[]
  exclusions?: string[]
}

export interface BrandData {
  id: string
  display_name?: string
  seed_query?: string
  brief?: string
  product_brief?: string
  product_context?: string
  target_audience?: string
  goals?: string
  research_map?: ResearchMapData
  create_at: number
  update_at: number
}

export interface ListBrandsData {
  list: BrandData[]
}

export interface CreatePlacementTopicData {
  brand: BrandData
  job_id: string
  status: string
  message?: string
}

export function hasResearchMap(brand: BrandData | null | undefined): boolean {
  const map = brand?.research_map
  return !!(map?.audience_summary || (map?.questions?.length ?? 0) > 0)
}