hunk.code_window: package com.external.plugins;
   import com.appsmith.external.models.ActionConfiguration;
   import com.appsmith.external.models.ActionExecutionResult;
   import com.appsmith.external.models.DBAuth;
   import com.appsmith.external.models.DatasourceConfiguration;
   import com.appsmith.external.models.DatasourceStructure;
  
hunk.labels: keep add keep keep keep keep keep
hunk.after_edit: import com.appsmith.external.exceptions.pluginExceptions.AppsmithPluginError;
   import com.appsmith.external.exceptions.pluginExceptions.AppsmithPluginException;
   import com.appsmith.external.exceptions.pluginExceptions.StaleConnectionException;
  
hunk.file_path: app/server/appsmith-plugins/postgresPlugin/src/main/java/com/external/plugins/PostgresPlugin.java
hunk.type: add
file: import React from "react";
  import BaseControl, { ControlProps } from "./BaseControl";
  import { StyledSwitch } from "./StyledControls";
  
  class SwitchControl extends BaseControl<ControlProps> {
    render() {
      return (
        <StyledSwitch
          onChange={this.onToggle}
          defaultChecked={this.props.propertyValue}
          large
        />
      );
    }
  
    onToggle = () => {
      this.updateProperty(this.props.propertyName, !this.props.propertyValue);
    };
  
    static getControlType() {
      return "SWITCH";
    }
  }
  
  export type SwitchControlProps = ControlProps;
  
  export default SwitchControl;
  