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