import{g as l,q as i,j as e}from"./index-L_QXzS2K.js";import{R as n}from"./ResourceLink-9Z5xOJhy.js";import{f as x}from"./images-se5HFJWt.js";const v=({item:s,activeProject:a,type:o,to:c})=>{var t;const{data:p=[]}=l({queryKey:[i.images],queryFn:()=>x(a),enabled:o==="image"}),r=p.find(j=>j.fingerprint===s.name),u=((t=r==null?void 0:r.properties)==null?void 0:t.description)||s.name;return e.jsxs("div",{children:[s.project!==a&&e.jsxs(e.Fragment,{children:[e.jsx(n,{type:"project",value:s.project,to:`/ui/project/${s.project}/instances`})," ","/"," "]}),o==="snapshot"&&s.instance&&e.jsxs(e.Fragment,{children:[e.jsx(n,{type:"instance",value:s.instance,to:`/ui/project/${s.project}/instance/${s.instance}`})," ","/"," "]}),o==="snapshot"&&s.volume&&e.jsxs(e.Fragment,{children:[e.jsx(n,{type:"volume",value:s.volume,to:`/ui/project/${s.project}/storage/pool/${s.pool}/volumes/custom/${s.volume}`})," ","/"," "]}),e.jsx(n,{type:o,value:u,to:c})]})};export{v as U};
