"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Errors = void 0;
const app_1 = require("../app");
const utils_1 = require("../utils");
class Errors {
    constructor(op, res) {
        this.op = op;
        this.res = res;
    }
    static handle(op, res) {
        if (app_1.Config.app_env) {
            console.log('error op', op);
            console.log('error response', res);
        }
        if (res?.noUpdate) {
            utils_1.Sweet.success({ html: res?.title });
        }
        if (res?.bigError) {
            utils_1.Error.validateErrors(res.errors);
        }
        if (res?.wrong) {
            utils_1.Sweet.error({ html: res?.title });
        }
        return this;
    }
}
exports.Errors = Errors;
//# sourceMappingURL=errors.js.map