import React from "react"; import type { ControlProps } from "./BaseControl"; import BaseControl from "./BaseControl"; import { Button } from "@appsmith/ads"; class OpenConfigPanelControl extends BaseControl { constructor(props: OpenConfigPanelControlProps) { super(props); } openConfigPanel = () => { this.props.openNextPanel({ index: 0, ...this.props.propertyValue, propPaneId: this.props.widgetProperties.widgetId, }); }; render() { const { buttonConfig, widgetProperties } = this.props; const { icon, label } = buttonConfig; const { widgetName } = widgetProperties; return ( ); } static getControlType() { return "OPEN_CONFIG_PANEL"; } } export interface OpenConfigPanelControlProps extends ControlProps { buttonConfig: { icon: string; label: string; }; } export default OpenConfigPanelControl;