import{b as j,j as e}from"./vendor-BKmmeuxg.js";import{I as c}from"./input-error-LaPr_4wd.js";import{L as _}from"./loading-button-BnTVAMJ7.js";import{S as f}from"./switch-Db09nqXX.js";import{C as v}from"./card-D9_SJYq6.js";import{I as n}from"./input-DM0goJrn.js";import{L as a}from"./label-HmIcv5Yx.js";import{u as b}from"./use-lang-YfV87_zl.js";import{o as d}from"./inertia-SZXqLvQm.js";import"./utils-DxSsnXxD.js";import"./button-BpNwv2aE.js";import"./index-WW_1X1qx.js";import"./switch-DFFqeub-.js";const H=m=>{const{auth:o,input:t,button:g,common:h}=b(),{data:i,setData:r,post:x,errors:l,processing:p}=j({...m.auth.fields,type:"google_auth"}),u=s=>{s.preventDefault(),x(route("settings.auth0.update",{id:m.auth.id}))};return e.jsxs(v,{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:o.google_auth_settings}),e.jsx("p",{className:"text-gray-500",children:o.google_auth_description})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(a,{htmlFor:"status",children:i.active?h.enabled:h.disabled}),e.jsx(f,{id:"status",checked:i.active,onCheckedChange:s=>r("active",s)})]})]}),e.jsxs("form",{onSubmit:u,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:o.google_auth}),e.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx(a,{children:t.google_client_id}),e.jsx(n,{name:"client_id",value:i.client_id||"",onChange:s=>d(s,r),placeholder:t.google_client_id_placeholder}),e.jsx(c,{message:l.client_id})]}),e.jsxs("div",{children:[e.jsx(a,{children:t.google_client_secret}),e.jsx(n,{name:"client_secret",value:i.client_secret||"",onChange:s=>d(s,r),placeholder:t.google_client_secret_placeholder}),e.jsx(c,{message:l.client_secret})]}),e.jsxs("div",{children:[e.jsx(a,{children:t.google_redirect_uri}),e.jsx(n,{name:"redirect",value:i.redirect||"",onChange:s=>d(s,r),placeholder:t.google_redirect_uri}),e.jsx(c,{message:l.redirect})]})]})]}),e.jsx(_,{loading:p,children:g.save_changes})]})]})};export{H as default};