"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.nameErrorCheck = void 0;
const antd_1 = require("antd");
const build_1 = require("@/constants/build");
const index_1 = require("@/foxI18n/index");
const nameErrorCheck = (name) => {
    const { application: { nameInvalid }, global: { nameFormatInvalid }, } = (0, index_1.getBusinessI18n)();
    if (!name) {
        antd_1.message.warning(nameInvalid);
        return true;
    }
    if (build_1.keywordReg.test(name)) {
        antd_1.message.warning(nameFormatInvalid);
        return true;
    }
    if (build_1.nameRuleReg.test(name)) {
        antd_1.message.warning(nameFormatInvalid);
        return true;
    }
    return false;
};
exports.nameErrorCheck = nameErrorCheck;
exports.default = { nameErrorCheck: exports.nameErrorCheck };
