import{K as k,a as c,J as g,av as C}from"./m6q5jxyf.js";import{p as b,q as B,P as t,a1 as a,Q as s,U as N,R as u,X as E,F as l,a9 as d,a8 as r,u as m}from"./vendor/json-editor-vue-llkaejaf.js";const F={flex:"~ gap-2 items-center",class:"group"},I=["title"],S={key:0,op50:""},V={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)=>(a(),t("span",F,[s("span",{class:E([e.lineBreak?"":"ws-nowrap of-hidden truncate"]),"font-mono":"",title:e.override||e.filepath},[e.override?(a(),t(l,{key:0},[d(r(e.override),1)],64)):n.value.moduleName?(a(),t(l,{key:1},[s("span",null,r(n.value.moduleName),1),e.subpath?(a(),t("span",S,r(n.value.path.slice(n.value.moduleName.length)),1)):u("",!0)],64)):(a(),t(l,{key:2},[d(r(n.value.path),1)],64))],10,I),N(e.$slots,"default"),e.filepath?(a(),t("div",V,[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)]))])):u("",!0)]))}});export{D as _};
