"use strict";
const vue = require("vue");
const lodashEs = require("lodash-es");
const zhCN = {
  name: "zh-CN",
  max: {
    icon: {
      lang: "切换语言",
      fullscreen: "全屏",
      fullscreenExit: "退出全屏",
      reload: "刷新页面",
      collapse: "折叠菜单",
      expand: "展开菜单",
      pin: "固定",
      unpin: "取消固定"
    },
    notification: {
      delete: "确定要删除吗？"
    },
    basic: {
      add: "新增",
      edit: "编辑",
      delete: "删除",
      view: "查看",
      reset: "重置",
      submit: "查询",
      open: "展开",
      collapse: "收起",
      selected: "已选择",
      clear: "清空选择",
      item: "项",
      warning: "警告",
      export: "导出",
      import: "导入",
      print: "打印",
      other: ""
    },
    button: {
      confirm: "确定",
      cancel: "取消"
    },
    checkbox: {
      selectAll: "全选"
    },
    viewBar: {
      prev: "上一页",
      next: "下一页"
    },
    messagebox: {
      alert: "提示",
      error: "格式错误"
    },
    upload: {
      uploading: "上传中",
      upload: "上传",
      uploadSuccess: "上传成功",
      uploadFailed: "上传失败",
      downloadFile: "下载文件",
      previewFile: "预览文件",
      removeFile: "删除文件"
    },
    dragVerify: {
      text: "拖动滑块验证",
      successText: "验证成功"
    },
    placeholder: {
      input: "请输入",
      picker: "请选择",
      select: "请选择"
    },
    region: {
      province: "省/直辖市",
      city: "市",
      district: "区/县",
      placeholder: "请选择区域",
      clear: "清空"
    },
    form: {
      required: "必填",
      max: "字符应小于 {max}"
    },
    table: {
      empty: "暂无数据",
      loading: "加载中...",
      noData: "暂无数据",
      noMatch: "暂无匹配数据",
      noResult: "暂无结果",
      sum: "小计",
      avg: "平均值"
    },
    treeSearch: {
      searchPlaceholder: "搜索关键字",
      checkedButtonText: "已选"
    },
    iconPicker: {
      searchIcon: "搜索图标",
      iconNotExist: "图标不存在",
      clear: "清空"
    },
    import: {
      import: "导入",
      exportSuccess: "导出成功",
      fileSizeLimit: "文件大小不能超过 50MB!",
      uploadFile: "请上传文件",
      confirmImport: "确定要导入吗？",
      confirm: "确定",
      cancel: "取消",
      uploadTip: "点击或者拖拽到此处上传文件",
      allowedFormats: "允许导入xlsx, xls文件",
      downloadTemplate: "下载模板",
      updateExisting: "是否更新/覆盖已存在数据",
      noTemplateApi: "未配置模板下载接口",
      previewTitle: "导入数据预览",
      totalCount: "共计",
      back: "返回"
    }
  }
};
const translate = (path, option, locale) => lodashEs.get(locale, path, path).replace(/\{(\w+)\}/g, (_, key) => {
  var _a;
  return `${(_a = option == null ? void 0 : option[key]) != null ? _a : `{${key}}`}`;
});
const buildTranslator = (locale) => {
  return (path, option) => {
    return translate(path, option, vue.unref(locale));
  };
};
const buildLocaleContext = (locale) => {
  const lang = vue.computed(() => vue.unref(locale).name);
  const localeRef = vue.isRef(locale) ? locale : vue.ref(locale);
  return {
    lang,
    locale: localeRef,
    t: buildTranslator(locale)
  };
};
exports.buildLocaleContext = buildLocaleContext;
exports.buildTranslator = buildTranslator;
exports.translate = translate;
exports.zhCN = zhCN;
//# sourceMappingURL=utils-COQsBuSS.cjs.map
