"use client";

import * as React from "react";
import { Separator } from "@/components/ui/separator";
import { ConfirmedMaterialsTable } from "./confirmed-materials-table";
import { VendorInputMaterialsTable } from "./vendor-input-materials-table";
import { VendorMaterialsResult } from "../vendor-possible-material-service";

interface VendorMaterialsClientProps {
  vendorId: number;
  confirmedMaterials: VendorMaterialsResult;
  vendorInputMaterials: VendorMaterialsResult;
}

export function VendorMaterialsClient({
  vendorId,
  confirmedMaterials,
  vendorInputMaterials,
}: VendorMaterialsClientProps) {
  return (
    <div className="space-y-8">
      {/* 확정정보 테이블 */}
      <ConfirmedMaterialsTable
        vendorId={vendorId}
        data={confirmedMaterials.data}
        pageCount={confirmedMaterials.pageCount}
      />

      <Separator />

      {/* 업체입력정보 테이블 */}
      <VendorInputMaterialsTable
        vendorId={vendorId}
        data={vendorInputMaterials.data}
        pageCount={vendorInputMaterials.pageCount}
      />
    </div>
  );
}
