// import { listarPropostas } from "@/requests/CRUD/Propostas/listarPropostas";

// const options = [
//   {
//     value: "*",
//     label: "Todos",
//   },
//   {
//     value: "0",
//     label: "Proposta Gerada",
//   },
//   {
//     value: "1",
//     label: "Aprovada",
//   },
//   {
//     value: "3",
//     label: "Cancelada",
//   },
//   {
//     value: "2",
//     label: "Reprovada",
//   },
// ];
const NegocioView = ({
  dadosCliente,
  dadosCard,
  buscaPropostas,
  propostas,
}: any) => {
  // const [kitProposta, setKitProposta] = useState<any>([]);

  // const idColeta = dadosCard.id_coleta_cliente;

  // const { valuesSession } = useAuth();
  // const { session } = valuesSession();

  // if (propostas !== "" && propostas !== "*") {
  //   const propostasStatus1 = propostas.filter(
  //     (proposta: any) => proposta.status_proposta == 1
  //   );

  //   if (propostasStatus1.length > 0) {
  //     filteredPropostas = propostasStatus1[0];
  //   } else {
  //     filteredPropostas = propostas[propostas.length - 1];
  //   }
  // } else {
  //   filteredPropostas = propostas;
  // }

  // useEffect(() => {
  //   if (filteredPropostas && filteredPropostas.kit_proposta) {
  //     if (filteredPropostas.tipoKit_proposta == "0") {
  //       listarComponentesKitByKitId(filteredPropostas.kit_proposta).then(
  //         (res: any) => {

  //           setKitProposta(res);
  //         }
  //       );
  //     } else {
  //       listarComponentesKitManual(filteredPropostas.kit_proposta).then(
  //         (res: any) => {

  //           setKitProposta(res);
  //         }
  //       );
  //     }
  //   }
  // }, [filteredPropostas]);

  // useEffect(() => {

  // }, []);

  return <></>;
  // return (
  //   <div className="bg-white h-full w-full flex flex-col justify-center items-center p-5">
  //     <span className="w-full text-center text-lg">
  //       Visualização do Projeto nº {filteredPropostas?.id_proposta}
  //     </span>
  //     <div className="flex flex-row justify-between w-full">
  //       <span>
  //         Consumo:{" "}
  //         {kitProposta && kitProposta.extras && kitProposta.extras[0]?.consumo}{" "}
  //         kWp
  //       </span>
  //       <span>
  //         Valor:{" "}
  //         {kitProposta && kitProposta.extras && kitProposta.extras[0]?.valor
  //           ? parseFloat(kitProposta.extras[0].valor).toLocaleString("pt-BR", {
  //               style: "currency",
  //               currency: "BRL",
  //             })
  //           : ""}
  //       </span>
  //     </div>
  //     <table className="styled-table">
  //       <thead>
  //         <tr>
  //           <th className="px-4 py-2">Nome</th>
  //           <th className="px-4 py-2">Categoria</th>
  //           <th className="px-4 py-2">Descrição</th>
  //           <th className="px-4 py-2">Quantidade</th>
  //         </tr>
  //       </thead>
  //       <tbody>
  //         {kitProposta &&
  //           kitProposta.componentesKit &&
  //           kitProposta.componentesKit.map((proposta: any, index: any) => (
  //             <tr key={index}>
  //               <td className="border px-4 py-2">{proposta.nome}</td>
  //               <td className="border px-4 py-2">{proposta.categoria}</td>
  //               <td className="border px-4 py-2">{proposta.descricao}</td>
  //               <td className="border px-4 py-2">{proposta.qtd}</td>
  //             </tr>
  //           ))}
  //       </tbody>
  //     </table>
  //   </div>
  // );
};

export default NegocioView;
