import { Box, Button, Divider, FormLabel, Heading, Image, Input, InputGroup, InputRightAddon, Table, Tbody, Td, Th, Thead, Tr } from "@chakra-ui/react"; import React from "react"; const FormInputView = ({ groupedFields, name, groupedFieldsTwo, errors, onSubmit, children, }) => { return (
{Object?.entries(groupedFields, groupedFieldsTwo).map( ([section, fields], index) => ( {section} {/* */} {fields.map( ({ value, label, id, width, btn, arabic, type, align }, key) => type === "table" ? ( {value?.map((item, index) => ( ))} {value?.map((item, index) => ( ))}
{item.country === "United Arab Emirates" ? "UAE" : item.country}
{item?.curr}
) : ( {label} {type === "number" ? value : value} ) )}
{/*
*/} {index < Object.entries(groupedFields, groupedFieldsTwo).length - 1 && ( )}
) )} {children}
); }; export default FormInputView;