import{o as g,ez as v,j as s,e9 as T,aw as b,b as j,a4 as y}from"./app-BgLa5dit.js";import{N}from"./C9Rwpp7a.chunk.js";import{b as q}from"./C1fMRwzQ.chunk.js";import{u as F,C as u}from"./C5-i-ZL0.chunk.js";import{C as w,a as z}from"./DsVQ3BFu.chunk.js";import{C as I}from"./q-IBKcuF.chunk.js";import"./CmeGmsFm.chunk.js";import"./Zwjmkasg.chunk.js";import"./CsH2Nu4a.chunk.js";import"./C4BcftDO.chunk.js";import"./DJ0pq8J_.chunk.js";import"./CCcwLDvu.chunk.js";import"./DDfKZ_ng.chunk.js";import"./Bs6fQ2wT.chunk.js";import"./BUT90D7O.chunk.js";import"./DUpYPoLs.chunk.js";import"./EZim8aq-.chunk.js";import"./BD9MrUJP.chunk.js";import"./s6cGcwlA.chunk.js";import"./4qGb1BIY.chunk.js";import"./DnXDEnAR.chunk.js";import"./DpUpv6rY.chunk.js";import"./CG7zbly5.chunk.js";import"./m4aqaK_l.chunk.js";import"./MEkA24R1.chunk.js";import"./C53kfXmd.chunk.js";function L({cft:o,isUs:a}){const i=b(),{hasPermissions:l}=j(),c=l(y.ExchangeTvProductManage),{onTogglePresentation:n,onToggleCurriculum:m,onToggleProduct:d,onToggleFeature:C}=F(o),{orderedPresentations:p,orderedCurriculumPresentations:h,orderedProducts:P,orderedFeatures:S,hasTwig:x,hasTigTag:f}=q(o,c);return s.jsxs("div",{className:"crm-studio-wizard-form mt-3",children:[s.jsx(u,{heading:"Presentations",items:p.map(e=>{var t;return{id:e.id,name:e.name,value:!!((t=i.values.enabledPresentations)!=null&&t.some(r=>r.toString()===e.id.toString()))}}),onChange:n}),s.jsx(u,{heading:a?"Standards":"Curriculums",items:h.map(e=>{var t;return{id:e.id,name:e.name,value:!!((t=i.values.enabledCurriculums)!=null&&t.some(r=>r.toString()===e.id.toString()))}}),onChange:m}),s.jsx(u,{heading:"Products",items:P.map(e=>{var t;return{id:e.id,name:e.name,disabled:e.disabled,disabledTooltip:e.disabled&&e.disabledTooltip,value:!!((t=i.values.enabledProducts)!=null&&t.some(r=>r.toString()===e.id.toString()))}}),onChange:d}),(x||f)&&s.jsx(u,{heading:"Features",items:S.map(e=>{var t;return{id:e.id,name:e.name,value:!!((t=i.values.enabledLibraries)!=null&&t.some(r=>r.toString()===e.id.toString()))}}),onChange:C})]})}function re(o){var n,m,d;const a=g(I.customer(o.id)),i=g(o.queryParams.cftName&&N.customerFormationTemplate(o.queryParams.cftName)),l=!a.hasCompleted||!!o.queryParams.cftName&&!i.hasCompleted,c=((d=(m=(n=a.data)==null?void 0:n.country)==null?void 0:m.code)==null?void 0:d.toLowerCase())===v.US;return s.jsxs(w,{id:o.id,currentStepId:z.CUSTOMISATIONS,queryParams:o.queryParams,children:[s.jsx("h2",{className:"h3",children:"Customisations"}),l?s.jsx(T,{}):s.jsx(L,{cft:i.data,isUs:c})]})}export{re as CustomerConvertingWizardCustomisationsView};
//# sourceMappingURL=C93_N4WG.chunk.js.map
