import { type MouseEventHandler } from 'react'; import { type DataTestId, type MaskingProps, type StylingProps, type AriaLabelingProps, type DOMProps } from '@dynatrace/strato-components/core'; /** * All options available for the RunQueryButton's state. * @public */ export declare const queryStateOptions: readonly ["idle", "loading", "success", "error"]; /** * 1. idle: The query is yet to be run. * 2. loading: The query is currently running. * 3. success: The query can be rerun again (Query was successful and no errors have occurred). * 4. error: The query has returned an error, user can retry. * @public */ export type QueryStateType = (typeof queryStateOptions)[number]; /** * @public */ export interface RunQueryButtonProps extends AriaLabelingProps, DOMProps, StylingProps, DataTestId, MaskingProps { /** When the run query button is disabled it cannot be interacted with. * @defaultValue false */ disabled?: boolean; /** * The current button state. * @defaultValue idle */ queryState?: QueryStateType; /** Callback triggered when the RunQueryButton is interacted with. */ onClick?: MouseEventHandler; /** * Whether the run query button is cancelable, i.e., if the loading * state can be interrupted. * @defaultValue true */ cancelable?: boolean; } /** * This button component is used for running queries. It * supports four query states: idle, loading, success, and error. * @public */ export declare const RunQueryButton: (props: RunQueryButtonProps & import("react").RefAttributes) => React.ReactElement | null;