import{h as e,i as s,o as l,aT as p,ag as O,j as t,e9 as S}from"./app-BgLa5dit.js";import{B as x}from"./3nM7jLnE.chunk.js";import{C}from"./ChrB5FYK.chunk.js";import{O as u}from"./DNClpFKN.chunk.js";import{a as I}from"./DR2FaZH9.chunk.js";import{s as N}from"./8iu0vnCW.chunk.js";function f(a,i){return[{id:"overview",text:"Overview",appLink:{application:s.CRM_STUDIO,action:e.CrmStudio.ORGANISATION_OVERVIEW,args:[a]}},{id:"rostering",text:"Rostering",disabled:i,disabledTooltip:i?"Add customers to this organisation to setup rostering":"",appLink:{application:s.CRM_STUDIO,action:e.CrmStudio.ORGANISATION_ROSTERING,args:[a]}},{id:"sso",text:"SSO",appLink:{application:s.CRM_STUDIO,action:e.CrmStudio.ORGANISATION_SSO,args:[a]}},{id:"domains",text:"Domains",appLink:{application:s.CRM_STUDIO,action:e.CrmStudio.ORGANISATION_DOMAINS,args:[a]}},{id:"featureFlags",text:"Feature Flags",appLink:{application:s.CRM_STUDIO,action:e.CrmStudio.ORGANISATION_FEATURE_FLAGS,args:[a]}}]}function _(a){var r,d,c,m;const i=l(u.getOrganisation(a.id)),n=l(u.getCustomersFromOrganisation(a.id));if(p.useEffect(()=>{i.data&&I(a.id,O.Organisation)},[i.hasCompleted]),!i.hasCompleted||!n.hasCompleted)return t.jsx(t.Fragment,{});const g=!((d=(r=n.data)==null?void 0:r.data)!=null&&d.length),o=(c=i.data)==null?void 0:c.name;return t.jsxs("div",{className:"d-flex flex-column gap-4",children:[t.jsxs("div",{className:"d-flex flex-row justify-content-between",children:[t.jsxs("div",{children:[t.jsx("p",{children:o}),t.jsx("h1",{children:a.title}),t.jsx(x,{breadcrumbs:[{name:"Curation Studio"},{name:"Organisations",appLink:{application:s.CRM_STUDIO,action:e.CrmStudio.ORGANISATIONS}},{name:o,active:!0}]})]}),a.rightContent&&t.jsx("div",{children:a.rightContent})]}),t.jsxs("div",{className:"w-100 h-100 d-flex flex-row gap-3",children:[t.jsx("div",{className:N.crmStudioNav,children:t.jsx(C,{currentTabId:a.currentTabId,items:f((m=i.data)==null?void 0:m.id,g)})}),t.jsx("div",{className:"flex-grow-1 overflow-x-auto",children:a.loading?t.jsx(S,{}):a.children})]})]})}export{_ as C};
//# sourceMappingURL=BPRDISw7.chunk.js.map
