import{_ as t,ab as e,ad as a,o as s,f as o,w as r,h as n,n as i,S as l,V as d,T as p,k as m,A as u,i as c}from"./index-D3amy06V.js";const h=t({data:()=>({top:0,forLength:0}),props:{maxWidth:{type:Number,default:180},rotate:{type:Number,default:-21},margin:{type:Number,default:50},watermark:{type:String,default:""},color:{type:String,default:"#bcbcbc"},opacity:{type:Number,default:.3},show:{type:Boolean,default:!0},fontSize:{type:Number},customTop:{type:Number}},mounted(){this.getstatusBarHeight()},methods:{getstatusBarHeight(){const t=e();this.top="number"==typeof this.customTop?this.customTop:t.safeArea.top+t.windowTop;const s=parseInt(t.screenHeight*(1.2*t.screenWidth));let o=0;a().in(this).select("#getwh").boundingClientRect((t=>{o=parseInt((t.height+this.margin)*t.width)})).exec();const r=setInterval((()=>{0==o||(clearInterval(r),this.forLength=parseInt(s/o))}),500)}}},[["render",function(t,e,a,h,f,g){const y=u,w=c;return a.show?(s(),o(w,{key:0},{default:r((()=>[n(w,{class:"next-watermark-box",style:i([{top:f.top+"px"},{opacity:a.opacity}])},{default:r((()=>[n(w,{class:"next-watermark-getwh",ref:"getwh",id:"getwh",style:i([{"max-width":a.maxWidth+"px"}])},{default:r((()=>[n(y,{nodes:a.watermark},null,8,["nodes"])])),_:1},8,["style"]),n(w,{class:"next-watermark-content"},{default:r((()=>[(s(!0),l(d,null,p(f.forLength,((t,e)=>(s(),o(w,{class:"next-watermark-text",style:i([{color:a.color},{"margin-bottom":a.margin+"px"},{"font-size":a.fontSize?a.fontSize+"px":void 0},{"max-width":a.maxWidth+"px"},{transform:"rotate("+a.rotate+"deg)"}]),key:e},{default:r((()=>[n(y,{nodes:a.watermark},null,8,["nodes"])])),_:2},1032,["style"])))),128))])),_:1})])),_:1},8,["style"])])),_:1})):m("",!0)}],["__scopeId","data-v-566520eb"]]);export{h as _};
