"use strict";
const common_vendor = require("../../../common/vendor.js");
const common_libraries_naviHelper = require("../../../common/libraries/naviHelper.js");
require("../../../common/libraries/getPageConfig.js");
const common_libraries_public = require("../../../common/libraries/public.js");
const common_libraries_userUserLogin = require("../../../common/libraries/userUserLogin.js");
require("../../../common/libraries/request.js");
const common_store_useWeAppAuthStore = require("../../../common/store/useWeAppAuthStore.js");
require("../../../common/store/useWorkStore.js");
require("../../../gen/Apis.js");
require("../../../common/libraries/setTabBar.js");
require("../../../common/libraries/apiLoading.js");
if (!Array) {
  const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
  _easycom_uni_icons2();
}
const _easycom_uni_icons = () => "../../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
if (!Math) {
  _easycom_uni_icons();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "AiInput",
  setup(__props) {
    const auth = common_store_useWeAppAuthStore.useWeAppAuthStore();
    const handleInputChange = (i) => {
      var _a, _b, _c;
      if (!((_a = common_libraries_userUserLogin.getUserLogin) == null ? void 0 : _a.onBindPhone())) {
        return false;
      }
      if (!((_c = (_b = auth.data) == null ? void 0 : _b.selected_house) == null ? void 0 : _c.asset_projects_id)) {
        common_libraries_naviHelper.showToast("请绑定房屋");
        return false;
      }
      common_vendor.index.navigateTo({
        url: `/pages/ai/chat?message=${(i == null ? void 0 : i.message) || ""}`
      });
    };
    return (_ctx, _cache) => {
      return {
        a: common_vendor.p({
          type: "arrow-right",
          size: "20",
          color: "#A4A4A4"
        }),
        b: common_vendor.o(handleInputChange),
        c: common_vendor.f(common_vendor.unref(common_libraries_public.quickActions), (i, index, i0) => {
          return {
            a: `/static/svg/${i.icon}`,
            b: common_vendor.t(i.label),
            c: `item_${index}`,
            d: common_vendor.o(($event) => handleInputChange(i), `item_${index}`)
          };
        })
      };
    };
  }
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-b68fefb8"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-customer/src/pages/index/components/AiInput.vue"]]);
wx.createComponent(Component);
