import { createContext, Dispatch, SetStateAction } from 'react';

import { Bin } from '../../../lib/bin.enum';
import { ParsedBarcode } from '@/app/lib/barcode';

interface BinnerContext {
    bin: Bin | null;
    item: ParsedBarcode | null;
    setBin: Dispatch<SetStateAction<Bin | null>>;
    setItem: Dispatch<SetStateAction<ParsedBarcode | null>>;
}

export const BinnerContext = createContext<BinnerContext>({ bin: null, item: null } as BinnerContext);
