"use strict";
const common_vendor = require("../../common/vendor.js");
const WORKORDER_add_method = require("./method.js");
const WORKORDER_add_model = require("./model.js");
const gen_Enums = require("../../gen/Enums.js");
require("../../common/libraries/request.js");
require("../../common/store/useWeAppAuthStore.js");
require("../../gen/Apis.js");
require("../../common/store/useWorkStore.js");
require("../../common/libraries/setTabBar.js");
require("../../common/libraries/apiLoading.js");
require("../../common/libraries/naviHelper.js");
if (!Array) {
  const _easycom_hs_radio_cell_picker2 = common_vendor.resolveComponent("hs-radio-cell-picker");
  const _easycom_hs_cell2 = common_vendor.resolveComponent("hs-cell");
  const _easycom_hs_cell_textarea2 = common_vendor.resolveComponent("hs-cell-textarea");
  const _easycom_hs_upload2 = common_vendor.resolveComponent("hs-upload");
  const _easycom_hs_reservation_picker2 = common_vendor.resolveComponent("hs-reservation-picker");
  const _easycom_hs_input2 = common_vendor.resolveComponent("hs-input");
  const _easycom_hs_footer2 = common_vendor.resolveComponent("hs-footer");
  (_easycom_hs_radio_cell_picker2 + _easycom_hs_cell2 + _easycom_hs_cell_textarea2 + _easycom_hs_upload2 + _easycom_hs_reservation_picker2 + _easycom_hs_input2 + _easycom_hs_footer2)();
}
const _easycom_hs_radio_cell_picker = () => "../../components/hs-radio-cell-picker/hs-radio-cell-picker.js";
const _easycom_hs_cell = () => "../../components/hs-cell/hs-cell.js";
const _easycom_hs_cell_textarea = () => "../../components/hs-cell-textarea/hs-cell-textarea.js";
const _easycom_hs_upload = () => "../../components/hs-upload/hs-upload.js";
const _easycom_hs_reservation_picker = () => "../../components/hs-reservation-picker/hs-reservation-picker.js";
const _easycom_hs_input = () => "../../components/hs-input/hs-input.js";
const _easycom_hs_footer = () => "../../components/hs-footer/hs-footer.js";
if (!Math) {
  (_easycom_hs_radio_cell_picker + _easycom_hs_cell + _easycom_hs_cell_textarea + _easycom_hs_upload + _easycom_hs_reservation_picker + _easycom_hs_input + _easycom_hs_footer)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    common_vendor.onShow(() => {
      var _a;
      (_a = WORKORDER_add_method.method) == null ? void 0 : _a.init();
    });
    common_vendor.onLoad((e) => {
      WORKORDER_add_model.useModel.formData.value.type = (e == null ? void 0 : e.type) || "";
      WORKORDER_add_model.useModel.formData.value.location = (e == null ? void 0 : e.location) || "";
    });
    common_vendor.onUnload(() => {
      WORKORDER_add_model.useModel.formData.value = { is_anonymous: false };
    });
    return (_ctx, _cache) => {
      var _a, _b, _c, _d, _e;
      return common_vendor.e({
        a: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.type === "Complaint"
      }, common_vendor.unref(WORKORDER_add_model.useModel).formData.value.type === "Complaint" ? {
        b: common_vendor.o(($event) => common_vendor.unref(WORKORDER_add_model.useModel).formData.value.complaint_type = $event),
        c: common_vendor.p({
          Enums: common_vendor.unref(gen_Enums.HouseWorkOrdersComplaintTypeEnum),
          title: "投诉类型",
          borderTop: true,
          required: true,
          valueModel: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.complaint_type
        })
      } : {}, {
        d: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.type !== "Complaint" && common_vendor.unref(WORKORDER_add_model.useModel).formData.value.location === "MyHome"
      }, common_vendor.unref(WORKORDER_add_model.useModel).formData.value.type !== "Complaint" && common_vendor.unref(WORKORDER_add_model.useModel).formData.value.location === "MyHome" ? {
        e: common_vendor.o((_a = common_vendor.unref(WORKORDER_add_method.method)) == null ? void 0 : _a.handleToSelectHouse),
        f: common_vendor.p({
          title: "房屋信息",
          required: true,
          borderTop: true,
          isLink: true,
          value: (_d = (_c = (_b = common_vendor.unref(WORKORDER_add_model.useModel)) == null ? void 0 : _b.formData) == null ? void 0 : _c.value) == null ? void 0 : _d.full_name
        })
      } : {}, {
        g: common_vendor.o(($event) => common_vendor.unref(WORKORDER_add_model.useModel).formData.value.content = $event),
        h: common_vendor.p({
          borderTop: true,
          required: true,
          title: "问题描述",
          placeholder: "请详细描述问题情况，包括具体位置现象等",
          valueModel: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.content
        }),
        i: common_vendor.o(($event) => common_vendor.unref(WORKORDER_add_model.useModel).formData.value.attachments = $event),
        j: common_vendor.p({
          borderTop: true,
          title: "上传图片",
          count: 6,
          valueModel: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.attachments
        }),
        k: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.type === "Complaint"
      }, common_vendor.unref(WORKORDER_add_model.useModel).formData.value.type === "Complaint" ? {
        l: common_vendor.o(
          //@ts-ignore
          (...args) => common_vendor.unref(WORKORDER_add_method.method).handleSwitchChange && common_vendor.unref(WORKORDER_add_method.method).handleSwitchChange(...args)
        ),
        m: common_vendor.p({
          title: "匿名投诉"
        })
      } : {}, {
        n: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.location === "MyHome" && common_vendor.unref(WORKORDER_add_model.useModel).formData.value.type !== "Complaint"
      }, common_vendor.unref(WORKORDER_add_model.useModel).formData.value.location === "MyHome" && common_vendor.unref(WORKORDER_add_model.useModel).formData.value.type !== "Complaint" ? {
        o: common_vendor.o(($event) => common_vendor.unref(WORKORDER_add_model.useModel).formData.value.expect_start_time = $event),
        p: common_vendor.o(($event) => common_vendor.unref(WORKORDER_add_model.useModel).formData.value.expect_end_time = $event),
        q: common_vendor.p({
          title: "期望上门时间",
          required: true,
          valueExpectStartTime: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.expect_start_time,
          valueExpectEndTime: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.expect_end_time
        })
      } : {}, {
        r: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.type !== "Complaint"
      }, common_vendor.unref(WORKORDER_add_model.useModel).formData.value.type !== "Complaint" ? {
        s: common_vendor.o(($event) => common_vendor.unref(WORKORDER_add_model.useModel).formData.value.reporter_name = $event),
        t: common_vendor.p({
          valueModel: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.reporter_name
        }),
        v: common_vendor.p({
          title: "联系人",
          required: true
        }),
        w: common_vendor.o(($event) => common_vendor.unref(WORKORDER_add_model.useModel).formData.value.reporter_phone = $event),
        x: common_vendor.p({
          valueModel: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.reporter_phone
        }),
        y: common_vendor.p({
          title: "联系电话",
          required: true,
          borderTop: true
        })
      } : {}, {
        z: common_vendor.o((_e = common_vendor.unref(WORKORDER_add_method.method)) == null ? void 0 : _e.handleSubmit),
        A: common_vendor.p({
          btnParimaryName: "提交"
        })
      });
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-customer/src/WORKORDER/add/index.vue"]]);
wx.createPage(MiniProgramPage);
