import{r as d,a as l,j as r,n as m}from"./index-7c7a558c.js";import{u}from"./settingsApi-5a4df441.js";import{B as x}from"./Breadcrumb-f4cb0f42.js";function f(){const[t,o]=d.useState(!1),{isFetching:a,refetch:s}=l("updateCache",()=>u(t),{enabled:!1,onSuccess:e=>{var c,n;(c=e==null?void 0:e.data)!=null&&c.success&&m.success((n=e==null?void 0:e.data)==null?void 0:n.success)}}),i=(e,c)=>{e.preventDefault(),m.dismiss(),o(c)};return d.useEffect(()=>{t&&s(t)},[t,s]),r.jsxs(r.Fragment,{children:[r.jsx(x,{title:"Other Settings"}),r.jsxs("div",{className:"my-12 h-screen",children:[r.jsxs("div",{className:"flex items-center space-x-6 dark:text-white text-black my-6",children:[r.jsx("h1",{children:"Views Cache:"}),r.jsx("button",{className:"text-white bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-6 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800",disabled:a,onClick:e=>i(e,1),children:a&&t==1?"Views cache updating...":"Clear"})]}),r.jsxs("div",{className:"flex items-center space-x-6 dark:text-white text-black my-6",children:[r.jsx("h1",{children:" Route cache:"}),r.jsx("button",{className:"text-white bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-6 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800",disabled:a,onClick:e=>i(e,2),children:a&&t==2?" Route cache updating...":" Clear"})]}),r.jsxs("div",{className:"flex items-center space-x-6 dark:text-white text-black my-6",children:[r.jsx("h1",{children:" Configuration cache:"}),r.jsx("button",{className:"text-white bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-6 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800",disabled:a,onClick:e=>i(e,3),children:a&&t==3?" Configuration cache updating...":" Clear"})]}),r.jsxs("div",{className:"flex items-center space-x-6 dark:text-white text-black my-6",children:[r.jsx("h1",{children:" Application cache:"}),r.jsx("button",{className:"text-white bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-6 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800",disabled:a,onClick:e=>i(e,4),children:a&&t==4?" Application cache updating...":" Clear"})]})]})]})}export{f as default};
