import{c as s,R as o,bj as f}from"./index-hX9gYZGS.js";function y(a,r){const i=s(()=>a.getComponentDefinition(o(r).type)),c=s(()=>{var n;const{type:t,content:e}=o(r);return t=="html"&&(e!=null&&e.element)?e==null?void 0:e.element:t=="blueprints_blueprint"?(e==null?void 0:e.key)||"Blueprint":((n=i.value)==null?void 0:n.name)??`Unknown (${t})`}),m=s(()=>{var l,p;const t=(l=i.value)==null?void 0:l.previewField;if(!t)return;const e=(p=o(r).content)==null?void 0:p[t];let n;const u=70;return(e==null?void 0:e.length)>u?n=e.substring(0,u)+"...":n=e,n}),g=s(()=>{const t=o(r).type,e=i.value.category;return[`/components/${t}.svg`,`/components/category_${e}.svg`,t.startsWith("blueprints_")?`/components/blueprints_category_${e}.svg`:void 0].filter(Boolean).map(n=>f(n))});return{name:c,previewText:m,possibleImageUrls:g}}export{y as u};
