"use strict";
const common_vendor = require("../../common/vendor.js");
const utils_utils = require("../../utils/utils.js");
const utils_file = require("../../utils/file.js");
const _sfc_main = {
  __name: "orderDetail",
  setup(__props) {
    const payType = common_vendor.ref("confirmOrder");
    const foodList = common_vendor.ref([
      {
        id: 1,
        name: "石板肉酱豆腐",
        price: 19.9,
        image: "/static/demo.png",
        tags: [
          { text: "份", type: "normal" },
          { text: "微辣", type: "spicy" }
        ],
        quantity: 1
      },
      {
        id: 2,
        name: "经典三杯鸡",
        price: 26.9,
        image: "/static/demo.png",
        tags: [
          { text: "份", type: "normal" }
        ],
        quantity: 1
      }
    ]);
    const handleConfirmOrder = () => {
      utils_utils.go("/pages/result/index");
    };
    common_vendor.onLoad((e) => {
      if (e.payType)
        payType.value = e.payType;
    });
    return (_ctx, _cache) => {
      return {
        a: common_vendor.f(foodList.value, (item, index, i0) => {
          return common_vendor.e({
            a: common_vendor.unref(utils_file.getFileUrl)(item.image),
            b: common_vendor.t(item.name),
            c: item.tags && item.tags.length > 0
          }, item.tags && item.tags.length > 0 ? {
            d: common_vendor.f(item.tags, (tag, tagIndex, i1) => {
              return common_vendor.e({
                a: common_vendor.t(tag.text),
                b: tagIndex < item.tags.length - 1
              }, tagIndex < item.tags.length - 1 ? {} : {}, {
                c: tagIndex
              });
            })
          } : {}, {
            e: common_vendor.t(item.price),
            f: common_vendor.t(item.quantity || 1),
            g: item.id || index
          });
        }),
        b: common_vendor.o(handleConfirmOrder),
        c: common_vendor.o((...args) => _ctx.handleConfirmPay && _ctx.handleConfirmPay(...args))
      };
    };
  }
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-a6cd41f4"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/orderInfo/orderDetail.js.map
