import type { MetadataRoute } from "next";
import { siteConfig } from "@/data/site-config";

/** Top-level routes, highest priority first. */
const routes = [
  { path: "/", priority: 1.0 },
  { path: "/about", priority: 0.8 },
  { path: "/services", priority: 0.9 },
  { path: "/solutions", priority: 0.9 },
  { path: "/industries", priority: 0.8 },
  { path: "/case-studies", priority: 0.7 },
  { path: "/resources", priority: 0.6 },
  { path: "/careers", priority: 0.6 },
  { path: "/contacts", priority: 0.7 },
  { path: "/privacy", priority: 0.3 },
  { path: "/terms", priority: 0.3 },
];

export default function sitemap(): MetadataRoute.Sitemap {
  return routes.map(({ path, priority }) => ({
    url: `${siteConfig.url}${path}`,
    changeFrequency: "monthly",
    priority,
  }));
}
