"use strict";
var common_vendor = require("../../common/vendor.js");
require("../../stores/index.js");
var uni_modules_wotDesignUni_components_wdToast_index = require("../../uni_modules/wot-design-uni/components/wd-toast/index.js");
var uni_modules_wotDesignUni_components_wdMessageBox_index = require("../../uni_modules/wot-design-uni/components/wd-message-box/index.js");
require("../../uni_modules/wot-design-uni/locale/index.js");
require("../../uni_modules/wot-design-uni/dayjs/index.js");
var api_modules_config = require("../../api/modules/config.js");
var config_api_config = require("../../config/api.config.js");
var stores_modules_user = require("../../stores/modules/user.js");
require("../../stores/modules/tabIndex.js");
require("../../stores/modules/AIResponse.js");
require("../../stores/modules/rateLimit.js");
require("../../uni_modules/wot-design-uni/components/common/util.js");
require("../../uni_modules/wot-design-uni/components/common/AbortablePromise.js");
require("../../uni_modules/wot-design-uni/locale/lang/zh-CN.js");
require("../../uni_modules/wot-design-uni/dayjs/constant.js");
require("../../uni_modules/wot-design-uni/dayjs/locale/en.js");
require("../../uni_modules/wot-design-uni/dayjs/utils.js");
require("../../utils/request.js");
if (!Array) {
  const _easycom_wd_img2 = common_vendor.resolveComponent("wd-img");
  const _easycom_wd_cell2 = common_vendor.resolveComponent("wd-cell");
  const _easycom_wd_cell_group2 = common_vendor.resolveComponent("wd-cell-group");
  const _easycom_wd_message_box2 = common_vendor.resolveComponent("wd-message-box");
  const _easycom_wd_toast2 = common_vendor.resolveComponent("wd-toast");
  (_easycom_wd_img2 + _easycom_wd_cell2 + _easycom_wd_cell_group2 + _easycom_wd_message_box2 + _easycom_wd_toast2)();
}
const _easycom_wd_img = () => "../../uni_modules/wot-design-uni/components/wd-img/wd-img.js";
const _easycom_wd_cell = () => "../../uni_modules/wot-design-uni/components/wd-cell/wd-cell.js";
const _easycom_wd_cell_group = () => "../../uni_modules/wot-design-uni/components/wd-cell-group/wd-cell-group.js";
const _easycom_wd_message_box = () => "../../uni_modules/wot-design-uni/components/wd-message-box/wd-message-box.js";
const _easycom_wd_toast = () => "../../uni_modules/wot-design-uni/components/wd-toast/wd-toast.js";
if (!Math) {
  (NavBar + _easycom_wd_img + _easycom_wd_cell + _easycom_wd_cell_group + _easycom_wd_message_box + _easycom_wd_toast)();
}
const NavBar = () => "../../components/NavBar.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "user",
  setup(__props) {
    const message = uni_modules_wotDesignUni_components_wdMessageBox_index.useMessage();
    const toast = uni_modules_wotDesignUni_components_wdToast_index.useToast();
    const {
      yaoList
    } = common_vendor.storeToRefs(stores_modules_user.useUserStore());
    const avatar = common_vendor.ref("");
    api_modules_config.getPageConfig().then((res) => {
      avatar.value = res.avatar.formats.medium.url;
    });
    const list = [
      {
        title: "\u5386\u53F2\u8BB0\u5F55",
        isLink: true,
        url: "/pages/user/history"
      },
      {
        title: "\u6E05\u7A7A\u7F13\u5B58",
        isLink: true,
        onClick: () => {
          message.confirm({
            title: "\u63D0\u793A",
            msg: "\u6B64\u64CD\u4F5C\u5C06\u5220\u9664\u6240\u6709\u5386\u53F2\u6570\u636E\uFF0C\u662F\u5426\u786E\u5B9A\uFF1F"
          }).then(() => {
            yaoList.value = [];
            toast.success("\u6E05\u9664\u7F13\u5B58\u6210\u529F");
          });
        }
      },
      {
        title: "\u5EFA\u8BAE\u53CD\u9988",
        isLink: true,
        url: "/pages/user/suggestion"
      }
    ];
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: common_vendor.p({
          title: "\u6211\u7684"
        }),
        b: avatar.value
      }, avatar.value ? {
        c: common_vendor.p({
          src: common_vendor.unref(config_api_config.BASE_URL) + avatar.value,
          width: "160rpx",
          height: "160rpx",
          round: true
        })
      } : {}, {
        d: common_vendor.f(list, (item, index, i0) => {
          return {
            a: common_vendor.o(item.onClick),
            b: "1198f63b-3-" + i0 + ",1198f63b-2",
            c: common_vendor.p({
              title: item.title,
              ["is-link"]: item.isLink,
              to: item.url
            })
          };
        }),
        e: common_vendor.p({
          border: true
        })
      });
    };
  }
});
var Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1198f63b"], ["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/pages/user/user.vue"]]);
wx.createComponent(Component);
