"use strict";const e=require("../../../common/vendor.js"),r=require("../../index.js"),s=require("../../hooks/useModal.js"),o=require("../../api/distri/share.js");if(require("../../url/index.js"),require("../../store/index.js"),require("../../store/app.js"),require("../../api/promotion/diy.js"),require("../../request/index.js"),require("../../config/index.js"),require("../../platform/index.js"),require("../../platform/provider/wechat/index.js"),require("../../platform/provider/wechat/miniProgram.js"),require("../../api/member/auth.js"),require("../../api/member/social.js"),require("../../api/member/user.js"),require("../../platform/provider/apple/index.js"),require("../../platform/share.js"),require("../../router/index.js"),require("../../helper/throttle.js"),require("../../platform/pay.js"),require("../../helper/index.js"),require("../../helper/test.js"),require("../../helper/digit.js"),require("../../api/pay/order.js"),require("../../store/user.js"),require("../../store/cart.js"),require("../../api/trade/cart.js"),require("../../api/pay/wallet.js"),require("../../api/trade/order.js"),require("../../api/promotion/coupon.js"),require("../../store/sys.js"),require("../../store/modal.js"),require("../../config/zIndex.js"),require("../../api/member/signin.js"),!Array){e.resolveComponent("su-popup")()}Math||((()=>"../../ui/su-popup/su-popup.js")+a)();const a=()=>"./canvas-poster/index.js",i={__name:"s-share-modal",props:{shareInfo:{type:Object,default(){}}},setup(a){const i=e.computed((()=>r.sheep.$store("modal").share)),u=e.computed((()=>r.sheep.$store("app").platform.share)),t=e.ref(""),p=a,d=e.reactive({showShareGuide:!1,showPosterModal:!1});let l=e.computed((()=>({...p.shareInfo})));const n=()=>{const a=e.computed((()=>r.sheep.$store("modal").shareInfo.spuId));s.closeShareModal(),r.sheep.$store("user").isLogin?(a.value&&o.ShareApi.getLinkId(3,a.value).then((e=>{0===e.code&&(l.value.link=l.value.link.replace("0",e.data.linkId),l.value.query=l.value.query.replace("0",e.data.linkId))})),e.unref(t).getPoster(),d.showPosterModal=!0):s.showAuthModal()},h=()=>{s.closeShareModal()};function c(){d.showShareGuide=!1}return(o,a)=>e.e({a:e.o(c),b:e.p({show:d.showShareGuide,showClose:!1}),c:d.showShareGuide},d.showShareGuide?{d:e.unref(r.sheep).$url.static("/static/images/share_guide.png")}:{},{e:u.value.methods.includes("forward")},u.value.methods.includes("forward")?{f:e.unref(r.sheep).$url.static("/static/images/share_wx.png"),g:e.o(h)}:{},{h:u.value.methods.includes("poster")},u.value.methods.includes("poster")?{i:e.unref(r.sheep).$url.static("/static/images/share_poster.png"),j:e.o(n)}:{},{k:e.o(((...r)=>e.unref(s.closeShareModal)&&e.unref(s.closeShareModal)(...r))),l:e.o(e.unref(s.closeShareModal)),m:e.p({show:i.value,round:"10",showClose:!1}),n:e.sr(t,"7553aadd-2",{k:"SharePosterRef"}),o:e.o((e=>d.showPosterModal=!1)),p:e.p({show:d.showPosterModal,shareInfo:e.unref(l)})})}},u=e._export_sfc(i,[["__scopeId","data-v-7553aadd"]]);wx.createComponent(u);
