import { DateTime } from 'luxon';
import React from 'react';
import type { IconNames } from '@spinnaker/presentation';
import type { ConstraintStatus, IBaseConstraint, IConstraint, IManagedArtifactVersionEnvironment } from '../../domain';
import { BasePluginManager } from '../plugins/BasePluginManager';
interface IConstraintOverrideAction {
    title: string;
    pass: boolean;
}
export declare const hasSkippedConstraint: (constraint: IConstraint, environment: IManagedArtifactVersionEnvironment) => boolean;
declare type RelaxedConstraint = IBaseConstraint | IConstraint;
export interface IConstraintHandler<K = string> {
    /** The type of the constraint - versioning is supported by adding @{version}, e.g. myConstraint@ */
    kind: K;
    /** The icon can be a string (from IconNames) or a partial map from statuses to IconNames */
    iconName: IconNames | {
        [status in ConstraintStatus | 'DEFAULT']?: IconNames;
    };
    /** Stricter format of the title */
    displayTitle?: {
        /** A user friendly name of the constraint */
        displayName: string;
        /** A user friend text describing the status of the constraint */
        displayStatus: (props: {
            constraint: RelaxedConstraint;
        }) => string;
    };
    /** DEPRECATED - Render function of the constraint title. If displayTitle exists it takes precedence */
    titleRender?: React.ComponentType<{
        constraint: RelaxedConstraint;
    }>;
    /** Optional render function of the constraint description */
    descriptionRender?: React.ComponentType<{
        constraint: RelaxedConstraint;
    }>;
    /** Display actions to override the constraint - (fail or pass) */
    overrideActions?: {
        [status in ConstraintStatus]?: IConstraintOverrideAction[];
    };
    /** determines when to show the restart constraint button. By default, only when the status is FAIL  */
    restartProps?: {
        isVisible?: (props: {
            constraint: RelaxedConstraint;
        }) => boolean;
        displayName?: string;
    };
}
declare class ConstraintsManager extends BasePluginManager<IConstraintHandler> {
    getIcon(constraint: IConstraint | IBaseConstraint): "placeholder" | "menu" | "close" | "play" | "add" | "done" | "environment" | "artifact" | "config" | "bake" | "plus" | "accordionCollapse" | "accordionExpand" | "accordionExpandAll" | "artifactApproved" | "artifactBad" | "artifactPending" | "artifactSkipped" | "build" | "buildFail" | "buildSuccess" | "canaryConfig" | "canaryFail" | "canaryRunning" | "canaryPass" | "canaryMarginal" | "caretRight" | "checkBadge" | "checkboxIndeterminate" | "checkboxChecked" | "checkboxUnchecked" | "closeSmall" | "cloudDeployed" | "cloudError" | "cloudProgress" | "cloudDecommissioned" | "cloudWaiting" | "cluster" | "configJ" | "configM" | "configS" | "copyClipboard" | "duplicate" | "edit" | "fileJson" | "fn" | "fnNew" | "formDrag" | "formError" | "formInfo" | "formNetworkBad" | "formNetworkGood" | "formRefresh" | "formWarning" | "heart" | "history" | "instances" | "loadBalancer" | "manualJudgement" | "manualJudgementApproved" | "manualJudgementRejected" | "mdActuating" | "mdActuationLaunched" | "mdCreated" | "mdDelay" | "mdDeltaDetected" | "mdDeltaResolved" | "mdDiff" | "mdError" | "mdUnhappy" | "mdPaused" | "mdResumed" | "mdUnknown" | "mdConstraintGeneric" | "mdConstraintDependsOn" | "mdConstraintAllowedTimes" | "md" | "mdVerification" | "menuClose" | "minus" | "pin" | "resourceT" | "securityGroup" | "servergroupAws" | "spCIBranch" | "spCIBuild" | "spCICommit" | "spCIMaster" | "spCIMerged" | "spCIPullRequest" | "spCIPullRequestClosed" | "spEnvironments" | "spMenuAppInSync" | "spMenuAppUnsynced" | "spMenuCanaryConfig" | "spMenuCanaryReport" | "spMenuClusters" | "spMenuConfig" | "spMenuFunctions" | "spMenuK8s" | "spMenuLoadBalancers" | "spMenuMeme" | "spMenuPager" | "spMenuPipelines" | "spMenuProperties" | "spMenuSecurityGroups" | "spMenuTasks" | "spMenuTimeline" | "spMenuZuul" | "spel" | "templateFull" | "templateS" | "templateWorkflow" | "toggleOff" | "toggleOn" | "trash" | "unpin";
    renderTitle(constraint: IConstraint): React.ReactNode;
    hasContent(constraint: IConstraint): boolean;
    renderDescription(constraint: IConstraint): React.ReactNode;
    getTimestamp(constraint: IConstraint, environment: IManagedArtifactVersionEnvironment): DateTime;
    getActions(constraint: IConstraint, environmentState?: IManagedArtifactVersionEnvironment['state']): IConstraintOverrideAction[];
    private defaultShowRestart;
    isRestartVisible(constraint: IConstraint): boolean;
    getRestartDisplayName(constraint: IConstraint): string;
}
export declare const constraintsManager: ConstraintsManager;
export {};
