Map<String, dynamic> toMap() { return { 'type': type, // Assuming ActionType is an enum 'elementIds': elementIds, }; }