import{w as k,a as c,A as g,a3 as b}from"./nfr71ycs.js";import{p as C,q as B,J as t,a3 as a,S as s,W as N,U as u,F as l,ab as d,aa as r,Z as S,u as m}from"./vendor/json-editor-vue-m9gzt21j.js";const w={flex:"~ gap-2 items-center",class:"group"},E=["title"],F={key:0,op50:""},I={key:0,flex:"~ gap1",pr2:"",op0:"","group-hover:op100":""},D=C({__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?b(p.filepath,i.value.rootDir):{path:p.filepath||""});return(e,o)=>(a(),t("span",w,[s("span",{class:S([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",F,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,E),N(e.$slots,"default"),e.filepath?(a(),t("div",I,[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 _};
