import{k as u,l as d,o as m,p as l,j as e,E as p,G as F,az as h,ax as k,a9 as a}from"./app-BgLa5dit.js";import{Q as x}from"./CWs2EUPM.chunk.js";function f(i){return e.jsxs(h,{children:[e.jsx(k,{name:"name",id:"name",placeholder:"e.g. Steven's Fave Ingestion Filter",label:"Name",showRequiredStar:!0}),e.jsxs(a,{children:[e.jsx(a.Cancel,{onClick:i.closePopup}),e.jsx(a.Submit,{variant:"dark",text:"Save changes"})]})]})}function g(i){var n;const r=u(),c=d(),s=(n=m(l.getQuickFilters(i.stage)).data)==null?void 0:n.find(t=>t.id===i.id);function o({name:t}){r(l.updateQuickFilter({...s,name:t})).then(()=>c.success(`Successfully renamed quick filter: ${t}`)).catch(()=>c.error(`Failed to rename quick filter: ${t}. Please try again.`)).finally(i.closePopup)}return e.jsx(p,{title:"Edit view",closePopup:i.closePopup,showLoadingSpinner:!s,backdrop:"static",children:!!s&&e.jsx(F,{initialValues:{name:s.name},validationSchema:x,onSubmit:o,children:e.jsx(f,{closePopup:i.closePopup})})})}export{g as EditQuickFilterView};
//# sourceMappingURL=Cg_7FC7B.chunk.js.map
