import { get, post } from "@/config/request";

export const notifLaporanBaru = async (data) => {
	try {
		const response = await post("/notifikasi/laporan-baru", data);
		return response.data;
	} catch (error) {
		if (error.response.data) return error.response.data;
		console.log(error);
		return false;
	}
};

export const notifKeberatan = async (data) => {
	try {
		const response = await post("/notifikasi/keberatan", data);
		return response.data;
	} catch (error) {
		if (error.response.data) return error.response.data;
		console.log(error);
		return false;
	}
};

export const notifBanding = async (data) => {
	try {
		const response = await post("/notifikasi/banding", data);
		return response.data;
	} catch (error) {
		if (error.response.data) return error.response.data;
		console.log(error);
		return false;
	}
};

export const notifDocPerbaikan = async (data) => {
	try {
		const response = await post("/notifikasi/doc-perbaikan", data);
		return response.data;
	} catch (error) {
		if (error.response.data) return error.response.data;
		console.log(error);
		return false;
	}
};
