import{d as u,K as k,L as m,e as a,a as o,f as l,t as y,b,o as n,M as h}from"./BvNnk7SS.js";const v={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 r(){d("close"),s.backArrow&&i.push(f.replace(/\?.*/,""))}return s.escapeKey&&s.backArrow&&m("keydown",e=>{e.key==="Escape"&&(r(),e.preventDefault())}),(e,t)=>(n(),a("div",v,[e.backArrow?(n(),a("button",{key:0,flex:"","items-center":"",op50:"",transition:"","hover:bg-active":"","px1.5":"","hover:op100":"",onClick:r},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:b(h))(e.id,!1)),1)]),o("button",{flex:"","items-center":"","hover:bg-active":"","px1.5":"",op50:"",transition:"","hover:op100":"",onClick:r},[e.escapeKey?(n(),a("div",B," Esc ")):l("",!0),t[1]||(t[1]=o("div",{h5:"",w5:"",class:"i-mdi-close"},null,-1))])]))}});export{g as _};
