1import{r as c,j as e,L as f,t as b,s as N}from"./main-CP2Oraov.js";import{E as w,a as C}from"./event-dates-picker-Vvk8iQRc.js";import{C as F,a as S,L as D}from"./convocatoria-cerrada-DrDgbatd.js";import{u as E}from"./convocatorias-CB8B5X0W.js";import{A as g}from"./arrow-left-CxmNGZwk.js";import"./button-CIuYtjqp.js";import"./chevron-right-YSoUIPeT.js";import"./createLucideIcon-rU5XVAH0.js";import"./popover-46vAI4nz.js";import"./index-CgCDVo89.js";import"./x-igh001Bb.js";const s={cream:"#F5F0E8",ink:"#0B0F1F",ink2:"#3A4060",orange:"#9FD928",heroBg:"#08091A"},T="http://alecmuza.com/wp-content/uploads/2026/05/Logo-Horizontal-4.png",P=["<25","25â50","50â100","100â250","250â500","500+"],A=["Coworking","Oficina corporativa","Auditorio","Rooftop","Restaurante / Bar","GalerÃa / Espacio cultural","Showroom","Otro"];function R(){const t=E("espacios"),[n,m]=c.useState(!1),[r,i]=c.useState(!1),[o,d]=c.useState([]),[p,j]=c.useState(!1),y=async x=>{if(x.preventDefault(),!p){b.error("Debes aceptar los términos y el aviso de privacidad.");return}i(!0);const a=new FormData(x.currentTarget),u=a.get("notas")||"",k=o.length>0?`DÃas disponibles: ${C(o)}${u?` | ${u}
1`:""}`:u,{error:v}=await N.from("registros_espacios").insert({nombre_contacto:a.get("nombre"),email:a.get("email"),telefono:a.get("telefono")||"",nombre_espacio:a.get("nombre_espacio"),direccion:a.get("direccion")||"",capacidad:a.get("capacidad")||"",tipo_espacio:a.get("tipo")||"",notas_disponibilidad:k});if(i(!1),v){b.error("Error al enviar. Intenta de nuevo.");return}m(!0)};return!t.cargando&&!t.abierta?e.jsx(F,{titulo:"¡Gracias! Cerramos la convocatoria de espacios",mensaje:t.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(S,{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:"¡Espacio registrado!"}),e.jsx("p",{className:"text-sm mb-6",style:{color:s.ink2},children:"Gracias por postular tu espacio. Te contactaremos pronto."}),e.jsxs(f,{to:"/",className:"text-sm font-medium inline-flex items-center gap-1",style:{color:s.orange},children:[e.jsx(g,{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:T,alt:"MTYTW",className:"h-12",referrerPolicy:"no-referrer"}),e.jsxs(f,{to:"/",className:"text-sm text-white/60 hover:text-white transition-colors flex items-center gap-1",children:[e.jsx(g,{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:"Postula tu Espacio"}),e.jsx("p",{className:"text-sm mb-8",style:{color:s.ink2},children:"Ofrece tu venue como sede de eventos durante la Tech Week. Oficinas, coworkings, rooftops y más."}),e.jsxs("form",{onSubmit:y,className:"space-y-5",children:[e.jsx(l,{label:"Nombre de contacto *",name:"nombre",required:!0}),e.jsx(l,{label:"Email *",name:"email",type:"email",required:!0}),e.jsx(l,{label:"Teléfono",name:"telefono",type:"tel",placeholder:"+52 81 ..."}),e.jsx(l,{label:"Nombre del espacio *",name:"nombre_espacio",required:!0}),e.jsx(l,{label:"Dirección",name:"direccion",placeholder:"Calle, colonia, ciudad"}),e.jsx(h,{label:"Capacidad (personas)",name:"capacidad",options:P}),e.jsx(h,{label:"Tipo de espacio",name:"tipo",options:A}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium mb-1.5",style:{color:s.ink2},children:"DÃas disponibles (Tech Week)"}),e.jsx(w,{value:o,onChange:d,ink2:s.ink2,accent:s.orange})]}),e.jsx(l,{label:"Notas adicionales",name:"notas",textarea:!0,placeholder:"Horarios, restricciones, equipo incluido, etc."}),e.jsx(D,{checked:p,onChange:j,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 registro"})]})]})]})}function l({label:t,name:n,type:m="text",required:r,textarea:i,placeholder:o}){const d=c.useId(),p="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:d,className:"block text-xs font-medium mb-1.5",style:{color:s.ink2},children:t}),i?e.jsx("textarea",{id:d,name:n,required:r,placeholder:o,rows:3,className:p,style:{borderColor:"rgba(60,50,30,0.15)"}}):e.jsx("input",{id:d,name:n,type:m,required:r,placeholder:o,className:p,style:{borderColor:"rgba(60,50,30,0.15)"}})]})}function h({label:t,name:n,options:m,required:r}){const i=c.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:t}),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â¦"}),m.map(o=>e.jsx("option",{value:o,children:o},o))]})]})}export{R 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.