import{d as u,D as k,ao as m,i as r,o as n,e as l,f as o,t as y,u as h,ap as v}from"./Dih1Xbo1.js";const b={border:"b base",flex:"","of-hidden":"","text-xs":""},w={"of-hidden":"","flex-grow-1":"","w-0":""},x={style:{direction:"rtl"},truncate:"",px3:"","text-left":"","font-mono":"","py1.5":"",op75:""},B={key:0,"text-xs":"",pl1:"","pr0.5":""},g=u({__name:"FileHeader",props:{id:{},backArrow:{type:Boolean,default:!1},escapeKey:{type:Boolean,default:!1}},emits:["close"],setup(c,{emit:p}){const s=c,d=p,i=k(),f=i.options.history.state.back;function a(){d("close"),s.backArrow&&i.push(f.replace(/\?.*/,""))}return s.escapeKey&&s.backArrow&&m("keydown",e=>{e.key==="Escape"&&(a(),e.preventDefault())}),(e,t)=>(n(),r("div",b,[e.backArrow?(n(),r("button",{key:0,flex:"","items-center":"",op50:"",transition:"","hover:bg-active":"","px1.5":"","hover:op100":"",onClick:a},t[0]||(t[0]=[o("div",{h5:"",w5:"",class:"i-carbon-arrow-left"},null,-1)]))):l("",!0),o("div",w,[o("div",x,y(("keyToPath"in e?e.keyToPath:h(v))(e.id,!1)),1)]),o("button",{flex:"","items-center":"","hover:bg-active":"","px1.5":"",op50:"",transition:"","hover:op100":"",onClick:a},[e.escapeKey?(n(),r("div",B," Esc ")):l("",!0),t[1]||(t[1]=o("div",{h5:"",w5:"",class:"i-mdi-close"},null,-1))])]))}});export{g as _};
