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