import{R as c,aP as g,l as f,o as j,j as e,bA as C,E as P,F as D,b7 as S,a9 as t,aR as v,aQ as R}from"./app-BgLa5dit.js";import{C as w}from"./Cgoejc6d.chunk.js";import{D as B}from"./BrZRQuEY.chunk.js";import{D as F}from"./BE59vaMU.chunk.js";import{u as I}from"./kHNgJL0M.chunk.js";import"./KIVqng-q.chunk.js";const i="subjects.removeClassificationDashboard",o=D.encloseNamespace(i);function E(s){const[d,l]=c.useState(!1),[h,u]=c.useState(!1),m=g(),n=f(),p=j(v.currentUser()),a=I(s.dashboardId);function x(){l(!0),R(m,F.deleteDashboard(s.dashboardId,()=>n.success(o("success")),()=>n.error(o("error")),s.closePopup))}const r=!!p.data&&!!a.data;return e.jsx(C.Provider,{value:i,children:e.jsx(P,{title:o("title"),closePopup:s.closePopup,showLoadingSpinner:!r,children:r&&e.jsxs(e.Fragment,{children:[e.jsx("div",{children:e.jsx(S,{phrase:"heading"})}),e.jsx(B,{extraClassName:"mt-3",dashboard:a.data}),e.jsx(w,{challengePhrase:a.data.name,onChallengePass:b=>u(b)}),e.jsxs(t,{className:"mt-3",children:[e.jsx(t.Cancel,{onClick:s.closePopup}),e.jsx(t.Submit,{variant:"danger",onClick:x,text:"Delete",showSpinner:d,disabled:!h})]})]})})})}export{E as RemoveClassificationDashboardView};
//# sourceMappingURL=By7Yl7fx.chunk.js.map
