import{j as e}from"./vendor-react-wBh_31cN.js";import{a as x,b,C as _}from"./index.esm-CAGtek53.js";import{C as h}from"./combobox-QqI9aNup.js";import{L as j}from"./label-gPWmc6ow.js";import{dD as y,e as v,u as C,h as E,m as F,H as O,a as D}from"./index-dNe6i2rS.js";import{e as N}from"./pythonUtils-DP4NidfK.js";import{O as I}from"./OldEnvCallout-DHeFVCSZ.js";import{c as L}from"./vendor-router-D1GqFWiT.js";const S=({name:i,isSpark:n,isRay:o,isPythonApp:s,filters:p=[],excludeBaseImageNames:l=["dlthub-ingestion-pipeline"],disabled:m=!1})=>{const{id:c}=L(),{control:t}=x(),u=b({name:i,control:t}),f=()=>o?["base_image_name:ray-training-pipeline,ray-torch-training-pipeline,ray-tensorflow-training-pipeline"]:n?["base_image_name:spark-feature-pipeline"]:[],d=s?"base_image_name:python-app-pipeline":"base_image_type:feature_pipeline,training_pipeline",{currentData:g=[]}=y({pId:c,params:{filter_by:[d,...f(),...p]}},{selectFromResult:v({currentData:C(E(D([],"items"),O(r=>{var a;return!l.includes(((a=r==null?void 0:r.baseImage)==null?void 0:a.name)??"")}),F(N)))})});return!u&&!s?null:e.jsx(_,{name:i,control:t,render:({field:{value:r,onChange:a}})=>e.jsxs(e.Fragment,{children:[e.jsx(I,{envName:r}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(j,{children:"Environment"}),e.jsx(h,{options:g,value:r,onChange:a,disabled:m})]})]})})};export{S as E};
