import {
  Tabs,
  TabsList,
  TabsTrigger,
  TabsContent,
} from "@/shared/common/ui/tabs";
import React from "react";

type RecordTab = "record" | "attachments";

interface RecordTabsWrapperProps {
  activeTab: RecordTab;
  setActiveTab: (tab: RecordTab) => void;
  children: React.ReactNode;
}

export const RecordTabsWrapper: React.FC<RecordTabsWrapperProps> = ({
  activeTab,
  setActiveTab,
  children,
}) => {
  return (
    <Tabs
      value={activeTab}
      onValueChange={(val) => setActiveTab(val as RecordTab)}
      className="w-full"
    >
      <TabsList className="grid grid-cols-2 w-[300px] mx-auto mb-6">
        <TabsTrigger value="record">Record</TabsTrigger>
        <TabsTrigger value="attachments">Attachments</TabsTrigger>
      </TabsList>
      {children}
    </Tabs>
  );
};
