// src/lib/secure/classify.ts
var DAY_MS = 24 * 60 * 60 * 1e3;
function classifySecureAge(publishedAt, now = /* @__PURE__ */ new Date()) {
  if (!publishedAt || Number.isNaN(publishedAt.getTime())) {
    return { level: "gray" };
  }
  const ageDays = Math.max(0, (now.getTime() - publishedAt.getTime()) / DAY_MS);
  if (ageDays < 3) return { ageDays, level: "red" };
  if (ageDays < 10) return { ageDays, level: "yellow" };
  if (ageDays < 365) return { ageDays, level: "green" };
  return { ageDays, level: "purple" };
}
function classifySecureDownloads(downloads) {
  if (downloads === void 0 || !Number.isFinite(downloads)) return "gray";
  if (downloads < 1e3) return "red";
  if (downloads < 1e4) return "yellow";
  return "green";
}
export {
  classifySecureAge,
  classifySecureDownloads
};
//# sourceMappingURL=classify.mjs.map
