PageSourceSearch

https://faf.co.ao/assets/BecomeMember-DSqRB0cq.js

js faf.co.ao collected 2026-10-02 19:10:09 UTC 7,699 bytes, 1 lines download raw bytes

1import{y as M,r as d,z as A,j as e}from"./vendor-react-core-_0sZDOLQ.js";import{B as q,b as m,c as R}from"./index-j07E1qHv.js";import{I as a}from"./input-rti45mgP.js";import{L as r}from"./label-7HT5__eZ.js";import{C as g,b as y,c as N,a as v}from"./card-DHmBnTdH.js";import{t as x}from"./index-CDqomOa1.js";import{U as S,af as T,aL as z,aM as B,y as L}from"./vendor-lucide-Ddz0eB7N.js";import{m as h}from"./vendor-framer-motion-C1oRD-X5.js";import"./vendor-radix-CFmJ1img.js";import"./vendor-utils-BRu4i-LD.js";import"./vendor-supabase-Ca6cp8v2.js";const w=[{type:"base",name:"Sócio Base",icon:S,price:15e3,color:"from-gray-600 to-gray-700",benefits:["10% desconto em bilhetes","Newsletter exclusiva","Cartão digital de sócio","Acesso a eventos especiais"]},{type:"prata",name:"Sócio Prata",icon:T,price:35e3,color:"from-gray-400 to-gray-500",benefits:["Todos os benefícios Base","20% desconto em bilhetes","15% desconto na loja oficial","Prioridade na compra de bilhetes","Convite para treinos abertos"]},{type:"ouro",name:"Sócio Ouro",icon:z,price:75e3,color:"from-yellow-500 to-yellow-600",popular:!0,benefits:["Todos os benefícios Prata","30% desconto em bilhetes","25% desconto na loja oficial","Acesso VIP em jogos selecionados","Meet & Greet com jogadores","Camisola oficial personalizada"]},{type:"vitalicio",name:"Sócio Vitalício",icon:B,price:5e5,color:"from-red-600 to-red-700",benefits:["Todos os benefícios Ouro","Válido para sempre","50% desconto em bilhetes vitalício","40% desconto na loja vitalício","Nome no mural de honra","Ingresso em todos os eventos FAF","Cartão físico premium"]}];function Z(){const C=M(),[t,F]=d.useState(w[2]),[p,b]=d.useState(!1),[u,P]=d.useState(null),{register:i,handleSubmit:_,formState:{errors:o}}=A(),I=async s=>{b(!0);try{let l=null;u&&(l=(await m.integrations.Core.UploadFile({file:u})).file_url);const c=`FAF-${Date.now()}-${Math.random().toString(36).substr(2,6).toUpperCase()}`,n=await m.entities.Membership.create({member_number:c,member_name:s.name,email:s.email,phone:s.phone,birth_date:s.birth_date,identification_number:s.bi,address:{street:s.street,city:s.city,province:s.province},membership_type:t.type,status:"pending",start_date:new Date().toISOString().split("T")[0],card_photo_url:l,benefits:t.benefits,annual_fee:t.price});(await m.functions.invoke("multicaixaGenerateReference",{type:"membership",entityId:n.id,amount:t.price,description:`Subscrição ${t.name}`})).data.success?x.success("Inscrição realizada! Referência de pagamento gerada."):x.warning("Inscrição realizada, mas falha ao gerar referência"),C(R("MemberCard"))}catch(l){x.error("Erro ao criar inscrição"),console.error(l)}finally{b(!1)}};return e.jsxs("main",{className:"min-h-screen bg-gray-50",children:[e.jsx("section",{className:"bg-gradient-to-br from-faf-blue via-faf-blue-light to-faf-blue-dark py-20",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs(h.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center text-white",children:[e.jsx(S,{className:"w-16 h-16 mx-auto mb-4"}),e.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-4",children:"Torna-te Sócio FAF"}),e.jsx("p",{className:"text-xl text-white/90 max-w-2xl mx-auto",children:"Junte-se à família das Palancas Negras e desfrute de benefícios exclusivos"})]})})}),e.jsx("section",{className:"py-12",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsx("h2",{className:"text-3xl font-bold text-center text-gray-900 mb-12",children:"Escolha a sua Modalidade"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-12",children:w.map((s,l)=>{const c=s.icon,n=t.type===s.type;return e.jsx(h.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:l*.1},children:e.jsxs(g,{className:`cursor-pointer transition-all relative overflow-hidden ${n?"ring-4 ring-red-600 shadow-2xl":"hover:shadow-xl"}`,onClick:()=>F(s),children:[s.popular&&e.jsx("div",{className:"absolute top-0 right-0 bg-red-600 text-white text-xs font-bold px-3 py-1 rounded-bl-lg",children:"POPULAR"}),e.jsx(y,{className:`bg-gradient-to-br ${s.color} text-white`,children:e.jsxs("div",{className:"text-center",children:[e.jsx(c,{className:"w-12 h-12 mx-auto mb-3"}),e.jsx(N,{className:"text-xl mb-2",children:s.name}),e.jsxs("div",{className:"text-3xl font-bold",children:[s.price.toLocaleStr
1ing("pt-AO")," Kz"]}),e.jsx("p",{className:"text-sm text-white/80 mt-1",children:s.type==="vitalicio"?"Pagamento único":"por ano"})]})}),e.jsx(v,{className:"p-6",children:e.jsx("ul",{className:"space-y-3",children:s.benefits.map((j,f)=>e.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[e.jsx(L,{className:"w-5 h-5 text-green-600 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:"text-gray-700",children:j})]},f))})})]})},s.type)})}),e.jsx(h.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"max-w-3xl mx-auto",children:e.jsxs(g,{children:[e.jsx(y,{children:e.jsx(N,{children:"Dados de Inscrição"})}),e.jsx(v,{children:e.jsxs("form",{onSubmit:_(I),className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(r,{htmlFor:"name",children:"Nome Completo *"}),e.jsx(a,{id:"name",...i("name",{required:!0}),className:o.name?"border-red-500":""})]}),e.jsxs("div",{children:[e.jsx(r,{htmlFor:"bi",children:"Número do BI *"}),e.jsx(a,{id:"bi",...i("bi",{required:!0}),className:o.bi?"border-red-500":""})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(r,{htmlFor:"email",children:"Email *"}),e.jsx(a,{id:"email",type:"email",...i("email",{required:!0}),className:o.email?"border-red-500":""})]}),e.jsxs("div",{children:[e.jsx(r,{htmlFor:"phone",children:"Telefone *"}),e.jsx(a,{id:"phone",...i("phone",{required:!0}),className:o.phone?"border-red-500":""})]})]}),e.jsxs("div",{children:[e.jsx(r,{htmlFor:"birth_date",children:"Data de Nascimento *"}),e.jsx(a,{id:"birth_date",type:"date",...i("birth_date",{required:!0}),className:o.birth_date?"border-red-500":""})]}),e.jsxs("div",{children:[e.jsx(r,{htmlFor:"street",children:"Morada *"}),e.jsx(a,{id:"street",...i("street",{required:!0}),className:o.street?"border-red-500":""})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(r,{htmlFor:"city",children:"Cidade *"}),e.jsx(a,{id:"city",...i("city",{required:!0}),className:o.city?"border-red-500":""})]}),e.jsxs("div",{children:[e.jsx(r,{htmlFor:"province",children:"Província *"}),e.jsx(a,{id:"province",...i("province",{required:!0}),className:o.province?"border-red-500":""})]})]}),e.jsxs("div",{children:[e.jsx(r,{htmlFor:"photo",children:"Foto para Cartão de Sócio"}),e.jsx(a,{id:"photo",type:"file",accept:"image/*",onChange:s=>P(s.target.files[0]),className:"mt-2"}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Formato: JPG, PNG (máx. 5MB)"})]}),e.jsxs("div",{className:"bg-gray-50 p-6 rounded-lg",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("span",{className:"font-semibold text-gray-900",children:"Modalidade Selecionada"}),e.jsx("span",{className:"text-2xl font-bold text-red-600",children:t.name})]}),e.jsxs("div",{className:"flex items-center justify-between text-lg font-bold",children:[e.jsx("span",{children:"Total"}),e.jsxs("span",{className:"text-red-600",children:[t.price.toLocaleString("pt-AO")," Kz"]})]})]}),e.jsx(q,{type:"submit",disabled:p,className:"w-full bg-red-600 hover:bg-red-700",size:"lg",children:p?"A processar...":"Confirmar Inscrição"})]})})]})})]})})]})}export{Z 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.