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