1import{r as n,j as e,s as P}from"./index-bMFZPluE.js";import{a as G}from"./emailApi-BQfIvn0G.js";import{f as T,P as O}from"./PrivacyPolicy-B2143qp5.js";import{f as R,v as W,n as V}from"./phoneFormatting-bIoASOCT.js";import{C as Y}from"./CompactPrivacyNotice-Dx4_VTkN.js";import{i as U,j as Z,h as E,f as H,d as Q,c as J,e as K,b as X}from"./studentProfileSummary-D5cIUZpH.js";import"./educationCatalog-pqwMnMBs.js";const ee=a=>{const m=String((a==null?void 0:a.email)||"").trim().toLowerCase(),d=String((a==null?void 0:a.phone)||"").replace(/\D/g,"");return[{label:"apellidos del alumno",ready:!!String((a==null?void 0:a.last_name)||"").trim()},{label:"fecha de nacimiento",ready:!!String((a==null?void 0:a.birth_date)||"").trim()},{label:"curso o nivel",ready:!!String((a==null?void 0:a.level)||(a==null?void 0:a.course)||"").trim()},{label:"materias necesarias",ready:!!String((a==null?void 0:a.subjects)||(a==null?void 0:a.subject)||"").trim()},{label:"disponibilidad o restricciones",ready:!!String((a==null?void 0:a.availability)||"").trim()},{label:"colegio o instituto",ready:!!String((a==null?void 0:a.school_name)||"").trim()},{label:"nombre completo del tutor",ready:!!String((a==null?void 0:a.parent_name)||"").trim()},{label:"correo familiar real",ready:!!m&&!m.includes("+familia-")},{label:"telefono de WhatsApp",ready:d.length>=9},{label:"direccion",ready:!!String((a==null?void 0:a.address)||"").trim()},{label:"codigo postal",ready:!!String((a==null?void 0:a.postal_code)||"").trim()},{label:"localidad",ready:!!String((a==null?void 0:a.location)||"").trim()}].filter(c=>!c.ready).map(c=>c.label)},ae=(a,m,d)=>{if(m||d)return{studentFirstName:m||"",studentLastName:d||""};const u=String(a||"").trim().replace(/\s+/g," ");if(!u)return{studentFirstName:"",studentLastName:""};const c=u.split(" ");return{studentFirstName:c.shift()||"",studentLastName:c.join(" ")}},te=(a,m,d)=>{if(m||d)return{parentFirstName:m||"",parentLastName:d||""};const u=String(a||"").trim();if(!u)return{parentFirstName:"",parentLastName:""};const c=u.split(/\s+/);return{parentFirstName:c.shift()||"",parentLastName:c.join(" ")}},pe=()=>{const a=typeof window<"u"&&["localhost","127.0.0.1"].includes(window.location.hostname),[m,d]=n.useState(!0),[u,c]=n.useState(!1),[h,f]=n.useState(!1),[A,v]=n.useState(!1),[N,p]=n.useState(""),[j,q]=n.useState(!1),[k,w]=n.useState(!1),[_,z]=n.useState(""),[S,M]=n.useState(""),[y,B]=n.useState([]),[b,I]=n.useState({level:"",modality:"",subjects:"",availability:"",birthDate:"",age:"",schoolName:""}),[t,o]=n.useState({studentFirstName:"",studentLastName:"",birthDate:"",level:"",subjects:"",availability:"",parentFirstName:"",parentLastName:"",email:"",phone:"",schoolName:"",address:"",addressDetails:"",postalCode:"",location:"",province:"Granada"});n.useEffect(()=>{(async()=>{const s=new URLSearchParams(window.location.search);let x=s.get("student"),g=s.get("token");const i=a&&s.get("preview")==="1";let r=null,F=null;if(i&&(x="LOCAL-FAMILY-DEMO",g="local-preview-only",r={student_id:x,name:"Lucia",first_name:"Lucia",last_name:"",parent_name:"Maria Demo",parent_first_name:"Maria",parent_last_name:"Demo",email:"[email protected]",phone:"+34600000000",school_name:"",birth_date:"",level:"2.º ESO",course:"2.º ESO",modality:"Academia Profe a 3",subjects:"Matematicas",subject:"Matematicas",availability:"",address:"",address_details:"",postal_code:"",location:"La Zubia",province:"Granada",privacy_accepted_at:null,guardian_privacy_confirmed:!1}),!x||!g){c(!0),d(!1);return}if(z(x),M(g),!i){const L=await P.rpc("get_public_family_update",{target_student_id:x,access_token:g});r=L.data,F=L.error}if(F||!r){c(!0),d(!1);return}const C=ae(r.name,r.first_name,r.last_name),D=te(r.parent_name,r.parent_first_name,r.parent_last_name);o({studentFirstName:C.studentFirstName,studentLastName:C.studentLastName,birthDate:U(r),level:r.level||r.course||"",subjects:r.subjects||r.subject||"",availability:r.availability||"",parentFirstName:D.parentFirstName,parentLastName:D.parentLastName,email:r.email||"",phone:R(r.phone),schoolName:r.school_name||"",address:r.address||"",addressDetail
1s:r.address_details||"",postalCode:r.postal_code||"",location:r.location||"",province:r.province||"Granada"}),B(ee(r)),I({level:X(r),modality:K(r),subjects:J(r),availability:Q(r),birthDate:H(r),age:E(r)!==null?String(E(r)):"",schoolName:Z(r)}),(!!r.privacy_accepted_at||!!r.guardian_privacy_confirmed)&&(q(!0),w(!0)),d(!1)})()},[]);const $=async l=>{if(l.preventDefault(),p(""),!j&&!k){const i="Marca la casilla de privacidad que aparece justo encima del boton para poder guardar la ficha.";p(i),alert(i);return}const s=`${t.studentFirstName} ${t.studentLastName}`.trim();if(!t.studentFirstName.trim()){const i="Necesitamos el nombre del alumno para actualizar la ficha correctamente.";p(i),alert(i);return}if(!t.email.trim()){const i="Necesitamos un correo electronico de contacto para guardar la ficha.";p(i),alert(i);return}if(!t.level.trim()){const i="Indica el curso o nivel actual del alumno.";p(i),alert(i);return}if(!t.subjects.trim()){const i="Indica las materias en las que necesita apoyo.";p(i),alert(i);return}const x=W(t.phone,"telefono de WhatsApp");if(!x.ok){const i=x.error||"Escribe un numero de movil valido para WhatsApp.";p(i),alert(i);return}f(!0);const g=`${t.parentFirstName} ${t.parentLastName}`.trim();if(a){v(!0),f(!1);return}try{const{error:i}=await P.rpc("submit_public_family_update",{payload:{student_id:_,family_token:S,student_name:s,student_first_name:t.studentFirstName.trim(),student_last_name:t.studentLastName.trim(),parent_name:g,parent_first_name:t.parentFirstName.trim(),parent_last_name:t.parentLastName.trim(),email:t.email.trim(),phone:V(t.phone),school_name:t.schoolName.trim(),birth_date:t.birthDate.trim(),level:t.level.trim(),subjects:t.subjects.trim(),availability:t.availability.trim(),address:t.address.trim(),address_details:t.addressDetails.trim(),postal_code:t.postalCode.trim(),location:t.location.trim(),province:t.province.trim(),privacy_version:O}});if(i)throw i;try{await G({template:"family_profile_updated",recordId:_,verificationToken:S})}catch(r){console.error("No se pudo enviar el email de confirmacion de ficha:",r)}v(!0)}catch(i){console.error("Error al actualizar la ficha de familia:",i);const r="No hemos podido guardar los datos. La informacion sigue escrita. Revisa los campos obligatorios y, si continua, avisanos indicando el mensaje que aparece.";p(r),alert(r)}finally{f(!1)}};return m?e.jsx("div",{className:"min-h-screen bg-[#F5F7FA] flex justify-center items-center p-6 font-sans",children:e.jsxs("div",{className:"w-full max-w-md bg-white rounded-[32px] border border-gray-100 shadow-xl p-8 text-center",children:[e.jsx("div",{className:"w-10 h-10 border-4 border-[#1c74e9] border-t-transparent rounded-full animate-spin mx-auto mb-4"}),e.jsx("p",{className:"text-sm font-bold text-gray-600",children:"Cargando ficha de familia..."})]})}):u?e.jsx("div",{className:"min-h-screen bg-[#F5F7FA] flex justify-center items-center p-6 font-sans",children:e.jsxs("div",{className:"w-full max-w-md bg-white rounded-[32px] border border-gray-100 shadow-xl p-8 text-center",children:[e.jsx("div",{className:"text-5xl mb-4",children:"â ï¸"}),e.jsx("h1",{className:"text-2xl font-black text-gray-900 mb-3",children:"Enlace no valido"}),e.jsx("p",{className:"text-sm text-gray-500 leading-relaxed",children:"No hemos encontrado la ficha de familia que querias actualizar. Si lo necesitas, escribenos por WhatsApp y te reenviamos el enlace correcto."})]})}):A?e.jsx("div",{className:"min-h-screen bg-gray-900 sm:p-6 flex justify-center items-start font-sans",children:e.jsxs("div",{className:"w-full max-w-md min-h-screen sm:min-h-[80vh] bg-[#F5F7FA] sm:rounded-[40px] flex flex-col justify-center items-center p-6 text-center shadow-2xl",children:[e.jsx("div",{className:"w-24 h-24 bg-green-500 rounded-full flex items-center justify-center text-white text-5xl mb-6 shadow-xl",children:"â
"}),e.jsx("h1",{className:"text-3xl font-black text-gray-900 mb-2",children:a?"Prueba local completada":"Datos actualizados"}),e.jsx("p",{className:"text-gray-500 max-w-sm mb-4",children:a?e.jsxs(e.Fragment,{children:["Los datos de ",e.jsx("b",{children:`${t.studentFirstName} ${t.studentLastName}`.trim()})," no se han guardado."]}):e.jsxs(e.Fragment,{children:["Ya hemos guardado la ficha de familia de ",e.jsx("b",{children:`${t.studentFirstName} ${t.studentLastName}`.trim()}),"."]})}),e.jsx("div",{className:"bg-blue-50 border border-blue-100 p-4 rounded-xl mb-8 max-w-sm",children:e.jsx("p",{className:"text-blue-800 text-sm font-medium",children:a?"Esta simulacion no ha modificado Supabase ni enviado comunicaciones.":"Gracias. Esto nos ayuda a enviaros mejor reservas mensuales, avisos y comunicaciones de la academia."})}),e.jsx("button",{onClick:re,className:"w-full py-4 bg-gray-900 text-white font-black rounded-xl uppercase tracking-widest text-xs active:scale-95 transition-transform max-w-xs",children:"Cerrar"})]})}):e.jsx("div",{className:"min-h-screen bg-gray-900 sm:p-6 flex justify-center items-start font-sans selection:bg-blue-200",children:e.jsxs("div",{className:"w-full max-w-md bg-[#F5F7FA] min-h-screen sm:min-h-[90vh] sm:rou
1nded-[40px] shadow-2xl overflow-hidden relative pb-12",children:[e.jsxs("div",{className:"bg-[#1c74e9] px-6 pt-12 pb-24 sm:rounded-t-[40px] rounded-b-[40px] text-center shadow-lg relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-[-20%] left-[-10%] w-[50%] h-[150%] bg-white/10 rounded-full blur-3xl"}),e.jsx("div",{className:"text-6xl mb-4 relative z-10",children:"ð"}),e.jsx("h1",{className:"text-3xl font-black text-white relative z-10 tracking-tight",children:"Actualizar ficha"}),e.jsx("p",{className:"text-blue-200 text-xs font-bold uppercase tracking-widest mt-2 relative z-10",children:"Familia · Profe en Casa"})]}),e.jsxs("form",{onSubmit:$,className:"mx-6 bg-white p-6 sm:p-8 rounded-[32px] shadow-[0_10px_40px_rgba(0,0,0,0.08)] border border-gray-100 -mt-16 relative z-20 space-y-8",children:[e.jsxs("div",{className:"bg-blue-50 border border-blue-100 rounded-[24px] p-5",children:[e.jsx("p",{className:"text-[#1c74e9] text-[10px] font-black uppercase tracking-widest mb-2",children:"Completar sin repetir la ficha"}),e.jsx("p",{className:"text-sm text-blue-900 font-bold leading-relaxed",children:"Este formulario recupera los datos que ya tenemos. Completa lo que falta y corrige cualquier dato que haya cambiado; no hace falta repetir la matricula."}),y.length>0?e.jsxs("div",{className:"mt-4 rounded-2xl border border-amber-200 bg-amber-50 p-4",children:[e.jsxs("p",{className:"text-[10px] font-black uppercase tracking-widest text-amber-700",children:["Datos pendientes (",y.length,")"]}),e.jsx("p",{className:"mt-2 text-xs font-bold leading-relaxed text-amber-900",children:y.join(" · ")})]}):e.jsx("p",{className:"mt-3 text-xs font-bold leading-relaxed text-emerald-700",children:"La ficha base esta completa. Puedes revisar y corregir cualquier dato antes de guardar."})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-[#1c74e9] text-xs font-black uppercase tracking-widest border-b border-gray-100 pb-2 mb-4",children:"1. Alumno de referencia"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-1 block",children:"Nombre del alumno"}),e.jsx("input",{type:"text",required:!0,value:t.studentFirstName,onChange:l=>o(s=>({...s,studentFirstName:l.target.value})),className:"w-full bg-gray-50 text-gray-900 p-3 sm:p-4 rounded-2xl border-2 border-gray-100 outline-none focus:border-[#1c74e9] text-sm font-black transition-colors",placeholder:"Ej: Adrian"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-1 block",children:"Apellidos"}),e.jsx("input",{type:"text",value:t.studentLastName,onChange:l=>o(s=>({...s,studentLastName:l.target.value})),className:"w-full bg-gray-50 text-gray-900 p-3 sm:p-4 rounded-2xl border-2 border-gray-100 outline-none focus:border-[#1c74e9] text-sm font-black transition-colors",placeholder:"Ej: Garcia Lopez"})]})]}),e.jsx("div",{children:e.jsx("p",{className:"text-[11px] text-gray-400 font-bold leading-relaxed mt-2 pl-1",children:"Si el nombre viene incompleto o con algun error, podeis corregirlo aqui."})}),e.jsxs("div",{children:[e.jsx("label",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-1 block",children:"Fecha de nacimiento del alumno"}),e.jsx("input",{type:"date",value:t.birthDate,onChange:l=>o(s=>({...s,birthDate:l.target.value})),className:"w-full bg-gray-50 text-gray-900 p-3 sm:p-4 rounded-2xl border-2 border-gray-100 outline-none focus:border-[#1c74e9] text-sm font-medium transition-colors"})]})]})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-[#1c74e9] text-xs font-black uppercase tracking-widest border-b border-gray-100 pb-2 mb-4",children:"2. Perfil que tenemos ahora"}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"bg-blue-50 border border-blue-100 rounded-2xl p-4",children:[e.jsx("p",{className:"text-[9px] text-blue-500 font-black uppercase tracking-widest mb-1",children:"Curso / nivel"}),e.jsx("p",{className:"text-sm font-black text-gray-900 leading-relaxed",children:b.level||"Pendiente de concretar"})]}),e.jsxs("div",{className:"bg-purple-50 border border-purple-100 rounded-2xl p-4",children:[e.jsx("p",{className:"text-[9px] text-purple-500 font-black uppercase tracking-widest mb-1",children:"Modalidad"}),e.jsx("p",{className:"text-sm font-black text-gray-900 leading-relaxed",children:b.modality||"Pendiente de concretar"})]}),e.jsxs("div",{className:"bg-rose-50 border border-rose-100 rounded-2xl p-4",children:[e.jsx("p",{className:"text-[9px] text-rose-500 font-black uppercase tracking-widest mb-1",children:"Nacimiento"}),e.jsx("p",{className:"text-sm font-black text-gray-900 leading-relaxed",children:b.birthDate||"Pendiente de concretar"})]}),e.jsxs("div",{className:"bg-cyan-50 border border-cyan-100 rounded-2xl p-4",children:[e.jsx("p",{className:"text-[9px] text-cyan-600 font-black uppercase tracking-widest mb-1",children:"Edad"}),e.jsx("p",{className:"text-sm font-black text-gray-900 leading-relaxed",children:b.age||"Pendiente de concretar"})]}),e.jsxs("div",{className:"bg-amber-50 border border-amber-100 rounded-2xl p-4 col-span-2",children:[e.jsx("p",{className:"text-[9px] text-amber-600 font-black uppercase tracking-widest mb-1",children:"Asignatura / interés principal"}),e.jsx("p",{className:"text-sm font-black text-gray-900 leading-relaxed",children:b.subjects||"Pendiente de concretar"})]}),e.jsxs("div",{className:"bg-sky-50 border border-sky-100 rounded-2xl p-4 col-span-2",children:[e.jsx("p",{className:"text-[9px] text-sky-600 font-black uppercase tracking-widest mb-1",children:"Colegio / instituto"}),e.jsx("p",{className:"text-sm font-black text-gray-900 leading-relaxed",children:b.schoolName||"Pendiente de concretar"})]}),e.jsxs("div",{className:"bg-emerald-50 border border-emerald-100 rounded-2xl p-4 col-span-2",children:[e.jsx("p",{className:"text-[9px] text-emerald-600 font-black uppercase tracking-widest mb-1",children:"Disponibilidad y restricciones"}),e.jsx("p",{className:"text-sm font-black text-gray-900 leading-relaxed",children:b.availability||"Si algo de esto no coincide, avÃsanos y lo actualizamos contigo."})]})]})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-[#1c74e9] text-xs font-black uppercase tracking-widest border-b border-gray-100 pb-2 mb-4",children:"3. Datos academicos pendientes"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-1 block",children:"Curso o nivel actual"}),e.jsx("input",{type:"text",required:!0,value:t.level,onChange:l=>o(s=>({...s,level:l.target.value}
1)),className:"w-full bg-amber-50 text-gray-900 p-3 sm:p-4 rounded-2xl border-2 border-amber-100 outline-none focus:border-[#1c74e9] text-sm font-black transition-colors",placeholder:"Ej: 2.º ESO"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-1 block",children:"Materias en las que necesita apoyo"}),e.jsx("textarea",{required:!0,rows:3,value:t.subjects,onChange:l=>o(s=>({...s,subjects:l.target.value})),className:"w-full bg-amber-50 text-gray-900 p-3 sm:p-4 rounded-2xl border-2 border-amber-100 outline-none focus:border-[#1c74e9] text-sm font-medium transition-colors resize-none",placeholder:"Ej: Matematicas, Fisica y Quimica"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-1 block",children:"Tardes que no puede asistir y observaciones horarias"}),e.jsx("textarea",{rows:3,value:t.availability,onChange:l=>o(s=>({...s,availability:l.target.value})),className:"w-full bg-gray-50 text-gray-900 p-3 sm:p-4 rounded-2xl border-2 border-gray-100 outline-none focus:border-[#1c74e9] text-sm font-medium transition-colors resize-none",placeholder:"Ej: No puede martes ni jueves antes de las 18:00"}),e.jsx("p",{className:"mt-2 pl-1 text-[11px] font-bold leading-relaxed text-gray-400",children:"Esto actualiza sus restricciones. No confirma por si solo un grupo ni un horario."})]})]})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-[#1c74e9] text-xs font-black uppercase tracking-widest border-b border-gray-100 pb-2 mb-4",children:"4. Datos de la familia"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-1 block",children:"Nombre del tutor"}),e.jsx("input",{type:"text",required:!0,value:t.parentFirstName,onChange:l=>o(s=>({...s,parentFirstName:l.target.value})),className:"w-full bg-gray-50 text-gray-900 p-3 sm:p-4 rounded-2xl border-2 border-gray-100 outline-none focus:border-[#1c74e9] text-sm font-medium transition-colors",placeholder:"Ej: Maria"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-1 block",children:"Apellidos"}),e.jsx("input",{type:"text",value:t.parentLastName,onChange:l=>o(s=>({...s,parentLastName:l.target.value})),className:"w-full bg-gray-50 text-gray-900 p-3 sm:p-4 rounded-2xl border-2 border-gray-100 outline-none focus:border-[#1c74e9] text-sm font-medium transition-colors",placeholder:"Ej: Moreno Garcia"})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-1 block",children:["Colegio / instituto ",e.jsx("span",{className:"text-gray-400",children:"(opcional)"})]}),e.jsx("input",{type:"text",value:t.schoolName,onChange:l=>o(s=>({...s,schoolName:l.target.value})),className:"w-full bg-gray-50 text-gray-900 p-3 sm:p-4 rounded-2xl border-2 border-gray-100 outline-none focus:border-[#1c74e9] text-sm font-medium transition-colors",placeholder:"Ej: IES Trevenque"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-1 block",children:"Correo electronico principal"}),e.jsx("input",{type:"email",required:!0,value:t.email,onChange:l=>o(s=>({...s,email:l.target.value})),className:"w-full bg-gray-50 text-gray-900 p-3 sm:p-4 rounded-2xl border-2 border-gray-100 outline-none focus:border-[#1c74e9] text-sm font-medium transition-colors",placeholder:"[email protected]"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-1 block",children:["Telefono / WhatsApp ",e.jsx("span",{className:"text-red-500",children:"(obligatorio)"})]}),e.jsx("input",{type:"tel",required:!0,value:t.phone,onChange:l=>{o(s=>({...s,phone:l.target.value})),p("")},className:"w-full bg-gray-50 text-gray-900 p-3 sm:p-4 rounded-2xl border-2 border-gray-100 outline-none focus:border-[#1c74e9] text-sm font-medium transition-colors",placeholder:"Ej: 600 000 000"}),e.jsx("p",{className:"mt-2 pl-1 text-[11px] font-bold leading-relaxed text-gray-400",children:"Debe ser un movil espanol de 9 cifras. Si la ficha antigua no tenia telefono, hay que escribirlo ahora."})]})]})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-[#1c74e9] text-xs font-black uppercase tracking-widest border-b border-gray-100 pb-2 mb-4",children:"5. Direccion de contacto"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-1 block",children:"Direccion"}),e.jsx("input",{type:"text",value:t.address,onChange:l=>o(s=>({...s,address:l.target.value}
1)),className:"w-full bg-gray-50 text-gray-900 p-3 sm:p-4 rounded-2xl border-2 border-gray-100 outline-none focus:border-[#1c74e9] text-sm font-medium transition-colors",placeholder:"Ej: Calle Real 15"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-1 block",children:"Detalles de direccion"}),e.jsx("input",{type:"text",value:t.addressDetails,onChange:l=>o(s=>({...s,addressDetails:l.target.value})),className:"w-full bg-gray-50 text-gray-900 p-3 sm:p-4 rounded-2xl border-2 border-gray-100 outline-none focus:border-[#1c74e9] text-sm font-medium transition-colors",placeholder:"Portal, piso, urbanizacion..."})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-1 block",children:"Codigo postal"}),e.jsx("input",{type:"text",value:t.postalCode,onChange:l=>o(s=>({...s,postalCode:l.target.value})),className:"w-full bg-gray-50 text-gray-900 p-3 sm:p-4 rounded-2xl border-2 border-gray-100 outline-none focus:border-[#1c74e9] text-sm font-medium transition-colors",placeholder:"18140"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-1 block",children:"Localidad"}),e.jsx("input",{type:"text",value:t.location,onChange:l=>o(s=>({...s,location:l.target.value})),className:"w-full bg-gray-50 text-gray-900 p-3 sm:p-4 rounded-2xl border-2 border-gray-100 outline-none focus:border-[#1c74e9] text-sm font-medium transition-colors",placeholder:"La Zubia"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest pl-1 block",children:"Provincia"}),e.jsx("input",{type:"text",value:t.province,onChange:l=>o(s=>({...s,province:l.target.value})),className:"w-full bg-gray-50 text-gray-900 p-3 sm:p-4 rounded-2xl border-2 border-gray-100 outline-none focus:border-[#1c74e9] text-sm font-medium transition-colors",placeholder:"Granada"})]})]})]}),e.jsxs("div",{className:"bg-amber-50 border border-amber-100 rounded-[24px] p-5",children:[e.jsx("p",{className:"text-amber-700 text-[10px] font-black uppercase tracking-widest mb-2",children:"Importante"}),e.jsx("p",{className:"text-sm text-amber-900 leading-relaxed",children:"Este formulario actualiza datos de la ficha, pero no cambia el profesor, el precio, la modalidad contratada ni confirma un grupo u horario. Esos acuerdos los revisa Coordinacion."})]}),j?e.jsxs("div",{className:"rounded-[24px] border border-green-100 bg-green-50 p-5 space-y-3",children:[e.jsx("p",{className:"text-[10px] font-black text-green-700 uppercase tracking-widest",children:"Privacidad ya confirmada"}),e.jsx("p",{className:"text-[12px] text-green-900 leading-6",children:"No hace falta volver a confirmar la informacion de privacidad. Aqui solo estas completando o corrigiendo datos de contacto de la familia."})]}):e.jsx(Y,{summary:T,accepted:k,onChange:w,consentText:"Confirmo que soy madre, padre o tutor legal y autorizo el tratamiento de estos datos para actualizar la ficha de la familia.",footnote:"Puedes abrir la polÃtica completa en una pestaña aparte y volver aquà enseguida para terminar la ficha.",compactHeightClass:"max-h-28",panelClassName:"bg-gray-50 border border-gray-100"}),N&&e.jsx("div",{role:"alert",className:"rounded-2xl border border-red-200 bg-red-50 p-4 text-sm font-bold leading-relaxed text-red-700",children:N}),e.jsx("button",{type:"submit",disabled:h,className:`w-full py-4 rounded-2xl text-white font-black uppercase tracking-widest text-xs transition-transform active:scale-95 ${h?"bg-gray-300 cursor-not-allowed":"bg-[#1c74e9] shadow-lg shadow-blue-500/30"}`,children:h?"Guardando datos...":"Guardar ficha actualizada"}),e.jsxs("p",{className:"text-[11px] text-center text-gray-400 font-bold leading-relaxed",children:["Gracias por ayudarnos a tener bien las comunicaciones de ",`${t.studentFirstName} ${t.studentLastName}`.trim(),"."]})]})]})})},re=()=>{if(window.close(),window.history.length>1){window.history.back();return}window.location.href="/"};export{pe as PublicFamilyUpdateForm};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.