import{C as e,Mt as t,Qt as n,S as r,T as i,W as a,Y as o,Z as s,_ as c,dt as l,g as u,h as d,m as f,p,s as m,tn as h}from"./vendor/json-editor-vue-9tyg6b65.js";import{t as g}from"./nicon-hgcqr03x.js";import{t as _}from"./nbutton-g8ropw1z.js";import{d as v,u as y}from"#entry";import{t as b}from"./filepath-item-evfn93g6.js";import{t as x}from"./constants-g2z8m4rs.js";import{t as S}from"./dist-das2ggjj.js";import{t as C}from"./nmarkdown-vetb9msz.js";var w={rounded:``,"font-mono":``},T={key:0,"text-primary":``},E={key:0},D={title:`Vue Directive`},O={"max-w-100":``},k={px4:``,py3:``,"text-sm":``},A={flex:`~ gap2`,n:`primary xs`},j={border:`t base`,"max-h-60":``,"of-auto":``,px4:``,py3:``},M={"text-sm":``},N={"text-primary":``},P={flex:`~ col gap-2`,"items-start":``,pt3:``,"text-sm":``,op75:``},F={key:1,"text-sm":``,op50:``},I=Object.assign(i({__name:`ComposableItem`,props:{item:{},isDirective:{type:Boolean,default:!1},metadata:{},filepath:{},counter:{type:Boolean,default:!0},classes:{default:`px2 py1 text-sm bg-gray:5 `}},setup(i){let I=i,L=y(),R=v(),z=p(()=>I.item.as||I.item.name),B=p(()=>{let e=z.value;return I.isDirective&&(e[0]!==`v`&&(e=`v${e}`),e=S(e)),e}),V=p(()=>I.metadata?.injectionsUsageMap?.get(z.value)?.count||0),H=p(()=>(I.metadata?.injectionsUsageMap?.get(z.value)?.moduleIds||[]).filter(e=>!e.endsWith(`?macro=true`))),U=p(()=>I.item.meta?.docsUrl?I.item.meta.docsUrl:[`nuxt`,`#app`,`nuxt3`].includes(I.item.from)?x.nuxt[I.item.name]:I.item.from===`vue`?x.vue[I.item.name]:null);return(p,v)=>{let y=g,x=C,S=_,W=b,G=s(`VDropdown`);return a(),d(G,{disabled:!I.metadata},{popper:l(()=>[f(`div`,O,[f(`div`,k,[i.item.meta?.description?(a(),d(x,{key:0,tag:`div`,pb3:``,"text-sm":``,markdown:i.item.meta.description},null,8,[`markdown`])):u(``,!0),f(`div`,A,[e(S,{icon:`carbon-copy`,onClick:v[0]||=e=>t(L)(B.value,`imports-name`)},{default:l(()=>[...v[2]||=[r(` Copy `,-1)]]),_:1}),i.filepath?(a(),d(S,{key:0,icon:`carbon-code`,onClick:v[1]||=e=>i.filepath&&t(R)(i.filepath)},{default:l(()=>[...v[3]||=[r(` Source `,-1)]]),_:1})):u(``,!0),U.value?(a(),d(S,{key:1,icon:`carbon-catalog`,to:U.value,target:`_blank`},{default:l(()=>[...v[4]||=[r(` Docs `,-1)]]),_:1},8,[`to`])):u(``,!0)])]),f(`div`,j,[V.value?(a(),c(m,{key:0},[f(`div`,M,[v[5]||=f(`span`,{op50:``},`It has been referenced `,-1),f(`strong`,N,h(V.value),1),v[6]||=f(`span`,{op50:``},` times by:`,-1)]),f(`div`,P,[(a(!0),c(m,null,o(H.value,e=>(a(),d(W,{key:e,filepath:e},null,8,[`filepath`]))),128))])],64)):(a(),c(`div`,F,` Not in use via auto import. `))])])]),default:l(()=>[f(`button`,{"hover:text-primary":``,class:n([i.metadata&&!V.value?`op30 hover:op100`:``,i.classes])},[f(`code`,w,[r(h(z.value)+` `,1),V.value&&i.counter?(a(),c(`sup`,T,`x`+h(V.value),1)):u(``,!0)]),i.isDirective?(a(),c(`sup`,E,[f(`abbr`,D,[e(y,{icon:`tabler:hexagon-letter-d`})])])):u(``,!0)],2)]),_:1},8,[`disabled`])}}}),{__name:`ComposableItem`});export{I as t};