var e = require("../../common/vendor.js"),
  n = require("../../hooks/onMounted.js"),
  t = require("../../hooks/onShareAppMessage.js"),
  a = require("../../service/index.js"),
  r = require("../../constant/index.js"),
  i = require("../../utils/util.js"),
  o = require("../../config/index.js"),
  u = require("../../utils/common.js"),
  s = require("../../utils/navigate.js"),
  c = require("../../enums/index.js"),
  l = require("../../data/index.js");
require("../../hooks/useState.js"),
  require("../../store/app/index.js"),
  require("../../utils/request.js"),
  Math || (e.unref(v) + e.unref(d) + e.unref(p) + e.unref(m))();
var v = function () {
    return "../../components/time-line/index.js";
  },
  p = function () {
    return "../../components/float-back-to-top/index.js";
  },
  d = function () {
    return "../../components/divider/index.js";
  },
  m = function () {
    return "../../components/float-share/index.js";
  },
  _ = {
    __name: "index",
    setup: function (v) {
      var p = e.ref(!0),
        d = e.ref({}),
        m = e.ref(!1),
        _ = e.ref(""),
        f = e.ref([
          {
            name: "骨架",
            value: 0,
            key: "type1",
            icon: "/static/svgs/pic_ckpc_normal_1.svg",
          },
          {
            name: "外观",
            value: 0,
            key: "type2",
            icon: "/static/svgs/pic_ckpc_normal_2.svg",
          },
          {
            name: "发动机",
            value: 0,
            key: "type3",
            icon: "/static/svgs/pic_ckpc_normal_3.svg",
          },
          {
            name: "变速箱",
            value: 0,
            key: "type3",
            icon: "/static/svgs/pic_ckpc_normal_4.svg",
          },
          {
            name: "火烧",
            value: 0,
            key: "type4",
            icon: "/static/svgs/pic_ckpc_normal_5.svg",
          },
          {
            name: "水淹",
            value: 0,
            key: "type5",
            icon: "/static/svgs/pic_ckpc_normal_6.svg",
          },
          {
            name: "气囊",
            value: 0,
            key: "type6",
            icon: "/static/svgs/pic_ckpc_normal_7.svg",
          },
          {
            name: "加强件",
            value: 0,
            key: "type7",
            icon: "/static/svgs/pic_ckpc_normal_8.svg",
          },
        ]),
        g = function () {
          i.showLoading(),
            a
              .getOrderDetail({ order_no: _.value })
              .then(function (n) {
                var t = e._.map(n.productList, function (e) {
                  return e.product_id;
                }).join(",");
                s.navigateTo({
                  url: "/pages/order-detail/index",
                  params: {
                    orderNo: _.value,
                    productName: u.getProduct(t).product_name,
                  },
                });
              })
              .finally(function () {
                i.hideLoading();
              });
        },
        k = function (e) {
          e.detail.path && switchTab({ url: e.detail.path });
        };
      return (
        n.onMounted(function (e) {
          var n = e.order_no,
            t = e.product_id;
          (_.value = n),
            i.showLoading("努力查询中"),
            a
              .getBlankReportDetail({ order_no: n, product_id: t })
              .then(function (e) {
                (d.value = e), (p.value = !1), i.hideLoading();
              });
        }, !1),
        e.onPageScroll(function (n) {
          var t = n.scrollTop;
          m.value = t >= e.index.getSystemInfoSync().windowHeight / 3;
        }),
        t.onShareAppMessage(),
        function (n, t) {
          return e.e(
            { a: !p.value },
            p.value
              ? {}
              : {
                  b: e.t(
                    (d.value.vin || "")
                      .toString()
                      .replace(/^(.{5}).{6}/, "$1******")
                  ),
                  c: e.t(d.value.order_no),
                  d: e.t(d.value.report_date),
                  e: e.t(d.value.name),
                  f: e.t(d.value.manufacturer),
                  g: e.t(d.value.comfuelconsumption),
                  h: e.t(d.value.engine_no),
                  i: e.t(d.value.displacementml),
                  j: e.t(d.value.environmentalstandards),
                  k: e.t(d.value.sizetype),
                  l: e.t(d.value.isimport),
                  m: e.t(d.value.seatnum),
                  n: e.f(f.value, function (n, t, a) {
                    return e.e(
                      { a: n.icon, b: e.t(n.name), c: 0 === n.value },
                      (n.value, {}),
                      { d: 1 === n.value },
                      (n.value, {}),
                      { e: 2 === n.value },
                      (n.value, {}),
                      { f: 3 === n.value || 4 === n.value },
                      (3 === n.value || n.value, {}),
                      { g: t }
                    );
                  }),
                  o: e.p({
                    type: e.unref(c.TimeLineEnum).RECORD,
                    data: e.unref(l.mockBlankReportList),
                  }),
                  p: e.o(g),
                  q: e.unref(o.appName),
                  r: e.o(k),
                  s: e.t(e.unref(r.disclaimer)),
                  t: e.p({ visible: m.value }),
                }
          );
        }
      );
    },
  },
  f = e._export_sfc(_, [["__scopeId", "data-v-94bceea2"]]);
(_.__runtimeHooks = 3), wx.createPage(f);
