import { Widget } from "./Widget";
import { Action } from "../../Action";
import { DynamicValue } from "../../DynamicValue";
/**
* A [[Widget]] that holds an [[Action]] and a [[DynamicValue]], and when pressed on the client the action is run, and is highlighted based on the value of the DynamicValue
*
* @example
* ```jsx
* new ToggleButton({icon:"power-on",action: new HttpAction({
* name:"on",
* method:"GET",
* base:"https://device.ip",
* path:"turnOn"
* }),
* state:new ParsedValue(new TextValue("true"))
* })
* //JSX
*
* ```
*/
export declare class ToggleButton implements Widget {
action: Action;
icon: string;
text: string;
state: DynamicValue;
__variant__: string;
constructor({ action, state, icon, text }: {
action: Action;
state: DynamicValue;
icon?: string;
text?: string;
});
static fromJSON(json: {
action: any;
state: any;
icon?: string;
text?: string;
}): ToggleButton;
}