import{j as e}from"./markdown-9_JKOUHQ.js";import{L as o,B as n}from"./button-D8qrc3hb.js";import{x as a}from"./index-Z_QI94Zg.js";import{u as l}from"./input-Dyxe5hqI.js";import{c as m}from"./createLucideIcon-CsWFljth.js";import{R as d}from"./refresh-cw-Svvcff2v.js";import"./mermaid-C0IQv4mH.js";const x=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],f=m("wifi-off",x);function w(){const{t}=l(),s=a(r=>r.state),c=a(r=>r.retryNow);if(s==="closed")return null;const i=s==="half-open";return e.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-background",children:e.jsxs("div",{className:"flex max-w-md flex-col items-center gap-6 px-6 text-center",children:[e.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-destructive/10",children:e.jsx(f,{className:"h-8 w-8 text-destructive"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-xl font-semibold",children:t("circuitBreaker.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t("circuitBreaker.description")})]}),i?e.jsxs("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(o,{className:"h-4 w-4 animate-spin"}),t("circuitBreaker.attemptingReconnect")]}):e.jsx("p",{className:"text-sm text-muted-foreground",children:t("circuitBreaker.willRetryAutomatically")}),!i&&e.jsxs(n,{onClick:c,size:"lg",children:[e.jsx(d,{className:"mr-2 h-4 w-4"}),t("circuitBreaker.retryNow")]})]})})}export{w as CircuitBreakerDialog};
