import {
  Dialog,
  DialogContent,
  DialogHeader,
  DialogTitle,
} from "@/shared/common/ui/dialog";
import { MoveDepartmentForm } from "../forms/MoveDepartmentForm";

interface DepartmentDialogProps {
  isOpen: boolean;
  onClose: () => void;
  organizationId: string;
  unitId: string;
  departmentId:string;
}

export function MoveDepartmentDialog({
  isOpen,
  onClose,
  departmentId,
  organizationId,
  unitId,
}: DepartmentDialogProps) {
  const handleSuccess = (departmentName: string) => {
    onClose();
  };
  return (
    <Dialog open={isOpen} onOpenChange={(open) => !open && onClose()}>
      <DialogContent className="sm:max-w-[425px]">
        <DialogHeader>
          <DialogTitle>Move Department</DialogTitle>
        </DialogHeader>
        <MoveDepartmentForm
          unitId={unitId}
          organizationId={organizationId}
          onSuccess={handleSuccess}
          onCancel={onClose}
          departmentId={departmentId}
        />
      </DialogContent>
    </Dialog>
  );
}
