import{R as n,dk as p,l as b,j as e,E as x,a9 as t}from"./app-BgLa5dit.js";import{C as f}from"./Cgoejc6d.chunk.js";import{D as C}from"./BrZRQuEY.chunk.js";import{D}from"./BE59vaMU.chunk.js";import{u as g}from"./kHNgJL0M.chunk.js";import"./KIVqng-q.chunk.js";function y(s){const[r,d]=n.useState(!1),[l,h]=n.useState(!1),i=p(),o=b(),a=g(s.dashboardId);function u(){d(!0),i(D.deleteDashboard(s.dashboardId,()=>o.success("The dashboard has been successfully deleted"),()=>o.error("Something went wrong while removing the dashboard"),s.closePopup))}const c=!!a.data;return e.jsx(x,{title:"Delete Dashboard",closePopup:s.closePopup,children:c&&e.jsxs(e.Fragment,{children:[e.jsx("div",{children:"Are you sure you want to delete:"}),e.jsx(C,{extraClassName:"mt-3",dashboard:a.data}),e.jsx(f,{challengePhrase:a.data.name,onChallengePass:m=>h(m)}),e.jsxs(t,{className:"mt-3",children:[e.jsx(t.Cancel,{onClick:s.closePopup}),e.jsx(t.Submit,{variant:"danger",onClick:u,text:"Delete",showSpinner:r,disabled:!l})]})]})})}export{y as RemoveCompanyDashboardView};
//# sourceMappingURL=KD48g-6m.chunk.js.map
