// Path: app/src/main/java/com/example/offline/domain/AddCommentUseCase.java
// public class AddCommentUseCase {
//     private final LocalCommentRepository localCommentRepository;
//     private final SyncCommentUseCase syncCommentUseCase;
// 
//     public AddCommentUseCase(LocalCommentRepository localCommentRepository, SyncCommentUseCase syncCommentUseCase) {
//         this.localCommentRepository = localCommentRepository;
//         this.syncCommentUseCase = syncCommentUseCase;
//     }
// 
//     public Completable addComment(String commentText) {
//         return localCommentRepository.add(ModelConstants.DUMMY_PHOTO_ID, commentText)
//                 .flatMapCompletable(syncCommentUseCase::syncComment);
//     }
// }
// 
// Path: app/src/main/java/com/example/offline/domain/GetCommentsUseCase.java
// public class GetCommentsUseCase {
//     private final LocalCommentRepository localCommentRepository;
// 
//     public GetCommentsUseCase(LocalCommentRepository localCommentRepository) {
//         this.localCommentRepository = localCommentRepository;
//     }
// 
//     public Flowable<List<Comment>> getComments() {
//         return localCommentRepository.getComments(ModelConstants.DUMMY_PHOTO_ID);
//     }
// }


import android.arch.lifecycle.ViewModel;
import android.arch.lifecycle.ViewModelProvider;
import com.example.offline.domain.AddCommentUseCase;
import com.example.offline.domain.GetCommentsUseCase;
package com.example.offline.presentation;



public class CommentsViewModelFactory implements ViewModelProvider.Factory {

    private final GetCommentsUseCase getCommentsUseCase;
// Path: app/src/main/java/com/example/offline/domain/AddCommentUseCase.java
// public class AddCommentUseCase {
//     private final LocalCommentRepository localCommentRepository;
//     private final SyncCommentUseCase syncCommentUseCase;
// 
//     public AddCommentUseCase(LocalCommentRepository localCommentRepository, SyncCommentUseCase syncCommentUseCase) {
//         this.localCommentRepository = localCommentRepository;
//         this.syncCommentUseCase = syncCommentUseCase;
//     }
// 
//     public Completable addComment(String commentText) {
//         return localCommentRepository.add(ModelConstants.DUMMY_PHOTO_ID, commentText)
//                 .flatMapCompletable(syncCommentUseCase::syncComment);
//     }
// }
// 
// Path: app/src/main/java/com/example/offline/domain/GetCommentsUseCase.java
// public class GetCommentsUseCase {
//     private final LocalCommentRepository localCommentRepository;
// 
//     public GetCommentsUseCase(LocalCommentRepository localCommentRepository) {
//         this.localCommentRepository = localCommentRepository;
//     }
// 
//     public Flowable<List<Comment>> getComments() {
//         return localCommentRepository.getComments(ModelConstants.DUMMY_PHOTO_ID);
//     }
// }


// Path: app/src/main/java/com/example/offline/presentation/CommentsViewModelFactory.java
import android.arch.lifecycle.ViewModel;
import android.arch.lifecycle.ViewModelProvider;
import com.example.offline.domain.AddCommentUseCase;
import com.example.offline.domain.GetCommentsUseCase;

package com.example.offline.presentation;



public class CommentsViewModelFactory implements ViewModelProvider.Factory {

    private final GetCommentsUseCase getCommentsUseCase;
    private final AddCommentUseCase addCommentUseCase;