import{r as c,j as s}from"./vendor-react-wBh_31cN.js";import{dD as l,e as p,u,h as d,f,b as h,a as j,r as v,G as x}from"./index-BKr2rJhV.js";import{C as y}from"./callout-Dd8FkTQe.js";import{u as E}from"./useProjectNavigate-5znX7Ojg.js";import{c as C}from"./vendor-router-D1GqFWiT.js";const P=({env:a,envName:e,className:r})=>{const{id:n}=C(),o=E(),{currentData:i}=l({pId:n},{skip:!e,selectFromResult:p({currentData:u(d(j([],"items"),f(h("name",e))))})}),t=a??i,m=c.useCallback(()=>{o(v.project.settings.pythonWithEnvironment,{version:t==null?void 0:t.name})},[t==null?void 0:t.name,o]);return(t==null?void 0:t.isOldDockerImage)&&s.jsxs("div",{className:r,children:[s.jsx(y,{type:"warning",content:`${t.name} is an old environment that may cause compatibility issues. It is recommended to recreate it.`}),s.jsx(x,{variant:"outline",size:"sm",className:"mt-2",onClick:m,children:"Go to environment"})]})};export{P as O};
