import React, { useState } from "react";

import { LazyLoad } from "@/components/LazyLoad";
import { GlobalContext, setGLobalProperty } from "@/context/Global";

import { ScaleModalOverlay } from "@/components/ScaleModalOverlay";
import { MkdButton } from "@/components/MkdButton";
import { RouteIfControlCondition } from "./RouteIfControlCondition";

const RouteIfControlConditions = ({ conditions = [] }) => {
  const {
    dispatch: globalDispatch,
    state: { selectedRoute, configModalOpen },
  } = React.useContext(GlobalContext);

  return (
    <div className="scrollbar-none w-full overflow-auto ">
      {conditions.map((condition) => (
        <LazyLoad key={condition?.id}>
          <RouteIfControlCondition key={condition?.id} />
        </LazyLoad>
      ))}
    </div>
  );
};

export default RouteIfControlConditions;
