import{K as k,J as c,I as g,av as C}from"./h48l6b7a.js";import{l as b,m as B,R as t,U as a,V as s,F as l,a7 as u,a6 as r,X as d,Z as N,W as I,u as m}from"./vendor/json-editor-vue-hrh84odz.js";const V={flex:"~ gap-2 items-center",class:"group"},E=["title"],F={key:0,op50:""},S={key:0,flex:"~ gap1",pr2:"",op0:"","group-hover:op100":""},D=b({__name:"FilepathItem",props:{filepath:{},lineBreak:{type:Boolean},subpath:{type:Boolean},override:{}},setup(f){const p=f,v=k(),h=c(),i=g(),n=B(()=>p.filepath&&i.value?C(p.filepath,i.value.rootDir):{path:p.filepath||""});return(e,o)=>(t(),a("span",V,[s("span",{class:N([e.lineBreak?"":"ws-nowrap of-hidden truncate"]),"font-mono":"",title:e.override||e.filepath},[e.override?(t(),a(l,{key:0},[u(r(e.override),1)],64)):n.value.moduleName?(t(),a(l,{key:1},[s("span",null,r(n.value.moduleName),1),e.subpath?(t(),a("span",F,r(n.value.path.slice(n.value.moduleName.length)),1)):d("",!0)],64)):(t(),a(l,{key:2},[u(r(n.value.path),1)],64))],10,E),I(e.$slots,"default"),e.filepath?(t(),a("div",S,[s("button",{"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:o[0]||(o[0]=y=>m(v)(e.filepath))},o[2]||(o[2]=[s("div",{"i-carbon-script-reference":""},null,-1)])),s("button",{"text-sm":"",op40:"",hover:"op100 text-primary",title:"Copy path",onClick:o[1]||(o[1]=y=>m(h)(e.filepath))},o[3]||(o[3]=[s("div",{"i-carbon-copy":""},null,-1)]))])):d("",!0)]))}});export{D as _};
