hunk.code_window:       });
       }
     }, [authApiPlugin, props.createDatasourceFromForm]);
     const handleCreateNew = () => {
       if (pageId) {
         createNewApiAction(pageId, "API_PANE");
       }
     };
  
hunk.labels: keep keep keep keep add keep keep keep keep
hunk.after_edit:     AnalyticsUtil.logEvent("CREATE_DATA_SOURCE_CLICK", {
         source: "CREATE_NEW_API",
       });
  
hunk.file_path: app/client/src/pages/Editor/IntegrationEditor/NewApi.tsx
hunk.type: add
file: import React from "react";
  import BaseWidget, { WidgetProps, WidgetState } from "./BaseWidget";
  import { WidgetType } from "constants/WidgetConstants";
  import CheckboxComponent from "components/designSystems/blueprint/CheckboxComponent";
  import { EventType } from "constants/AppsmithActionConstants/ActionConstants";
  import { ValidationTypes } from "constants/WidgetValidation";
  import { DerivedPropertiesMap } from "utils/WidgetFactory";
  import * as Sentry from "@sentry/react";
  import withMeta, { WithMeta } from "./MetaHOC";
  import { AlignWidget } from "./SwitchWidget";
  
  class CheckboxWidget extends BaseWidget<CheckboxWidgetProps, WidgetState> {
    static getPropertyPaneConfig() {
      return [
        {
          sectionName: "General",
          children: [
            {
              propertyName: "label",
              label: "Label",
              controlType: "INPUT_TEXT",
              helpText: "Displays a label next to the widget",
              placeholderText: "Enter label text",
              isBindProperty: true,
              isTriggerProperty: false,
              validation: { type: ValidationTypes.TEXT },
            },
            {
              propertyName: "alignWidget",
              helpText: "Sets the alignment of the widget",
              label: "Alignment",
              controlType: "DROP_DOWN",
              options: [
                {
                  label: "Left",
                  value: "LEFT",
                },
                {
                  label: "Right",
                  value: "RIGHT",
                },
              ],
              isBindProperty: true,
              isTriggerProperty: false,
            },
            {
              propertyName: "defaultCheckedState",
              label: "Default Selected",
              helpText:
                "Checks / un-checks the checkbox by default. Changes to the default selection update the widget state",
              controlType: "SWITCH",
              isJSConvertible: true,
              isBindProperty: true,
              isTriggerProperty: false,
              validation: { type: ValidationTypes.BOOLEAN },
            },
            {
              propertyName: "isRequired",
              label: "Required",
              helpText: "Makes input to the widget mandatory",
              controlType: "SWITCH",
              isJSConvertible: true,
              isBindProperty: true,
              isTriggerProperty: false,
              validation: { type: ValidationTypes.BOOLEAN },
            },
            {
              propertyName: "isVisible",
              label: "Visible",
              helpText: "Controls the visibility of the widget",
              controlType: "SWITCH",
              isJSConvertible: true,
              isBindProperty: true,
              isTriggerProperty: false,
              validation: { type: ValidationTypes.BOOLEAN },
            },
            {
              propertyName: "isDisabled",
              label: "Disabled",
              controlType: "SWITCH",
              helpText: "Disables input to this widget",
              isJSConvertible: true,
              isBindProperty: true,
              isTriggerProperty: false,
              validation: { type: ValidationTypes.BOOLEAN },
            },
          ],
        },
        {
          sectionName: "Actions",
          children: [
            {
              helpText: "Triggers an action when the check state is changed",
              propertyName: "onCheckChange",
              label: "onCheckChange",
              controlType: "ACTION_SELECTOR",
              isJSConvertible: true,
              isBindProperty: true,
              isTriggerProperty: true,
            },
          ],
        },
      ];
    }
  
    static getDefaultPropertiesMap(): Record<string, string> {
      return {
        isChecked: "defaultCheckedState",
      };
    }
  
    static getDerivedPropertiesMap(): DerivedPropertiesMap {
      return {
        value: `{{!!this.isChecked}}`,
        isValid: `{{ this.isRequired ? !!this.isChecked : true }}`,
      };
    }
  
    static getMetaPropertiesMap(): Record<string, any> {
      return {
        isChecked: undefined,
      };
    }
  
    getPageView() {
      return (
        <CheckboxComponent
          alignWidget={this.props.alignWidget}
          isChecked={!!this.props.isChecked}
          isDisabled={this.props.isDisabled}
          isLoading={this.props.isLoading}
          isRequired={this.props.isRequired}
          key={this.props.widgetId}
          label={this.props.label}
          onCheckChange={this.onCheckChange}
          widgetId={this.props.widgetId}
        />
      );
    }
  
    onCheckChange = (isChecked: boolean) => {
      this.props.updateWidgetMetaProperty("isChecked", isChecked, {
        triggerPropertyName: "onCheckChange",
        dynamicString: this.props.onCheckChange,
        event: {
          type: EventType.ON_CHECK_CHANGE,
        },
      });
    };
  
    getWidgetType(): WidgetType {
      return "CHECKBOX_WIDGET";
    }
  }
  
  export interface CheckboxWidgetProps extends WidgetProps, WithMeta {
    label: string;
    defaultCheckedState: boolean;
    isChecked?: boolean;
    isDisabled?: boolean;
    onCheckChange?: string;
    isRequired?: boolean;
    alignWidget: AlignWidget;
  }
  
  export default CheckboxWidget;
  export const ProfiledCheckboxWidget = Sentry.withProfiler(
    withMeta(CheckboxWidget),
  );
  