"use strict";const e=require("../../../../sheep/index.js"),t=require("../../../../common/vendor.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/hooks/useModal.js"),require("../../../../sheep/helper/index.js"),require("../../../../sheep/helper/test.js"),require("../../../../sheep/helper/digit.js"),require("../../../../sheep/api/member/signin.js"),require("../../../../sheep/helper/throttle.js"),require("../../../../sheep/platform/pay.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"),e.sheep.$platform.device;const i={name:"UniFab",emits:["fabClick","trigger"],props:{pattern:{type:Array,default:()=>[]},horizontal:{type:String,default:"left"},vertical:{type:String,default:"bottom"},direction:{type:String,default:"horizontal"},content:{type:Array,default:()=>[]},show:{type:Boolean,default:!1},popMenu:{type:Boolean,default:!0}},data:()=>({fabShow:!1,isShow:!1,isAndroidNvue:!1,styles:[{}]}),computed:{contentWidth(e){return 130*(this.content.length+1)+"rpx"},contentWidthMin:()=>"100rpx",boxWidth(){return this.getPosition(3,"horizontal")},boxHeight(){return this.getPosition(3,"vertical")},leftBottom(){return this.getPosition(0,"left","bottom")},rightBottom(){return this.getPosition(0,"right","bottom")},leftTop(){return this.getPosition(0,"left","top")},rightTop(){return this.getPosition(0,"right","top")},flexDirectionStart(){return this.getPosition(1,"vertical","top")},flexDirectionEnd(){return this.getPosition(1,"vertical","bottom")},horizontalLeft(){return this.getPosition(2,"horizontal","left")},horizontalRight(){return this.getPosition(2,"horizontal","right")}},watch:{},created(){this.isShow=this.show,0===this.top&&(this.fabShow=!0)},methods:{_onClick(){this.$emit("fabClick"),this.popMenu&&(this.isShow=!this.isShow)},open(){this.isShow=!0},close(){this.isShow=!1},_onItemClick(e,t){this.$emit("trigger",{index:e,item:t})},getPosition(e,t,i){return 0===e?this.horizontal===t&&this.vertical===i:1===e?this.direction===t&&this.vertical===i:2===e?this.direction===t&&this.horizontal===i:this.isShow&&this.direction===t?this.contentWidth:this.contentWidthMin}}};if(!Array){t.resolveComponent("uni-icons")()}Math;const r=t._export_sfc(i,[["render",function(e,i,r,o,s,n){return t.e({a:r.popMenu&&(n.leftBottom||n.rightBottom||n.leftTop||n.rightTop)&&r.content.length>0},r.popMenu&&(n.leftBottom||n.rightBottom||n.leftTop||n.rightTop)&&r.content.length>0?t.e({b:n.flexDirectionStart||n.horizontalLeft},(n.flexDirectionStart||n.horizontalLeft,{}),{c:t.f(r.content,((e,i,o)=>({a:e.active?e.selectedIconPath:e.iconPath,b:t.t(e.text),c:r.pattern[i].color,d:i,e:t.o((t=>n._onItemClick(i,e)),i)}))),d:"vertical"==r.direction?1:"",e:s.isShow?1:"",f:"horizontal"==r.direction?1:"",g:n.flexDirectionEnd||n.horizontalRight},(n.flexDirectionEnd||n.horizontalRight,{}),{h:"left"===r.horizontal?1:"",i:"right"===r.horizontal?1:"",j:"vertical"===r.direction?1:"",k:n.flexDirectionStart?1:"",l:n.flexDirectionEnd?1:"",m:s.isAndroidNvue?"":1,n:n.boxWidth,o:n.boxHeight,p:n.leftBottom?1:"",q:n.rightBottom?1:"",r:n.leftTop?1:"",s:n.rightTop?1:""}):{},{t:s.isShow&&r.content.length>0?1:"",v:t.p({type:"plusempty",color:"#fff",size:"20"}),w:n.leftBottom?1:"",x:n.rightBottom?1:"",y:n.leftTop?1:"",z:n.rightTop?1:"",A:s.isAndroidNvue?"":1,B:t.o(((...e)=>n._onClick&&n._onClick(...e)))})}]]);wx.createComponent(r);
