import{bk as s,r as t,c as e,o as a,b as o,Q as i,as as r,n,d as m,w as c,O as _,P as h,F as l}from"./vendor.js?ver=3.1.0";import{u,a1 as d,J as p,O as f,ab as v}from"./vendor-element-plus.js?ver=3.1.0";import{_ as g}from"./fc-bits-ui.js?ver=3.1.0";const w={class:"fcrm_page_header_top_nav_wrapper"},P={class:"fcrm_page_header_top_nav"},$={class:"fcrm_page_header_top_nav_links"},b={class:"fcrm_page_header_top_actions"};const k=g({name:"ContactHeaderPopNav",data(){return{routeName:this.$route.name,menuItems:this.getMenuItems()}},watch:{"$route.name"(s){this.routeName=s}},methods:{getMenuItems(){var t,e;const a=null==(e=null==(t=this.appVars)?void 0:t.addons)?void 0:e.company_module,o=!this.hasPermission||(this.hasPermission("fcrm_read_contacts")||this.hasPermission("fcrm_manage_contacts")),i=!this.hasPermission||(this.hasPermission("fcrm_manage_contact_cats")||this.hasPermission("fcrm_manage_contact_cats_delete"));return[{show:o,title:this.$t("All Contacts"),route:"subscribers",icon:s(u)},{show:i,title:this.$t("Lists"),route:"lists",icon:s(d)},{show:i,title:this.$t("Tags"),route:"tags",icon:s(p)},{show:i&&a,title:this.$t("Companies"),route:"companies",icon:s(f)},{show:i,title:this.$t("Segments"),route:"dynamic_segments",icon:s(v)}].filter(s=>s.show).map(({show:s,...t})=>t)}}},[["render",function(s,u,d,p,f,v){const g=t("router-link");return a(),e("div",w,[o("div",P,[o("ul",$,[(a(!0),e(i,null,r(f.menuItems,s=>(a(),e("li",{key:s.route,class:n("fcrm_item_"+s.route+" fcrm_top_menu_item "+(s.item_class||""))},[m(g,{to:{name:s.route},class:"fcrm_top_nav_link"},{default:c(()=>[_(h(s.title),1)],void 0),_:2},1032,["to"])],2))),128))])]),o("div",b,[l(s.$slots,"actions")])])}]]);export{k as C};
