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