//#region ../core/dist/validation/validation-rules.js
/**
* Validate status transition
*/
function validateStatusTransition(currentStatus, newStatus) {
	const allowed = {
		pending: [
			"active",
			"blocked",
			"done",
			"cancelled"
		],
		active: [
			"pending",
			"blocked",
			"done",
			"cancelled"
		],
		blocked: [
			"pending",
			"active",
			"done",
			"cancelled"
		],
		done: ["pending", "active"],
		cancelled: ["pending"]
	}[currentStatus];
	if (!allowed) return [{
		rule: "valid-status-transition",
		field: "status",
		message: `Unknown current status: '${currentStatus}'`,
		severity: "error"
	}];
	if (!allowed.includes(newStatus)) return [{
		rule: "valid-status-transition",
		field: "status",
		message: `Cannot transition from '${currentStatus}' to '${newStatus}'. Valid: ${allowed.join(", ")}`,
		severity: "error"
	}];
	return [];
}

export { validateStatusTransition };
//# sourceMappingURL=validation-rules-CE27rtoF.js.map
