export type ReadingStatus = 'unread' | 'reading' | 'read' | 'pending_review' | 'archived';

export interface LinkTag {
    id: number;
    name: string;
    color: string;
}

export interface LinkProject {
    id: number;
    name: string;
    color: string;
    icon: string;
}

export interface LinkFolder {
    id: number;
    name: string;
}

export interface LinkCategory {
    id: number;
    name: string;
    color: string;
    icon: string;
}

export interface Link {
    id: number;
    url: string;
    display_title: string;
    title: string | null;
    description: string | null;
    image_url: string | null;
    favicon_url: string | null;
    domain: string | null;
    platform: string;
    content_type: string | null;
    reading_status: ReadingStatus;
    processing_status: string;
    summary_status: string | null;
    summary_short: string | null;
    is_favorite: boolean;
    is_archived: boolean;
    published_at: string | null;
    created_at: string;
    project: LinkProject | null;
    folder: LinkFolder | null;
    category: LinkCategory | null;
    tags: LinkTag[];
}

export interface Pagination {
    current_page: number;
    last_page: number;
    per_page: number;
    total: number;
    from: number | null;
    to: number | null;
}

export interface LinksResponse {
    data: Link[];
    meta: Pagination;
    links: { first: string; last: string; prev: string | null; next: string | null };
}

export interface FiltersMeta {
    projects: LinkProject[];
    categories: LinkCategory[];
    tags: LinkTag[];
    platforms: string[];
}

export interface Filters {
    search: string;
    project_id: number | '';
    category_id: number | '';
    tag_id: number | '';
    reading_status: ReadingStatus | '';
    is_favorite: boolean;
    sort: string;
}

export type ViewMode = 'biblioteca' | 'kanban';
