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, u as Slot } from "../_libs/@radix-ui/react-checkbox+[...].mjs";
import { n as clsx, t as cva } from "../_libs/class-variance-authority+clsx.mjs";
import { t as twMerge } from "../_libs/tailwind-merge.mjs";
//#region node_modules/.nitro/vite/services/ssr/assets/categories-MJJjwt1u.js
var import_react = /* @__PURE__ */ __toESM(require_react());
var import_jsx_runtime = require_jsx_runtime();
var seedProducts = [
	{
		id: "fs0",
		name: "Samsung Galaxy A26 4G Smartphone",
		price: 144499,
		old: 18e4,
		disc: "-20%",
		seed: "fs0",
		category: "Phones & Tablets"
	},
	{
		id: "fs1",
		name: "HP 15.6 inches USB 4G Laptop",
		price: 419999,
		old: 5e5,
		disc: "-17%",
		seed: "fs1",
		category: "Computing"
	},
	{
		id: "fs2",
		name: "Sunking HomePlus Solar Kit",
		price: 73110,
		old: 9e4,
		disc: "-19%",
		seed: "fs2",
		category: "Electronics"
	},
	{
		id: "fs3",
		name: "Water Thermocool 3kg Washer",
		price: 216706,
		old: 26e4,
		disc: "-17%",
		seed: "fs3",
		category: "Appliances"
	},
	{
		id: "fs4",
		name: "Sunking 15\" Rechargeable Fan",
		price: 76721,
		old: 9e4,
		disc: "-15%",
		seed: "fs4",
		category: "Appliances"
	},
	{
		id: "fs5",
		name: "Ace 20000 mAh Power Bank",
		price: 7500,
		old: 1e4,
		disc: "-25%",
		seed: "fs5",
		category: "Mobile Accessories"
	},
	{
		id: "ts0",
		name: "Hithium 15kWh Power Station",
		price: 199999,
		old: 26e4,
		disc: "-22%",
		seed: "ts0",
		category: "Electronics"
	},
	{
		id: "ts1",
		name: "Royal 10\" QLED TV",
		price: 212e3,
		old: 25e4,
		disc: "-16%",
		seed: "ts1",
		category: "Electronics"
	},
	{
		id: "ts2",
		name: "Oraimo SpaceBuds 2 Pro",
		price: 12499,
		old: 2e4,
		disc: "-38%",
		seed: "ts2",
		category: "Mobile Accessories"
	},
	{
		id: "ts3",
		name: "Samsung Galaxy A26 Shell Case",
		price: 128991,
		old: 15e4,
		disc: "-14%",
		seed: "ts3",
		category: "Mobile Accessories"
	},
	{
		id: "ts4",
		name: "SunKit InfiKarn 2.5kva Inverter",
		price: 210244,
		old: 235e3,
		disc: "-11%",
		seed: "ts4",
		category: "Electronics"
	},
	{
		id: "ts5",
		name: "Martini Rossi Red Vermouth",
		price: 10890,
		old: 14500,
		disc: "-25%",
		seed: "ts5",
		category: "Groceries"
	}
];
var Ctx = (0, import_react.createContext)(null);
var KEY = "sulejamarket:v1";
var defaultTopBanners = [
	{
		id: "1",
		title: "Aircraft Deals",
		image: "https://picsum.photos/seed/tb0/120/120"
	},
	{
		id: "2",
		title: "Up to 70% Off",
		image: "https://picsum.photos/seed/tb1/120/120"
	},
	{
		id: "3",
		title: "New Ikon Deals",
		image: "https://picsum.photos/seed/tb2/120/120"
	},
	{
		id: "4",
		title: "Banger Deals",
		image: "https://picsum.photos/seed/tb3/120/120"
	},
	{
		id: "5",
		title: "Up to 50% Off",
		image: "https://picsum.photos/seed/tb4/120/120"
	},
	{
		id: "6",
		title: "Shoes on a Budget",
		image: "https://picsum.photos/seed/tb5/120/120"
	},
	{
		id: "7",
		title: "Rs.100 Store",
		image: "https://picsum.photos/seed/tb6/120/120"
	},
	{
		id: "8",
		title: "Groceries",
		image: "https://picsum.photos/seed/tb7/120/120"
	}
];
var defaultHeroBanners = [
	{
		id: "h1",
		image: "https://images.unsplash.com/photo-1607082348824-0a96f2a4b9da?w=1200&h=500&fit=crop"
	},
	{
		id: "h2",
		image: "https://images.unsplash.com/photo-1607082349566-187342175e2f?w=1200&h=500&fit=crop"
	},
	{
		id: "h3",
		image: "https://images.unsplash.com/photo-1472851294608-062f824d29cc?w=1200&h=500&fit=crop"
	},
	{
		id: "h4",
		image: "https://images.unsplash.com/photo-1542291026-7eec264c27ff?w=1200&h=500&fit=crop"
	},
	{
		id: "h5",
		image: "https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=1200&h=500&fit=crop"
	},
	{
		id: "h6",
		image: "https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=1200&h=500&fit=crop"
	}
];
var empty = {
	user: null,
	addresses: [],
	vendorProducts: [],
	orders: [],
	cart: [],
	vendors: [],
	withdrawals: [],
	paystackKey: "pk_test_fb0f7e3d7cbbf0141e7410e773cfaaec88769605",
	topBanners: defaultTopBanners,
	heroBanners: defaultHeroBanners,
	notifications: []
};
var nextStatus = {
	placed: "processing",
	processing: "shipped",
	shipped: "out_for_delivery",
	out_for_delivery: "delivered",
	delivered: null
};
function StoreProvider({ children }) {
	const [state, setState] = (0, import_react.useState)(empty);
	const [hydrated, setHydrated] = (0, import_react.useState)(false);
	(0, import_react.useEffect)(() => {
		let localOrders = [];
		try {
			const raw = localStorage.getItem(KEY);
			if (raw) {
				const parsed = JSON.parse(raw);
				localOrders = parsed.orders || [];
				setState((s) => ({
					...s,
					cart: parsed.cart || [],
					user: parsed.user || null,
					addresses: parsed.addresses || [],
					orders: localOrders
				}));
			}
		} catch {}
		Promise.all([fetch("/api/store.php").then((r) => r.json()), fetch("/api/orders.php").then((r) => r.json())]).then(([data, ordersData]) => {
			const fetchedOrders = Array.isArray(ordersData) ? ordersData : [];
			setState((s) => {
				const mergedOrders = [...fetchedOrders];
				for (const locOrd of localOrders) {
					const idx = mergedOrders.findIndex((o) => o.id === locOrd.id);
					if (idx >= 0) {
						if (locOrd.driverPhone && (!mergedOrders[idx].driverPhone || mergedOrders[idx].driverPhone !== locOrd.driverPhone)) mergedOrders[idx] = {
							...mergedOrders[idx],
							driverPhone: locOrd.driverPhone
						};
					} else mergedOrders.push(locOrd);
				}
				return {
					...s,
					vendors: data.vendors || [],
					vendorProducts: data.products || [],
					heroBanners: data.heroBanners || defaultHeroBanners,
					topBanners: data.topBanners || defaultTopBanners,
					orders: mergedOrders
				};
			});
		}).catch((e) => console.error("Failed to load store from API", e)).finally(() => setHydrated(true));
	}, []);
	(0, import_react.useEffect)(() => {
		if (!hydrated) return;
		try {
			const { cart, user, addresses, orders } = state;
			localStorage.setItem(KEY, JSON.stringify({
				cart,
				user,
				addresses,
				orders
			}));
		} catch {}
	}, [
		state.cart,
		state.user,
		state.addresses,
		state.orders,
		hydrated
	]);
	const value = {
		...state,
		hydrated,
		signIn: (email, name) => setState((s) => ({
			...s,
			user: s.user ? {
				...s.user,
				email,
				name: name || s.user.name
			} : {
				email,
				name: name || email.split("@")[0],
				role: "customer"
			}
		})),
		signOut: () => setState((s) => ({
			...s,
			user: null
		})),
		applyVendor: (profile) => setState((s) => {
			const id = `vnd_${Date.now()}`;
			let baseSlug = profile.businessName.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
			if (!baseSlug) baseSlug = "store";
			let slug = baseSlug;
			let counter = 1;
			while (s.vendors.some((v) => v.storeSlug === slug)) slug = `${baseSlug}-${counter++}`;
			const newVendor = {
				...profile,
				id,
				status: "pending",
				appliedAt: Date.now(),
				storeSlug: slug
			};
			fetch("/api/vendors.php?action=apply", {
				method: "POST",
				headers: { "Content-Type": "application/json" },
				body: JSON.stringify(newVendor)
			});
			return {
				...s,
				vendors: [...s.vendors, newVendor],
				user: s.user && s.user.email === profile.contactEmail ? {
					...s.user,
					role: "pending_vendor"
				} : s.user
			};
		}),
		adminApproveVendor: (id) => setState((s) => {
			const vendor = s.vendors.find((v) => v.id === id);
			if (!vendor) return s;
			const updatedVendors = s.vendors.map((v) => v.id === id ? {
				...v,
				status: "approved"
			} : v);
			const updatedUser = s.user && s.user.email === vendor.contactEmail ? {
				...s.user,
				role: "vendor"
			} : s.user;
			fetch("/api/vendors.php?action=approve", {
				method: "POST",
				headers: { "Content-Type": "application/json" },
				body: JSON.stringify({ id })
			});
			return {
				...s,
				vendors: updatedVendors,
				user: updatedUser
			};
		}),
		verifyVendor: (id) => setState((s) => {
			const updatedVendors = s.vendors.map((v) => v.id === id ? {
				...v,
				is_verified: true
			} : v);
			fetch("/api/vendors.php?action=verify", {
				method: "POST",
				headers: { "Content-Type": "application/json" },
				body: JSON.stringify({ id })
			});
			return {
				...s,
				vendors: updatedVendors
			};
		}),
		adminEditVendor: (id, updates) => setState((s) => ({
			...s,
			vendors: s.vendors.map((v) => v.id === id ? {
				...v,
				...updates
			} : v)
		})),
		editVendorProfile: (id, updates) => setState((s) => {
			const updatedVendors = s.vendors.map((v) => v.id === id ? {
				...v,
				...updates
			} : v);
			fetch("/api/vendors.php?action=edit_profile", {
				method: "POST",
				headers: { "Content-Type": "application/json" },
				body: JSON.stringify({
					id,
					...updates
				})
			});
			return {
				...s,
				vendors: updatedVendors
			};
		}),
		adminDeleteVendor: (id) => setState((s) => {
			const vendor = s.vendors.find((v) => v.id === id);
			if (!vendor) return s;
			const updatedVendors = s.vendors.filter((v) => v.id !== id);
			const updatedUser = s.user && s.user.email === vendor.contactEmail ? {
				...s.user,
				role: "customer"
			} : s.user;
			fetch("/api/vendors.php?action=delete", {
				method: "POST",
				headers: { "Content-Type": "application/json" },
				body: JSON.stringify({ id })
			});
			return {
				...s,
				vendors: updatedVendors,
				user: updatedUser
			};
		}),
		addAddress: (a) => {
			const addr = {
				...a,
				id: `addr_${Date.now()}`
			};
			setState((s) => ({
				...s,
				addresses: [...s.addresses, addr]
			}));
			return addr;
		},
		removeAddress: (id) => setState((s) => ({
			...s,
			addresses: s.addresses.filter((x) => x.id !== id)
		})),
		addProduct: async (p) => {
			const optimisticId = `vp_${Date.now()}`;
			const optimisticProduct = {
				...p,
				id: optimisticId,
				seed: optimisticId,
				vendorEmail: state.user?.email
			};
			setState((s) => ({
				...s,
				vendorProducts: [...s.vendorProducts, optimisticProduct]
			}));
			try {
				const data = await (await fetch("/api/products.php?action=add", {
					method: "POST",
					headers: { "Content-Type": "application/json" },
					body: JSON.stringify(optimisticProduct)
				})).json();
				if (data.success && data.id) setState((s) => ({
					...s,
					vendorProducts: s.vendorProducts.map((prod) => prod.id === optimisticId ? {
						...prod,
						id: data.id,
						seed: data.id
					} : prod)
				}));
			} catch (err) {
				console.error("Failed to sync new product:", err);
			}
		},
		editProduct: (id, updates) => {
			setState((s) => ({
				...s,
				vendorProducts: s.vendorProducts.map((p) => p.id === id ? {
					...p,
					...updates
				} : p)
			}));
			const product = state.vendorProducts.find((p) => p.id === id);
			if (product) fetch("/api/products.php?action=edit", {
				method: "POST",
				headers: { "Content-Type": "application/json" },
				body: JSON.stringify({
					...product,
					...updates
				})
			});
		},
		removeProduct: (id) => {
			fetch("/api/products.php?action=delete", {
				method: "POST",
				headers: { "Content-Type": "application/json" },
				body: JSON.stringify({ id })
			});
			setState((s) => ({
				...s,
				vendorProducts: s.vendorProducts.filter((x) => x.id !== id)
			}));
		},
		addToCart: (item) => setState((s) => {
			const found = s.cart.find((x) => x.id === item.id);
			return {
				...s,
				cart: found ? s.cart.map((x) => x.id === item.id ? {
					...x,
					qty: x.qty + 1
				} : x) : [...s.cart, {
					...item,
					qty: 1
				}]
			};
		}),
		updateQty: (id, delta) => setState((s) => ({
			...s,
			cart: s.cart.map((x) => x.id === id ? {
				...x,
				qty: Math.max(0, x.qty + delta)
			} : x).filter((x) => x.qty > 0)
		})),
		removeItem: (id) => setState((s) => ({
			...s,
			cart: s.cart.filter((x) => x.id !== id)
		})),
		clearCart: () => setState((s) => ({
			...s,
			cart: []
		})),
		placeOrder: (o) => {
			const id = `ORD-${Date.now().toString(36).toUpperCase()}`;
			const now = Date.now();
			const order = {
				...o,
				id,
				status: "placed",
				history: [{
					status: "placed",
					at: now
				}],
				createdAt: now
			};
			fetch("/api/orders.php?action=place", {
				method: "POST",
				headers: { "Content-Type": "application/json" },
				body: JSON.stringify(order)
			});
			setState((s) => ({
				...s,
				orders: [order, ...s.orders]
			}));
			return order;
		},
		advanceOrder: (id) => {
			fetch("/api/orders.php?action=advance", {
				method: "POST",
				headers: { "Content-Type": "application/json" },
				body: JSON.stringify({ id })
			});
			setState((s) => ({
				...s,
				orders: s.orders.map((o) => {
					if (o.id !== id) return o;
					const nx = nextStatus[o.status];
					if (!nx) return o;
					return {
						...o,
						status: nx,
						history: [...o.history, {
							status: nx,
							at: Date.now()
						}]
					};
				})
			}));
		},
		setOrderStatus: (id, status) => {
			fetch("/api/orders.php?action=update_status", {
				method: "POST",
				headers: { "Content-Type": "application/json" },
				body: JSON.stringify({
					id,
					status
				})
			});
			setState((s) => ({
				...s,
				orders: s.orders.map((o) => {
					if (o.id !== id || o.status === status) return o;
					return {
						...o,
						status,
						history: [...o.history, {
							status,
							at: Date.now()
						}]
					};
				})
			}));
		},
		updateOrderDriverPhone: (id, driverPhone) => {
			fetch("/api/orders.php?action=update_driver_phone", {
				method: "POST",
				headers: { "Content-Type": "application/json" },
				body: JSON.stringify({
					id,
					driverPhone
				})
			});
			setState((s) => ({
				...s,
				orders: s.orders.map((o) => o.id === id ? {
					...o,
					driverPhone
				} : o)
			}));
		},
		getAllProducts: () => {
			return [...state.vendorProducts.length > 0 ? state.vendorProducts : seedProducts].sort((a, b) => {
				const aFeatured = a.is_featured ? 2 : 0;
				const bFeatured = b.is_featured ? 2 : 0;
				const aVerified = state.vendors.find((v) => v.contactEmail === a.vendorEmail)?.is_verified ? 1 : 0;
				return bFeatured + (state.vendors.find((v) => v.contactEmail === b.vendorEmail)?.is_verified ? 1 : 0) - (aFeatured + aVerified);
			});
		},
		setPaystackKey: (k) => setState((s) => ({
			...s,
			paystackKey: k
		})),
		setTopBanners: (b) => {
			setState((s) => ({
				...s,
				topBanners: b
			}));
			fetch("/api/banners.php?type=top", {
				method: "POST",
				headers: { "Content-Type": "application/json" },
				body: JSON.stringify(b)
			});
		},
		setHeroBanners: (b) => {
			setState((s) => ({
				...s,
				heroBanners: b
			}));
			fetch("/api/banners.php?type=hero", {
				method: "POST",
				headers: { "Content-Type": "application/json" },
				body: JSON.stringify(b)
			});
		},
		fetchWithdrawals: async (vendorEmail) => {
			const url = vendorEmail ? `/api/withdraw.php?vendorEmail=${encodeURIComponent(vendorEmail)}` : "/api/withdraw.php";
			try {
				const data = await (await fetch(url)).json();
				if (Array.isArray(data)) setState((s) => ({
					...s,
					withdrawals: data
				}));
			} catch (e) {}
		},
		requestWithdrawal: async (vendorEmail, amount) => {
			try {
				const data = await (await fetch("/api/withdraw.php?action=request", {
					method: "POST",
					headers: { "Content-Type": "application/json" },
					body: JSON.stringify({
						vendorEmail,
						amount
					})
				})).json();
				if (data.success) {
					setState((s) => ({
						...s,
						vendors: s.vendors.map((v) => v.contactEmail === vendorEmail ? {
							...v,
							wallet_balance: (v.wallet_balance || 0) - amount
						} : v)
					}));
					return { success: true };
				}
				return {
					success: false,
					error: data.error
				};
			} catch (e) {
				return {
					success: false,
					error: e.message
				};
			}
		},
		adminUpdateWithdrawal: async (id, action) => {
			try {
				const data = await (await fetch(`/api/withdraw.php?action=${action}`, {
					method: "POST",
					headers: { "Content-Type": "application/json" },
					body: JSON.stringify({ id })
				})).json();
				if (data.success) {
					setState((s) => ({
						...s,
						withdrawals: s.withdrawals.map((w) => w.id === id ? {
							...w,
							status: action === "approve" ? "approved" : "rejected"
						} : w)
					}));
					return { success: true };
				}
				return {
					success: false,
					error: data.error
				};
			} catch (e) {
				return {
					success: false,
					error: e.message
				};
			}
		},
		fetchNotifications: async (email) => {
			try {
				const targetEmail = email || state.user?.email || "";
				const role = state.user?.role || "customer";
				const url = targetEmail ? `/api/notifications.php?email=${encodeURIComponent(targetEmail)}` : `/api/notifications.php?role=${encodeURIComponent(role)}`;
				const data = await (await fetch(url)).json();
				if (Array.isArray(data)) setState((s) => ({
					...s,
					notifications: data
				}));
			} catch (e) {}
		},
		markNotificationRead: async (id) => {
			try {
				await fetch("/api/notifications.php?action=mark_read", {
					method: "POST",
					headers: { "Content-Type": "application/json" },
					body: JSON.stringify({ id })
				});
				setState((s) => ({
					...s,
					notifications: s.notifications.map((n) => n.id === id ? {
						...n,
						is_read: true
					} : n)
				}));
			} catch (e) {}
		},
		markAllNotificationsRead: async (email) => {
			try {
				await fetch("/api/notifications.php?action=mark_all_read", {
					method: "POST",
					headers: { "Content-Type": "application/json" },
					body: JSON.stringify({ email })
				});
				setState((s) => ({
					...s,
					notifications: s.notifications.map((n) => ({
						...n,
						is_read: true
					}))
				}));
			} catch (e) {}
		},
		fetchLoyaltyData: async (vendorEmail) => {
			try {
				const data = await (await fetch(`/api/loyalty.php?vendorEmail=${encodeURIComponent(vendorEmail)}`)).json();
				if (data.loyalty_coins !== void 0) {
					setState((s) => ({
						...s,
						vendors: s.vendors.map((v) => v.contactEmail === vendorEmail ? {
							...v,
							loyalty_coins: data.loyalty_coins
						} : v)
					}));
					return {
						loyalty_coins: data.loyalty_coins,
						transactions: data.transactions || []
					};
				}
			} catch (e) {}
			return {
				loyalty_coins: 0,
				transactions: []
			};
		},
		featureProductWithLoyalty: async (vendorEmail, productId) => {
			try {
				const data = await (await fetch("/api/loyalty.php?action=feature_product", {
					method: "POST",
					headers: { "Content-Type": "application/json" },
					body: JSON.stringify({
						vendorEmail,
						productId
					})
				})).json();
				if (data.success) {
					setState((s) => ({
						...s,
						vendors: s.vendors.map((v) => v.contactEmail === vendorEmail ? {
							...v,
							loyalty_coins: data.loyalty_coins
						} : v),
						vendorProducts: s.vendorProducts.map((p) => p.id === productId ? {
							...p,
							is_featured: true,
							is_top: true
						} : p)
					}));
					return { success: true };
				}
				return {
					success: false,
					error: data.error
				};
			} catch (e) {
				return {
					success: false,
					error: e.message
				};
			}
		}
	};
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Ctx.Provider, {
		value,
		children
	});
}
function useStore() {
	const v = (0, import_react.useContext)(Ctx);
	if (!v) throw new Error("useStore must be used within StoreProvider");
	return v;
}
function fmt(n) {
	return n.toLocaleString("en-NG");
}
var statusLabel = {
	placed: "Order placed",
	processing: "Processing",
	shipped: "Shipped",
	out_for_delivery: "Out for delivery",
	delivered: "Delivered"
};
function cn(...inputs) {
	return twMerge(clsx(inputs));
}
var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
	variants: {
		variant: {
			default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
			destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
			outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
			secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
			ghost: "hover:bg-accent hover:text-accent-foreground",
			link: "text-primary underline-offset-4 hover:underline"
		},
		size: {
			default: "h-9 px-4 py-2",
			sm: "h-8 rounded-md px-3 text-xs",
			lg: "h-10 rounded-md px-8",
			icon: "h-9 w-9"
		}
	},
	defaultVariants: {
		variant: "default",
		size: "default"
	}
});
var Button = import_react.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(asChild ? Slot : "button", {
		className: cn(buttonVariants({
			variant,
			size,
			className
		})),
		ref,
		...props
	});
});
Button.displayName = "Button";
var Input = import_react.forwardRef(({ className, type, ...props }, ref) => {
	return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
		type,
		className: cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
		ref,
		...props
	});
});
Input.displayName = "Input";
var CATEGORIES = [
	"Official Store",
	"Appliances",
	"Phones & Tablets",
	"Health & Beauty",
	"Electronics",
	"Home & Office",
	"Fashion",
	"Supermarket",
	"Computing",
	"Baby Products",
	"Gaming",
	"Other categories"
];
function slugify(name) {
	return name.toLowerCase().replace(/&/g, "and").replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
}
function findCategoryBySlug(slug) {
	return CATEGORIES.find((c) => slugify(c) === slug);
}
var RELATED = {
	"Official Store": [
		"Phones & Tablets",
		"Electronics",
		"Computing"
	],
	"Appliances": ["Appliances"],
	"Phones & Tablets": ["Phones & Tablets", "Mobile Accessories"],
	"Health & Beauty": ["Health & Beauty"],
	"Electronics": ["Electronics"],
	"Home & Office": ["Home & Office", "Appliances"],
	"Fashion": ["Fashion"],
	"Supermarket": ["Groceries", "Supermarket"],
	"Computing": ["Computing", "Mobile Accessories"],
	"Baby Products": ["Baby Products"],
	"Gaming": ["Gaming", "Electronics"],
	"Other categories": []
};
function relatedCategories(name) {
	return RELATED[name] ?? [name];
}
//#endregion
export { cn as a, relatedCategories as c, statusLabel as d, useStore as f, StoreProvider as i, seedProducts as l, CATEGORIES as n, findCategoryBySlug as o, Input as r, fmt as s, Button as t, slugify as u };
