// components/modals/BatchInfoModal.tsx
import React from 'react'
import axios from 'axios'
import { toast } from 'react-hot-toast'
import { StockBatch, StockEntry } from "@/types"
import BatchInfoWindow from "@/Components/BatchInfoWindow";
import {router} from "@inertiajs/react";

interface Props {
    onClose: () => void
    selectedBatch: () => StockBatch
}


const BatchInfoModal: React.FC<Props> = ({ onClose, selectedBatch }) => {


    return (
        <div className="space-y-4">
            <h3 className="font-bold text-lg">Batch # {selectedBatch.id}</h3>

            <BatchInfoWindow
                selectedBatch={selectedBatch}
                router={router}
                route={(name, params) => route(name, params)}
                entries={null}
                openEntry={() => {}}
                recountEnabled={false}
            />

        </div>
    )
}

export default BatchInfoModal
