import { webPages } from "@/config/web";
import { getOrigin } from "@/models/helper";

export default async function sitemap() {
  const origin = await getOrigin();

  return webPages.map((page) => ({
    url: `${origin}${page.route}`,
    lastModified: new Date(),
    changeFrequency: page.frequency,
    priority: page.priority || 0.5,
  }));
}
