import { business } from '@/services';

const useSearch = () => {
	const getPermissionList = async (params: BusinessAPI.PermissionListQry) => {
		const { data: permissionVOList } =
			await business.permission.listPermission({
				permissionListQry: { ...params },
			});

		return permissionVOList || [];
	};

	const getPlatformList = async (params: BusinessAPI.PlatformListQry) => {
		const { data: platformVOList } = await business.platform.listPlatform({
			platformListQry: { ...params },
		});

		return platformVOList || [];
	};

	return {
		getPermissionList,
		getPlatformList,
	};
};
export default useSearch;
