hunk.code_window:             } else if (objResult instanceof DocumentSnapshot) {
                   // Individual document.
                   DocumentSnapshot documentSnapshot = (DocumentSnapshot) objResult;
                   Map<String, Object> resultMap = new HashMap<>();
                   resultMap.put("$ref", resultToMap(documentSnapshot.getReference()));
                   if (documentSnapshot.getData() != null) {
                       for (final Map.Entry<String, Object> entry : documentSnapshot.getData().entrySet()) {
                           resultMap.put(entry.getKey(), resultToMap(entry.getValue(), false));
  
hunk.labels: keep keep keep keep keep replace keep keep keep
hunk.after_edit:                 resultMap.put("_ref", resultToMap(documentSnapshot.getReference()));
  
hunk.file_path: app/server/appsmith-plugins/firestorePlugin/src/main/java/com/external/plugins/FirestorePlugin.java
hunk.type: replace
file: import React from "react";
  import styled from "styled-components";
  import { ComponentProps } from "components/designSystems/appsmith/BaseComponent";
  import { Checkbox, Classes } from "@blueprintjs/core";
  import { BlueprintControlTransform } from "constants/DefaultTheme";
  
  const CheckboxContainer = styled.div<{ isValid: boolean }>`
    && {
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: flex-start;
      align-items: center;
  
      .bp3-control-indicator {
        border: ${(props) =>
          !props.isValid
            ? `1px solid ${props.theme.colors.error} !important`
            : `1px solid transparent`};
      }
  
      label {
        margin: 0;
        color: ${(props) =>
          !props.isValid ? `${props.theme.colors.error}` : `inherit`};
      }
    }
    ${BlueprintControlTransform}
  `;
  class CheckboxComponent extends React.Component<CheckboxComponentProps> {
    render() {
      console.log({ props: this.props });
      return (
        <CheckboxContainer
          isValid={!(this.props.isRequired && !this.props.isChecked)}
        >
          <Checkbox
            label={this.props.label}
            className={
              this.props.isLoading ? "bp3-skeleton" : Classes.RUNNING_TEXT
            }
            style={{ borderRadius: 0 }}
            onChange={this.onCheckChange}
            disabled={this.props.isDisabled}
            checked={this.props.isChecked}
          />
        </CheckboxContainer>
      );
    }
  
    onCheckChange = () => {
      this.props.onCheckChange(!this.props.isChecked);
    };
  }
  
  export interface CheckboxComponentProps extends ComponentProps {
    label: string;
    isChecked: boolean;
    onCheckChange: (isChecked: boolean) => void;
    isLoading: boolean;
    isRequired?: boolean;
  }
  
  export default CheckboxComponent;
  