hunk.code_window:                     assertNotNull(first);
                       assertEquals("one", first.remove("name"));
                       assertFalse((Boolean) first.remove("isPlural"));
                       assertEquals(1L, first.remove("value"));
                       assertEquals(Map.of("id", "one", "path", "initial/one"), first.remove("$ref"));
                       assertEquals(Collections.emptyMap(), first);
                       final Map<String, Object> second = results.stream().filter(d -> "two".equals(d.get("name"))).findFirst().orElse(null);
  
hunk.labels: keep keep keep keep replace keep keep keep
hunk.after_edit:                     assertEquals(Map.of("id", "one", "path", "initial/one"), first.remove("_ref"));
  
hunk.file_path: app/server/appsmith-plugins/firestorePlugin/src/test/java/com/external/plugins/FirestorePluginTest.java
hunk.type: replace
file: import React from "react";
  import { ControlProps } from "components/formControls/BaseControl";
  import { isHidden } from "components/formControls/utils";
  import { useSelector } from "react-redux";
  import { getFormValues } from "redux-form";
  import FormControlFactory from "utils/FormControlFactory";
  
  interface FormControlProps {
    config: ControlProps;
    formName: string;
    multipleConfig?: ControlProps[];
  }
  
  const FormControl = (props: FormControlProps) => {
    const formValues = useSelector((state) =>
      getFormValues(props.formName)(state),
    );
    const hidden = isHidden(formValues, props.config.hidden);
  
    if (hidden) return null;
  
    return (
      <div className={`t--form-control-${props.config.controlType}`}>
        {FormControlFactory.createControl(
          props.config,
          props.formName,
          props?.multipleConfig,
        )}
      </div>
    );
  };
  
  export default FormControl;
  