import type { MetadataRoute } from "next";
import { SITE_URL } from "@/lib/sitemap/config";

export default function robots(): MetadataRoute.Robots {
  return {
    rules: [
      {
        userAgent: "*",
        allow: ["/"],
        disallow: [
          "/api/",
          "/_next/",
          "/settings",
          "/settings/",
          "/auth",
          "/private/",
          "/new-post",
          "/new-project",
          "/billboards/new",
          "/search",
          "/verify/",
          "/register",
          "/register/",
          "/login",
          "/login-with-username",
          "/login-2fa",
          "/verify-otp",
          "/forget-password",
          "/forget-password-otp",
          "/change-passowrd",
          "/offer",
          "/offer/",
          "/*/payment/",
          "/projects/payment/",
          "/billboards/payment/",
          "/academy/payment/",
        ],
      },
    ],
    sitemap: `${SITE_URL}/sitemap.xml`,
    host: SITE_URL,
  };
}
