package com.dbs.consentServer.service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;

import com.dbs.consentServer.VO.consentVO.ConsentFormListVO;
import com.dbs.consentServer.exception.ItemNotFoundException;
import com.dbs.consentServer.mapper.ConsentMapper;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ConsentService {

  private final Logger logger = LoggerFactory.getLogger(this.getClass());

  @Autowired
  public ConsentMapper consentMapper;

  public List<ConsentFormListVO> getUserFormSet(Map<String, String> params) {
    return consentMapper.getUserFormSet(params);
  }

  public List<ConsentFormListVO> getConsentBySearch(Map<String, String> params) {
    return consentMapper.getConsentBySearch(params);
  }

  public ArrayList<ConsentFormListVO> getConsentList(Map<String, Object> params) {
    return consentMapper.getConsentList(params);
  }

  public Integer updateConsentMstForDelete(Map<String, Object> params) {
    logger.debug("reason -- > " + params.get("reason"));
    return consentMapper.updateConsentMstForDelete(params);
  }

  public String getConsentMstForDeleteOcrTag(HashMap<String, Object> params) {
    return consentMapper.getConsentMstForDeleteOcrTag(params);
  }

  public int updateMrfhOcrPrntStatCd(HashMap<String, Object> params) {
    return consentMapper.updateMrfhOcrPrntStatCd(params);
  }

  public String getOcrTag() {
    return consentMapper.getOcrTag();
  }
  
}