from __future__ import annotations

from dataclasses import dataclass, field


@dataclass(slots=True)
class IndexReport:
    indexed_files: int = 0
    failed_files: int = 0
    cache_hit_files: int = 0
    cache_miss_files: int = 0
    documents: int = 0
    warnings: list[str] = field(default_factory=list)

    def as_tuple(self) -> tuple[int, int, int, int]:
        return (
            self.indexed_files,
            self.failed_files,
            self.cache_hit_files,
            self.cache_miss_files,
        )
