export default (callApi) => ({
	async getVerification(payload) {
		try {
			const response = await callApi('POST', '/auth/register-mobile', { data: payload });
			return response;
		} catch (error) {
			throw new Error(error.message);
		}
	},
	async verifyCode(payload) {
		try {
			const response = await callApi('PUT', '/auth/register-mobile', { data: payload });
			return response;
		} catch (error) {
			throw new Error(error.message);
		}
	},
	async login(payload) {
		try {
			const response = await callApi('POST', '/auth/signin', { data: payload });
			return response;
		} catch (error) {
			throw new Error(error.message);
		}
	},
	async registerBeneficiary(payload) {
		try {
			const response = await callApi('POST', '/auth/register-user', { data: payload });
			return response;
		} catch (error) {
			throw new Error(error.message);
		}
	},
});
