import{$ as p}from"./auth-vue-plugin-akZjEFVJ.js";import{M as l,b as d,o as h,R as u,a0 as A,a1 as f,a2 as o}from"./setup-BuwH6Opq.js";const g={props:{page:{type:String,required:!0},containerId:{type:String,default:"recaptcha-container"}},emits:["setCaptcha","submitForm","loadCaptcha"],setup(c,{emit:e}){const s=f(),n={signin:"6LejkvUcAAAAADndc6dw_XdmT6rWqazeixVBCXkV",signup:"6LdYrfUcAAAAABiyiGS9YR050FQV3uQUhunxgcvc",registration:"6LczsfUcAAAAAI-9n-eaFmlR9Qjlx19XL7SmpEU5"},r=()=>{grecaptcha.execute();const t=document.querySelectorAll('iframe[src^="https://www.recaptcha.net/recaptcha"]');t==null||t.forEach(a=>{if(!a)return;const i=a.parentElement;i.style.position="fixed",i.style.top="0px",a.style.position="fixed",a.style.top="0px"})};return A(()=>{const t=n[c.page];p("https://www.recaptcha.net/recaptcha/api.js?render=explicit",()=>{e("loadCaptcha"),grecaptcha.ready(()=>{grecaptcha.render(c.containerId,{sitekey:t,badge:s.width<=o?"inline":"bottomright",size:"invisible","expired-callback":()=>{e("setCaptcha",null)},"error-callback":()=>{e("setCaptcha",null)},callback:async a=>{e("setCaptcha",a),e("submitForm"),grecaptcha.reset()}})})})}),{executeCaptcha:r,BREAKPOINT_SM:o}}},x=["id"];function y(c,e,s,n,r,t){return h(),d("div",{id:s.containerId,"data-size":"invisible",class:u({"flex justify-center":c.$responsive.width<=n.BREAKPOINT_SM})},null,10,x)}const m=l(g,[["render",y]]);export{m as C};