import{aP as p,l as d,aT as m,o as x,j as e,E as S,a9 as n,aQ as T,g as j,h as f,i as g}from"./app-BgLa5dit.js";import{T as o}from"./BY4vH9zH.chunk.js";function w(t){const c=p(),a=d(),[i,r]=m.useState(!1),s=x(o.theme(t.id));function l(){r(!0);const h=()=>{a.success("Successfully deleted theme"),t.closePopup(),j.trigger({application:g.THEMES,action:f.Themes.THEMES})},u=()=>{a.error("Failed to delete theme")};T(c,o.deleteTheme(t.id,h,u))}return e.jsx(S,{title:"Delete Theme",closePopup:t.closePopup,showLoadingSpinner:!s.data,children:!!s.data&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Are you sure you want to delete ",e.jsx("strong",{children:s.data.name}),"?"]}),e.jsxs(n,{children:[e.jsx(n.Cancel,{onClick:t.closePopup}),e.jsx(n.Submit,{onClick:l,variant:"danger",text:"Yes, delete this theme",showSpinner:i})]})]})})}export{w as DeleteThemeView};
//# sourceMappingURL=CtmwhVGu.chunk.js.map
