import{aP as x,l as j,o as d,j as s,ar as y,fd as E,i as b,S as i,aQ as u}from"./app-BgLa5dit.js";import{A as v}from"./B6VMOFye.chunk.js";import{E as w}from"./CPYC3VpT.chunk.js";function B(p){var l;const{classificationId:e,memberType:f,presentationId:m}=p,o=x(),t=j(),n=d(i.classificationWithAliases(e)),c=d(i.presentation(m)),h=(l=n.data)==null?void 0:l.aliases;function A(a,r){u(o,i.createAlias(e,{...n.data,aliases:[a]},()=>{t.success("Successfully created alias"),r()},()=>{t.error("Something went wrong creating your alias")}))}function S(a){u(o,i.deleteAlias(e,a,()=>{t.success("Successfully deleted alias")},()=>{t.error("Something went wrong deleting your alias")}))}return!c.data||!n.data?s.jsx("div",{className:"text-center py-3",children:s.jsx(y,{as:"div",animation:"border",role:"status"})}):s.jsxs(s.Fragment,{children:[s.jsx(w,{memberType:f,presentation:c.data,classificationId:e,getTabs:(a,r,g)=>E.getEditClassificationTabs(b.SUBJECTS,a,r,g)}),s.jsx(v,{aliases:h.data,onSave:A,onDelete:S})]})}export{B as EditClassificationAliasesView};
//# sourceMappingURL=DasKAYM3.chunk.js.map
