import type { DBSearchResult } from "@/interfaces"; export type ResultStatus = "found" | "notFound" | "blocked" | "error"; export const classify = (result: DBSearchResult): ResultStatus => { if (result.code === 0) return "error"; if (result.code !== 200) return "blocked"; if (result.data.count === 0) return "notFound"; return "found"; };