import{r as i,j as t}from"./vendor-react-wBh_31cN.js";import{a as m,L as c}from"./vendor-router-D1GqFWiT.js";import{G as l,g as d,r as n}from"./index-dNe6i2rS.js";import{u as j}from"./useLastProject-Du1ajmeV.js";const x=({actions:s})=>{const{data:e}=j(),{pathname:o}=m(),r=e==null?void 0:e.projectName,a=(e==null?void 0:e.projectId)!=null&&o.startsWith(`/p/${e.projectId}/`);return r&&!a?t.jsxs(t.Fragment,{children:[t.jsx(l,{asChild:!0,children:t.jsxs(c,{to:d(n.project.prj.view,n.project.value,{id:e.projectId}),children:["back to ",r]})}),s]}):t.jsxs(t.Fragment,{children:[t.jsx(l,{variant:"outline",asChild:!0,children:t.jsx(c,{to:n.project.list,children:"See all projects"})}),s]})},p=i.memo(x),u=({errorTitle:s,errorMessage:e,actions:o,children:r,withoutActions:a=!1})=>t.jsxs("div",{className:"flex flex-col items-center my-auto",children:[t.jsx("span",{className:"text-6xl font-semibold mb-2 text-foreground tracking-tight",children:s}),t.jsx("span",{className:"text-lg mb-8 text-muted-foreground",children:e}),r&&t.jsx("div",{className:"mb-8",children:r}),!a&&t.jsx("div",{className:"flex gap-2",children:t.jsx(p,{actions:o})})]}),N=i.memo(u);export{N as E};
