var y=Object.defineProperty,v=Object.defineProperties;var b=Object.getOwnPropertyDescriptors;var d=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var l=(a,s,t)=>s in a?y(a,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[s]=t,m=(a,s)=>{for(var t in s||(s={}))k.call(s,t)&&l(a,t,s[t]);if(d)for(var t of d(s))S.call(s,t)&&l(a,t,s[t]);return a},h=(a,s)=>v(a,b(s));import{aU as C,j as e}from"./react-vendor-xYZnmIII.js";import{I as x}from"./input-error-_LAmvivg.js";import{L as N}from"./loading-button-D7aXR3K4.js";import{S as _}from"./switch-DkOIfbnP.js";import{a as L,L as n,I as p}from"./ui-components-CQM92IK3.js";import{u as R}from"./use-lang-Dg6I_Fym.js";import{o as j}from"./inertia-FIn3q7f1.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./interactive-vendor-B1OgcAgP.js";const z=a=>{const{button:s,common:t}=R(),{data:i,setData:c,post:u,errors:o,processing:g}=C(h(m({},a.auth.fields),{type:"google_recaptcha"})),f=r=>{r.preventDefault(),u(route("settings.auth0.update",{id:a.auth.id}))};return e.jsxs(L,{className:"p-4 sm:p-6",children:[e.jsxs("div",{className:"mb-7 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold",children:"ReCaptcha Settings"}),e.jsx("p",{className:"text-gray-500",children:"Provide the ReCaptcha site key and secret key."})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(n,{htmlFor:"status",children:i.active?t.enabled:t.disabled}),e.jsx(_,{id:"status",checked:i.active,onCheckedChange:r=>c("active",r)})]})]}),e.jsxs("form",{onSubmit:f,className:"space-y-6",children:[e.jsxs("div",{className:"border-b pb-6",children:[e.jsx("h2",{className:"mb-4 text-xl font-semibold",children:"ReCaptcha Settings"}),e.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx(n,{children:"Site Key"}),e.jsx(p,{name:"site_key",value:i.site_key||"",onChange:r=>j(r,c),placeholder:"Site Key"}),e.jsx(x,{message:o.site_key})]}),e.jsxs("div",{children:[e.jsx(n,{children:"Secret Key"}),e.jsx(p,{name:"secret_key",value:i.secret_key||"",onChange:r=>j(r,c),placeholder:"Secret Key"}),e.jsx(x,{message:o.secret_key})]})]})]}),e.jsx(N,{loading:g,children:s.save_changes})]})]})};export{z as default};
