import{r as e,z as o}from"./vendor-s2rfM_Vj.js";import{D as t,L as s,B as a}from"./t-r-vendor-gn7FMrPE.js";const l="_pdf-dialog_1vi4l_1",r=({visible:r,handleVisible:i,iframe:n})=>{const[c,d]=e.useState(!0),[h,p]=e.useState(!1);return o.jsxs(t,{className:l,style:{padding:0,overflow:"auto",backgroundColor:"var(--theme-black7)",backdropFilter:"blur(5px)",height:h?"100vh":"fit-content"},width:h?"100vw":"85vw",visible:r,mode:"modal",placement:"center",onClose:()=>i(!1),preventScrollThrough:!0,showOverlay:!0,theme:"default",footer:!1,header:!1,closeBtn:!1,closeOnEscKeydown:!1,closeOnOverlayClick:!0,confirmOnEnter:!1,children:[o.jsx(s,{loading:c,size:"large",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),o.jsx("iframe",{title:"ilovepdf",src:n,width:"100%",height:h?"100%":"640px",loading:"lazy",onLoad:()=>d(!1),onErrorCapture:()=>d(!1)}),o.jsx(a,{style:{position:"absolute",right:"20px",bottom:"20px"},onClick:()=>{p(!h)},ghost:!0,variant:"text",shape:"square",icon:o.jsx("i",{className:"ovo fullscreen",style:{fontSize:24}})})]})};export{r as default};
