import { n as __toESM } from "../_runtime.mjs";
import { u as require_react } from "../_libs/@floating-ui/react-dom+[...].mjs";
import { p as require_jsx_runtime } from "../_libs/@radix-ui/react-checkbox+[...].mjs";
import { i as StoreProvider } from "./categories-MJJjwt1u.mjs";
import { c as HeadContent, d as Outlet, f as lazyRouteComponent, h as Link, m as createRootRouteWithContext, p as createFileRoute, s as Scripts, u as createRouter, v as useRouter } from "../_libs/@tanstack/react-router+[...].mjs";
import { t as Route$15 } from "../_storeSlug-CfTiHJfP.mjs";
import { t as Toaster } from "../_libs/sonner.mjs";
import { t as Route$16 } from "./admin_.vendors._id-t0Q87Vo2.mjs";
import { t as Route$17 } from "./category._slug-BqzvrAFK.mjs";
import { t as Route$18 } from "./product._id-e7c1iT8u.mjs";
import { t as TawkChatWidget } from "./TawkChatWidget-42R2rSeG.mjs";
import { t as QueryClient } from "../_libs/tanstack__query-core.mjs";
import { t as QueryClientProvider } from "../_libs/tanstack__react-query.mjs";
//#region node_modules/.nitro/vite/services/ssr/assets/router-CuYoNrKx.js
var import_react = /* @__PURE__ */ __toESM(require_react());
var import_jsx_runtime = require_jsx_runtime();
var styles_default = "/assets/styles-Czh6rNdg.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"
	});
}
var Toaster$1 = ({ ...props }) => {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Toaster, {
		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__ */ (0, import_jsx_runtime.jsx)("div", {
		className: "flex min-h-screen items-center justify-center bg-background px-4",
		children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
			className: "max-w-md text-center",
			children: [
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
					className: "text-7xl font-bold text-foreground",
					children: "404"
				}),
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
					className: "mt-4 text-xl font-semibold text-foreground",
					children: "Page not found"
				}),
				/* @__PURE__ */ (0, import_jsx_runtime.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__ */ (0, import_jsx_runtime.jsx)("div", {
					className: "mt-6",
					children: /* @__PURE__ */ (0, import_jsx_runtime.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 router = useRouter();
	(0, import_react.useEffect)(() => {
		reportLovableError(error, { boundary: "tanstack_root_error_component" });
	}, [error]);
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
		className: "flex min-h-screen items-center justify-center bg-background px-4",
		children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
			className: "max-w-md text-center",
			children: [
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
					className: "text-xl font-semibold tracking-tight text-foreground",
					children: "This page didn't load"
				}),
				/* @__PURE__ */ (0, import_jsx_runtime.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__ */ (0, import_jsx_runtime.jsxs)("div", {
					className: "mt-6 flex flex-wrap justify-center gap-2",
					children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
						onClick: () => {
							router.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__ */ (0, import_jsx_runtime.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"
					})]
				})
			]
		})
	});
}
var Route$14 = createRootRouteWithContext()({
	head: () => ({
		meta: [
			{ charSet: "utf-8" },
			{
				name: "viewport",
				content: "width=device-width, initial-scale=1"
			},
			{ title: "SulejaMarket — E-Commerce Marketplace" },
			{
				name: "description",
				content: "SulejaMarket E-Commerce Platform"
			}
		],
		links: [{
			rel: "stylesheet",
			href: styles_default
		}, {
			rel: "icon",
			href: "/favicon.ico",
			type: "image/x-icon"
		}]
	}),
	shellComponent: RootShell,
	component: RootComponent,
	notFoundComponent: NotFoundComponent,
	errorComponent: ErrorComponent
});
function RootShell({ children }) {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("html", {
		lang: "en",
		children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("head", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HeadContent, {}) }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("body", { children: [children, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Scripts, {})] })]
	});
}
function RootComponent() {
	const { queryClient } = Route$14.useRouteContext();
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryClientProvider, {
		client: queryClient,
		children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(StoreProvider, { children: [
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Outlet, {}),
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Toaster$1, {}),
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TawkChatWidget, { channel: "admin-buyer" })
		] })
	});
}
var $$splitComponentImporter$13 = () => import("./routes-DES7Uyz-.mjs");
var Route$13 = createFileRoute("/")({
	head: () => ({ meta: [
		{ title: "SulejaMarket — Online Shopping for Electronics, Fashion & More" },
		{
			name: "description",
			content: "Shop the best deals on phones, electronics, fashion, groceries and more. Flash sales daily."
		},
		{
			property: "og:title",
			content: "SulejaMarket — Online Shopping"
		},
		{
			property: "og:description",
			content: "Flash sales, top sellers and limited stock deals up to 70% off."
		}
	] }),
	component: lazyRouteComponent($$splitComponentImporter$13, "component")
});
var $$splitComponentImporter$12 = () => import("./about-Cijpqp8I.mjs");
var Route$12 = createFileRoute("/about")({
	head: () => ({ meta: [{ title: "About Us — SulejaMarket" }] }),
	component: lazyRouteComponent($$splitComponentImporter$12, "component")
});
var $$splitComponentImporter$11 = () => import("./admin-u9VsuHe2.mjs");
var Route$11 = createFileRoute("/admin")({
	head: () => ({ meta: [{ title: "Admin — Dashboard • SulejaMarket" }, {
		name: "description",
		content: "Manage orders and vendors."
	}] }),
	component: lazyRouteComponent($$splitComponentImporter$11, "component")
});
var $$splitComponentImporter$10 = () => import("./careers-Cmi_6mVx.mjs");
var Route$10 = createFileRoute("/careers")({
	head: () => ({ meta: [{ title: "Careers — SulejaMarket" }] }),
	component: lazyRouteComponent($$splitComponentImporter$10, "component")
});
var $$splitComponentImporter$9 = () => import("./contact-DC_2gWlv.mjs");
var Route$9 = createFileRoute("/contact")({
	head: () => ({ meta: [
		{ title: "Contact Us — SulejaMarket" },
		{
			name: "description",
			content: "Get in touch with SulejaMarket support. We're here to help with orders, returns, and vendor inquiries."
		},
		{
			property: "og:title",
			content: "Contact SulejaMarket"
		},
		{
			property: "og:description",
			content: "Reach our support team by phone, email, or the contact form."
		}
	] }),
	component: lazyRouteComponent($$splitComponentImporter$9, "component")
});
var $$splitComponentImporter$8 = () => import("./faq-D9Y78C7q.mjs");
var Route$8 = createFileRoute("/faq")({
	head: () => ({ meta: [{ title: "FAQs — SulejaMarket" }] }),
	component: lazyRouteComponent($$splitComponentImporter$8, "component")
});
var $$splitComponentImporter$7 = () => import("./press-CQn5WMsc.mjs");
var Route$7 = createFileRoute("/press")({
	head: () => ({ meta: [{ title: "Press — SulejaMarket" }] }),
	component: lazyRouteComponent($$splitComponentImporter$7, "component")
});
var $$splitComponentImporter$6 = () => import("./profile-DskEt5fR.mjs");
var Route$6 = createFileRoute("/profile")({
	head: () => ({ meta: [{ title: "My Account — SulejaMarket" }, {
		name: "description",
		content: "Manage your addresses and view your purchase history."
	}] }),
	component: lazyRouteComponent($$splitComponentImporter$6, "component")
});
var $$splitComponentImporter$5 = () => import("./returns-CLwRCZhg.mjs");
var Route$5 = createFileRoute("/returns")({
	head: () => ({ meta: [{ title: "Returns & Refunds — SulejaMarket" }] }),
	component: lazyRouteComponent($$splitComponentImporter$5, "component")
});
var $$splitComponentImporter$4 = () => import("./shipping-wkUeXOSK.mjs");
var Route$4 = createFileRoute("/shipping")({
	head: () => ({ meta: [{ title: "Shipping Info — SulejaMarket" }] }),
	component: lazyRouteComponent($$splitComponentImporter$4, "component")
});
var $$splitComponentImporter$3 = () => import("./track-order-CtjZGxTK.mjs");
var Route$3 = createFileRoute("/track-order")({
	head: () => ({ meta: [{ title: "Track Order — SulejaMarket Live Map Tracking" }] }),
	component: lazyRouteComponent($$splitComponentImporter$3, "component")
});
var $$splitComponentImporter$2 = () => import("./vendor-DWQ7Zfwj.mjs");
var Route$2 = createFileRoute("/vendor")({
	head: () => ({ meta: [{ title: "Vendor Dashboard — SulejaMarket" }, {
		name: "description",
		content: "Manage your SulejaMarket storefront and product listings."
	}] }),
	component: lazyRouteComponent($$splitComponentImporter$2, "component")
});
var $$splitComponentImporter$1 = () => import("./admin._id-CEhC4f5V.mjs");
var Route$1 = createFileRoute("/admin/$id")({
	head: () => ({ meta: [{ title: "Admin — Order detail • SulejaMarket" }, {
		name: "description",
		content: "Review order items, totals, customer and shipping details before updating status."
	}] }),
	component: lazyRouteComponent($$splitComponentImporter$1, "component")
});
var $$splitComponentImporter = () => import("./orders._id-BIVLL6TB.mjs");
var Route = createFileRoute("/orders/$id")({
	head: () => ({ meta: [{ title: "Order tracking — SulejaMarket" }, {
		name: "description",
		content: "Track your order status in real time with live map GPS."
	}] }),
	component: lazyRouteComponent($$splitComponentImporter, "component")
});
var IndexRoute = Route$13.update({
	id: "/",
	path: "/",
	getParentRoute: () => Route$14
});
var StoreSlugRoute = Route$15.update({
	id: "/$storeSlug",
	path: "/$storeSlug",
	getParentRoute: () => Route$14
});
var AboutRoute = Route$12.update({
	id: "/about",
	path: "/about",
	getParentRoute: () => Route$14
});
var AdminRoute = Route$11.update({
	id: "/admin",
	path: "/admin",
	getParentRoute: () => Route$14
});
var CareersRoute = Route$10.update({
	id: "/careers",
	path: "/careers",
	getParentRoute: () => Route$14
});
var ContactRoute = Route$9.update({
	id: "/contact",
	path: "/contact",
	getParentRoute: () => Route$14
});
var FaqRoute = Route$8.update({
	id: "/faq",
	path: "/faq",
	getParentRoute: () => Route$14
});
var PressRoute = Route$7.update({
	id: "/press",
	path: "/press",
	getParentRoute: () => Route$14
});
var ProfileRoute = Route$6.update({
	id: "/profile",
	path: "/profile",
	getParentRoute: () => Route$14
});
var ReturnsRoute = Route$5.update({
	id: "/returns",
	path: "/returns",
	getParentRoute: () => Route$14
});
var ShippingRoute = Route$4.update({
	id: "/shipping",
	path: "/shipping",
	getParentRoute: () => Route$14
});
var TrackOrderRoute = Route$3.update({
	id: "/track-order",
	path: "/track-order",
	getParentRoute: () => Route$14
});
var VendorRoute = Route$2.update({
	id: "/vendor",
	path: "/vendor",
	getParentRoute: () => Route$14
});
var AdminIdRoute = Route$1.update({
	id: "/$id",
	path: "/$id",
	getParentRoute: () => AdminRoute
});
var CategorySlugRoute = Route$17.update({
	id: "/category/$slug",
	path: "/category/$slug",
	getParentRoute: () => Route$14
});
var OrdersIdRoute = Route.update({
	id: "/orders/$id",
	path: "/orders/$id",
	getParentRoute: () => Route$14
});
var ProductIdRoute = Route$18.update({
	id: "/product/$id",
	path: "/product/$id",
	getParentRoute: () => Route$14
});
var AdminVendorsIdRoute = Route$16.update({
	id: "/admin_/vendors/$id",
	path: "/admin/vendors/$id",
	getParentRoute: () => Route$14
});
var AdminRouteChildren = { AdminIdRoute };
var rootRouteChildren = {
	IndexRoute,
	StoreSlugRoute,
	AboutRoute,
	AdminRoute: AdminRoute._addFileChildren(AdminRouteChildren),
	CareersRoute,
	ContactRoute,
	FaqRoute,
	PressRoute,
	ProfileRoute,
	ReturnsRoute,
	ShippingRoute,
	TrackOrderRoute,
	VendorRoute,
	CategorySlugRoute,
	OrdersIdRoute,
	ProductIdRoute,
	AdminVendorsIdRoute
};
var routeTree = Route$14._addFileChildren(rootRouteChildren)._addFileTypes();
var getRouter = () => {
	return createRouter({
		routeTree,
		context: { queryClient: new QueryClient() },
		scrollRestoration: true,
		defaultPreloadStaleTime: 0
	});
};
//#endregion
export { getRouter };
