import{j as c}from"./document_model_editor-B0b9iLkL.js";import{r as s}from"./sentry_react-cODD7zWc.js";import{u as l,c as m}from"./index-Zdob0kL_.js";import{q as p}from"./design_system_connect-CyoiT4fi.js";import{a3 as d,x as g,aP as f,s as S,g as u}from"./reactor_browser-CqcNBhxi.js";import{t as h}from"./document_drive-CacD9AxC.js";import"./graphql-AKTCpY7l.js";import"./drive_explorer-C9ZlHrfH.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-BhnxVUEi.js";import"./zod-9j67vCAu.js";import"./react-DQSxOgtG.js";import"./design_system-D3L2kJJ3.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./sentry_browser-B4YoBIIG.js";import"./react-dom/client-BVPiT_FE.js";import"./graphql_request-BJtmW2JS.js";import"./config-CU-aFfVJ.js";import"./design_system_ui-cfMsqDx9.js";const r=h(["ClearStorage"]);function A(){const a=d()?.type==="clearStorage",{t:o}=l(),[n,e]=s.useState(!1);function i(){e(!0),m().then(()=>{r.info("Storage cleared"),S(void 0),u(void 0),window.location.reload()}).catch(t=>{r.error("Error clearing storage",t),e(!1)})}return c.jsx(p,{open:a,header:o("modals.connectSettings.clearStorage.confirmation.title"),title:o("modals.connectSettings.clearStorage.confirmation.title"),body:o("modals.connectSettings.clearStorage.confirmation.body"),cancelLabel:o("common.cancel"),continueLabel:o("modals.connectSettings.clearStorage.confirmation.clearButton"),onCancel:()=>g({type:"settings"}),onContinue:i,onOpenChange:t=>{if(!t)return f()},continueButtonProps:{disabled:n}})}export{A as ClearStorageModal};
