import "../_runtime.mjs";
import { f as QueryClientProvider, h as require_react, m as require_jsx_runtime } from "../_libs/react+tanstack__react-query.mjs";
import "./src-u_N1opJl.mjs";
import { t as QueryClient } from "../_libs/tanstack__query-core.mjs";
import { n as trpc, t as getTrpcClient } from "./trpc-client-CQOIB5UU.mjs";
import { a as createRouter, b as redirect, c as createRootRoute, n as Scripts, o as lazyRouteComponent, r as HeadContent, s as createFileRoute } from "../_libs/@tanstack/react-router+[...].mjs";
import { t as AuthProvider } from "./auth-context-DzjwonUC.mjs";
import { t as Route$21 } from "./flash.order-success-Bs-Lyb2u.mjs";
import { t as Route$22 } from "./flash.product._id-ZKApXVIZ.mjs";
import { t as Route$23 } from "./home.order-success-ng0baB-e.mjs";
import { t as Route$24 } from "./home.product._id-B_8DxUhK.mjs";
import { t as Route$25 } from "./home.search-C7gKn8CW.mjs";
import { t as Route$26 } from "./me.orders._id-9KyXzQNP.mjs";
import { t as Route$27 } from "./stores._storeId-Dh-du4bI.mjs";
import { t as Route$28 } from "./stores._storeId.product._productId-D-wjnIdD.mjs";
import { t as ReactQueryDevtools2 } from "../_libs/tanstack__react-query-devtools.mjs";
require_react();
var import_jsx_runtime = require_jsx_runtime();
function getQueryClient() {
	return new QueryClient({ defaultOptions: { queries: {
		staleTime: 30 * 1e3,
		retry: 2,
		refetchOnWindowFocus: false
	} } });
}
var styles_default = "/assets/styles-DWsgI6YW.css";
var queryClient = getQueryClient();
var trpcClient = getTrpcClient();
var Route$20 = createRootRoute({
	head: () => ({
		meta: [
			{ charSet: "utf-8" },
			{
				name: "viewport",
				content: "width=device-width, initial-scale=1"
			},
			{ title: "Freshyo - Fresh Meat Delivery" }
		],
		links: [{
			rel: "stylesheet",
			href: styles_default
		}]
	}),
	shellComponent: RootDocument
});
function RootDocument({ 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: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryClientProvider, {
			client: queryClient,
			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(trpc.Provider, {
				client: trpcClient,
				queryClient,
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AuthProvider, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
					id: "app",
					children
				}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReactQueryDevtools2, {})] })
			})
		}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Scripts, {})] })]
	});
}
var $$splitComponentImporter$18 = () => import("./stores-CcccRdgP.mjs");
var Route$19 = createFileRoute("/stores")({ component: lazyRouteComponent($$splitComponentImporter$18, "component") });
var $$splitComponentImporter$17 = () => import("./register-dcmJe--5.mjs");
var Route$18 = createFileRoute("/register")({ component: lazyRouteComponent($$splitComponentImporter$17, "component") });
var $$splitComponentImporter$16 = () => import("./me-Dn8Tk_dJ.mjs");
var Route$17 = createFileRoute("/me")({ component: lazyRouteComponent($$splitComponentImporter$16, "component") });
var $$splitComponentImporter$15 = () => import("./login-QH2hpwxi.mjs");
var Route$16 = createFileRoute("/login")({ component: lazyRouteComponent($$splitComponentImporter$15, "component") });
var $$splitComponentImporter$14 = () => import("./home-BxXKVXbQ.mjs");
var Route$15 = createFileRoute("/home")({ component: lazyRouteComponent($$splitComponentImporter$14, "component") });
var $$splitComponentImporter$13 = () => import("./flash-CkaCI73Q.mjs");
var Route$14 = createFileRoute("/flash")({ component: lazyRouteComponent($$splitComponentImporter$13, "component") });
var $$splitComponentImporter$12 = () => import("./checkout-CaijlEpv.mjs");
var Route$13 = createFileRoute("/checkout")({ component: lazyRouteComponent($$splitComponentImporter$12, "component") });
var $$splitComponentImporter$11 = () => import("./cart-CHg5Ccyz.mjs");
var Route$12 = createFileRoute("/cart")({ component: lazyRouteComponent($$splitComponentImporter$11, "component") });
var Route$11 = createFileRoute("/")({ loader: () => {
	throw redirect({ to: "/home" });
} });
var $$splitComponentImporter$10 = () => import("./me.terms-BY5QWW0t.mjs");
var Route$10 = createFileRoute("/me/terms")({ component: lazyRouteComponent($$splitComponentImporter$10, "component") });
var $$splitComponentImporter$9 = () => import("./me.orders-CSqnUtwy.mjs");
var Route$9 = createFileRoute("/me/orders")({ component: lazyRouteComponent($$splitComponentImporter$9, "component") });
var $$splitComponentImporter$8 = () => import("./me.edit-profile-jHHMfrY4.mjs");
var Route$8 = createFileRoute("/me/edit-profile")({ component: lazyRouteComponent($$splitComponentImporter$8, "component") });
var $$splitComponentImporter$7 = () => import("./me.coupons-CK-hvcuK.mjs");
var Route$7 = createFileRoute("/me/coupons")({ component: lazyRouteComponent($$splitComponentImporter$7, "component") });
var $$splitComponentImporter$6 = () => import("./me.complaints-CUIcnKsp.mjs");
var Route$6 = createFileRoute("/me/complaints")({ component: lazyRouteComponent($$splitComponentImporter$6, "component") });
var $$splitComponentImporter$5 = () => import("./me.addresses-DS1Qf9Hh.mjs");
var Route$5 = createFileRoute("/me/addresses")({ component: lazyRouteComponent($$splitComponentImporter$5, "component") });
var $$splitComponentImporter$4 = () => import("./me.about-ig0mha9d.mjs");
var Route$4 = createFileRoute("/me/about")({ component: lazyRouteComponent($$splitComponentImporter$4, "component") });
var $$splitComponentImporter$3 = () => import("./home.checkout-o3MfvOFR.mjs");
var Route$3 = createFileRoute("/home/checkout")({ component: lazyRouteComponent($$splitComponentImporter$3, "component") });
var $$splitComponentImporter$2 = () => import("./home.cart-Bl_3HSf0.mjs");
var Route$2 = createFileRoute("/home/cart")({ component: lazyRouteComponent($$splitComponentImporter$2, "component") });
var $$splitComponentImporter$1 = () => import("./flash.checkout-D2UaQnns.mjs");
var Route$1 = createFileRoute("/flash/checkout")({ component: lazyRouteComponent($$splitComponentImporter$1, "component") });
var $$splitComponentImporter = () => import("./flash.cart-BCcvG5Yb.mjs");
var Route = createFileRoute("/flash/cart")({ component: lazyRouteComponent($$splitComponentImporter, "component") });
var StoresRoute = Route$19.update({
	id: "/stores",
	path: "/stores",
	getParentRoute: () => Route$20
});
var RegisterRoute = Route$18.update({
	id: "/register",
	path: "/register",
	getParentRoute: () => Route$20
});
var MeRoute = Route$17.update({
	id: "/me",
	path: "/me",
	getParentRoute: () => Route$20
});
var LoginRoute = Route$16.update({
	id: "/login",
	path: "/login",
	getParentRoute: () => Route$20
});
var HomeRoute = Route$15.update({
	id: "/home",
	path: "/home",
	getParentRoute: () => Route$20
});
var FlashRoute = Route$14.update({
	id: "/flash",
	path: "/flash",
	getParentRoute: () => Route$20
});
var CheckoutRoute = Route$13.update({
	id: "/checkout",
	path: "/checkout",
	getParentRoute: () => Route$20
});
var CartRoute = Route$12.update({
	id: "/cart",
	path: "/cart",
	getParentRoute: () => Route$20
});
var IndexRoute = Route$11.update({
	id: "/",
	path: "/",
	getParentRoute: () => Route$20
});
var StoresStoreIdRoute = Route$27.update({
	id: "/$storeId",
	path: "/$storeId",
	getParentRoute: () => StoresRoute
});
var MeTermsRoute = Route$10.update({
	id: "/terms",
	path: "/terms",
	getParentRoute: () => MeRoute
});
var MeOrdersRoute = Route$9.update({
	id: "/orders",
	path: "/orders",
	getParentRoute: () => MeRoute
});
var MeEditProfileRoute = Route$8.update({
	id: "/edit-profile",
	path: "/edit-profile",
	getParentRoute: () => MeRoute
});
var MeCouponsRoute = Route$7.update({
	id: "/coupons",
	path: "/coupons",
	getParentRoute: () => MeRoute
});
var MeComplaintsRoute = Route$6.update({
	id: "/complaints",
	path: "/complaints",
	getParentRoute: () => MeRoute
});
var MeAddressesRoute = Route$5.update({
	id: "/addresses",
	path: "/addresses",
	getParentRoute: () => MeRoute
});
var MeAboutRoute = Route$4.update({
	id: "/about",
	path: "/about",
	getParentRoute: () => MeRoute
});
var HomeSearchRoute = Route$25.update({
	id: "/search",
	path: "/search",
	getParentRoute: () => HomeRoute
});
var HomeOrderSuccessRoute = Route$23.update({
	id: "/order-success",
	path: "/order-success",
	getParentRoute: () => HomeRoute
});
var HomeCheckoutRoute = Route$3.update({
	id: "/checkout",
	path: "/checkout",
	getParentRoute: () => HomeRoute
});
var HomeCartRoute = Route$2.update({
	id: "/cart",
	path: "/cart",
	getParentRoute: () => HomeRoute
});
var FlashOrderSuccessRoute = Route$21.update({
	id: "/order-success",
	path: "/order-success",
	getParentRoute: () => FlashRoute
});
var FlashCheckoutRoute = Route$1.update({
	id: "/checkout",
	path: "/checkout",
	getParentRoute: () => FlashRoute
});
var FlashCartRoute = Route.update({
	id: "/cart",
	path: "/cart",
	getParentRoute: () => FlashRoute
});
var MeOrdersIdRoute = Route$26.update({
	id: "/$id",
	path: "/$id",
	getParentRoute: () => MeOrdersRoute
});
var HomeProductIdRoute = Route$24.update({
	id: "/product/$id",
	path: "/product/$id",
	getParentRoute: () => HomeRoute
});
var FlashProductIdRoute = Route$22.update({
	id: "/product/$id",
	path: "/product/$id",
	getParentRoute: () => FlashRoute
});
var StoresStoreIdProductProductIdRoute = Route$28.update({
	id: "/product/$productId",
	path: "/product/$productId",
	getParentRoute: () => StoresStoreIdRoute
});
var FlashRouteChildren = {
	FlashCartRoute,
	FlashCheckoutRoute,
	FlashOrderSuccessRoute,
	FlashProductIdRoute
};
var FlashRouteWithChildren = FlashRoute._addFileChildren(FlashRouteChildren);
var HomeRouteChildren = {
	HomeCartRoute,
	HomeCheckoutRoute,
	HomeOrderSuccessRoute,
	HomeSearchRoute,
	HomeProductIdRoute
};
var HomeRouteWithChildren = HomeRoute._addFileChildren(HomeRouteChildren);
var MeOrdersRouteChildren = { MeOrdersIdRoute };
var MeRouteChildren = {
	MeAboutRoute,
	MeAddressesRoute,
	MeComplaintsRoute,
	MeCouponsRoute,
	MeEditProfileRoute,
	MeOrdersRoute: MeOrdersRoute._addFileChildren(MeOrdersRouteChildren),
	MeTermsRoute
};
var MeRouteWithChildren = MeRoute._addFileChildren(MeRouteChildren);
var StoresStoreIdRouteChildren = { StoresStoreIdProductProductIdRoute };
var StoresRouteChildren = { StoresStoreIdRoute: StoresStoreIdRoute._addFileChildren(StoresStoreIdRouteChildren) };
var rootRouteChildren = {
	IndexRoute,
	CartRoute,
	CheckoutRoute,
	FlashRoute: FlashRouteWithChildren,
	HomeRoute: HomeRouteWithChildren,
	LoginRoute,
	MeRoute: MeRouteWithChildren,
	RegisterRoute,
	StoresRoute: StoresRoute._addFileChildren(StoresRouteChildren)
};
var routeTree = Route$20._addFileChildren(rootRouteChildren)._addFileTypes();
function getRouter() {
	return createRouter({
		routeTree,
		scrollRestoration: true,
		defaultPreload: "intent",
		defaultPreloadStaleTime: 0
	});
}
//#endregion
export { getRouter };
