"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const XEUtils = require("xe-utils");
const index_esm = require("../../../../@vxe-ui/core/es/index.esm.js");
const index_esm$1 = require("../../../../dom-zindex/es/index.esm.js");
const { getConfig } = index_esm.VxeUI;
function isEnableConf(conf) {
  return conf && conf.enabled !== false;
}
function isEmptyValue(cellValue) {
  return cellValue === null || cellValue === void 0 || cellValue === "";
}
function parseFile(file) {
  const name = file.name;
  const tIndex = XEUtils.lastIndexOf(name, ".");
  const type = name.substring(tIndex + 1, name.length).toLowerCase();
  const filename = name.substring(0, tIndex);
  return { filename, type };
}
function nextZIndex() {
  return index_esm$1.default.getNext();
}
function getLastZIndex() {
  return index_esm$1.default.getCurrent();
}
function hasChildrenList(item) {
  return item && item.children && item.children.length > 0;
}
function getFuncText(content, args) {
  if (XEUtils.eqNull(content)) {
    return "";
  }
  const translate = getConfig().translate;
  return `${translate ? translate("" + content, args) : content}`;
}
function formatText(value, placeholder) {
  return "" + (isEmptyValue(value) ? placeholder ? getConfig().emptyCell : "" : value);
}
function eqEmptyValue(cellValue) {
  return cellValue === "" || XEUtils.eqNull(cellValue);
}
exports.eqEmptyValue = eqEmptyValue;
exports.formatText = formatText;
exports.getFuncText = getFuncText;
exports.getLastZIndex = getLastZIndex;
exports.hasChildrenList = hasChildrenList;
exports.isEmptyValue = isEmptyValue;
exports.isEnableConf = isEnableConf;
exports.nextZIndex = nextZIndex;
exports.parseFile = parseFile;
