import {Box} from "@mui/material";
import UpdateForm from "@/components/dashboard/bank-management/Form/Update";
import RejectForm from "@/components/dashboard/bank-management/Form/Reject";
import EditForm from "@/components/dashboard/bank-management/Form/Edit";

const TableRow = ({row, mutate}) => {
    return (
        <Box sx={{display: "flex", flexWrap: "nowrap", gap: "8px"}}>
            {(row.original.bank_status == 0 || (row.original.bank_status == 1 && row.original.bank_state == 8)) && (
                <UpdateForm
                    rowId={row.getValue("id")}
                    mutate={mutate}
                />
            )}
            <RejectForm
                rowId={row.getValue("id")}
                mutate={mutate}
            />
            <EditForm
                rowId={row.getValue("id")}
                mutate={mutate}
                row={row}
            />
        </Box>
    );
};

export default TableRow;
