import { useState } from "react";
import { Card, CardContent } from "@/components/ui/card";
import { Button } from "@/components/ui/button";
import { Progress } from "@/components/ui/progress";
const perguntas = [
{
tema: "Governança",
pergunta: "O município tem uma estratégia ESG aprovada?",
},
{
tema: "Ambiente",
pergunta: "Existe um plano municipal de ação climática (PMAAC)?",
},
{
tema: "Social",
pergunta: "Existem políticas de igualdade de género no município?",
},
{
tema: "Transversal",
pergunta: "Aplica o princípio da dupla materialidade?",
},
];
const opcoes = ["Sim", "Parcialmente", "Não", "N/A"];
export default function ESGForm() {
const [respostas, setRespostas] = useState(Array(perguntas.length).fill(""));
const handleChange = (index, valor) => {
const novas = [...respostas];
novas[index] = valor;
setRespostas(novas);
};
const pontuacao = respostas.reduce((acc, r) => {
if (r === "Sim") return acc + 2;
if (r === "Parcialmente") return acc + 1;
return acc;
}, 0);
const total = perguntas.length * 2;
const percentagem = Math.round((pontuacao / total) * 100);
return (
))}
);
}
Diagnóstico ESG para Municípios
{perguntas.map((p, i) => ({p.tema}: {p.pergunta}
{opcoes.map((op) => (
))}
Pontuação Global: {pontuacao} / {total}
Cumprimento ESG: {percentagem}%
Este website utiliza cookies