import M from"./index-0a75e8e4.js";import{A as L,ah as C,_ as P,B as $,ab as A}from"./index.js";import{c as l,S as B,J as I,u as g,d as k,Z as m,_ as h,F as S,a7 as N,a8 as b,a6 as T,m as E,A as O,a4 as p,k as w,a5 as _,q as V,af as y,ak as j}from"./vue-72a104e4.js";import{a8 as K}from"./antd-0679333d.js";function R(){const e=L(),s=l(()=>e.getMultiTabsSetting.show),o=l(()=>e.getMultiTabsSetting.showQuick),r=l(()=>e.getMultiTabsSetting.showRedo),i=l(()=>e.getMultiTabsSetting.showFold);function u(t){e.setProjectConfig({multiTabsSetting:t})}return{setMultipleTabSetting:u,getShowMultipleTab:s,getShowQuick:o,getShowRedo:r,getShowFold:i}}function q(){const e=B(),{currentRoute:s}=e,{getShowMultipleTab:o}=R(),r=C(),i=l(()=>t(I(e.getRoutes()))||[]),u=l(()=>r.getTabList.reduce((n,c)=>(c.meta&&Reflect.has(c.meta,"frameSrc")&&n.push(c.name),n),[]));function t(n){let c=[];for(const F of n){const{meta:{frameSrc:v}={},children:d}=F;v&&c.push(F),d&&d.length&&c.push(...t(d))}return c=K(c,"name"),c}function a(n){return n.name===g(s).name}function f(n){return g(o)?g(u).includes(n):e.currentRoute.value.name===n}return{hasRenderFrame:f,getFramePages:i,showIframe:a,getAllFramePages:t}}const D=k({name:"FrameLayout",components:{FramePage:M},setup(){const{getFramePages:e,hasRenderFrame:s,showIframe:o}=q(),r=l(()=>g(e).length>0);return{getFramePages:e,hasRenderFrame:s,showIframe:o,showFrame:r}}}),Q={key:0};function z(e,s,o,r,i,u){const t=T("FramePage");return e.showFrame?(m(),h("div",Q,[(m(!0),h(S,null,N(e.getFramePages,a=>(m(),h(S,{key:a.path},[a.meta.frameSrc&&e.hasRenderFrame(a.name)?E((m(),p(t,{key:0,frameSrc:a.meta.frameSrc},null,8,["frameSrc"])),[[O,e.showIframe(a)]]):b("",!0)],64))),128))])):b("",!0)}const J=P(D,[["render",z]]);function Z({route:e,openCache:s,cacheTabs:o,enableTransition:r,def:i}){if(!r)return;const u=o.includes(e.name),t="fade-slide";let a=t;return s&&(a=u&&e.meta.loaded?t:void 0),a||e.meta.transitionName||i}const G=k({name:"PageLayout",components:{FrameLayout:J},setup(){const{getShowMultipleTab:e}=R(),s=C(),{getOpenKeepAlive:o,getCanEmbedIFramePage:r}=$(),{getBasicTransition:i,getEnableTransition:u}=A(),t=l(()=>g(o)&&g(e)),a=l(()=>g(o)?s.getCachedTabList:[]);return{getTransitionName:Z,openCache:t,getEnableTransition:u,getBasicTransition:i,getCaches:a,getCanEmbedIFramePage:r}}});function H(e,s,o,r,i,u){const t=T("RouterView"),a=T("FrameLayout");return m(),h(S,null,[w(t,null,{default:_(({Component:f,route:n})=>[w(V,{name:e.getTransitionName({route:n,openCache:e.openCache,enableTransition:e.getEnableTransition,cacheTabs:e.getCaches,def:e.getBasicTransition}),mode:"out-in",appear:""},{default:_(()=>[e.openCache?(m(),p(j,{key:0,include:e.getCaches},[(m(),p(y(f),{key:n.fullPath}))],1032,["include"])):(m(),p(y(f),{key:n.fullPath}))]),_:2},1032,["name"])]),_:1}),e.getCanEmbedIFramePage?(m(),p(a,{key:0})):b("",!0)],64)}const U=P(G,[["render",H]]),ee=Object.freeze(Object.defineProperty({__proto__:null,default:U},Symbol.toStringTag,{value:"Module"}));export{U as P,ee as i,R as u};
