const require_utils_httpStatusCodes = require('./httpStatusCodes.cjs');

//#region src/utils/responseData.ts
const isSuccessStatus = (status) => status === require_utils_httpStatusCodes.HttpStatusCodes.OK_200 || status === require_utils_httpStatusCodes.HttpStatusCodes.CREATED_201 || status === require_utils_httpStatusCodes.HttpStatusCodes.ACCEPTED_202 || status === require_utils_httpStatusCodes.HttpStatusCodes.NON_AUTHORITATIVE_INFORMATION_203 || status === require_utils_httpStatusCodes.HttpStatusCodes.NO_CONTENT_204 || status === require_utils_httpStatusCodes.HttpStatusCodes.RESET_CONTENT_205 || status === require_utils_httpStatusCodes.HttpStatusCodes.PARTIAL_CONTENT_206 || status === require_utils_httpStatusCodes.HttpStatusCodes.MULTI_STATUS_207 || status === require_utils_httpStatusCodes.HttpStatusCodes.ALREADY_REPORTED_208 || status === require_utils_httpStatusCodes.HttpStatusCodes.IM_USED_226;
function formatResponse({ message, description, data, error, status = require_utils_httpStatusCodes.HttpStatusCodes.OK_200 }) {
	return {
		success: isSuccessStatus(status),
		message: message ?? void 0,
		description: description ?? void 0,
		data: data ?? null,
		error: error ?? void 0,
		status
	};
}
function formatPaginatedResponse({ status = require_utils_httpStatusCodes.HttpStatusCodes.OK_200, message, description, data, error, page, pageSize, totalPages, totalItems }) {
	return {
		success: isSuccessStatus(status),
		message: message ?? void 0,
		description: description ?? void 0,
		data: data ?? null,
		error: error ?? void 0,
		status,
		page: page ?? null,
		page_size: pageSize ?? null,
		total_pages: totalPages ?? null,
		total_items: totalItems ?? null
	};
}

//#endregion
exports.formatPaginatedResponse = formatPaginatedResponse;
exports.formatResponse = formatResponse;
//# sourceMappingURL=responseData.cjs.map