import api from "@shared/api"

interface IUseDeleteProjectParams {
	onSuccess?: () => void
	onError?: (error: unknown) => void
}

export const useDeleteProject = ({
	onSuccess,
	onError,
}: IUseDeleteProjectParams = {}) => {
	return api.useMutation("delete", "/api/projects/{project_id}/", {
		onSuccess: () => {
			onSuccess?.()
		},
		onError: (error) => {
			onError?.(error)
		},
	})
}
