+ {/* Header */}
+
+
Admin Panel
+
+
+
+ {/* Navigation Tabs */}
+
+ {[
+ { id: "products", label: "Товарлар", icon: Package },
+ { id: "categories", label: "Категорияlar", icon: FolderOpen },
+ { id: "orders", label: "Buyurtmalar", icon: ShoppingCart },
+ { id: "customers", label: "Мижозлар", icon: Users },
+ { id: "analytics", label: "Статистика", icon: TrendingUp },
+ ].map((tab) => {
+ const Icon = tab.icon;
+ return (
+
+ );
+ })}
+
+
+ {/* Content */}
+
+ {/* Products Tab */}
+ {currentTab === "products" && (
+
+
Махсулотларни Бошқариш
+
+ {/* Add Product Form */}
+
+
+ {/* Products List */}
+
+ {products.map((product) => (
+
+
+
{product.name}
+
+ Категория: {product.category} | Нарх: {product.price.toLocaleString()} so'm
+
+
+
+
+
+
+
+ ))}
+
+
+ )}
+
+ {/* Categories Tab */}
+ {currentTab === "categories" && (
+
+
Категорияларни Бошқариш
+
+ {/* Add Category Form */}
+
+
+ {/* Categories List */}
+
+ {categories.map((category) => (
+
+ {category.name}
+
+
+ ))}
+
+
+ )}
+
+ {/* Orders Tab */}
+ {currentTab === "orders" && (
+
+
Buyurtmаларни Бошқариш
+
+ {/* Orders List */}
+
+ {orders.map((order) => (
+
+
+
+
ID: {order.id}
+
{order.customerName}
+
+
+
+ {order.total.toLocaleString()} so'm
+
+
{order.date}
+
+
+
+ {[
+ "pending", "processing", "delivered", "cancelled"].map((status) => (
+
+ ))}
+
+
+ ))}
+
+
+ )}
+
+ {/* Customers Tab */}
+ {currentTab === "customers" && (
+
+
Мижозларни Кўриш
+
+ {/* Customers List */}
+
+ {customers.map((customer) => (
+
+
+
+
{customer.name}
+
{customer.email}
+
{customer.phone}
+
+
+
Buyurtmalar: {customer.orders}
+
+
+
+ ))}
+
+
+ )}
+
+ {/* Analytics Tab */}
+ {currentTab === "analytics" && (
+
+
+ Энг Йўқори Сотувчи Гуллар
+
+
+ {/* Top Selling Products */}
+
+ {topSellingProducts.map((product, index) => (
+
+
+
+ {index + 1}. {product.name}
+
+
+ {product.sales} сотув
+
+
+
+
+ ))}
+
+
+ {/* Summary Stats */}
+
+
+
Умумий Махсулотлар
+
{products.length}
+
+
+
Умумий Buyurtmalar
+
{orders.length}
+
+
+
Умумий Мижозлар
+
{customers.length}
+
+
+
Кўп Сотувчи Категория
+
Розалар
+
+
+
+ )}
+
+