import{h as c,i as p,j as o,dd as r}from"./app-BgLa5dit.js";import{C}from"./BfMtaC_g.chunk.js";function A(i){if(i==="streamable"){const a=p.STREAMABLE_LEARNING,e=c.StreamableLearning;return{companies:()=>({application:a,action:e.COMPANIES}),newCompany:()=>({application:a,action:e.NEW_COMPANY}),editCompany:t=>({application:a,action:e.EDIT_COMPANY,args:[t]}),editDashboards:t=>({application:a,action:e.EDIT_COMPANY_DASHBOARDS,args:[t]})}}const n=p.COMPANIES,s=c.Companies;return{companies:()=>({application:n,action:s.COMPANIES}),newCompany:()=>({application:n,action:s.NEW_COMPANY}),editCompany:a=>({application:n,action:s.EDIT_COMPANY,args:[a]}),editDashboards:a=>({application:n,action:s.COMPANY_DASHBOARDS,args:[a]})}}const m={getCompaniesTabs(i,n,s){const a=[];if(!C.hasSubjectsAccess(i))return a;const t=A(s);return a.push({label:"Edit Company Details",appLink:t.editCompany(n)}),s==="clickview"&&a.push({label:"Curation",appLink:{application:p.COMPANIES,action:c.Companies.EDIT_COMPANY_CURATION,args:[n]}}),a.push({label:"Dashboards",appLink:t.editDashboards(n)}),a}},l=i=>n=>n.appLink.action===i;function b(i){const n=m.getCompaniesTabs(i.currentUser,i.companyId,i.context);return n.length<2?o.jsx(o.Fragment,{}):o.jsx("div",{className:"py-2",children:o.jsx(r,{tabs:n,isItemActive:l(i.activeAction)})})}export{b as E,A as g};
//# sourceMappingURL=CZm-cuK3.chunk.js.map
