import{r as n,j as t,F as f,n as c}from"./index-DT8qTvyx.js";function h({currentRoute:o}){const[a,s]=n.useState(!0),r=n.useRef(null),d=()=>{var i;const e=((i=document.querySelector(".ant-layout-content.overflow-hidden"))==null?void 0:i.offsetTop)||65;return`${window.innerHeight-e}px`},l=()=>{r.current.src=o.iframe_url};return n.useEffect(()=>{l();const e=()=>{r.current.style.height=d()};return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[o.iframe_url]),t(f,{children:t(c,{spinning:a,style:{minHeight:a?"500px":""},children:t("iframe",{className:"owl-iframe",ref:r,title:"Iframe Page",width:"100%",style:{border:"none",order:0,boxSizing:"border-box",overflow:"hidden",minHeight:"500px"},onLoad:()=>{s(!1)}})})})}export{h as default};
