import{aP as O,aQ as Q,p as U,ax as A,i as l,az as F,m as G,H as K,j as X,n as Y}from"./app-JmgyQoR0.js";import{p as Z}from"./popout-CZfGmYRx.js";import{b as ee,a as s,p as m,c as I,D as _,g as te,h as n,i as S,j as k,y as oe,t as h,z as f,q as ae,x as le,H as g,E as se,u as a,l as B,I as ne,J as ie}from"./vue-y3KLWBaS.js";const R=i=>(ne("data-v-5c499fe2"),i=i(),ie(),i),ue=R(()=>a("i",{class:"ph-caret-left ph-bold ph-lg"},null,-1)),re=[ue],ce={key:1,style:{display:"inline-block",width:"20px"}},pe={key:2,class:"title"},de=["aria-label"],he=R(()=>a("i",{class:"ph-x ph-bold ph-lg"},null,-1)),ve=[he],me={class:"body"},_e=ee({__name:"MkModalPageWindow",props:{initialPath:{}},emits:["closed","click"],setup(i){const y=i,u=new O(Q,y.initialPath);u.addListener("push",e=>{});let o=s(),b=s(),r=s(),c=s(y.initialPath),V=s(860),w=s(660);const v=[];m("router",u),U(e=>{o.value=e}),m("shouldOmitHeaderTitle",!0),m("shouldHeaderThin",!0);const x=I(()=>A+c.value),z=I(()=>[{type:"label",text:c.value},{icon:"ph-arrows-out-simple ph-bold ph-lg",text:l.ts.showInPage,action:N},{icon:"ph-arrow-square-out ph-bold ph-lg",text:l.ts.popout,action:T},null,{icon:"ph-arrow-square-out ph-bold ph-lg",text:l.ts.openInNewTab,action:()=>{window.open(x.value,"_blank"),r.value.close()}},{icon:"ph-link-simple ph-bold ph-lg",text:l.ts.copyLink,action:async()=>{await F(x.value)}}]);function D(e,t=!0){t&&v.push(u.getCurrentPath()),u.push(e)}function E(){D(v.pop(),!1)}function N(){G.push(c.value),r.value.close()}function T(){Z(c.value,b.value),r.value.close()}function q(e){X(z.value,e)}return(e,t)=>{const j=_("MkPageHeader"),L=_("RouterView"),W=_("MkStickyContainer"),J=te("tooltip");return n(),S(K,{ref_key:"modal",ref:r,onClick:t[2]||(t[2]=p=>e.$emit("click")),onClosed:t[3]||(t[3]=p=>e.$emit("closed"))},{default:k(()=>{var p,C,M,P;return[a("div",{ref_key:"rootEl",ref:b,class:"hrmcaedk _narrow_",style:oe({width:`${V.value}px`,height:w.value?`min(${w.value}px, 100%)`:"100%"})},[a("div",{class:"header",onContextmenu:q},[v.length>0?ae((n(),h("button",{key:0,class:"_button",onClick:t[0]||(t[0]=d=>E())},re)),[[J,f(l).ts.goBack]]):(n(),h("span",ce)),(p=o.value)!=null&&p.value?(n(),h("span",pe,[(C=o.value)!=null&&C.value.icon?(n(),h("i",{key:0,class:le(["icon",(M=o.value)==null?void 0:M.value.icon])},null,2)):g("",!0),a("span",null,se((P=o.value)==null?void 0:P.value.title),1)])):g("",!0),a("button",{class:"_button",onClick:t[1]||(t[1]=d=>e.$refs.modal.close()),"aria-label":f(l).t("close")},ve,8,de)],32),a("div",me,[B(W,null,{header:k(()=>{var d,$,H;return[(d=o.value)!=null&&d.value&&!(($=o.value)!=null&&$.value.hideHeader)?(n(),S(j,{key:0,info:(H=o.value)==null?void 0:H.value},null,8,["info"])):g("",!0)]}),default:k(()=>[B(L,{router:f(u)},null,8,["router"])]),_:1})])],4)]}),_:1},512)}}}),ye=Y(_e,[["__scopeId","data-v-5c499fe2"]]);export{ye as default};
