"use strict";const e=require("react/jsx-runtime"),o=require("@mui/material/Box"),i=require("@mui/material/Typography"),c=require("@mui/icons-material/ErrorOutline"),d=require("./Button-Dmu1cikC.cjs"),g=require("./CopyButton-3fq1UAiv.cjs"),p={xs:2,sm:3,md:4,lg:6,xl:8};function u({icon:s,title:a,description:n,primaryAction:l,secondaryAction:x,size:t="md",sx:r}){const f=t==="xs"||t==="sm"?32:t==="md"?40:48;return e.jsxs(o,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:p[t],px:2,...typeof r=="object"&&!Array.isArray(r)?r:{}},children:[s&&e.jsx(o,{sx:{mb:2,color:"var(--ov-fg-faint)",fontSize:f,display:"flex"},children:s}),e.jsx(i,{variant:t==="xs"||t==="sm"?"subtitle2":"h6",sx:{color:"var(--ov-fg-default)",fontWeight:600,mb:n?.5:0},children:a}),n&&e.jsx(i,{variant:"body2",sx:{color:"var(--ov-fg-muted)",maxWidth:400,lineHeight:1.5},children:n}),(l||x)&&e.jsxs(o,{sx:{display:"flex",gap:1,mt:2.5},children:[l,x]})]})}u.displayName="EmptyState";function m({message:s,errorId:a,onRetry:n,variant:l="panel"}){const x=l==="inline",t=l==="page",r=t?56:x?20:40;return x?e.jsxs(o,{sx:{display:"inline-flex",alignItems:"center",gap:1,color:"var(--ov-danger-default)"},children:[e.jsx(c,{sx:{fontSize:r}}),e.jsx(i,{variant:"body2",sx:{color:"var(--ov-danger-default)"},children:s}),n&&e.jsx(d.Button,{size:"xs",emphasis:"ghost",color:"danger",onClick:n,children:"Retry"})]}):e.jsxs(o,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:t?8:4,px:2,...t&&{minHeight:"60vh"}},children:[e.jsx(c,{sx:{fontSize:r,color:"var(--ov-danger-default)",mb:2}}),e.jsx(i,{variant:t?"h5":"subtitle1",sx:{color:"var(--ov-fg-default)",fontWeight:600,mb:.5},children:"Something went wrong"}),e.jsx(i,{variant:"body2",sx:{color:"var(--ov-fg-muted)",maxWidth:420,lineHeight:1.5,mb:1},children:s}),a&&e.jsxs(o,{sx:{display:"inline-flex",alignItems:"center",gap:.5,mb:2,px:1.5,py:.5,borderRadius:"4px",bgcolor:"var(--ov-bg-surface-inset)"},children:[e.jsxs(i,{variant:"caption",sx:{fontFamily:"var(--ov-font-mono)",color:"var(--ov-fg-muted)",fontSize:"var(--ov-text-xs)"},children:["Error ID: ",a]}),e.jsx(g.CopyButton,{value:a,size:"xs"})]}),n&&e.jsx(d.Button,{emphasis:"outline",color:"primary",size:"sm",onClick:n,children:"Try again"})]})}m.displayName="ErrorState";exports.EmptyState=u;exports.ErrorState=m;
