import{c2 as l,ex as s}from"./app-BgLa5dit.js";import{C as p}from"./CmeGmsFm.chunk.js";const C=["enabledProducts","enabledCurriculums","enabledPresentations","enabledLibraries"];function f(a){const e={};return Object.entries(a).forEach(([i,t])=>{C.includes(i)&&typeof t=="string"?e[i]=[t]:e[i]=t}),e}function S(a,e){const{subjectPresentations:i,curriculumPresentations:t,products:u}=p.getCustomisations(a),m=[...i||[]].sort((r,n)=>r.name.localeCompare(n.name)),b=[...t||[]].sort((r,n)=>r.name.localeCompare(n.name)),c=(u||[]).map(r=>({...r,disabled:!e&&r.id.toString()===l.Exchange,disabledTooltip:!e&&r.id.toString()===l.Exchange?"This can't be modified":void 0})).sort((r,n)=>r.name.localeCompare(n.name)),o=a==null?void 0:a.data.libraries.find(r=>r.id.toString()===s.Libraries.TWIG&&!!r.optional),d=a==null?void 0:a.data.libraries.find(r=>r.id.toString()===s.Libraries.TIGTAG&&!!r.optional),g=[...o?[{id:s.Libraries.TWIG,name:"Twig"}]:[],...d?[{id:s.Libraries.TIGTAG,name:"TigTag"}]:[]];return{orderedPresentations:m,orderedCurriculumPresentations:b,orderedProducts:c,orderedFeatures:g,hasTwig:o,hasTigTag:d}}function A(a){return{enabledCurriculums:a.curriculumPresentations.filter(e=>e.enabled).map(e=>e.id.toString()),enabledPresentations:a.subjectPresentations.filter(e=>e.enabled).map(e=>e.id.toString()),enabledProducts:a.products.filter(e=>e.enabled).map(e=>e.id.toString()),enabledLibraries:a.libraries.filter(e=>e.enabled).map(e=>e.id.toString())}}export{C,S as b,f,A as g};
//# sourceMappingURL=C1fMRwzQ.chunk.js.map
