import{L as k,a as c,K as g,aw as C}from"./ebt3cj6n.js";import{p as b,q as B,U as t,W as a,X as s,F as l,a9 as u,a8 as r,Z as d,a0 as N,Y as w,u as m}from"./vendor/json-editor-vue-kcahofzr.js";const E={flex:"~ gap-2 items-center",class:"group"},F=["title"],I={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",E,[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",I,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,F),w(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 _};
