"use strict";
const common_vendor = require("../../../../common/vendor.js");
const sheep_index = require("../../../../sheep/index.js");
const sheep_hooks_useModal = require("../../../../sheep/hooks/useModal.js");
const sheep_api_product_favorite = require("../../../../sheep/api/product/favorite.js");
require("../../../../sheep/url/index.js");
require("../../../../sheep/store/index.js");
require("../../../../sheep/store/app.js");
require("../../../../sheep/api/promotion/diy.js");
require("../../../../sheep/request/index.js");
require("../../../../sheep/config/index.js");
require("../../../../sheep/platform/index.js");
require("../../../../sheep/platform/provider/wechat/index.js");
require("../../../../sheep/platform/provider/wechat/miniProgram.js");
require("../../../../sheep/api/member/auth.js");
require("../../../../sheep/api/member/social.js");
require("../../../../sheep/api/member/user.js");
require("../../../../sheep/platform/provider/apple/index.js");
require("../../../../sheep/platform/share.js");
require("../../../../sheep/router/index.js");
require("../../../../sheep/helper/throttle.js");
require("../../../../sheep/platform/pay.js");
require("../../../../sheep/helper/index.js");
require("../../../../sheep/helper/test.js");
require("../../../../sheep/helper/digit.js");
require("../../../../sheep/api/pay/order.js");
require("../../../../sheep/store/user.js");
require("../../../../sheep/store/cart.js");
require("../../../../sheep/api/trade/cart.js");
require("../../../../sheep/api/pay/wallet.js");
require("../../../../sheep/api/trade/order.js");
require("../../../../sheep/api/promotion/coupon.js");
require("../../../../sheep/store/sys.js");
require("../../../../sheep/store/modal.js");
require("../../../../sheep/config/zIndex.js");
if (!Array) {
  const _easycom_su_fixed2 = common_vendor.resolveComponent("su-fixed");
  _easycom_su_fixed2();
}
const _easycom_su_fixed = () => "../../../../sheep/ui/su-fixed/su-fixed.js";
if (!Math) {
  _easycom_su_fixed();
}
const _sfc_main = {
  __name: "detail-tabbar",
  props: {
    modelValue: {
      type: Object,
      default() {
      }
    },
    bg: {
      type: String,
      default: "bg-white"
    },
    bgStyles: {
      type: Object,
      default() {
      }
    },
    ui: {
      type: String,
      default: ""
    },
    noFixed: {
      type: Boolean,
      default: false
    },
    topRadius: {
      type: Number,
      default: 0
    },
    collectIcon: {
      type: Boolean,
      default: true
    },
    serviceIcon: {
      type: Boolean,
      default: true
    },
    shareIcon: {
      type: Boolean,
      default: true
    }
  },
  setup(__props) {
    const props = __props;
    common_vendor.reactive({});
    async function onFavorite() {
      if (props.modelValue.favorite) {
        const { code } = await sheep_api_product_favorite.FavoriteApi.deleteFavorite(props.modelValue.id);
        if (code !== 0) {
          return;
        }
        sheep_index.sheep.$helper.toast("取消收藏");
        props.modelValue.favorite = false;
      } else {
        const { code } = await sheep_api_product_favorite.FavoriteApi.createFavorite(props.modelValue.id);
        if (code !== 0) {
          return;
        }
        sheep_index.sheep.$helper.toast("收藏成功");
        props.modelValue.favorite = true;
      }
    }
    const onChat = () => {
      sheep_index.sheep.$router.go("/pages/chat/index", {
        id: props.modelValue.id
      });
    };
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: __props.collectIcon
      }, __props.collectIcon ? common_vendor.e({
        b: __props.modelValue.favorite
      }, __props.modelValue.favorite ? {
        c: common_vendor.unref(sheep_index.sheep).$url.static("/static/img/shop/goods/collect_1.gif")
      } : {
        d: common_vendor.unref(sheep_index.sheep).$url.static("/static/img/shop/goods/collect_0.png")
      }, {
        e: common_vendor.o(onFavorite)
      }) : {}, {
        f: __props.serviceIcon
      }, __props.serviceIcon ? {
        g: common_vendor.unref(sheep_index.sheep).$url.static("/static/img/shop/goods/message.png"),
        h: common_vendor.o(onChat)
      } : {}, {
        i: __props.shareIcon
      }, __props.shareIcon ? {
        j: common_vendor.unref(sheep_index.sheep).$url.static("/static/img/shop/goods/share.png"),
        k: common_vendor.o((...args) => common_vendor.unref(sheep_hooks_useModal.showShareModal) && common_vendor.unref(sheep_hooks_useModal.showShareModal)(...args))
      } : {}, {
        l: common_vendor.p({
          bottom: true,
          placeholder: true,
          bg: "bg-white"
        })
      });
    };
  }
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-4c75f2f1"], ["__file", "/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-app/pages/goods/components/detail/detail-tabbar.vue"]]);
wx.createComponent(Component);
