import{av as s,aQ as t,W as a,X as e,Z as o,J as i,az as r,a0 as n,ab as m,a5 as c,a9 as _,aa as h,_ as l}from"./vendor.js?ver=3.1.10";import{u,a1 as p,J as d,O as f,ab as v}from"./vendor-element-plus.js?ver=3.1.10";import{_ as g}from"./fc-bits-ui.js?ver=3.1.10";const w={class:"fcrm_page_header_top_nav_wrapper"},$={class:"fcrm_page_header_top_nav"},P={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,a;const e=null==(a=null==(t=this.appVars)?void 0:t.addons)?void 0:a.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(p)},{show:i,title:this.$t("Tags"),route:"tags",icon:s(d)},{show:i&&e,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,p,d,f,v){const g=t("router-link");return a(),e("div",w,[o("div",$,[o("ul",P,[(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};
