/**
 * Type definitions for search functionality
 */

export interface Tag {
  id: string;
  name: string;
  slug: string;
  color: string | null;
}

export type EntryStatus = "ACTIVE" | "SCHEDULED" | "PAUSED" | "DORMANT" | "ARCHIVED";

export type EntryVisibility = "PRIVATE" | "WORKSPACE" | "PUBLIC";

export interface SearchResult {
  id: string;
  workspaceId: string;
  slug: string;
  title: string;
  content: string;
  contentHtml: string | null;
  summary: string | null;
  status: EntryStatus;
  visibility: EntryVisibility;
  createdAt: Date;
  updatedAt: Date;
  createdBy: string;
  updatedBy: string;
  rank: number;
  headline?: string;
  tags: Tag[];
}

export interface SearchPagination {
  page: number;
  limit: number;
  total: number;
  totalPages: number;
}

export interface SearchResponse {
  data: SearchResult[];
  pagination: SearchPagination;
  query: string;
}

export interface SearchFiltersState {
  status?: EntryStatus;
  tags?: string[];
}
