"use strict";const e=require("../../../common/vendor.js"),r=require("../../index.js");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("../../hooks/useModal.js"),require("../../helper/index.js"),require("../../helper/test.js"),require("../../helper/digit.js"),require("../../api/member/signin.js"),require("../../helper/throttle.js"),require("../../platform/pay.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");const t={__name:"su-coupon",props:{size:{type:String,default:"lg"},textColor:{type:String,default:"#FF6000"},background:{type:String,default:"#FFC19C"},btnBg:{type:String,default:"#fff"},btnTextColor:{type:String,default:"#FF6000"},state:{type:Number,default:0},couponId:{type:Number,default:0},title:{type:String,default:"这是优惠券"},value:{type:[Number,String],default:50},sellBy:{type:String,default:"2019.11.25至2019.12.25"},surplus:{type:[Number,String],default:0},type:{type:String,default:""}},setup(t){e.useCssVars((e=>({"1cba8317":t.textColor,"0956aa8e":t.btnTextColor,"78bb65bc":t.btnBg})));const u=e.reactive({stateMap:{0:"立即领取",1:"去使用"}}),s=t,i=e.computed((()=>({background:s.background})));return(a,p)=>e.e({a:"xs"===s.size},"xs"===s.size?{b:e.t("reduce"===t.type?t.value:Number(t.value)),c:e.t("reduce"===t.type?"元":"折"),d:e.t(s.title),e:e.t(u.stateMap[s.state]),f:e.s(i.value),g:e.o((u=>e.unref(r.sheep).$router.go("/pages/coupon/detail",{id:t.couponId})))}:{},{h:"md"===s.size},"md"===s.size?e.e({i:e.t("reduce"===t.type?t.value:Number(t.value)),j:e.t("reduce"===t.type?"元":"折"),k:e.t(s.title),l:s.surplus},s.surplus?{m:e.t(s.surplus)}:{},{n:e.t(u.stateMap[s.state]),o:e.s(i.value),p:e.o((u=>e.unref(r.sheep).$router.go("/pages/coupon/detail",{id:t.couponId})))}):{},{q:"lg"===s.size},"lg"===s.size?e.e({r:e.t("reduce"===t.type?t.value:Number(t.value)),s:e.t("reduce"===t.type?"元":"折"),t:e.t(s.title),v:e.t(s.sellBy),w:e.t(u.stateMap[s.state]),x:s.surplus},s.surplus?{y:e.t(s.surplus)}:{},{z:e.s(i.value),A:e.o((u=>e.unref(r.sheep).$router.go("/pages/coupon/detail",{id:t.couponId})))}):{},{B:e.s(a.__cssVars())})}},u=e._export_sfc(t,[["__scopeId","data-v-0533717a"]]);wx.createComponent(u);
