import{H as e,J as o,K as t,L as i,aL as n,M as a,O as r,aM as d,o as l,c as s,w as c,k as u,P as g,f as m,F as f,g as p,m as y,e as h,t as v,i as w,j as _}from"./index-IX2tYR8R.js";import{_ as b}from"./_plugin-vue_export-helper.BCo6x5W8.js";const S=b({name:"u-loading-icon",mixins:[t,i,e({props:{show:{type:Boolean,default:()=>o.loadingIcon.show},color:{type:String,default:()=>o.loadingIcon.color},textColor:{type:String,default:()=>o.loadingIcon.textColor},vertical:{type:Boolean,default:()=>o.loadingIcon.vertical},mode:{type:String,default:()=>o.loadingIcon.mode},size:{type:[String,Number],default:()=>o.loadingIcon.size},textSize:{type:[String,Number],default:()=>o.loadingIcon.textSize},text:{type:[String,Number],default:()=>o.loadingIcon.text},timingFunction:{type:String,default:()=>o.loadingIcon.timingFunction},duration:{type:[String,Number],default:()=>o.loadingIcon.duration},inactiveColor:{type:String,default:()=>o.loadingIcon.inactiveColor}}})],data:()=>({array12:Array.from({length:12}),aniAngel:360,webviewHide:!1,loading:!1}),computed:{otherBorderColor(){const e=n(this.color,"#ffffff",100)[80];return"circle"===this.mode?this.inactiveColor?this.inactiveColor:e:"transparent"}},watch:{show(e){}},mounted(){this.init()},methods:{addUnit:a,addStyle:r,init(){setTimeout((()=>{}),20)},addEventListenerToWebview(){const e=d(),o=e[e.length-1].$getAppWebview();o.addEventListener("hide",(()=>{this.webviewHide=!0})),o.addEventListener("show",(()=>{this.webviewHide=!1}))}}},[["render",function(e,o,t,i,n,a){const r=w,d=_;return e.show?(l(),s(r,{key:0,class:u(["u-loading-icon",[e.vertical&&"u-loading-icon--vertical"]]),style:g([a.addStyle(e.customStyle)])},{default:c((()=>[n.webviewHide?y("",!0):(l(),s(r,{key:0,class:u(["u-loading-icon__spinner",[`u-loading-icon__spinner--${e.mode}`]]),ref:"ani",style:g({color:e.color,width:a.addUnit(e.size),height:a.addUnit(e.size),borderTopColor:e.color,borderBottomColor:a.otherBorderColor,borderLeftColor:a.otherBorderColor,borderRightColor:a.otherBorderColor,"animation-duration":`${e.duration}ms`,"animation-timing-function":"semicircle"===e.mode||"circle"===e.mode?e.timingFunction:""})},{default:c((()=>["spinner"===e.mode?(l(!0),m(f,{key:0},p(n.array12,((e,o)=>(l(),s(r,{key:o,class:"u-loading-icon__dot"})))),128)):y("",!0)])),_:1},8,["class","style"])),e.text?(l(),s(d,{key:1,class:"u-loading-icon__text",style:g({fontSize:a.addUnit(e.textSize),color:e.textColor})},{default:c((()=>[h(v(e.text),1)])),_:1},8,["style"])):y("",!0)])),_:1},8,["style","class"])):y("",!0)}],["__scopeId","data-v-6bab3068"]]);export{S as _};