import{u as g,a as w,b as a,d as o,h as x,e as n,f as r,p as b,q as u,g as v,n as y,F as _,o as V}from"./app-DtilF0jd.js";import{A as k}from"./AdminLayout-cPq_IGY4.js";import{_ as l,b as d,a as m}from"./InputError-CGryjV6E.js";import{P as C}from"./PrimaryButton-8n0N1KDV.js";import"./MobileNavigationDrawer-BV2kxNFx.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./DarkModeToggle-wIsj_tj1.js";import"./ImpersonationBanner-BXRKEhdr.js";const N={class:"max-w-7xl mx-auto py-6 sm:px-6 lg:px-8"},h={class:"flex justify-between items-center mb-6"},E={class:"bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg"},q={class:"p-6"},B={class:"grid grid-cols-1 gap-6 max-w-2xl"},F={class:"border-t border-gray-200 dark:border-gray-700 pt-4 mt-2"},M={class:"mb-4"},U={class:"flex items-center gap-4 mt-4"},S={__name:"Edit",props:{user:Object},setup(p){const i=p,s=g({name:i.user.name,email:i.user.email,password:"",password_confirmation:""}),f=()=>{s.put(route("admin.moderators.update",i.user.id),{onFinish:()=>s.reset("password","password_confirmation")})};return(c,e)=>(V(),w(_,null,[a(o(x),{title:"Editar Moderador"}),a(k,null,{default:n(()=>[r("div",N,[r("div",h,[e[5]||(e[5]=r("h2",{class:"text-2xl font-bold text-gray-800 dark:text-gray-100"},"Editar Moderador",-1)),a(o(b),{href:c.route("admin.moderators.index"),class:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200"},{default:n(()=>[...e[4]||(e[4]=[u(" ← Volver ",-1)])]),_:1},8,["href"])]),r("div",E,[r("div",q,[r("form",{onSubmit:v(f,["prevent"])},[r("div",B,[r("div",null,[a(l,{for:"name",value:"Nombre Completo"}),a(d,{id:"name",type:"text",class:"mt-1 block w-full",modelValue:o(s).name,"onUpdate:modelValue":e[0]||(e[0]=t=>o(s).name=t),required:"",autofocus:"",autocomplete:"name"},null,8,["modelValue"]),a(m,{class:"mt-2",message:o(s).errors.name},null,8,["message"])]),r("div",null,[a(l,{for:"email",value:"Correo Electrónico"}),a(d,{id:"email",type:"email",class:"mt-1 block w-full",modelValue:o(s).email,"onUpdate:modelValue":e[1]||(e[1]=t=>o(s).email=t),required:"",autocomplete:"username"},null,8,["modelValue"]),a(m,{class:"mt-2",message:o(s).errors.email},null,8,["message"])]),r("div",F,[e[6]||(e[6]=r("h3",{class:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4"},"Cambiar Contraseña",-1)),e[7]||(e[7]=r("p",{class:"text-sm text-gray-500 dark:text-gray-400 mb-4"},"Deja esto en blanco si no quieres cambiar la contraseña.",-1)),r("div",M,[a(l,{for:"password",value:"Nueva Contraseña"}),a(d,{id:"password",type:"password",class:"mt-1 block w-full",modelValue:o(s).password,"onUpdate:modelValue":e[2]||(e[2]=t=>o(s).password=t),autocomplete:"new-password"},null,8,["modelValue"]),a(m,{class:"mt-2",message:o(s).errors.password},null,8,["message"])]),r("div",null,[a(l,{for:"password_confirmation",value:"Confirmar Nueva Contraseña"}),a(d,{id:"password_confirmation",type:"password",class:"mt-1 block w-full",modelValue:o(s).password_confirmation,"onUpdate:modelValue":e[3]||(e[3]=t=>o(s).password_confirmation=t),autocomplete:"new-password"},null,8,["modelValue"]),a(m,{class:"mt-2",message:o(s).errors.password_confirmation},null,8,["message"])])]),r("div",U,[a(C,{class:y({"opacity-25":o(s).processing}),disabled:o(s).processing},{default:n(()=>[...e[8]||(e[8]=[u(" Actualizar Moderador ",-1)])]),_:1},8,["class","disabled"])])])],32)])])])]),_:1})],64))}};export{S as default};
