import React from 'react';
import type { Ari, ManualRule, ManualRuleInvoker, RuleQuery, UserInputs } from './common/types';
/**
 * React hook that implements the fetch and invoke actions for manual triggers.
 * Can be used standalone or in the HOC provided below.
 * @param site - The site to filter on. We map this to just a cloudId to resolve the manual rules API path
 * @param query - Query object containing filter props (container, object(s))
 */
export declare const useManualRules: (site: Ari, query: RuleQuery) => any[];
export interface ManualRulesData {
    error: any;
    initialised: boolean;
    invokeRuleOrShowDialog: ManualRuleInvoker;
    invokingRuleId: number | null;
    rules: ManualRule[];
    triggerFetch: () => Promise<void>;
}
export interface ManualRulesContainerProps {
    children: (data: ManualRulesData) => React.ReactElement;
    onInputsModalClosed?: () => void;
    onInputsModalOpened?: () => void;
    onRuleInvocationFailure?: (ruleId: number, successfulObjectIds: string[], failedObjects: string[]) => void;
    /********
     * Lifecycle handlers
     */
    onRuleInvocationLifecycleDone?: (ruleId: number, objectIds: string[]) => void;
    onRuleInvocationLifecycleStarted?: (ruleId: number, objectIds: string[], inputs: UserInputs | undefined) => void;
    onRuleInvocationSuccess?: (ruleId: number, objectIds: string[]) => void;
    query: RuleQuery;
    site: Ari;
}
/**
 *
 * Container HOC that implements the above hook and behaviours.
 *
 * This HOC uses rendered props to allow the use of any render instructions
 * for manual rules, while still maintaining the behaviour of invoking rules.
 *
 * The HOC also appends a dialog that is displayed when the {@code invokeRuleOrShowDialog}
 * prop is called, if the underlying rule has user inputs.
 *
 * The component exposes the "invokingRuleId" property to the child hierarchy,
 * because the children might care about the invocation state. It does not expose
 * the "selected" state, or any information about the dialog, as the children
 * should not care about this, only how to trigger invocation and understand
 * the invocation lifecycle.
 *
 * @param props - cloudId, projectId, children
 */
export declare const ManualRulesContainer: (props: ManualRulesContainerProps) => React.JSX.Element;
