import{j as e,S as s,h as a,H as d}from"./vendor-ClLR6ncd.js";import{L as l,o as x}from"./index-OtVJl4GC.js";import{E as h}from"./Messages-BRmQDxrZ.js";import{R as m}from"./RefreshDataButton-BMv_Vwgi.js";const p={flex:"1 0 0",minHeight:0,width:"100%",overflow:"auto",fontFamily:"monospace"};function f({txt:r,style:o}){return e.jsx("pre",{style:o,children:r})}function y({useData:r,useDownloadMutation:o,title:c}){const{logData:t,content:n}=r(),i=o();return e.jsxs(s,{spacing:x(),sx:{flexGrow:1},children:[e.jsxs(s,{direction:"row",justifyContent:"space-between",children:[e.jsx(a,{variant:"h4",children:c}),e.jsxs(s,{direction:"row",spacing:2,children:[e.jsx(m,{disabled:t.isFetching,onClick:t.refetch}),e.jsx(d,{variant:"contained",disabled:i.isLoading,onClick:i.mutate,children:"Download"})]})]}),t.isError?e.jsx(h,{error:t.error,resetError:()=>{}}):t.isLoading?e.jsx(l,{}):n===0?e.jsx(a,{children:"Stacktrace is empty"}):e.jsx(f,{style:p,txt:n})]})}export{y as P};
