/** @format */

import web from "@/utils/axios/web.ts";

/**
 * 获取分享圈列表
 */
export const getShareCircleList = () => {
	return web.request({
		url: `/share/share/circle/sharelist`,
		method: "get",
	});
};
/**
 * 新增分享圈
 * @param data
 * @constructor
 */
export const addShareCircle = (data: any) => {
	return web.request({
		url: `/share/share/circle/add`,
		method: "post",
		data: data,
	});
};
/**
 * 分享圈详情列表
 * @param circleId
 */
export const shareDetailList = (circleId: any) => {
	return web.request({
		url: `/share/share/detail/list`,
		method: "post",
		params: {
			circleId: circleId,
		},
	});
};
/**
 * 分享圈详情
 * @param id
 */
export const getShareDetail = (id: any) => {
	return web.request({
		url: `/share/share/detail/get_detail`,
		method: "get",
		params: {
			Id: id,
		},
	});
};
/**
 * 新增分享圈详情
 * @param data
 */
export const addShareDetail = (data: any) => {
	return web.request({
		url: `/share/share/detail/add_detail`,
		method: "post",
		data: data,
	});
};
/**
 * 分享圈详情评论列表
 * @param detailId
 * @param userId
 */
export const listComment = (detailId: any, userId: any) => {
	return web.request({
		url: `/share/share/comment/reply/listcomment`,
		method: "get",
		params: {
			detailId: detailId,
			userId: userId,
		},
	});
};
/**
 * 分享圈详情热门评论列表
 * @param detailId
 * @param userId
 */
export const listCommentHot = (detailId: any, userId: any) => {
	return web.request({
		url: `/share/share/comment/reply/listcommenthot`,
		method: "get",
		params: {
			detailId: detailId,
			userId: userId,
		},
	});
};
/**
 * 分享圈详情回复列表
 * @param commentId
 * @param userId
 */
export const listReply = (commentId: any, userId: any) => {
	return web.request({
		url: `/share/share/comment/reply/listreply`,
		method: "get",
		params: {
			commentId: commentId,
			userId: userId,
		},
	});
};
/**
 * 新增评论
 * @param data
 */
export const addComment = (data: any) => {
	return web.request({
		url: `/share/share/comment/reply/addcomment`,
		method: "post",
		data: data,
	});
};
/**
 * 新增回复
 * @param data
 */
export const addReply = (data: any) => {
	return web.request({
		url: `/share/share/comment/reply/addreply`,
		method: "post",
		data: data,
	});
};
/**
 * 返回评论总数
 * @param detailId
 */
export const returnAllCommentAndReplyCount = (detailId: any) => {
	return web.request({
		url: `/share/share/detail/returncount`,
		method: "get",
		params: {
			detailId: detailId,
		},
	});
};
/**
 * 获取我的分享圈列表
 * @param userId
 */
export const getMyShareList = (userId: any) => {
	return web.request({
		url: `/share/share/detail/mydetail`,
		method: "get",
		params: {
			userId: userId,
		},
	});
};
/**
 * 获取我的分享圈收藏
 * @param userId
 */
export const getMyFavor = (userId: any) => {
	return web.request({
		url: `/share/share/user/favorites/myfavor`,
		method: "get",
		params: {
			userId: userId,
		},
	});
};
/**
 * 新增点赞
 * @param data
 */
export const addLikeComment = (data: any) => {
	return web.request({
		url: `/share/share/comment/reply/addlike`,
		method: "post",
		data: data,
	});
};
/**
 * 删除点赞
 * @param data
 */
export const deletedLikeComment = (data: any) => {
	return web.request({
		url: `/share/share/comment/reply/dellike`,
		method: "post",
		data: data,
	});
};
/**
 * 新增点赞
 * @param data
 */
export const addLikeDetail = (data: any) => {
	return web.request({
		url: `/share/share/detail/addlike`,
		method: "post",
		data: data,
	});
};
/**
 * 删除点赞
 * @param data
 */
export const deletedLikeDetail = (data: any) => {
	return web.request({
		url: `/share/share/detail/dellike`,
		method: "post",
		data: data,
	});
};
