PageSourceSearch

https://simplifiqueportugal.com/assets/dadoscliented1-CocJ1H21.js

js simplifiqueportugal.com collected 2026-10-09 22:04:45 UTC 4,423 bytes, 1 lines download raw bytes

1import{c as v,r as l,j as e}from"./index-8M6IK-H8.js";import{c as k,u as w}from"./createServerFn-BWgG3QXW.js";const P=k({method:"POST"}).handler(v("e26114b2a4cf3f75f21b0a97e01ab4249f14dbf961250e860721821b98649790")),b={nome:"",sobrenome:"",sobrenome_antigo:"",estado_civil:"",rg:"",orgao_expeditor:"",cpf:"",telefone:"+55 ",endereco:"",email:"",profissao:"",formacao:"",cargo_portugal:"",banco:"",nome_pai:"",nome_mae:""},S=[{key:"nome",label:"Nome"},{key:"sobrenome",label:"Sobrenome atual"},{key:"sobrenome_antigo",label:"Sobrenome antigo (se mudou)"},{key:"estado_civil",label:"Estado civil"},{key:"rg",label:"Número do RG"},{key:"orgao_expeditor",label:"Órgão expeditor"},{key:"cpf",label:"Número do CPF"},{key:"telefone",label:"Telefone (+55 DDD número)"},{key:"endereco",label:"Endereço completo (rua, CEP, cidade, estado, Brasil)",wide:!0},{key:"email",label:"E-mail para receber informações do consulado",wide:!0,type:"email"},{key:"profissao",label:"Profissão atual"},{key:"formacao",label:"Formação acadêmica (se tiver)"},{key:"cargo_portugal",label:"Cargo que vai ocupar na empresa em Portugal",wide:!0},{key:"banco",label:"Banco onde estará o dinheiro (extrato bancário)",wide:!0},{key:"nome_pai",label:"Nome completo do pai"},{key:"nome_mae",label:"Nome completo da mãe"}];function C(){const x=w(P),[t,i]=l.useState([{...b}]),[d,u]=l.useState(!1),[g,f]=l.useState(!1),[p,c]=l.useState(null);function h(s,o,a){i(r=>r.map((n,m)=>m===s?{...n,[o]:a}:n))}function y(){i(s=>s.length>=5?s:[...s,{...b}])}function j(s){i(o=>o.filter((a,r)=>r!==s))}async function N(s){if(s.preventDefault(),c(null),t.some(a=>a.nome.trim().length<2||a.sobrenome.trim().length<1)){c("Preencha ao menos nome e sobrenome de cada pessoa.");return}u(!0);try{const a=t.map(r=>Object.fromEntries(Object.entries(r).map(([n,m])=>[n,String(m).trim().toUpperCase()])));await x({data:{pessoas:a}}),f(!0)}catch(a){c(a instanceof Error?a.message:"Erro ao enviar.")}finally{u(!1)}}return g?e.jsx("main",{className:"min-h-screen bg-background text-foreground grid place-items-center px-6",children:e.jsxs("div",{className:"max-w-lg text-center",children:[e.jsx("h1",{className:"font-display text-3xl md:text-4xl",children:"Dados enviados com sucesso"}),e.jsxs("p",{className:"mt-4 text-muted-foreground",children:["Recebemos as informações de ",t.length," ",t.length===1?"pessoa":"pessoas",". Nossa equipe entrará em contato em caso de qualquer ajuste necessário."]})]})}):e.jsx("main",{className:"min-h-screen bg-background text-foreground py-16 px-6",children:e.jsxs("div",{className:"mx-auto w-full max-w-3xl",children:[e.jsxs("header",{className:"mb-10",children:[e.jsx("span",{className:"text-xs uppercase tracking-[0.25em] text-muted-foreground",children:"Simplifique Portugal"}),e.jsx("h1",{className:"mt-3 font-display text-3xl md:text-4xl",children:"Item 1 — Seus dados"}),e.jsx("p",{className:"mt-3 text-muted-foreground",children:"Preencha os dados abaixo. É possível incluir até 5 pessoas. Todas as informações são enviadas em caixa alta para nossa equipe."})]}),e.jsxs("form",{onSubmit:N,className:"space-y-10",children:[t.map((s,o)=>e.jsxs("section",{className:"border border-border p-6 md:p-8 bg-card",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("h2",{className:"font-display text-xl",children:o===0?"Titular":`Pessoa ${o+1}`}),o>0&&e.jsx("button",{type:"button",onClick:()=>j(o),className:"text-xs uppercase tracking-widest text-destructive",children:"Remover"})]}),e.jsx("div",{className:"mt-6 grid md:grid-cols-2 gap-5",children:S.map(a=>e.jsxs("div",{className:a.wide?"md:col-span-2":void 0,children:[e.jsx("label",{className:"text-xs uppercase tracking-widest text-muted-foreground",children:a.label}),e.jsx("input",{type:a.type??"text",value:s[a.key],onChange:r=>h(o,a.key,r.target.value),className:"mt-2 w-full bg-transparent border-b border-border focus:border-primary outline-none py-2 uppercase"})]},a.key))})]},o)),p&&e.jsx("p",{className:"text-sm text-destructive",children:p}),e.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[t.length<5&&e.jsxs("button",{type:"button",onClick:y,className:"btn-tech",children:["+ Adicionar mais uma pessoa (",t.length,"/5)"]}),e.jsx("button",{type:"submit",disabled:d,className:"btn-primary disabled:opacity-60",children:d?"Enviando...":"Finalizar e enviar"})]})]})]})})}export{C 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.