"use client";

import React, { useState } from "react";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { WildberriesSuppliesTab } from "./wildberries-supplies-tab";
import { OzonSuppliesTab } from "./ozon-supplies-tab";

export function MarketplaceSuppliesTab() {
  const [activeSubTab, setActiveSubTab] = useState("wildberries");

  return (
    <div className="h-full">
      <Tabs
        value={activeSubTab}
        onValueChange={setActiveSubTab}
        className="w-full h-full flex flex-col"
      >
        {/* Подвкладки для Маркетплейсов */}
        <TabsList className="grid grid-cols-2 bg-white/5 backdrop-blur border-white/10 mb-4 w-fit">
          <TabsTrigger
            value="wildberries"
            className="data-[state=active]:bg-white/20 data-[state=active]:text-white text-white/60 px-6"
          >
            Поставки на Wildberries
          </TabsTrigger>
          <TabsTrigger
            value="ozon"
            className="data-[state=active]:bg-white/20 data-[state=active]:text-white text-white/60 px-6"
          >
            Поставки на Ozon
          </TabsTrigger>
        </TabsList>

        <TabsContent value="wildberries" className="mt-0 flex-1">
          <WildberriesSuppliesTab />
        </TabsContent>

        <TabsContent value="ozon" className="mt-0 flex-1">
          <OzonSuppliesTab />
        </TabsContent>
      </Tabs>
    </div>
  );
}
