1import{r as l,j as e}from"./vendor-react-CoH7wDUq.js";import{b as P,c as q,P as n,p as i,a as o}from"./PublicFormLayout-B7vwxvbG.js";import{u as E}from"./index-co-p2Yz-.js";import{f as T,a as z}from"./formulariosApi-Bdn4wPtd.js";import"./vendor-pdf-DNjb9-t8.js";const D=()=>{const{language:j}=E(),[m,y]=l.useState([]),[c,d]=l.useState(!1),[N,w]=l.useState(!1),[u,r]=l.useState(""),[v,x]=l.useState(!1),p={pt:{title:"Filiação",eyebrow:"Convention Bureau",lead:"Os filiados são organizações que apoiam o Convention Bureau e colaboram com ações de promoção do destino, sem integrar a rede de associados mantenedores.",how:"Para se filiar, envie sua solicitação pelo formulário. Avaliaremos e retornaremos por e-mail.",listTitle:"Filiados",nome:"Nome / instituição",tel:"Telefone",email:"E-mail",msg:"Mensagem",send:"Enviar solicitação",cta:"Quero me filiar",success:"Recebemos sua solicitação de filiação.",empty:"Nenhum filiado listado no momento.",fillRequired:"Preencha nome, telefone e e-mail."},en:{title:"Affiliation",eyebrow:"Convention Bureau",lead:"Affiliates are organizations that support the Convention Bureau and collaborate on destination promotion.",how:"To apply, use the form below. We will reply by email.",listTitle:"Affiliates",nome:"Name / organization",tel:"Phone",email:"Email",msg:"Message",send:"Submit request",cta:"Apply for affiliation",success:"We have received your affiliation request.",empty:"No affiliates listed yet.",fillRequired:"Please fill in name, phone and email."},es:{title:"Filación",eyebrow:"Convention Bureau",lead:"Los filiados son organizaciones que apoyan al Convention Bureau en la promoción del destino.",how:"Para filiarse, envÃe el formulario. Responderemos por correo.",listTitle:"Filiados",nome:"Nombre / institución",tel:"Teléfono",email:"Correo",msg:"Mensaje",send:"Enviar solicitud",cta:"Quiero filiarme",success:"Hemos recibido su solicitud de filación.",empty:"No hay filiados listados por ahora.",fillRequired:"Complete nombre, teléfono y correo."}},t=p[j]||p.pt;l.useEffect(()=>{let s=!1;return T().then(a=>{s||y(a)}),()=>{s=!0}},[]);async function F(s){s.preventDefault(),r("");const a=new FormData(s.currentTarget),f=String(a.get("nome")||"").trim(),b=String(a.get("telefone")||"").trim(),h=String(a.get("email")||"").trim(),S=String(a.get("mensagem")||"").trim();if(!f||!b||!h){r(t.fillRequired);return}d(!0);const C=s.currentTarget;try{await z({nome:f,telefone:b,email:h,mensagem:S}),C.reset(),w(!0),x(!1)}catch(g){r(g instanceof Error?g.message:"Erro")}finally{d(!1)}}return e.jsxs(P,{title:t.title,children:[e.jsxs(q,{title:t.title,eyebrow:t.eyebrow,breadcrumbLabel:t.title,children:[e.jsx("p",{className:"mb-3 text-slate-200/95",children:t.lead}),e.jsx("p",{className:"text-slate-300/95",children:t.how})]}),e.jsxs("section",{className:"mb-10 sm:mb-12",children:[e.jsx("h2",{className:"mb-4 font-serif text-xl font-bold text-slate-900 sm:text-2xl",children:t.listTitle}),m.length===0?e.jsx(n,{className:"p-6 sm:p-8",children:e.jsx("p",{className:"text-center text-sm text-slate-500 sm:text-base",children:t.empty})}):e.jsx("ul",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 sm:gap-5",children:m.map(s=>e.jsx("li",{children:e.jsxs(n,{className:"h-full p-5 transition-shadow hover:shadow-lg sm:p-6",children:[s.logoUrl?e.jsx("div",{className:"mb-3 flex h-14 items-center",children:e.jsx("img",{src:s.logoUrl,alt:"",className:"max-h-14 w-auto max-w-full object-contain",loading:"lazy"})}):null,e.jsx("p",{className:"font-semibold text-slate-900",children:s.nome}),s.titulo?e.jsx("p",{className:"mt-1 text-xs font-medium uppercase tracking-wide text-emerald-700/90",children:s.titulo}):null,s.texto?e.jsx("p",{className:"mt-3 text-sm leading-relaxed text-slate-600",children:s.texto}):null]})},s.id))})]}),e.jsx("div",{className:"mb-6 flex flex-col gap-3 sm:flex-row sm:items-center",children:e.jsx("button",{type:"button",onClick:()=>x(s=>!s),className:"inline-flex w-full items-center justify-center rounded-xl border-2 border-emerald-600 bg-white px-6 py-3.5 text-sm font-semibold text-emerald-700 shadow-sm transition hover:bg-emerald-50 sm:w-auto
1sm:min-w-[200px] sm:text-base",children:t.cta})}),N?e.jsx("div",{className:"mb-6 rounded-2xl border border-emerald-200/80 bg-emerald-50 px-4 py-3 text-sm text-emerald-900 sm:px-5 sm:text-base",children:t.success}):null,u?e.jsx("div",{className:"mb-6 rounded-2xl border border-red-200/80 bg-red-50 px-4 py-3 text-sm text-red-800 sm:px-5 sm:text-base",children:u}):null,v?e.jsxs(n,{className:"p-5 sm:p-8 md:p-10",children:[e.jsx("h3",{className:"mb-6 font-serif text-lg font-bold text-slate-900 sm:text-xl",children:t.cta}),e.jsxs("form",{onSubmit:s=>void F(s),className:"space-y-5 sm:space-y-6",children:[e.jsxs("label",{className:i,children:[t.nome," ",e.jsx("span",{className:"text-red-500",children:"*"}),e.jsx("input",{name:"nome",required:!0,className:o,autoComplete:"organization"})]}),e.jsxs("label",{className:i,children:[t.tel," ",e.jsx("span",{className:"text-red-500",children:"*"}),e.jsx("input",{name:"telefone",required:!0,type:"tel",className:o,autoComplete:"tel"})]}),e.jsxs("label",{className:i,children:[t.email," ",e.jsx("span",{className:"text-red-500",children:"*"}),e.jsx("input",{name:"email",required:!0,type:"email",className:o,autoComplete:"email"})]}),e.jsxs("label",{className:i,children:[t.msg,e.jsx("textarea",{name:"mensagem",rows:5,className:`${o} resize-y min-h-[120px]`})]}),e.jsx("button",{type:"submit",disabled:c,className:"inline-flex w-full items-center justify-center rounded-xl bg-gradient-to-r from-emerald-600 to-teal-600 py-3.5 text-sm font-semibold text-white shadow-md transition hover:from-emerald-500 hover:to-teal-500 disabled:cursor-not-allowed disabled:opacity-50 sm:text-base",children:c?"â¦":t.send})]})]}):null]})};export{D as FiliacaoPage,D as default};
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.