'use client'

import { WildberriesWarehouseTab } from '@/components/wb-warehouse/wildberries-warehouse-tab'
import { useWBWarehouseData } from '@/hooks/useWBWarehouseData'

export default function SellerWarehouseWildberriesPage() {
  const warehouseData = useWBWarehouseData()

  return (
    <WildberriesWarehouseTab
      stocks={warehouseData.stocks}
      warehouses={warehouseData.warehouses}
      loading={warehouseData.loading}
      initialized={warehouseData.initialized}
      cacheLoading={warehouseData.cacheLoading}
      totalProducts={warehouseData.totalProducts}
      totalStocks={warehouseData.totalStocks}
      totalReserved={warehouseData.totalReserved}
      totalFromClient={warehouseData.totalFromClient}
      activeWarehouses={warehouseData.activeWarehouses}
      analyticsData={warehouseData.analyticsData}
      onRefresh={warehouseData.loadWarehouseDataFromAPI}
    />
  )
}
