package in.gov.digilocker.uidai.services.properties;

import java.io.InputStream;
import java.util.Properties;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@Service
public class OTPProperties {
	private static final Logger logger = LoggerFactory.getLogger(OTPProperties.class);
	private String optsCHAllVal;
	private String optsCHMobVal;
	private String optsCHEmailVal;
	
	private String otpACVal;
	private String otpVersionVal;
	private String otpSAVal;
	private String otpLKVal;

	public OTPProperties() {
		Properties prop = new Properties();
		InputStream input = getClass().getClassLoader().getResourceAsStream("uidai-services.properties");
		try {
			prop.load(input);
		} catch (Exception e) {
			logger.error("Error in calling common propery:- " + e.getMessage());
		}
		this.optsCHAllVal = prop.getProperty("uidai.request.otp.ch.all");
		this.optsCHMobVal = prop.getProperty("uidai.request.otp.ch.mob");
		this.optsCHEmailVal = prop.getProperty("uidai.request.otp.ch.email");
		this.otpACVal = prop.getProperty("uidai.request.otp.ac");
		this.otpVersionVal = prop.getProperty("uidai.request.otp.ver");
		this.otpSAVal = prop.getProperty("uidai.request.otp.sa");
		this.otpLKVal = prop.getProperty("uidai.request.otp.lk");
	}

	public String getOptsCHAllVal() {
		return optsCHAllVal;
	}

	public String getOptsCHMobVal() {
		return optsCHMobVal;
	}

	public String getOptsCHEmailVal() {
		return optsCHEmailVal;
	}

	public String getOtpACVal() {
		return otpACVal;
	}

	public String getOtpVersionVal() {
		return otpVersionVal;
	}

	public String getOtpSAVal() {
		return otpSAVal;
	}

	public String getOtpLKVal() {
		return otpLKVal;
	}
}
