import type { MetadataRoute } from "next";

const pages: Array<{ path: string; priority: number; freq: "weekly" | "monthly" | "yearly" }> = [
  { path: "/", priority: 1.0, freq: "weekly" },
  { path: "/about-us/", priority: 0.8, freq: "monthly" },
  { path: "/bank-products/", priority: 0.8, freq: "monthly" },
  { path: "/bank-products/eps-financial/", priority: 0.6, freq: "monthly" },
  { path: "/bank-products/paydash/", priority: 0.6, freq: "monthly" },
  { path: "/bank-products/refund-advantage/", priority: 0.6, freq: "monthly" },
  { path: "/bank-products/republic-bank/", priority: 0.6, freq: "monthly" },
  { path: "/bank-products/tax-products-group/", priority: 0.6, freq: "monthly" },
  { path: "/bank-products/what-is-a-bank-product/", priority: 0.6, freq: "monthly" },
  { path: "/blog/", priority: 0.7, freq: "weekly" },
  { path: "/checkout/", priority: 0.6, freq: "monthly" },
  { path: "/contact-us/", priority: 0.9, freq: "monthly" },
  { path: "/creative-layouts/", priority: 0.6, freq: "monthly" },
  { path: "/creative-layouts/service-bureau/", priority: 0.6, freq: "monthly" },
  { path: "/creative-layouts/taxoffice/", priority: 0.6, freq: "monthly" },
  { path: "/creative-services/", priority: 0.6, freq: "monthly" },
  { path: "/download-demos/", priority: 0.7, freq: "monthly" },
  { path: "/managed-services-plans/", priority: 0.7, freq: "monthly" },
  { path: "/mobile-apps/", priority: 0.6, freq: "monthly" },
  { path: "/privacy-policy/", priority: 0.3, freq: "yearly" },
  { path: "/professional-tax-software-comparison-chart/", priority: 0.8, freq: "monthly" },
  { path: "/returns-and-refund-policy/", priority: 0.3, freq: "yearly" },
  { path: "/revenue-boosters/", priority: 0.7, freq: "monthly" },
  { path: "/revenue-boosters/audit-assistance-program/", priority: 0.6, freq: "monthly" },
  { path: "/revenue-boosters/resellers-program/", priority: 0.6, freq: "monthly" },
  { path: "/services/", priority: 0.9, freq: "monthly" },
  { path: "/services/sigma-1040-dr/", priority: 0.7, freq: "monthly" },
  { path: "/services/sigma-1040-dr-desktop-demo/", priority: 0.6, freq: "monthly" },
  { path: "/services/sigma-1040-dr-web-demo/", priority: 0.6, freq: "monthly" },
  { path: "/services/sigma-1040-sr/", priority: 0.7, freq: "monthly" },
  { path: "/services/sigma-1040-sr-desktop-demo/", priority: 0.6, freq: "monthly" },
  { path: "/services/sigma-1040-sr-web-demo/", priority: 0.6, freq: "monthly" },
  { path: "/services/sigma-1040-tw/", priority: 0.7, freq: "monthly" },
  { path: "/services/sigma-1040-tw-desktop-demo/", priority: 0.6, freq: "monthly" },
  { path: "/services/sigma-1040-tw-web-demo/", priority: 0.6, freq: "monthly" },
  { path: "/sigmania/", priority: 0.7, freq: "monthly" },
  { path: "/team/", priority: 0.6, freq: "monthly" },
  { path: "/terms-of-use/", priority: 0.3, freq: "yearly" },
  { path: "/thank-you/", priority: 0.3, freq: "monthly" },
  { path: "/website-accessibility-statement/", priority: 0.3, freq: "yearly" },
];

export default function sitemap(): MetadataRoute.Sitemap {
  const base =
    process.env.NEXT_PUBLIC_ENV === "production"
      ? "https://sigmataxpro.com"
      : "https://new.sigmataxpro.com";

  return pages.map((p) => ({
    url: `${base}${p.path}`,
    lastModified: new Date(),
    changeFrequency: p.freq,
    priority: p.priority,
  }));
}
