import{y as s,c as a,e,f as l,w as t,j as d,B as o,t as u,u as c,g as i,v as r,s as n,ab as f,A as p,i as y}from"./index-9aa72eed.js";import{f as _}from"./useGoods.ce02ada2.js";import{_ as m}from"./_plugin-vue_export-helper.1b428a4d.js";const b=m({__name:"s-coupon-list",props:{data:{type:Object,default:{}},disabled:{type:Boolean,default:!1},type:{type:String,default:"coupon"}},setup(m){s({});const b=a((()=>"coupon"!==v.type&&1!==v.data.status)),v=m;return(s,a)=>{const v=y;return e(),l(v,{class:"ss-m-20",style:p({opacity:m.disabled?"0.5":"1"})},{default:t((()=>[d(v,{class:"content"},{default:t((()=>[d(v,{class:o(["tag ss-flex ss-row-center",b.value?"disabled-bg-color":"info-bg-color"])},{default:t((()=>[u(c(1===m.data.discountType?"满减券":"折扣券"),1)])),_:1},8,["class"]),d(v,{class:"title ss-m-x-30 ss-p-t-18"},{default:t((()=>[d(v,{class:"ss-flex ss-row-between"},{default:t((()=>[d(v,{class:o(["value-text ss-flex-1 ss-m-r-10",b.value?"disabled-color":"info-color"])},{default:t((()=>[u(c(m.data.name),1)])),_:1},8,["class"]),d(v,null,{default:t((()=>[d(v,{class:o(["ss-flex ss-col-bottom",b.value?"disabled-color":"price-text"])},{default:t((()=>[1===m.data.discountType?(e(),l(v,{key:0,class:"value-reduce ss-m-b-10"},{default:t((()=>[u("￥")])),_:1})):i("",!0),d(v,{class:"value-price"},{default:t((()=>[u(c(1===m.data.discountType?r(_)(m.data.discountPrice):m.data.discountPercent/10),1)])),_:1}),2===m.data.discountType?(e(),l(v,{key:1,class:"value-discount ss-m-b-10 ss-m-l-4"},{default:t((()=>[u("折")])),_:1})):i("",!0)])),_:1},8,["class"])])),_:1})])),_:1}),d(v,{class:"ss-flex ss-row-between ss-m-t-16"},{default:t((()=>[2===m.data.validityType?(e(),l(v,{key:0,class:o(["sellby-text",b.value?"disabled-color":"subtitle-color"])},{default:t((()=>[u(" 有效期：领取后 "+c(m.data.fixedEndTerm)+" 天内可用 ",1)])),_:1},8,["class"])):(e(),l(v,{key:1,class:o(["sellby-text",b.value?"disabled-color":"subtitle-color"])},{default:t((()=>[u(" 有效期: "+c(r(n).$helper.timeFormat(m.data.validStartTime,"yyyy-mm-dd"))+" 至 "+c(r(n).$helper.timeFormat(m.data.validEndTime,"yyyy-mm-dd")),1)])),_:1},8,["class"])),d(v,{class:o(["value-enough",b.value?"disabled-color":"subtitle-color"])},{default:t((()=>[u(" 满 "+c(r(_)(m.data.usePrice))+" 可用 ",1)])),_:1},8,["class"])])),_:1})])),_:1})])),_:1}),d(v,{class:"desc ss-flex ss-row-between"},{default:t((()=>[d(v,null,{default:t((()=>[d(v,{class:"desc-title"},{default:t((()=>[u(c(m.data.description),1)])),_:1}),d(v,null,{default:t((()=>[f(s.$slots,"reason",{},void 0,!0)])),_:3})])),_:3}),d(v,null,{default:t((()=>[f(s.$slots,"default",{},void 0,!0)])),_:3})])),_:3})])),_:3},8,["style"])}}},[["__scopeId","data-v-b112a8a9"]]);export{b as _};
