package com.workfusion.odf.core;

import java.util.Map;
import javax.inject.Named;

import org.codejargon.feather.Provides;

import com.workfusion.odf.impl.converter.html2pdf.PdfReportGenerator;
import com.workfusion.odf.impl.converter.html2pdf.RpaPdfReportGenerator;
import com.workfusion.odf.service.DatastoreSplitJoinService;
import com.workfusion.odf.service.DeleteTransactionService;
import com.workfusion.odf.service.DeleteTransactionServiceImpl;
import com.workfusion.odf.service.SplitJoinService;
import com.workfusion.odf.service.TransactionWaitService;
import com.workfusion.odf.service.TransactionWaitServiceImpl;
import com.workfusion.rpa.core.CommonConstants;

/**
 * Describes how intake dependencies need to be initialized.
 */
public class IntakeModule implements Module {
    private Map<String, String> params;

    public IntakeModule(final Map<String, String> botConfigParams) {
        this.params = botConfigParams;
    }

    @Provides
    public SplitJoinService splitJoinService(DatastoreSplitJoinService service) {
        return service;
    }

    @Provides
    public TransactionWaitService transactionWaitService(TransactionWaitServiceImpl service) {
        return service;
    }

    @Provides
    public PdfReportGenerator pdfReportGenerator(RpaPdfReportGenerator generator) {
        return generator;
    }

    @Provides
    public DeleteTransactionService deleteTransactionService(DeleteTransactionServiceImpl deleteTransactionService) {
    	return deleteTransactionService;
    }

    @Provides
    @Named("botConfigParams")
    public Map<String, String> params() {
        return params;
    }

    @Provides
    @Named("defaultS3Bucket")
    public String s3Bucket() {
        return CommonConstants.INTAKE_S3_BUCKET;
    }
}
