import{j as e,aT as d,ao as o,eI as l,w as m}from"./app-BgLa5dit.js";import{A as u}from"./DFA8aJel.chunk.js";function g(){return e.jsx(u,{className:"mt-2",variant:"info",children:"As this customer was created using a CFT, certain features cannot be modified. If you need something changed, please contact the Product Team."})}function h(n,a){return m.first(a.filter(s=>s.id.toString()===n.toString()))}function j(n){const[a,s]=d.useState(),i=n.availablePresentations.filter(t=>!n.currentPresentations.find(r=>r.id===t.id));function c(t){n.removePresentation(t),s(null)}return e.jsxs(e.Fragment,{children:[n.canEdit&&!!i.length&&e.jsxs(e.Fragment,{children:[e.jsx(o.Label,{children:"Select a presentation to add"}),e.jsxs(o.Control,{as:"select",value:(a==null?void 0:a.id)??"",onChange:t=>{const r=h(t.target.value,i);r&&(s(r),n.onSelectPresentation(r))},className:"cursor-pointer",children:[e.jsx("option",{value:"",children:"Select a presentation"}),i.map(t=>e.jsx("option",{value:t.id,children:l.formatPresentationName(t)},t.id))]})]}),n.currentPresentations.length?e.jsx(e.Fragment,{children:e.jsx("ul",{className:"list-unstyled mt-2",children:n.currentPresentations.map(t=>e.jsxs("li",{children:[l.formatPresentationName(t),n.canEdit&&e.jsx("span",{className:"text-danger cursor-pointer ms-2",onClick:()=>c(t),children:e.jsx("em",{children:"remove"})})]},t.id))})}):e.jsx("div",{className:"mt-1 fst-italic",children:"This customer currently doesn't have a presentation set."})]})}export{g as C,j as M};
//# sourceMappingURL=CV1yHwBc.chunk.js.map
