import { jsx, jsxs } from "react/jsx-runtime";
import { QueryClientProvider, queryOptions, QueryClient } from "@tanstack/react-query";
import { createRootRouteWithContext, useRouter, Link, Outlet, HeadContent, Scripts, createFileRoute, lazyRouteComponent, redirect, notFound, createRouter } from "@tanstack/react-router";
import { useEffect } from "react";
import { Toaster as Toaster$1 } from "sonner";
import { s as supabase } from "./client-CJCZGN4z.js";
const appCss = "/dashboard/malawi-today-news/assets/styles-BvmUqKqB.css";
function reportLovableError(error, context = {}) {
  if (typeof window === "undefined") return;
  window.__lovableEvents?.captureException?.(
    error,
    {
      source: "react_error_boundary",
      route: window.location.pathname,
      ...context
    },
    {
      mechanism: "react_error_boundary",
      handled: false,
      severity: "error"
    }
  );
}
const Toaster = ({ ...props }) => {
  return /* @__PURE__ */ jsx(
    Toaster$1,
    {
      className: "toaster group",
      toastOptions: {
        classNames: {
          toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
          description: "group-[.toast]:text-muted-foreground",
          actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
          cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
        }
      },
      ...props
    }
  );
};
function NotFoundComponent() {
  return /* @__PURE__ */ jsx("div", { className: "flex min-h-screen items-center justify-center bg-background px-4", children: /* @__PURE__ */ jsxs("div", { className: "max-w-md text-center", children: [
    /* @__PURE__ */ jsx("h1", { className: "text-7xl font-bold text-foreground", children: "404" }),
    /* @__PURE__ */ jsx("h2", { className: "mt-4 text-xl font-semibold text-foreground", children: "Page not found" }),
    /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm text-muted-foreground", children: "The page you're looking for doesn't exist or has been moved." }),
    /* @__PURE__ */ jsx("div", { className: "mt-6", children: /* @__PURE__ */ jsx(
      Link,
      {
        to: "/",
        className: "inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",
        children: "Go home"
      }
    ) })
  ] }) });
}
function ErrorComponent({ error, reset }) {
  console.error(error);
  const router2 = useRouter();
  useEffect(() => {
    reportLovableError(error, { boundary: "tanstack_root_error_component" });
  }, [error]);
  return /* @__PURE__ */ jsx("div", { className: "flex min-h-screen items-center justify-center bg-background px-4", children: /* @__PURE__ */ jsxs("div", { className: "max-w-md text-center", children: [
    /* @__PURE__ */ jsx("h1", { className: "text-xl font-semibold tracking-tight text-foreground", children: "This page didn't load" }),
    /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm text-muted-foreground", children: "Something went wrong on our end. You can try refreshing or head back home." }),
    /* @__PURE__ */ jsxs("div", { className: "mt-6 flex flex-wrap justify-center gap-2", children: [
      /* @__PURE__ */ jsx(
        "button",
        {
          onClick: () => {
            router2.invalidate();
            reset();
          },
          className: "inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",
          children: "Try again"
        }
      ),
      /* @__PURE__ */ jsx(
        "a",
        {
          href: "/",
          className: "inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent",
          children: "Go home"
        }
      )
    ] })
  ] }) });
}
const Route$e = createRootRouteWithContext()({
  head: () => ({
    meta: [
      { charSet: "utf-8" },
      { name: "viewport", content: "width=device-width, initial-scale=1" },
      { title: "Malawi Today — National News, Politics, Business & Sports" },
      {
        name: "description",
        content: "Malawi Today delivers breaking news, in-depth analysis and trusted journalism from across Malawi and the world."
      },
      { name: "author", content: "Malawi Today" },
      { name: "theme-color", content: "#0F172A" },
      { property: "og:site_name", content: "Malawi Today" },
      { property: "og:type", content: "website" },
      { name: "twitter:card", content: "summary_large_image" }
    ],
    links: [
      { rel: "stylesheet", href: appCss },
      { rel: "preconnect", href: "https://fonts.googleapis.com" },
      { rel: "preconnect", href: "https://fonts.gstatic.com", crossOrigin: "anonymous" },
      {
        rel: "stylesheet",
        href: "https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700;1,900&family=Inter:wght@400;500;600;700;800&display=swap"
      }
    ]
  }),
  shellComponent: RootShell,
  component: RootComponent,
  notFoundComponent: NotFoundComponent,
  errorComponent: ErrorComponent
});
function RootShell({ children }) {
  return /* @__PURE__ */ jsxs("html", { lang: "en", children: [
    /* @__PURE__ */ jsx("head", { children: /* @__PURE__ */ jsx(HeadContent, {}) }),
    /* @__PURE__ */ jsxs("body", { children: [
      children,
      /* @__PURE__ */ jsx(Scripts, {})
    ] })
  ] });
}
function RootComponent() {
  const { queryClient } = Route$e.useRouteContext();
  return /* @__PURE__ */ jsxs(QueryClientProvider, { client: queryClient, children: [
    /* @__PURE__ */ jsx(Outlet, {}),
    /* @__PURE__ */ jsx(Toaster, {})
  ] });
}
const heroIrrigation = "/dashboard/malawi-today-news/assets/hero-irrigation-DzCaqX2Q.jpg";
const newsParliament = "/dashboard/malawi-today-news/assets/news-parliament-Dk-RfF9C.jpg";
const newsLake = "/dashboard/malawi-today-news/assets/news-lake-3qFytztR.jpg";
const newsMarket = "/dashboard/malawi-today-news/assets/news-market-CFQORwPe.jpg";
const newsTech = "/dashboard/malawi-today-news/assets/news-tech-D-8D7WiE.jpg";
const newsFootball = "/dashboard/malawi-today-news/assets/news-football-BUwbBUGH.jpg";
const newsKwacha = "/dashboard/malawi-today-news/assets/news-kwacha-DXroZl2N.jpg";
const newsHealth = "/dashboard/malawi-today-news/assets/news-health-sX5Up1Bs.jpg";
const CATEGORIES = [
  { slug: "breaking", name: "Breaking" },
  { slug: "politics", name: "Politics" },
  { slug: "business", name: "Business" },
  { slug: "economy", name: "Economy" },
  { slug: "technology", name: "Technology" },
  { slug: "education", name: "Education" },
  { slug: "health", name: "Health" },
  { slug: "sports", name: "Sports" },
  { slug: "entertainment", name: "Entertainment" },
  { slug: "lifestyle", name: "Lifestyle" },
  { slug: "agriculture", name: "Agriculture" },
  { slug: "environment", name: "Environment" },
  { slug: "crime", name: "Crime & Security" },
  { slug: "opinion", name: "Opinion" },
  { slug: "investigations", name: "Investigations" },
  { slug: "international", name: "International" }
];
const PRIMARY_NAV = [
  "politics",
  "economy",
  "business",
  "agriculture",
  "sports",
  "opinion",
  "international"
];
const ASSET_MAP = {
  "/src/assets/hero-irrigation.jpg": heroIrrigation,
  "/src/assets/news-parliament.jpg": newsParliament,
  "/src/assets/news-lake.jpg": newsLake,
  "/src/assets/news-market.jpg": newsMarket,
  "/src/assets/news-tech.jpg": newsTech,
  "/src/assets/news-football.jpg": newsFootball,
  "/src/assets/news-kwacha.jpg": newsKwacha,
  "/src/assets/news-health.jpg": newsHealth
};
const PLACEHOLDER = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 9'><rect width='16' height='9' fill='%23eee'/></svg>";
function resolveImage(url) {
  if (!url) return PLACEHOLDER;
  return ASSET_MAP[url] ?? url;
}
function categoryName(slug) {
  return CATEGORIES.find((c) => c.slug === slug)?.name ?? slug;
}
function timeAgo(iso) {
  const diff = Date.now() - new Date(iso).getTime();
  const h = Math.floor(diff / 36e5);
  if (h < 1) return "just now";
  if (h < 24) return `${h}h ago`;
  const d = Math.floor(h / 24);
  return `${d}d ago`;
}
const BASE_URL = "";
const Route$d = createFileRoute("/sitemap.xml")({
  server: {
    handlers: {
      GET: async () => {
        const { supabaseServer } = await import("./public-client.server-CNIbo3sp.js");
        const { data: articles } = await supabaseServer.from("articles").select("slug, updated_at").eq("status", "published").order("published_at", { ascending: false }).limit(5e3);
        const entries = [
          { path: "/", changefreq: "hourly", priority: "1.0" },
          ...CATEGORIES.map((c) => ({
            path: `/category/${c.slug}`,
            changefreq: "hourly",
            priority: "0.8"
          })),
          ...(articles ?? []).map((a) => ({
            path: `/article/${a.slug}`,
            changefreq: "daily",
            priority: "0.7"
          }))
        ];
        const urls = entries.map(
          (e) => `  <url>
    <loc>${BASE_URL}${e.path}</loc>
    <changefreq>${e.changefreq}</changefreq>
    <priority>${e.priority}</priority>
  </url>`
        );
        const xml = [
          `<?xml version="1.0" encoding="UTF-8"?>`,
          `<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">`,
          ...urls,
          `</urlset>`
        ].join("\n");
        return new Response(xml, {
          headers: {
            "Content-Type": "application/xml",
            "Cache-Control": "public, max-age=3600"
          }
        });
      }
    }
  }
});
const $$splitComponentImporter$c = () => import("./auth-Cqj56oWR.js");
const Route$c = createFileRoute("/auth")({
  head: () => ({
    meta: [{
      title: "Sign in — Malawi Today"
    }, {
      name: "robots",
      content: "noindex"
    }]
  }),
  component: lazyRouteComponent($$splitComponentImporter$c, "component")
});
const $$splitComponentImporter$b = () => import("./route-BFsOu0JM.js");
const Route$b = createFileRoute("/_authenticated")({
  ssr: false,
  beforeLoad: async () => {
    const {
      data,
      error
    } = await supabase.auth.getUser();
    if (error || !data.user) throw redirect({
      to: "/auth"
    });
    return {
      user: data.user
    };
  },
  component: lazyRouteComponent($$splitComponentImporter$b, "component")
});
const COLS = "slug,title,dek,category,author_name,published_at,created_at,read_minutes,image_url,image_alt,ai_summary,body,tags,views,shares";
function toArticle(r) {
  return {
    slug: r.slug,
    title: r.title,
    dek: r.dek ?? "",
    category: r.category,
    author: r.author_name ?? "Newsroom",
    publishedAt: r.published_at ?? r.created_at,
    readMinutes: r.read_minutes,
    image: r.image_url ?? "",
    imageAlt: r.image_alt ?? r.title,
    aiSummary: r.ai_summary ?? "",
    body: r.body ?? [],
    tags: r.tags ?? [],
    views: r.views,
    shares: r.shares
  };
}
async function fetchHomeData() {
  const [latestRes, trendingRes, sharedRes, breakingRes] = await Promise.all([
    supabase.from("articles").select(COLS).eq("status", "published").order("published_at", { ascending: false }).limit(20),
    supabase.from("articles").select(COLS).eq("status", "published").order("views", { ascending: false }).limit(5),
    supabase.from("articles").select(COLS).eq("status", "published").order("shares", { ascending: false }).limit(4),
    supabase.from("breaking_news").select("message").eq("active", true).order("priority", { ascending: false })
  ]);
  if (latestRes.error) throw latestRes.error;
  return {
    latest: (latestRes.data ?? []).map(toArticle),
    trending: (trendingRes.data ?? []).map(toArticle),
    mostShared: (sharedRes.data ?? []).map(toArticle),
    ticker: (breakingRes.data ?? []).map((b) => b.message)
  };
}
async function fetchCategoryArticles(slug) {
  const { data: rows, error } = await supabase.from("articles").select(COLS).eq("status", "published").eq("category", slug).order("published_at", { ascending: false }).limit(24);
  if (error) throw error;
  return { items: (rows ?? []).map(toArticle) };
}
async function fetchArticleBySlug(slug) {
  const { data: row, error } = await supabase.from("articles").select(`${COLS}, id`).eq("status", "published").eq("slug", slug).maybeSingle();
  if (error) throw error;
  if (!row) return { article: null, related: [] };
  const article = toArticle(row);
  void supabase.from("article_views").insert({ article_id: row.id });
  const { data: relatedRows } = await supabase.from("articles").select(COLS).eq("status", "published").eq("category", row.category).neq("slug", slug).order("published_at", { ascending: false }).limit(3);
  return { article, related: (relatedRows ?? []).map(toArticle) };
}
const homeQuery = queryOptions({
  queryKey: ["home-data"],
  queryFn: () => fetchHomeData(),
  staleTime: 6e4
});
const $$splitComponentImporter$a = () => import("./index-DGU_ynNN.js");
const $$splitNotFoundComponentImporter$2 = () => import("./index-Dx9sGzFR.js");
const $$splitErrorComponentImporter$2 = () => import("./index-8J0-IVEG.js");
const Route$a = createFileRoute("/")({
  head: () => ({
    meta: [{
      title: "Malawi Today — National News, Politics, Business & Sports"
    }, {
      name: "description",
      content: "Malawi Today delivers breaking news, in-depth analysis and trusted journalism from across Malawi and the world. Politics, economy, sports, and more."
    }, {
      property: "og:title",
      content: "Malawi Today — Malawi's leading digital newspaper"
    }, {
      property: "og:description",
      content: "Breaking news, analysis and trusted reporting from across Malawi."
    }, {
      property: "og:type",
      content: "website"
    }, {
      property: "og:url",
      content: "/"
    }]
  }),
  loader: ({
    context
  }) => context.queryClient.ensureQueryData(homeQuery),
  errorComponent: lazyRouteComponent($$splitErrorComponentImporter$2, "errorComponent"),
  notFoundComponent: lazyRouteComponent($$splitNotFoundComponentImporter$2, "notFoundComponent"),
  component: lazyRouteComponent($$splitComponentImporter$a, "component")
});
const catQuery = (slug) => queryOptions({
  queryKey: ["category", slug],
  queryFn: () => fetchCategoryArticles(slug)
});
const $$splitComponentImporter$9 = () => import("./category._slug-C0Bwo35G.js");
const $$splitErrorComponentImporter$1 = () => import("./category._slug-BNOH2zTs.js");
const $$splitNotFoundComponentImporter$1 = () => import("./category._slug-0hrg28_Y.js");
const Route$9 = createFileRoute("/category/$slug")({
  loader: async ({
    params,
    context
  }) => {
    if (!CATEGORIES.some((c) => c.slug === params.slug)) throw notFound();
    await context.queryClient.ensureQueryData(catQuery(params.slug));
    return {
      slug: params.slug
    };
  },
  head: ({
    params
  }) => {
    const name = categoryName(params.slug);
    return {
      meta: [{
        title: `${name} News — Malawi Today`
      }, {
        name: "description",
        content: `The latest ${name.toLowerCase()} news, analysis and reporting from Malawi Today.`
      }, {
        property: "og:title",
        content: `${name} News — Malawi Today`
      }, {
        property: "og:description",
        content: `The latest ${name.toLowerCase()} news from across Malawi.`
      }, {
        property: "og:url",
        content: `/category/${params.slug}`
      }],
      links: [{
        rel: "canonical",
        href: `/category/${params.slug}`
      }]
    };
  },
  notFoundComponent: lazyRouteComponent($$splitNotFoundComponentImporter$1, "notFoundComponent"),
  errorComponent: lazyRouteComponent($$splitErrorComponentImporter$1, "errorComponent"),
  component: lazyRouteComponent($$splitComponentImporter$9, "component")
});
const articleQuery = (slug) => queryOptions({
  queryKey: ["article", slug],
  queryFn: () => fetchArticleBySlug(slug)
});
const $$splitComponentImporter$8 = () => import("./article._slug-BIypJIff.js");
const $$splitErrorComponentImporter = () => import("./article._slug-DvR06Iww.js");
const $$splitNotFoundComponentImporter = () => import("./article._slug-DN2_rdeF.js");
const Route$8 = createFileRoute("/article/$slug")({
  loader: async ({
    params,
    context
  }) => {
    const data = await context.queryClient.ensureQueryData(articleQuery(params.slug));
    if (!data.article) throw notFound();
    return data;
  },
  head: ({
    loaderData,
    params
  }) => {
    const a = loaderData?.article;
    if (!a) return {
      meta: [{
        title: "Article — Malawi Today"
      }]
    };
    return {
      meta: [{
        title: `${a.title} — Malawi Today`
      }, {
        name: "description",
        content: a.dek
      }, {
        property: "og:title",
        content: a.title
      }, {
        property: "og:description",
        content: a.dek
      }, {
        property: "og:type",
        content: "article"
      }, ...a.image ? [{
        property: "og:image",
        content: a.image
      }] : [], {
        property: "og:url",
        content: `/article/${params.slug}`
      }, {
        name: "twitter:card",
        content: "summary_large_image"
      }],
      links: [{
        rel: "canonical",
        href: `/article/${params.slug}`
      }],
      scripts: [{
        type: "application/ld+json",
        children: JSON.stringify({
          "@context": "https://schema.org",
          "@type": "NewsArticle",
          headline: a.title,
          description: a.dek,
          image: a.image ? [a.image] : void 0,
          datePublished: a.publishedAt,
          author: {
            "@type": "Person",
            name: a.author
          },
          publisher: {
            "@type": "Organization",
            name: "Malawi Today"
          },
          articleSection: categoryName(a.category)
        })
      }]
    };
  },
  notFoundComponent: lazyRouteComponent($$splitNotFoundComponentImporter, "notFoundComponent"),
  errorComponent: lazyRouteComponent($$splitErrorComponentImporter, "errorComponent"),
  component: lazyRouteComponent($$splitComponentImporter$8, "component")
});
const $$splitComponentImporter$7 = () => import("./submit-BZG1RBQY.js");
const Route$7 = createFileRoute("/_authenticated/submit")({
  head: () => ({
    meta: [{
      title: "Submit a Story — Malawi Today"
    }, {
      name: "robots",
      content: "noindex"
    }]
  }),
  component: lazyRouteComponent($$splitComponentImporter$7, "component")
});
const $$splitComponentImporter$6 = () => import("./index-BinONCYO.js");
const Route$6 = createFileRoute("/_authenticated/admin/")({
  head: () => ({
    meta: [{
      title: "Newsroom Dashboard — Malawi Today"
    }, {
      name: "robots",
      content: "noindex"
    }]
  }),
  component: lazyRouteComponent($$splitComponentImporter$6, "component")
});
const $$splitComponentImporter$5 = () => import("./users-BJUY8Fw3.js");
const Route$5 = createFileRoute("/_authenticated/admin/users")({
  head: () => ({
    meta: [{
      title: "Users & Roles — Newsroom"
    }, {
      name: "robots",
      content: "noindex"
    }]
  }),
  component: lazyRouteComponent($$splitComponentImporter$5, "component")
});
const $$splitComponentImporter$4 = () => import("./submissions-CaIc4NFe.js");
const Route$4 = createFileRoute("/_authenticated/admin/submissions")({
  head: () => ({
    meta: [{
      title: "Citizen Submissions — Newsroom"
    }, {
      name: "robots",
      content: "noindex"
    }]
  }),
  component: lazyRouteComponent($$splitComponentImporter$4, "component")
});
const $$splitComponentImporter$3 = () => import("./polls-CyMHEyrK.js");
const Route$3 = createFileRoute("/_authenticated/admin/polls")({
  head: () => ({
    meta: [{
      title: "Polls — Newsroom"
    }, {
      name: "robots",
      content: "noindex"
    }]
  }),
  component: lazyRouteComponent($$splitComponentImporter$3, "component")
});
const $$splitComponentImporter$2 = () => import("./breaking-CJhmvKfV.js");
const Route$2 = createFileRoute("/_authenticated/admin/breaking")({
  head: () => ({
    meta: [{
      title: "Breaking News — Newsroom"
    }, {
      name: "robots",
      content: "noindex"
    }]
  }),
  component: lazyRouteComponent($$splitComponentImporter$2, "component")
});
const $$splitComponentImporter$1 = () => import("./articles-Cx4-p-jp.js");
const Route$1 = createFileRoute("/_authenticated/admin/articles")({
  head: () => ({
    meta: [{
      title: "Articles — Newsroom"
    }, {
      name: "robots",
      content: "noindex"
    }]
  }),
  component: lazyRouteComponent($$splitComponentImporter$1, "component")
});
const $$splitComponentImporter = () => import("./ads-Dn192hnr.js");
const Route = createFileRoute("/_authenticated/admin/ads")({
  head: () => ({
    meta: [{
      title: "Ad Slots — Newsroom"
    }, {
      name: "robots",
      content: "noindex"
    }]
  }),
  component: lazyRouteComponent($$splitComponentImporter, "component")
});
const SitemapDotxmlRoute = Route$d.update({
  id: "/sitemap.xml",
  path: "/sitemap.xml",
  getParentRoute: () => Route$e
});
const AuthRoute = Route$c.update({
  id: "/auth",
  path: "/auth",
  getParentRoute: () => Route$e
});
const AuthenticatedRouteRoute = Route$b.update({
  id: "/_authenticated",
  getParentRoute: () => Route$e
});
const IndexRoute = Route$a.update({
  id: "/",
  path: "/",
  getParentRoute: () => Route$e
});
const CategorySlugRoute = Route$9.update({
  id: "/category/$slug",
  path: "/category/$slug",
  getParentRoute: () => Route$e
});
const ArticleSlugRoute = Route$8.update({
  id: "/article/$slug",
  path: "/article/$slug",
  getParentRoute: () => Route$e
});
const AuthenticatedSubmitRoute = Route$7.update({
  id: "/submit",
  path: "/submit",
  getParentRoute: () => AuthenticatedRouteRoute
});
const AuthenticatedAdminIndexRoute = Route$6.update({
  id: "/admin/",
  path: "/admin/",
  getParentRoute: () => AuthenticatedRouteRoute
});
const AuthenticatedAdminUsersRoute = Route$5.update({
  id: "/admin/users",
  path: "/admin/users",
  getParentRoute: () => AuthenticatedRouteRoute
});
const AuthenticatedAdminSubmissionsRoute = Route$4.update({
  id: "/admin/submissions",
  path: "/admin/submissions",
  getParentRoute: () => AuthenticatedRouteRoute
});
const AuthenticatedAdminPollsRoute = Route$3.update({
  id: "/admin/polls",
  path: "/admin/polls",
  getParentRoute: () => AuthenticatedRouteRoute
});
const AuthenticatedAdminBreakingRoute = Route$2.update({
  id: "/admin/breaking",
  path: "/admin/breaking",
  getParentRoute: () => AuthenticatedRouteRoute
});
const AuthenticatedAdminArticlesRoute = Route$1.update({
  id: "/admin/articles",
  path: "/admin/articles",
  getParentRoute: () => AuthenticatedRouteRoute
});
const AuthenticatedAdminAdsRoute = Route.update({
  id: "/admin/ads",
  path: "/admin/ads",
  getParentRoute: () => AuthenticatedRouteRoute
});
const AuthenticatedRouteRouteChildren = {
  AuthenticatedSubmitRoute,
  AuthenticatedAdminAdsRoute,
  AuthenticatedAdminArticlesRoute,
  AuthenticatedAdminBreakingRoute,
  AuthenticatedAdminPollsRoute,
  AuthenticatedAdminSubmissionsRoute,
  AuthenticatedAdminUsersRoute,
  AuthenticatedAdminIndexRoute
};
const AuthenticatedRouteRouteWithChildren = AuthenticatedRouteRoute._addFileChildren(AuthenticatedRouteRouteChildren);
const rootRouteChildren = {
  IndexRoute,
  AuthenticatedRouteRoute: AuthenticatedRouteRouteWithChildren,
  AuthRoute,
  SitemapDotxmlRoute,
  ArticleSlugRoute,
  CategorySlugRoute
};
const routeTree = Route$e._addFileChildren(rootRouteChildren)._addFileTypes();
function RouterPending() {
  return /* @__PURE__ */ jsx("div", { className: "min-h-screen grid place-items-center bg-background", children: /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Loading…" }) });
}
const getRouter = () => {
  const queryClient = new QueryClient();
  const basepath = "/dashboard/malawi-today-news/".replace(/\/$/, "") || void 0;
  const router2 = createRouter({
    routeTree,
    context: { queryClient },
    basepath,
    scrollRestoration: true,
    defaultPreloadStaleTime: 0,
    defaultPendingComponent: RouterPending
  });
  return router2;
};
const router = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  getRouter
}, Symbol.toStringTag, { value: "Module" }));
export {
  CATEGORIES as C,
  PRIMARY_NAV as P,
  Route$9 as R,
  catQuery as a,
  Route$8 as b,
  categoryName as c,
  articleQuery as d,
  router as e,
  homeQuery as h,
  resolveImage as r,
  timeAgo as t
};
