import{r as a,o as s,g as c,w as t,h as e,i as B,k as C,F as N,l as S,n as $,m as f,t as E,j as V}from"./vendor-cf98dd49.js";import{_ as q}from"./_plugin-vue_export-helper-c27b6911.js";const F={props:{name:{type:String,required:!0},email:{type:String,required:!0},role:{type:String,required:!0}},data:()=>({drawer:!1,items:[],accessManagerBadge:0}),mounted(){this.createNavigation()},methods:{logout(){form.submit()},createNavigation(){let i=!1,r=!1,l=!1,o=!1;location.href.includes("admin-manager")&&(l=!0),location.href.includes("users-manager")&&(o=!0),location.href.includes("role-manager")&&(r=!0),location.href.includes("access-manager")&&(i=!0),(this.role==1||this.role==2)&&this.$root.axiosGet("/access-manager/unfinished").then(u=>{this.accessManagerBadge=parseInt(u.response.data.data),console.log(this.accessManagerBadge),this.role==1&&(this.items=[{text:"Access Manager",icon:"mdi-security",link:"/access-manager",active:i,badge:this.accessManagerBadge},{text:"Employees Manager",icon:"mdi-account-multiple-outline",link:"/users-manager",active:o,badge:0},{text:"Roles Manager",icon:"mdi-folder-account",link:"/role-manager",active:r,badge:0},{text:"Administrators Manager",icon:"mdi-shield-account",link:"/admin-manager",active:l,badge:0}]),this.role==2&&(this.items=[{text:"Access Manager",icon:"mdi-security",link:"/access-manager",active:i,badge:this.accessManagerBadge},{text:"Employees Manager",icon:"mdi-account-multiple-outline",link:"/users-manager",active:o,badge:0},{text:"Roles Manager",icon:"mdi-office-building-outline",link:"/role-manager",active:r,badge:0}])}),this.role==3&&(this.items=[{text:"Employees Manager",icon:"mdi-account-multiple-outline",link:"/users-manager",active:o,badge:0}]),this.role==4&&(this.items=[])}}},H=["value"];function L(i,r,l,o,u,h){const p=a("v-spacer"),k=a("v-img"),b=a("v-app-bar"),y=a("v-form"),d=a("v-list-item"),m=a("v-list"),_=a("v-divider"),g=a("v-icon"),x=a("v-badge"),v=a("v-list-item-title"),M=a("v-navigation-drawer"),w=a("v-container");return s(),c(w,null,{default:t(()=>[e(b,{prominent:"",app:"",elevation:2,style:{"background-color":"white"}},{default:t(()=>[e(p),e(k,{class:"mx-2 logoPng",src:"images/HA-South_Africa.svg","max-height":"200","max-width":"200",href:"#",contain:"","align-center":"",center:""}),e(p)]),_:1}),e(y,{id:"form",ref:"form",method:"post",action:"/logout"},{default:t(()=>[B("input",{type:"hidden",name:"_token",value:this.$root.csrfToken},null,8,H)]),_:1},512),e(M,{"expand-on-hover":"",rail:"",app:"",style:{"background-color":"white"},elevation:"24","rail-width":"60"},{default:t(()=>[e(m,{lines:!1,density:"compact",nav:""},{default:t(()=>[e(d,{"prepend-icon":"mdi-view-dashboard",title:"Home",color:"primary",href:"/",link:""})]),_:1}),e(_),e(m,{lines:!1,density:"compact",nav:"",class:"pt-5"},{default:t(()=>[(s(!0),C(N,null,S(i.items,(n,A)=>(s(),c(d,{key:A,value:n,color:"primary",href:n.link,link:"",class:$({"v-list-item--active":n.active})},{prepend:t(()=>[n.badge>0?(s(),c(x,{key:0,content:n.badge,floating:"",color:"red"},{default:t(()=>[e(g,{icon:n.icon},null,8,["icon"])]),_:2},1032,["content"])):f("",!0),n.badge===0?(s(),c(g,{key:1,icon:n.icon},null,8,["icon"])):f("",!0)]),default:t(()=>[e(v,{textContent:E(n.text)},null,8,["textContent"])]),_:2},1032,["value","href","class"]))),128))]),_:1}),e(_),e(m,{lines:!1,density:"compact",nav:""},{default:t(()=>[e(d,{color:"primary",onClick:h.logout},{prepend:t(()=>[e(g,{icon:"mdi-backspace-outline"})]),default:t(()=>[e(v,null,{default:t(()=>[V("Logout")]),_:1})]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1})}const j=q(F,[["render",L]]);export{j as default};
