import{o as t,S as j,ai as x,e4 as y,aV as g,j as e,h as d,b7 as m,e5 as A,ar as I,aR as R,aW as S,i as b}from"./app-BgLa5dit.js";import{O as D}from"./B-fq6xxv.chunk.js";import{E as T}from"./CZm-cuK3.chunk.js";import"./BfMtaC_g.chunk.js";const p="companies.companiesDashboard";function O(a){var c;const n=t(R.currentUser()),o=t(j.presentations(x.Subject)),r=t(y.getCompany(a.companyId)),i=t(g.selectedCurationTags(a.companyId));function l(){var s;return!!((s=i.data)!=null&&s.data.filter(h=>h.name===S.CLICKVIEW_CURATED).length)}function u(s){return{application:b.COMPANIES,action:d.Companies.EDIT_DASHBOARDS,args:[a.companyId,s.id]}}const C=n.hasCompleted&&r.hasCompleted&&o.hasCompleted&&i.hasCompleted;return e.jsxs(e.Fragment,{children:[n.data&&e.jsx(T,{companyId:a.companyId,activeAction:d.Companies.COMPANY_DASHBOARDS,currentUser:n.data,context:"clickview"}),C?e.jsx(e.Fragment,{children:l()?e.jsxs("div",{children:[e.jsx("h5",{className:"mt-2",children:e.jsx(m,{namespace:p,phrase:"selectPresentation"})}),e.jsx(A,{presentations:o.data,getAppLink:u})]}):e.jsxs(e.Fragment,{children:[e.jsx(D,{object:{name:(c=r.data)==null?void 0:c.name}}),e.jsx("p",{children:e.jsx(m,{namespace:p,phrase:"notCurated"})})]})}):e.jsx("div",{className:"text-center py-5",children:e.jsx(I,{as:"div",animation:"border",role:"status"})})]})}export{O as CompanyDashboardsView};
//# sourceMappingURL=CXitc6cN.chunk.js.map
