import {
	ConstraintLevelMap,
	Level,
	ReplyStateLevelMap,
} from "qrc:/js/lib/manufacturing_state";

export const shopReplyStateLevelMap: ReplyStateLevelMap = {
	undefined: {
		undefinedError: Level.fatalError,
	},
	userDefined: {
		undefinedError: Level.fatalError,
	},
	tubeCutting: {
		undefinedError: Level.fatalError,
		undetectedFeatures: Level.warning,
	},
	userDefinedBase: {
		undefinedError: Level.fatalError,
	},
	sheet: {
		undefinedError: Level.fatalError,
		nestingFailed: Level.fatalError,
	},
	sheetBending: {
		undefinedError: Level.fatalError,
		undetectedFeatures: Level.warning,
		multipleOuterContours: Level.warning,
		contourInBend: Level.warning,
		invalidBend: Level.fatalError,
	},
	packaging: {
		undefinedError: Level.fatalError,
		insufficientPackageVolume: Level.fatalError,
		overweightParts: Level.fatalError,
	},
	sheetCutting: {
		undefinedError: Level.fatalError,
		undetectedFeatures: Level.warning,
		multipleOuterContours: Level.warning,
		unused0: Level.fatalError,
	},
	joining: {
		undefinedError: Level.fatalError,
	},
	transform: {
		undefinedError: Level.fatalError,
	},
	tube: {
		undefinedError: Level.fatalError,
	},
};

export const shopConstraintLevelMap: ConstraintLevelMap = {
	bendAreasNotOverlapping: Level.fatalError,
	bendDie: Level.fatalError,
	bendFlangeTooShort: Level.fatalError,
	bendThickness: Level.fatalError,
	contourInBend: Level.warning,
	dataCompleteness: Level.fatalError,
	dataConsistent: Level.fatalError,
	dataValidity: Level.fatalError,
	maxBendLineNetLength: Level.fatalError,
	maxDimensions: Level.fatalError,
	maxSheetThickness: Level.fatalError,
	minContourSize: Level.fatalError,
	profileSupport: Level.fatalError,
	sheetAvailability: Level.fatalError,
	sheetMaterialAvailability: Level.fatalError,
	sheetTappingDataValid: Level.fatalError,
	transportSource: Level.fatalError,
	tubeAvailability: Level.fatalError,
	tubeCuttingProcessCompatibility: Level.fatalError,
	tubeDetectionLicensed: Level.fatalError,
	tubeNestingAvailability: Level.fatalError,
	userDefinedProcessId: Level.fatalError,
};
