import{u as x,c,a as f,b as s,o as a,g as i,t as r,i as n,j as w,h as u,e as o,v as p}from"./app-BJF24m-a.js";import g from"./AjustadorLayout-Cl61fDaC.js";import"./NotificationBell-Cp-HzGv9.js";const v={class:"max-w-2xl mx-auto"},k={key:0,class:"mb-6 p-4 bg-emerald-50 border border-emerald-200 rounded-xl flex items-center gap-3"},y={class:"text-sm text-emerald-700 font-medium"},h={class:"bg-white rounded-2xl border border-slate-200 shadow-sm p-6 mb-6"},j={class:"grid grid-cols-1 sm:grid-cols-2 gap-4"},C={class:"font-semibold text-slate-700"},_={class:"font-semibold text-slate-700"},N={class:"font-semibold text-slate-700"},B={class:"font-semibold text-slate-700"},M={class:"bg-white rounded-2xl border border-slate-200 shadow-sm p-6"},S={key:0,class:"text-red-500 text-xs mt-1"},V={key:0,class:"text-red-500 text-xs mt-1"},P={class:"flex items-center gap-4 pt-2"},q=["disabled"],A={key:0},U={key:1},E={__name:"Profile",props:{title:String,ajustador:Object},setup(l){const e=x({current_password:"",password:"",password_confirmation:""}),b=()=>{e.put(route("ajustador.profile.password"),{preserveScroll:!0,onSuccess:()=>e.reset()})};return(m,t)=>(a(),c(g,{title:l.title,ajustador:l.ajustador},{default:f(()=>[s("div",v,[t[13]||(t[13]=s("div",{class:"mb-8"},[s("h1",{class:"text-2xl font-bold text-slate-800"},"Mi Perfil"),s("p",{class:"text-slate-500 mt-1"},"Gestiona tu información y seguridad")],-1)),m.$page.props.flash?.message?(a(),i("div",k,[t[3]||(t[3]=s("svg",{class:"w-5 h-5 text-emerald-600 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[s("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})],-1)),s("p",y,r(m.$page.props.flash.message),1)])):n("",!0),s("div",h,[t[8]||(t[8]=s("h3",{class:"text-sm font-bold text-slate-400 uppercase tracking-widest mb-4"},"Información Personal",-1)),s("dl",j,[s("div",null,[t[4]||(t[4]=s("dt",{class:"text-xs text-slate-500"},"Nombre",-1)),s("dd",C,r(l.ajustador.nombre),1)]),s("div",null,[t[5]||(t[5]=s("dt",{class:"text-xs text-slate-500"},"Email",-1)),s("dd",_,r(l.ajustador.email),1)]),s("div",null,[t[6]||(t[6]=s("dt",{class:"text-xs text-slate-500"},"Teléfono",-1)),s("dd",N,r(l.ajustador.telefono||"No registrado"),1)]),s("div",null,[t[7]||(t[7]=s("dt",{class:"text-xs text-slate-500"},"Ciudad",-1)),s("dd",B,r(l.ajustador.ciudad||"No registrada"),1)])])]),s("div",M,[t[12]||(t[12]=s("h3",{class:"text-sm font-bold text-slate-400 uppercase tracking-widest mb-4"},"Cambiar Contraseña",-1)),s("form",{onSubmit:w(b,["prevent"]),class:"space-y-5"},[s("div",null,[t[9]||(t[9]=s("label",{class:"block text-sm font-semibold text-slate-700 mb-2"},"Contraseña Actual",-1)),u(s("input",{"onUpdate:modelValue":t[0]||(t[0]=d=>o(e).current_password=d),type:"password",class:"w-full px-4 py-3 bg-slate-50 border border-slate-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all text-slate-700",placeholder:"••••••••",required:""},null,512),[[p,o(e).current_password]]),o(e).errors.current_password?(a(),i("p",S,r(o(e).errors.current_password),1)):n("",!0)]),s("div",null,[t[10]||(t[10]=s("label",{class:"block text-sm font-semibold text-slate-700 mb-2"},"Nueva Contraseña",-1)),u(s("input",{"onUpdate:modelValue":t[1]||(t[1]=d=>o(e).password=d),type:"password",class:"w-full px-4 py-3 bg-slate-50 border border-slate-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all text-slate-700",placeholder:"Mínimo 8 caracteres",required:""},null,512),[[p,o(e).password]]),o(e).errors.password?(a(),i("p",V,r(o(e).errors.password),1)):n("",!0)]),s("div",null,[t[11]||(t[11]=s("label",{class:"block text-sm font-semibold text-slate-700 mb-2"},"Confirmar Nueva Contraseña",-1)),u(s("input",{"onUpdate:modelValue":t[2]||(t[2]=d=>o(e).password_confirmation=d),type:"password",class:"w-full px-4 py-3 bg-slate-50 border border-slate-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all text-slate-700",placeholder:"Repite la nueva contraseña",required:""},null,512),[[p,o(e).password_confirmation]])]),s("div",P,[s("button",{type:"submit",disabled:o(e).processing,class:"px-8 py-3 bg-blue-600 text-white font-bold rounded-xl hover:bg-blue-700 transition-all disabled:opacity-50 disabled:cursor-not-allowed shadow-lg shadow-blue-600/20"},[o(e).processing?(a(),i("span",A,"Actualizando...")):(a(),i("span",U,"Actualizar Contraseña"))],8,q)])],32)])])]),_:1},8,["title","ajustador"]))}};export{E as default};
