import{v as q,u as H,x as M,c as m,j as o,e as l,h as s,f as r,b as n,H as c,w as i,A as _,l as p,t as b,g as f,Q as g,B as j,F as x,k as B,C as I,q as T,n as S,J as E,_ as V,E as $,D as k,K as L,R as D,ak as F}from"./index-OSKNspXo.js";import{Q as J}from"./QBtnDropdown-BxYnQIyn.js";/* empty css                                                                              */const K={class:"bg-page-container"},O={style:{display:"flex","justify-content":"space-between","padding-top":"1rem","padding-left":"0.5rem","padding-right":"0.5rem","align-items":"center"}},P={style:{"z-index":"6","margin-top":"-3.5vh",width:"100%","margin-bottom":"0.5rem"},class:"detail-padding-left"},R={class:"row justify-between q-pl-md"},G={key:0},U=["src"],W={class:"row justify-end items-end"},X={key:0},Y={class:"q-pa-sm"},Z={class:"q-pa-sm"},ee={key:0,class:"row items-baseline"},te={style:{"text-overflow":"ellipsis",overflow:"hidden","white-space":"nowrap","max-width":"43vw"}},le={class:"q-pl-xs",style:{"font-size":"small","font-style":"italic"}},ie={key:0,style:{"border-width":"0","border-top-width":"1px!important","border-style":"solid"}},ae={name:"headerDetailComponent"},se=Object.assign(ae,{props:{editTooltip:{type:String},headerClass:{type:String},close:{type:Function},labelAvatar:{type:String},displayLabel:{type:Boolean},label:{type:String},subLabel:{type:String},img:{type:String},iconName:{type:String},hideEditButton:{type:Boolean},editMode:{type:Boolean},subActions:{type:Array},actions:{type:Array},avatarBgColor:{type:String}},emits:["update:editMode"],setup(t,{emit:A}){const{t:v}=H(),w=M(),Q=m(()=>w.screen.width<480),C=m(()=>w.screen.width<1200),z=m(()=>C.value?[]:u.actions),a=m(()=>{var d;return C.value&&((d=u.actions)==null?void 0:d.length)>0?[...u.actions,...u.subActions].filter(y=>!y.isHide):u.subActions.filter(y=>!y.isHide)}),u=t,N=A,h=m({get:()=>u.editMode,set:function(d){N("update:editMode",d)}});return(d,y)=>(l(),o("div",K,[s("div",{class:L([t.headerClass?t.headerClass:"bg-primary","header"])},[s("div",O,[r(g,{name:"arrow_back",size:"2rem",color:"white",style:{cursor:"pointer","z-index":"100"},onClick:t.close},{default:i(()=>[r(_,null,{default:i(()=>[p(b(f(v)("ui.tooltip.close")),1)]),_:1})]),_:1},8,["onClick"]),a.value&&a.value.length>1?(l(),n(J,{key:0,rounded:"",outline:"",class:"bg-primary",style:{color:"#fff",margin:"0.5rem 0.5rem"}},{label:i(()=>[r(g,{name:"more_vert",class:"size",style:{cursor:"pointer"}},{default:i(()=>[r(_,null,{default:i(()=>[p(b(f(v)("ui.tooltip.more_actions")),1)]),_:1})]),_:1})]),default:i(()=>[r(j,{class:"text-primary",style:{"min-width":"200px"}},{default:i(()=>[(l(!0),o(x,null,B(a.value,e=>I((l(),n(T,{clickable:"",key:e.label,disable:e.isDisable||e.isLoading},{default:i(()=>[e.icon||e.isLoading?(l(),n(S,{key:0,avatar:""},{default:i(()=>[e.isLoading?(l(),n(E,{key:1,size:"1.5rem"})):(l(),n(g,{key:0,size:"1.5rem",name:e.icon},null,8,["name"]))]),_:2},1024)):c("",!0),r(S,null,{default:i(()=>[r(V,{img:!e.isLoading&&e.img?e.img:void 0,label:e.label,onClick:e.click,"class-label":"cursor-pointer",style:{"margin-bottom":"0.5rem","margin-top":"0.5rem"}},null,8,["img","label","onClick"])]),_:2},1024)]),_:2},1032,["disable"])),[[$]])),128))]),_:1})]),_:1})):a.value.length===1?(l(),n(k,{key:1,disable:a.value[0].isDisable!==void 0&&a.value[0].isDisable,label:a.value[0].label,icon:a.value[0].icon,click:a.value[0].click,loading:a.value[0].isLoading},null,8,["disable","label","icon","click","loading"])):c("",!0)])],2),s("div",P,[s("div",R,[s("div",{class:L(t.headerClass?t.headerClass:"bg-primary"),style:{"border-radius":"9999px",padding:"0.25rem"}},[r(F,{color:t.avatarBgColor?t.avatarBgColor:"secondary","text-color":"white",size:"9vh"},{default:i(()=>[t.labelAvatar?(l(),o("div",G,b(t.labelAvatar),1)):t.img?(l(),o("img",{key:1,src:t.img,alt:""},null,8,U)):t.iconName?(l(),n(g,{key:2,name:t.iconName},null,8,["name"])):c("",!0),D(d.$slots,"avatar",{},void 0,!0)]),_:3},8,["color"])],2),s("div",W,[h.value?c("",!0):(l(),o("div",X,[s("div",Y,[!Q.value&&!h.value&&!t.hideEditButton?(l(),n(k,{key:0,label:f(v)("ui.button.edit"),icon:"edit",click:()=>h.value=!0,tooltip:t.editTooltip},null,8,["label","click","tooltip"])):c("",!0)])])),(l(!0),o(x,null,B(z.value.filter(e=>!e.isHide),e=>(l(),o("div",Z,[(l(),n(k,{disable:e.isDisable!==void 0&&e.isDisable,key:e.icon,outline:e.outline,color:e.color,label:e.label,icon:e.icon,click:e.click,loading:e.isLoading,tooltip:e.tooltip},null,8,["disable","outline","color","label","icon","click","loading","tooltip"]))]))),256))])]),D(d.$slots,"title",{},()=>[t.displayLabel?(l(),o("div",ee,[s("h6",null,[s("div",te,[p(b(t.label),1),s("label",le,b(t.subLabel),1)])])])):c("",!0)],!0),t.displayLabel?(l(),o("div",ie)):c("",!0)])]))}}),de=q(se,[["__scopeId","data-v-1e719272"]]);export{de as H};
//# sourceMappingURL=headerDetailComponent-D46cilGF.js.map
