// HTTP模块统一导出文件

// 导入所有API模块
import * as petsApi from './api/pets.js'
import * as assistantApi from './api/assistant.js'
import * as adoptionApi from './api/adoption.js'
import * as profileApi from './api/profile.js'
import * as reviewApi from './api/review.js'
import * as commonApi from './api/common.js'

// 导入配置
export { HTTP_CONFIG, NO_AUTH_APIS, addNoAuthApis, setEnvironment } from './config/config.js'

// 导入工具
export { validateRequired, validateId, validatePagination, validateFileUpload } from './utils/validator.js'

// 统一导出所有API
export {
	petsApi,
	assistantApi,
	adoptionApi,
	profileApi,
	reviewApi,
	commonApi
}

// 也可以按模块导出，便于按需引入
export default {
	pets: petsApi,
	assistant: assistantApi,
	adoption: adoptionApi,
	profile: profileApi,
	review: reviewApi,
	common: commonApi
}

// 使用示例：
// 方式1：按模块导入API
// import { petsApi, assistantApi } from '@/http/index.js'
// petsApi.getPetsList()
// assistantApi.sendMessage()

// 方式2：导入所有API
// import api from '@/http/index.js'
// api.pets.getPetsList()
// api.assistant.sendMessage()

// 方式3：解构导入特定接口
// import { petsApi } from '@/http/index.js'
// const { getPetsList, addPet } = petsApi

// 方式4：配置不需要鉴权的接口
// import { addNoAuthApis } from '@/http/index.js'
// addNoAuthApis(['/custom/api1', '/custom/api2'])

// 方式5：切换环境
// import { setEnvironment } from '@/http/index.js'
// setEnvironment('production')  // 切换到生产环境
