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