"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCategories = exports.removeComponentsCategory = exports.getComponentsCategory = exports.saveComponentsCategory = void 0;
const api_agent_1 = __importDefault(require("@/utils/api-agent"));
const saveComponentsCategory = (params) => new Promise((resolve) => {
    api_agent_1.default.put('/components/category', params, (rs) => {
        resolve(rs);
    });
});
exports.saveComponentsCategory = saveComponentsCategory;
const getComponentsCategory = (params) => new Promise((resolve) => {
    api_agent_1.default.get('/components/category', params, (rs) => {
        resolve(rs);
    });
});
exports.getComponentsCategory = getComponentsCategory;
const removeComponentsCategory = (params) => new Promise((resolve) => {
    api_agent_1.default.delete('/components/category', params, (rs) => {
        resolve(rs);
    });
});
exports.removeComponentsCategory = removeComponentsCategory;
const getCategories = (params) => new Promise((resolve) => {
    api_agent_1.default.get('/components/category-types', params, (rs) => {
        resolve(rs);
    });
});
exports.getCategories = getCategories;
