import{t as e,a as t,x as a,aq as s,O as l,o as r,j as o,w as n,h as i,y as h,i as u,a0 as c,z as d,u as g,aW as p,B as f,G as y,H as m}from"./index-9bec188e.js";import{_ as B}from"./uv-icon.27c7246d.js";import{b as v}from"./utils.3f9740a5.js";import{_ as w}from"./_plugin-vue_export-helper.1b428a4d.js";const x=w({__name:"index",props:{scrollTop:{type:Number,default:()=>0},systemBarAreaBg:{type:String,default:()=>"#FFFFFF00"},headerAreaBg:{type:String,default:()=>"#FFFFFF00"},headerAreaTextColor:{type:String,default:()=>"#000000"},showReturn:{type:Boolean,default:()=>!0},returnColor:{type:String,default:()=>"#000"},returnSize:{type:Number,default:()=>16},textShadow:{type:[Boolean,String],default:()=>!1},bgChangeByScroll:{type:Boolean,default:()=>!0},bgChangeColor:{type:String,default:()=>"#fff"},propUp:{type:Boolean,default:()=>!0},showRight:{type:Boolean,default:()=>!0},leftWidth:{type:Number,default:()=>0},circleBack:{type:Boolean,default:!1}},emits:["getSystemInfo","animation"],setup(w,{expose:x,emit:b}){const k=w,{goBack:S}=g(),{systemBarAreaBg:_,headerAreaBg:C,headerAreaTextColor:H,showReturn:F,returnColor:A,returnSize:W,textShadow:$,bgChangeByScroll:I,bgChangeColor:z,propUp:j,showRight:T,leftWidth:R,scrollTop:N,circleBack:U}=e(k),X=t({safeAreaInsets:{bottom:0,top:0,left:0,right:0},statusBarHeight:0,screenWidth:0,screenHeight:0});const Y=t({bottom:0,height:0,left:0,right:0,top:0,width:0}),q=a((()=>({"--header-height":"60px"}))),G=a((()=>({width:"100%",height:`${u(X).statusBarHeight}px`,background:u(_)}))),O=a((()=>{let e=0;if(u(Y).height>0){const t=u(Y).top-u(X).statusBarHeight;e=`${(60-u(Y).height)/2*-1+t}px`}return{width:"100%",background:u(C),color:u(H),marginTop:e}})),D=a((()=>({height:Y.value.height>0?Y.value.height+"px":"32px"}))),E=a((()=>({textShadow:u($)?u($):"none"}))),J=a((()=>({width:u(R)<=0?"":`calc( 100vw - var(--side-distance) - var(--side-distance) - ${R.value}rpx )`,left:u(R)<=0?"50%":`calc( var(--side-distance) + ${R.value}rpx )`,textShadow:u($)?u($):"none",transform:u(R)<=0?"translateX(-50%) translateY(-50%)":"translateX(0) translateY(-50%)"}))),K=a((()=>Y.value.left>0?{right:`${X.value.screenWidth-Y.value.right+Y.value.width+5}px`}:{})),L=a((()=>({background:u(z),opacity:u(Q)}))),M=a((()=>{const e=u(Y).height>0?""+(60-u(Y).height)/2:0;return u(X).statusBarHeight+60-e}));let P;const Q=t(0);function V(){const e=X.value.safeAreaInsets.bottom+60+100;P=v(0,e,0,1)}return s(N,(()=>{I.value&&(P||V(),Q.value=P(u(N)),b("animation",Q.value))})),x({containerHeight:M,heightInfo:X,menuInfo:Y}),l((()=>{!function(){const e=p(),t=u(X);console.log(t),t.safeAreaInsets=e.safeAreaInsets,t.statusBarHeight=e.statusBarHeight,t.screenWidth=e.screenWidth||e.windowWidth,t.screenHeight=e.screenHeight||e.windowHeight}(),V()})),(e,t)=>{const a=f,s=y(m("uv-icon"),B);return r(),o(a,{class:"container",style:h(u(q))},{default:n((()=>[i(a,{class:"header-container"},{default:n((()=>[i(a,{class:"system-bar-area",style:h(u(G))},null,8,["style"]),i(a,{class:"header-row",style:h(u(O))},{default:n((()=>[u(F)?(r(),o(a,{key:0,class:"left",style:h(u(E))},{default:n((()=>[c(e.$slots,"left",{},(()=>[u(U)?(r(),o(a,{key:0,class:"circle-back",style:h(u(D))},{default:n((()=>[i(s,{name:"arrow-left",color:u(A),size:u(W),onClick:u(S)},null,8,["color","size","onClick"])])),_:1},8,["style"])):(r(),o(s,{key:1,name:"arrow-left",color:u(A),size:u(W),onClick:u(S)},null,8,["color","size","onClick"]))]),!0)])),_:3},8,["style"])):d("",!0),i(a,{class:"title",style:h(u(J))},{default:n((()=>[c(e.$slots,"default",{},void 0,!0)])),_:3},8,["style"]),u(T)?(r(),o(a,{key:1,class:"right",style:h(u(K))},{default:n((()=>[c(e.$slots,"right",{},void 0,!0)])),_:3},8,["style"])):d("",!0)])),_:3},8,["style"]),i(a,{class:"bg-mask",style:h(u(L))},null,8,["style"])])),_:3}),u(j)?(r(),o(a,{key:0,class:"prop-up",style:h({height:`${u(M)}px`})},null,8,["style"])):d("",!0)])),_:3},8,["style"])}}},[["__scopeId","data-v-a2ed81fa"]]);export{x as H};
