"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.deleteTeamUsers = exports.AddTeamUsers = exports.fetchTeamUsers = exports.deleteTeam = exports.updateTeam = exports.addTeam = exports.fetchTeamList = void 0;
const api_agent_1 = __importDefault(require("@/utils/api-agent"));
const fetchTeamList = (params) => new Promise((resolve) => {
    api_agent_1.default.get('/team-searchs', params, (rs) => {
        resolve(rs);
    });
});
exports.fetchTeamList = fetchTeamList;
const addTeam = (params) => new Promise((resolve) => {
    api_agent_1.default.post('/teams', params, (rs) => {
        resolve(rs);
    });
});
exports.addTeam = addTeam;
const updateTeam = (params) => new Promise((resolve) => {
    api_agent_1.default.put('/teams', params, (rs) => {
        resolve(rs);
    });
});
exports.updateTeam = updateTeam;
const deleteTeam = (params) => new Promise((resolve) => {
    api_agent_1.default.put('/teams/status', params, (rs) => {
        resolve(rs);
    });
});
exports.deleteTeam = deleteTeam;
// team user
const fetchTeamUsers = (params) => new Promise((resolve) => {
    api_agent_1.default.get('/teams/member-searchs', params, (rs) => {
        resolve(rs);
    });
});
exports.fetchTeamUsers = fetchTeamUsers;
const AddTeamUsers = (params) => new Promise((resolve) => {
    api_agent_1.default.post('/teams/members', params, (rs) => {
        resolve(rs);
    });
});
exports.AddTeamUsers = AddTeamUsers;
const deleteTeamUsers = (params) => new Promise((resolve) => {
    api_agent_1.default.put('/teams/members-status', params, (rs) => {
        resolve(rs);
    });
});
exports.deleteTeamUsers = deleteTeamUsers;
