import{a as U}from"./chunk-35AQP5ZJ.js";import{a as H}from"./chunk-ZRBE56L3.js";import"./chunk-WWV256XH.js";import"./chunk-EP2DJHVF.js";import{a as E}from"./chunk-S3JIFK7T.js";import"./chunk-EQ67X7AF.js";import"./chunk-LMRN7T6T.js";import"./chunk-IVW2C32D.js";import{e as N,f as A}from"./chunk-KANMOB5U.js";import"./chunk-D3YCQTGW.js";import"./chunk-OBT56KUD.js";import{h as B,m as I}from"./chunk-NMCXU7N6.js";import{$b as L,B as h,Ba as g,Bc as M,Cc as R,Jc as _,K as y,L as S,Lc as j,Rb as $,Uc as v,Vc as x,_b as k,ac as D,bc as l,cc as d,ha as f,o as w,oc as F,p as n,sb as u,tb as p,v as C}from"./chunk-IYD54RT7.js";import"./chunk-RVFOIZLJ.js";var q=i=>({"tw-border-b-2 tw-border-primary tw-text-primary":i});function P(i,r){if(i&1&&(l(0,"li")(1,"a",2),v(2,"async"),M(3),d()()),i&2){let c=r.$implicit,o=F();u(),$("ngClass",j(5,q,o.router.url.includes(c.routerLink)))("routerLink",c.routerLink+x(2,3,o.routeSuffix)||""),u(2),R(c.label)}}var V=(()=>{let r=class r{constructor(o,a,m){this.ui=o,this.router=a,this.userService=m,this.navItems=w(H[0].children).pipe(S(e=>this.userService.userHasRoles(e.requiredRoles).pipe(f(t=>h(()=>t,n(e),n())))),y((e,t)=>[...e,t],[])),this.routeSuffix=C([this.ui.branchType,this.ui.branchId,this.ui.ciSetId]).pipe(f(([e,t,s])=>e===void 0||e===""?n(""):t===void 0||t===""||t==="-1"?n(`/${e}`):s===void 0||s===""||s==="-1"?n(`/${e}/${t}`):n(`/${e}/${t}/${s}`)))}};r.\u0275fac=function(a){return new(a||r)(p(U),p(N),p(E))},r.\u0275cmp=g({type:r,selectors:[["osee-ci-nav-header"]],standalone:!0,features:[_],decls:5,vars:2,consts:[[1,"tw-flex","tw-items-center"],[1,"tw-flex","tw-gap-4","tw-text-sm"],[1,"tw-p-2",3,"ngClass","routerLink"]],template:function(a,m){a&1&&(l(0,"nav",0)(1,"ul",1),L(2,P,4,7,"li",null,k),v(4,"async"),d()()),a&2&&(u(2),D(x(4,0,m.navItems)))},dependencies:[I,B,A],encapsulation:2});let i=r;return i})();export{V as default};
