/* eslint-disable @typescript-eslint/no-explicit-any */ import React from "react"; import SettlementSection from "./SettlementSection"; import { SettlementServiceProps } from "@/Constant/types"; const SettlementService: React.FC = ({ toggleSection, openSections, orderFlowTypesLoading, orderFlowTypes, selectedOrderFlowTypes, handleOrderFlowTypeChange, allData, UserTypes, SettlementInterval, }) => { return ( <> {/* Order Flow Types Accordion */} {/* {allData?.userType?.id === UserTypes?.NormalCustomer && ( */} {false && (
toggleSection("orderFlowTypes")} style={{ cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "space-between", padding: "1rem", background: "#fff", borderRadius: "10px 10px 0 0", border: "1px solid #eee", borderBottom: openSections.orderFlowTypes ? "none" : "1px solid #eee", marginTop: "1rem", }} >

Order Flow Types

{openSections.orderFlowTypes && (

Select your preferred order flow types for placing orders.

{orderFlowTypesLoading && (
{" "} Loading...
)} {/* {orderFlowTypesError && (
{orderFlowTypesError}
)} {orderFlowTypesSuccess && (
{orderFlowTypesSuccess}
)} */} {!orderFlowTypesLoading && orderFlowTypes.length > 0 && (
{orderFlowTypes .filter((type: any) => type.name !== "Externel API") .map((type: any) => ( ))}
)}
)}
)} {/* Settlement Intervals Accordion */} {(allData?.userType?.id !== UserTypes?.NormalCustomer ? true : false) ? ( <> toggleSection("settlementIntervals")} SettlementInterval={SettlementInterval} disabled={true} />{" "} ) : ( "" )} {/*
toggleSection("settlementIntervals")} style={{ cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "space-between", padding: "1rem", background: "#fff", borderRadius: "10px 10px 0 0", border: "1px solid #eee", borderBottom: openSections.settlementIntervals ? "none" : "1px solid #eee", marginTop: "1rem", }} > Settlement Intervals
{openSections.settlementIntervals && (
{( Object.entries(SettlementInterval) as [ string, string | number ][] ) .filter( ([, value]) => !isNaN(Number(value)) ) .map(([key, value]) => ( ))}
{( Object.entries(SettlementInterval) as [ string, string | number ][] ) .filter( ([, value]) => !isNaN(Number(value)) ) .map(([key, value]) => ( ))}
)}
*/} ); }; export default SettlementService;