import{j as s}from"./@radix-B1sy0Lhr.js";import{d as l,B as c,s as m,aa as d}from"./index-CO6UN3UX.js";import{f as p}from"./index-d_QrPL-8.js";import{j as u}from"./@tanstack-Dwlisomv.js";import{C as g}from"./ComponentIcon-C9AY8usJ.js";function L({type:e,setSelectedFlavor:r}){const t=u(p.flavorListInfinite({type:e}));if(t.isPending)return s.jsx(f,{});if(t.isError)return s.jsx("p",{children:"Failed to fetch Flavor List"});const{data:i}=t;return s.jsx("ul",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 2xl:grid-cols-4",children:i.pages.map(n=>n.items.map(a=>{var o;return s.jsx("li",{className:"",children:s.jsx(x,{type:e,onClick:()=>r(a),id:a.id,name:a.name,logoUrl:((o=a.body)==null?void 0:o.logo_url)??void 0})},a.id)}))})}function x({name:e,logoUrl:r,onClick:t,type:i}){return s.jsxs(c,{onClick:t,intent:"secondary",emphasis:"subtle",className:"h-auto w-full gap-2 px-5 py-3",children:[r?s.jsx("img",{alt:`Logo of ${e}`,width:36,height:36,className:"aspect-square object-contain",src:m(r)}):s.jsx(g,{className:"aspect-square h-[36px] w-[36px] fill-primary-400 object-contain",type:i}),s.jsx("span",{className:"min-w-0 truncate",children:d(e)})]})}function f(){return s.jsx("ul",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 2xl:grid-cols-4",children:Array.from({length:4}).map((e,r)=>s.jsx(l,{className:"h-[70px] w-full"},r))})}const k=["orchestrator","artifact_store","container_registry","step_operator","model_deployer","feature_store","experiment_tracker","alerter","annotator","data_validator","image_builder","model_registry"];export{L as S,k as s};
