"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:"s-menu-button",props:{data:{type:Object,default(){}},styles:{type:Object,default(){}},circular:{type:Boolean,default:!0},autoplay:{type:Boolean,default:!1},interval:{type:Number,default:5e3},duration:{type:Number,default:500},ui:{type:String,default:""},mode:{type:String,default:"default"},dotStyle:{type:String,default:"long"},dotCur:{type:String,default:"ui-BG-Main"},bg:{type:String,default:"bg-none"},height:{type:Number,default:300},hasBorder:{type:Boolean,default:!0},borderColor:{type:String,default:"red"},background:{type:String,default:"blue"},hoverClass:{type:String,default:"ss-hover-class"},col:{type:[Number,String],default:3},iconSize:{type:Number,default:80},color:{type:String,default:"#000"}},setup(t){const a=e.reactive({cur:0}),o=t,i=e.computed((()=>d(o.data.list,o.data.row*o.data.column))),u=e.computed((()=>o.data.row*("iconText"===o.data.layout?200:180)));r.sheep.$platform.device.windowWidth;const l=e=>{a.cur=e.detail.current},d=(e=[],r=1)=>{let t=[],a=[];return e.forEach((e=>{a.length===r&&(a=[]),0===a.length&&t.push(a),a.push(e)})),t};return(d,n)=>e.e({a:e.f(i.value,((i,u,l)=>({a:e.f(i,((a,i,u)=>e.e({a:a.badge.show},a.badge.show?{b:e.t(a.badge.text),c:e.s({background:a.badge.bgColor,color:a.badge.textColor})}:{},{d:a.iconUrl},a.iconUrl?{e:e.s({width:o.iconSize+"rpx",height:o.iconSize+"rpx"}),f:e.unref(r.sheep).$url.cdn(a.iconUrl)}:{},"iconText"===t.data.layout?{g:e.t(a.title),h:e.s({color:a.titleColor})}:{},{i:i,j:e.o((t=>e.unref(r.sheep).$router.go(a.url)),i)}))),b:u,c:a.cur==u?1:""}))),b:"iconText"===t.data.layout,c:e.s({width:1/t.data.column*100+"%",height:"200rpx"}),d:o.circular,e:a.cur,f:o.autoplay,g:o.interval,h:o.duration,i:e.s({height:u.value+"rpx"}),j:e.o(l),k:i.value.length>1},i.value.length>1?e.e({l:"tag"!=o.dotStyle},"tag"!=o.dotStyle?{m:e.f(i.value.length,((r,t,o)=>({a:t,b:e.n(a.cur==t?"cur":"")}))),n:e.n(o.dotCur),o:e.n(o.dotStyle)}:{},{p:"tag"==o.dotStyle},"tag"==o.dotStyle?{q:e.t(a.cur+1),r:e.t(i.value.length),s:e.n(o.dotCur),t:e.n(o.dotStyle)}:{}):{},{v:e.n(o.mode),w:e.n(o.bg),x:e.n(o.ui),y:e.s({height:u.value+(i.value.length>1?50:0)+"rpx"})})}},a=e._export_sfc(t,[["__scopeId","data-v-74b9c4a9"]]);wx.createComponent(a);
