import{a as F}from"./chunk-VNUV3WOR.js";import"./chunk-5YZW47FK.js";import{i as B}from"./chunk-ZSNLO3TX.js";import"./chunk-2JONWNYA.js";import"./chunk-FVG4OCAJ.js";import"./chunk-B47LJMRU.js";import"./chunk-EHV5JSNA.js";import"./chunk-5VEBEOBK.js";import{d as A}from"./chunk-S2V6IA2C.js";import"./chunk-QG2WC3H3.js";import"./chunk-6KEUYGBO.js";import"./chunk-ZBEJAM5I.js";import"./chunk-N2PQ6HLD.js";import"./chunk-RYOTKPRJ.js";import"./chunk-ORQ34GH7.js";import"./chunk-DZT3OJCU.js";import"./chunk-7SMWJ3GR.js";import"./chunk-P2NRYBYH.js";import"./chunk-XXO64O37.js";import"./chunk-M7AISLOK.js";import{a as V}from"./chunk-URVBFPQY.js";import"./chunk-OP2OM2NB.js";import"./chunk-YFKO2YMD.js";import{a as L}from"./chunk-KMX5PVQZ.js";import"./chunk-H7ZIYAN2.js";import"./chunk-D5M6Y5VI.js";import"./chunk-PFQHIQUX.js";import"./chunk-3CODJNWE.js";import"./chunk-HJB5ICMZ.js";import"./chunk-QU4JA34D.js";import"./chunk-TAYSHZWB.js";import"./chunk-GDIYNKGM.js";import"./chunk-L4FY67IO.js";import"./chunk-7WODUV7D.js";import{g as j}from"./chunk-CX23ZL4L.js";import"./chunk-EP2DJHVF.js";import"./chunk-ZVZZ3QVR.js";import"./chunk-EQ67X7AF.js";import"./chunk-LMRN7T6T.js";import"./chunk-KHAMQZND.js";import"./chunk-KANMOB5U.js";import"./chunk-D3YCQTGW.js";import"./chunk-OBT56KUD.js";import{m as H}from"./chunk-NMCXU7N6.js";import{B as C,Ba as x,Bc as d,Jc as E,Ma as M,N as g,Na as w,Nb as _,P as u,Rb as U,Uc as P,Vc as k,Yb as c,bc as s,cc as l,da as S,ea as v,ha as a,hc as I,mc as T,oc as D,p as f,sb as y,tb as p,u as h,v as b}from"./chunk-IYD54RT7.js";import"./chunk-RVFOIZLJ.js";function N(e,i){if(e&1){let m=I();s(0,"button",2),T("click",function(){M(m);let n=D(2);return w(n.openSettingsDialog())}),s(1,"mat-icon"),d(2,"settings"),l(),s(3,"span"),d(4,"Settings"),l()()}}function O(e,i){e&1&&(s(0,"button",1),d(1," No branch selected "),l()),e&2&&U("disabled",!0)}function R(e,i){if(e&1&&_(0,N,5,0,"button",0)(1,O,2,1,"button",1),e&2){let m=i;c(0,m==="true"?0:-1),y(),c(1,m==="false"?1:-1)}}var W=(()=>{let i=class i{constructor(o,n,r){this.routeState=o,this.dialog=n,this.preferencesService=r,this.settingsCapable=this.routeState.id.pipe(g(0),a(t=>C(()=>t!==""&&t!=="-1"&&t!=="0",f("true"),f("false")))),this.inEditMode=this.preferencesService.preferences.pipe(h(t=>t.inEditMode),S(),v(1))}openSettingsDialog(){b([this.inEditMode,this.preferencesService.globalPrefs,this.routeState.id]).pipe(u(1),a(([o,n,r])=>this.dialog.open(F,{data:{branchId:r,allHeaders2:[],allowedHeaders2:[],allHeaders1:[],allowedHeaders1:[],editable:o,headers1Label:"",headers2Label:"",headersTableActive:!1,wordWrap:n.wordWrap}}).afterClosed().pipe(u(1),a(t=>this.preferencesService.updatePreferences(t).pipe(a(q=>this.preferencesService.createOrUpdateGlobalUserPrefs(t))))))).subscribe()}};i.\u0275fac=function(n){return new(n||i)(p(j),p(A),p(B))},i.\u0275cmp=x({type:i,selectors:[["osee-messaging-usermenu"]],standalone:!0,features:[E],decls:2,vars:3,consts:[["mat-menu-item","","data-cy","mim-settings"],["mat-menu-item","",3,"disabled"],["mat-menu-item","","data-cy","mim-settings",3,"click"]],template:function(n,r){if(n&1&&(_(0,R,2,2),P(1,"async")),n&2){let t;c(0,(t=k(1,1,r.settingsCapable))?0:-1,t)}},dependencies:[H,V,L],encapsulation:2});let e=i;return e})(),G=W;export{G as default};
