"use client"

import * as React from "react"
import {
  Sheet,
  SheetContent,
  SheetDescription,
  SheetHeader,
  SheetTitle,
} from "@/components/ui/sheet"
import { Button } from "@/components/ui/button"
import { FinalRfqDetailView } from "@/db/schema"

interface UpdateFinalRfqSheetProps {
  open: boolean
  onOpenChange: (open: boolean) => void
  finalRfq: FinalRfqDetailView | null
}

export function UpdateFinalRfqSheet({
  open,
  onOpenChange,
  finalRfq
}: UpdateFinalRfqSheetProps) {
  return (
    <Sheet open={open} onOpenChange={onOpenChange}>
      <SheetContent className="sm:max-w-md">
        <SheetHeader>
          <SheetTitle>최종 RFQ 수정</SheetTitle>
          <SheetDescription>
            최종 RFQ 정보를 수정합니다.
          </SheetDescription>
        </SheetHeader>
        
        <div className="py-6">
          {finalRfq && (
            <div className="space-y-4">
              <div>
                <h4 className="font-medium">RFQ 정보</h4>
                <p className="text-sm text-muted-foreground">
                  RFQ Code: {finalRfq.rfqCode}
                </p>
                <p className="text-sm text-muted-foreground">
                  벤더: {finalRfq.vendorName}
                </p>
                <p className="text-sm text-muted-foreground">
                  상태: {finalRfq.finalRfqStatus}
                </p>
              </div>
              
              {/* TODO: 실제 업데이트 폼 구현 */}
              <div className="text-center text-muted-foreground">
                업데이트 폼이 여기에 구현됩니다.
              </div>
            </div>
          )}
        </div>

        <div className="flex justify-end gap-2">
          <Button variant="outline" onClick={() => onOpenChange(false)}>
            취소
          </Button>
          <Button onClick={() => onOpenChange(false)}>
            저장
          </Button>
        </div>
      </SheetContent>
    </Sheet>
  )
}