import { VmiLocationUploadError } from "@insite/client-framework/Store/Components/VmiLocationsImportModal/Handlers/ValidateVmiLocations";
import { VmiLocationModel } from "@insite/client-framework/Types/ApiModels";

export interface ParsedItem {
    name: string;
    customerNumber: string | null;
    customerSequence: string | null;
    isPrimaryLocation: boolean | null;
    useBins: boolean | null;
    enforceMaxQuantityInOrders: boolean | null;
}

export interface VmiLocationUploadRowError {
    index: number;
    name: string;
    customerNumber: string | null;
    customerSequence: string | null;
    error: VmiLocationUploadError;
}

export default interface VmiLocationsImportModalState {
    parsedItems: ParsedItem[];
    errorEntries: VmiLocationUploadRowError[];
    importedItems: VmiLocationModel[];
    isBadFile: boolean;
    isUploading: boolean;
    vmiLocationsProcessed: boolean;
    allowCancel: boolean;
    uploadCancelled: boolean;
    uploadLimitExceeded: boolean;
    errorsModalIsOpen: boolean;
    modalIsOpen: boolean;
    fullFileError: boolean;
    continueUpload: boolean;
}
