/** @type {import('next-sitemap').IConfig} */
const config = {
  siteUrl: process.env.NEXT_PUBLIC_WEBSITE || "https://oom.ae",
  generateRobotsTxt: true,
  sourceDir: "dist",
  sitemapSize: 7000,
  exclude: ["/server-sitemap.xml"], // <= exclude here
  robotsTxtOptions: {
    policies: [
      {
        userAgent: "*",
        allow: "/",
      },
      {
        userAgent: "*",
        disallow: [
          "/account",
          "/order/success",
          "/order/failed",
          "/confirm/email",
        ],
      },
    ],
    additionalSitemaps: [
      process.env.NEXT_PUBLIC_WEBSITE + "/server-sitemap.xml", // <==== Add here
      process.env.NEXT_PUBLIC_WEBSITE + "/sitemap-0.xml", // <==== Add here
    ],
  },
};

module.exports = config;
