"use strict";const e=require("../../../common/vendor.js"),l=require("../../../common/libraries/IsHouseExist.js");require("../../../common/libraries/request.js");const o=require("../../../common/store/useWeAppAuthStore.js"),u=require("../../../common/store/useWorkStore.js"),n=require("../model.js");if(require("../../../gen/Apis.js"),require("../../../common/libraries/setTabBar.js"),require("../../../common/libraries/apiLoading.js"),!Array){(e.resolveComponent("up-icon")+e.resolveComponent("hs-popup-switch-house"))()}Math||((()=>"../../../node-modules/uview-plus/components/u-icon/u-icon.js")+(()=>"../../../components/hs-popup-switch-house/hs-popup-switch-house.js"))();const i=e.defineComponent({__name:"PageHeadTitle",props:["title","objStyle","data"],setup(i){const r=i,d=u.useWorkStore(),s=e.ref(!1),a=e.ref("标题"),v=e.ref({}),t=e.ref({}),c=o.useWeAppAuthStore(),p=()=>{l.getIsHouseExist()&&(s.value=!0)};e.watch((()=>null==d?void 0:d.selectedHouse),(()=>{(null==d?void 0:d.selectedHouse)&&(s.value=!0),console.log("work?.selectedHouse",null==d?void 0:d.selectedHouse)}));const g=e=>{s.value=!1},f=()=>{var e,l,o,u,i,r,d,s;return`background:linear-gradient(180deg,rgba(208, 229, 255, 0.44) 0%,#f7f7f7 100%,rgba(255, 255, 255, 0) 100%),linear-gradient(145deg, ${(null==(u=null==(o=null==(l=null==(e=n.useModel)?void 0:e.pageConfig)?void 0:l.value)?void 0:o.pageColorValue)?void 0:u[0])||"#d3d7ff"} 100%,rgba(255, 255, 255, 0) 100%),linear-gradient(222deg, ${(null==(s=null==(d=null==(r=null==(i=n.useModel)?void 0:i.pageConfig)?void 0:r.value)?void 0:d.pageColorValue)?void 0:s[1])||"#dffff3"} 100%,#F7F7F7 40%);`},h=e=>{if(!e)return"-";if(e.length<=15)return e;return e.slice(0,6)+"..."+e.slice(-6)};return e.watch((()=>{var e;return null==(e=null==c?void 0:c.data)?void 0:e.user}),(()=>{var e,l;(null==(e=null==c?void 0:c.data)?void 0:e.house_occupant)&&!(null==(l=null==c?void 0:c.data)?void 0:l.selected_house)&&(s.value=!1)}),{deep:!0}),e.onShow((()=>{t.value=null==c?void 0:c.data,console.log("2k2k",t.value)})),e.onMounted((()=>{a.value=r.title,v.value=e.index.getMenuButtonBoundingClientRect(),console.log(v.value,"capsuleRect")})),e.onHide((()=>{s.value=!1})),(l,o)=>{var u,i,d,a,c,m,_,j,b,w,C,q,x,H,k,S,$,y,A,M,W,B,F,I,T,E;return e.e({a:null==(m=null==(c=null==(a=null==(d=null==(i=null==(u=t.value)?void 0:u.config)?void 0:i.companyConfig)?void 0:d.config_value)?void 0:a.logo)?void 0:c[0])?void 0:m.url},(null==(q=null==(C=null==(w=null==(b=null==(j=null==(_=t.value)?void 0:_.config)?void 0:j.companyConfig)?void 0:b.config_value)?void 0:w.logo)?void 0:C[0])?void 0:q.url)?{b:(null==(y=null==($=null==(S=null==(k=null==(H=null==(x=t.value)?void 0:x.config)?void 0:H.companyConfig)?void 0:k.config_value)?void 0:S.logo)?void 0:$[0])?void 0:y.url)||""}:{},{c:!(null==(A=t.value)?void 0:A.user)},(null==(M=t.value)?void 0:M.user)&&(null==(W=t.value)?void 0:W.selected_house)?{e:e.t(h((null==(F=null==(B=t.value)?void 0:B.selected_house)?void 0:F.full_name)||""))}:{},{d:!(null==(I=t.value)?void 0:I.selected_house),f:e.p({name:"arrow-down-fill",size:"12",color:"#333"}),g:e.o(p),h:e.o((e=>s.value=!1)),i:e.o(g),j:e.p({show:s.value}),k:e.s(`padding-top:${v.value.top}px;height:${v.value.height}px;line-height:${v.value.height}px;${null==r?void 0:r.objStyle};${(null==(E=null==(T=e.unref(n.useModel))?void 0:T.scrollTop)?void 0:E.value)>10?f():""}`)})}}}),r=e._export_sfc(i,[["__scopeId","data-v-09845181"]]);wx.createComponent(r);
