import{_ as I}from"./Dm5PsTJH.js";import{d as V,e as D,ac as U,a as c,aq as $,o as s,h as r,j as i,k as o,p as l,i as j,f as e,v as u,m as _,F as v,t as h,n as E,G as F,_ as S}from"./CCqMIw4K.js";import{_ as q}from"./D5lo6U3Q.js";import{C as k}from"./BcJws1i5.js";const z={"hover:text-primary":""},G={key:0,"text-primary":""},L={"max-w-100":""},M={px4:"",py3:"","text-sm":""},O={flex:"~ gap2",n:"primary xs"},T={border:"t base","max-h-60":"","of-auto":"",px4:"",py3:""},W={"text-sm":""},A=o("span",{op50:""},"It has been referenced ",-1),H={"text-primary":""},J=o("span",{op50:""}," times by:",-1),K={flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},P={key:1,"text-sm":"",op50:""},Z=V({__name:"ComposableItem",props:{item:{},metadata:{},filepath:{},counter:{type:Boolean,default:!0},classes:{default:"px2 py1 text-sm bg-gray:5 "}},setup(x){const t=x,b=D(),g=U(),m=c(()=>t.item.as||t.item.name),n=c(()=>t.metadata?.injectionUsage?.[m.value]?.count||0),C=c(()=>(t.metadata?.injectionUsage?.[m.value]?.moduleIds||[]).filter(a=>!a.endsWith("?macro=true"))),y=c(()=>t.item.meta?.docsUrl?t.item.meta.docsUrl:["nuxt","#app","nuxt3"].includes(t.item.from)?k.nuxt[t.item.name]:t.item.from==="vue"?k.vue[t.item.name]:null);return(a,p)=>{const w=I,f=S,N=q,B=$("VDropdown");return s(),r(B,{disabled:!t.metadata},{popper:i(()=>[o("div",L,[o("div",M,[a.item.meta?.description?(s(),r(w,{key:0,tag:"div",pb3:"","text-sm":"",markdown:a.item.meta.description},null,8,["markdown"])):l("",!0),o("div",O,[j(f,{icon:"carbon-copy",onClick:p[0]||(p[0]=d=>e(b)(e(m),"imports-name"))},{default:i(()=>[u(" Copy ")]),_:1}),a.filepath?(s(),r(f,{key:0,icon:"carbon-code",onClick:p[1]||(p[1]=d=>a.filepath&&e(g)(a.filepath))},{default:i(()=>[u(" Source ")]),_:1})):l("",!0),e(y)?(s(),r(f,{key:1,icon:"carbon-catalog",to:e(y),target:"_blank"},{default:i(()=>[u(" Docs ")]),_:1},8,["to"])):l("",!0)])]),o("div",T,[e(n)?(s(),_(v,{key:0},[o("div",W,[A,o("strong",H,h(e(n)),1),J]),o("div",K,[(s(!0),_(v,null,E(e(C),d=>(s(),r(N,{key:d,filepath:d},null,8,["filepath"]))),128))])],64)):(s(),_("div",P," Not in use via auto import. "))])])]),default:i(()=>[o("button",z,[o("code",{rounded:"","font-mono":"",class:F([a.metadata&&!e(n)?"op30 hover:op100":"",a.classes])},[u(h(e(m))+" ",1),e(n)&&a.counter?(s(),_("sup",G,"x"+h(e(n)),1)):l("",!0)],2)])]),_:1},8,["disabled"])}}});export{Z as _};
