1import{r as m,j as e,L as h,t as p,s as C}from"./main-CP2Oraov.js";import{C as F,a as T,L as w}from"./convocatoria-cerrada-DrDgbatd.js";import{u as L}from"./convocatorias-CB8B5X0W.js";import{A as j}from"./arrow-left-CxmNGZwk.js";import"./createLucideIcon-rU5XVAH0.js";const s={cream:"#F5F0E8",ink:"#0B0F1F",ink2:"#3A4060",ink3:"#6B7390",orange:"#9FD928",heroBg:"#08091A"},A="http://alecmuza.com/wp-content/uploads/2026/05/Logo-Horizontal-4.png",B=["LogÃstica","Staff en sedes","Registro / Check-in","Redes sociales","FotografÃa","Video","Producción","Traducción / Bilingüe","Comunidad / Anfitrión"],q=["Lun 28 Sep","Mar 29 Sep","Mié 30 Sep","Jue 1 Oct","Vie 2 Oct","Sáb 3 Oct"],D=["XS","S","M","L","XL","XXL"];function _(){const o=L("voluntarios"),[n,l]=m.useState(!1),[r,i]=m.useState(!1),[a,u]=m.useState([]),[c,v]=m.useState([]),[f,k]=m.useState(!1),b=(t,d,x)=>{d(t.includes(x)?t.filter(N=>N!==x):[...t,x])},S=async t=>{if(t.preventDefault(),a.length===0){p.error("Selecciona al menos un área de interés.");return}if(c.length===0){p.error("Selecciona al menos un dÃa de disponibilidad.");return}if(!f){p.error("Debes aceptar los términos y el aviso de privacidad.");return}i(!0);const d=new FormData(t.currentTarget),{error:x}=await C.from("registros_voluntarios").insert({nombre:d.get("nombre"),email:d.get("email"),telefono:d.get("telefono")||"",areas_interes:a.join(" | "),disponibilidad:c.join(" | "),experiencia:d.get("experiencia")||"",talla_playera:d.get("talla")||""});if(i(!1),x){p.error("Error al enviar. Intenta de nuevo.");return}l(!0)};return!o.cargando&&!o.abierta?e.jsx(F,{titulo:"¡Gracias! Cerramos la convocatoria de voluntarios",mensaje:o.mensaje}):n?e.jsx("div",{style:{fontFamily:"'IBM Plex Sans', sans-serif",color:s.ink,background:s.cream,minHeight:"100vh"},className:"flex items-center justify-center",children:e.jsxs("div",{className:"text-center max-w-md px-6",children:[e.jsx(T,{size:48,style:{color:s.orange},className:"mx-auto mb-4"}),e.jsx("h1",{className:"text-2xl font-display mb-2",style:{fontFamily:"'Bricolage Grotesque', sans-serif",fontWeight:800},children:"¡Bienvenido al equipo!"}),e.jsx("p",{className:"text-sm mb-6",style:{color:s.ink2},children:"Gracias por postularte como voluntario. Te contactaremos con los siguientes pasos."}),e.jsxs(h,{to:"/",className:"text-sm font-medium inline-flex items-center gap-1",style:{color:s.orange},children:[e.jsx(j,{size:14})," Volver"]})]})}):e.jsxs("div",{style:{fontFamily:"'IBM Plex Sans', sans-serif",color:s.ink,background:s.cream,minHeight:"100vh"},children:[e.jsxs("nav",{className:"flex items-center justify-between px-6 h-14",style:{background:s.heroBg},children:[e.jsx("img",{src:A,alt:"MTYTW",className:"h-12",referrerPolicy:"no-referrer"}),e.jsxs(h,{to:"/",className:"text-sm text-white/70 hover:text-white transition-colors flex items-center gap-1",children:[e.jsx(j,{size:14})," Volver"]})]}),e.jsxs("div",{className:"max-w-lg mx-auto px-6 py-12",children:[e.jsx("h1",{className:"text-3xl font-display mb-2",style:{fontFamily:"'Bricolage Grotesque', sans-serif",fontWeight:800,letterSpacing:"-0.035em"},children:"Sé Voluntario"}),e.jsx("p",{className:"text-sm mb-8",style:{color:s.ink2},children:"Ãnete al equipo que hace posible MTYTW 2026. Vive la Tech Week desde adentro y conoce a la comunidad tech del norte."}),e.jsxs("form",{onSubmit:S,className:"space-y-5",children:[e.jsx(g,{label:"Tu nombre *",name:"nombre",required:!0}),e.jsx(g,{label:"Email *",name:"email",type:"email",required:!0}),e.jsx(g,{label:"Teléfono *",name:"telefono",type:"tel",required:!0,placeholder:"+52 81 ..."}),e.jsx(y,{label:"Ãreas de interés *",hint:"Selecciona todas las que apliquen.",options:B,values:a,onToggle:t=>b(a,u,t)}),e.jsx(y,{label:"Disponibilidad (dÃas) *",hint:"Selecciona los dÃas que puedes participar.",options:q,values:c,onToggle:t=>b(c,v,t)}),e.jsx(g,{label:"Experiencia previa",name:"experiencia",textarea:!0,placeholder:"¿Has participado en eventos, comunidades o voluntariados antes? Cuéntanos."}),e.jsx(E,{label:"Talla de playera",name:"talla",options:D}),e.jsx(w,{checked:f,onChange:k,accent:s.orange,ink:s.ink,ink2:s.ink2}),e.jsx("button",{type:"submit",disabled:r,className:"w-full text-sm font-medium py-3 rounded-md disabled:opacity-50",style:{background:s.orange,color:s.ink},children:r?"Enviandoâ¦":"Enviar postulación"})]})]})]})}function g({label:o,name:n,type:l="text",required:r,textarea:i,placeholder:a}){const u=m.useId(),c="w-full rounded-md border px-3 py-2.5 text-sm bg-white focus:outline-none focus:ring-2 focus:ring-[#9FD928]/40";return e.jsxs("div",{children:[e.jsx("label",{htmlFor:u,className:"block text-xs font-medium mb-1.5",style:{color:s.ink2},children:o}),i?e.jsx("textarea",{id:u,name:n,required:r,placeholder:a,rows:3,className:c,style:{borderColor:"rgba(60,50,30,0.15)"}}):e.jsx("input",{id:u,name:n,type:l,required:r,placeholder:a,className:c,style:{borderColor:"rgba(60,50,30,0.15)"}})]})}function E({label:o,name:n,options:l,required:r}){const i=m.useId();return e.jsxs("div",{children:[e.jsx("label",{htmlFor:i,className:"block text-xs font-medium mb-1.5",style:{color:s.ink2},children:o}),e.jsxs("select",{id:i,name:n,required:r,defaultValue:"",className:"w-full rounded-md border px-3 py-2.5 text-sm bg-white focus:outline-none focus:ring-2 focus:ring-[#9FD928]/40",style:{borderColor:"rgba(60,50,30,0.15)"},children:[e.jsx("option",{value:"",disabled:!0,children:"Seleccionaâ¦"}),l.map(a=>e.jsx("option",{value:a,children:a},a))]})]})}function y({label:o,hint:n,options:l,values:r,onToggle:i}){return e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium mb-1.5",style:{color:s.ink2},children:o}),n&&e.jsx("p",{className:"text-[11px] mb-2",style:{color:s.ink3},children:n}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-1.5 rounded-md border p-3 bg-white",style:{borderColor:"rgba(60,50,30,0.15)"},children:l.map(a=>e.jsxs("label",{className:"flex items-start gap-2 text-xs cursor-pointer py-1 px-1 rounded hover:bg-black/[0.03]",style:{color:s.ink},children:[e.jsx("input",{type:"checkbox",checked:r.includes(a),onChange:()=>i(a),className:"mt-0.5 accent-[#9FD928]"}),e.jsx("span",{className:"leading-snug",children:a})]},a))})]})}export{_ as component};
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.