import * as React from 'react';
import { Link } from '../diagram/elements';
/**
 * Represents rendering context for the link action.
 */
export interface LinkActionContext {
    /**
     * Target link to display action for.
     */
    readonly link: Link;
    /**
     * Action button size in px.
     */
    readonly buttonSize: number;
    /**
     * Calculates action button position as a CSS style properties.
     */
    readonly getPosition: (side: 'source' | 'target', index: number) => Pick<React.CSSProperties, 'top' | 'left'>;
    /**
     * Calculates a link line angle at the action button position
     * in degrees.
     */
    readonly getAngleInDegrees: (side: 'source' | 'target') => number;
}
export declare const LinkActionContext: React.Context<LinkActionContext | null>;
/**
 * React hook to get rendering context for the link action.
 *
 * Throws an error if called outside {@link HaloLink} component.
 *
 * @category Hooks
 */
export declare function useLinkActionContext(): LinkActionContext;
/**
 * Base props for link action components.
 *
 * @see {@link LinkAction}
 */
export interface LinkActionStyleProps {
    /**
     * Link endpoint to place the action.
     */
    dockSide: 'source' | 'target';
    /**
     * Place shift for the action button from the {@link dockSide} endpoint
     * towards another endpoint (e.g. `1` for one place towards link target
     * if `dockSide` is `source).
     */
    dockIndex: number;
    /**
     * Additional CSS class for the component.
     */
    className?: string;
    /**
     * Title for the action button.
     */
    title?: string;
}
/**
 * Props for {@link LinkAction} component.
 *
 * @see {@link LinkAction}
 */
export interface LinkActionProps extends LinkActionStyleProps {
    /**
     * Whether the action is disabled.
     */
    disabled?: boolean;
    /**
     * Handler to call when the action is selected.
     */
    onSelect?: () => void;
    /**
     * Raw handler for mouse down event on the action button.
     */
    onMouseDown?: (e: React.MouseEvent) => void;
    /**
     * Action content.
     */
    children?: React.ReactNode;
}
/**
 * Base component to display an action on the selected link from {@link HaloLink}.
 *
 * @category Components
 */
export declare function LinkAction(props: LinkActionProps): import("react/jsx-runtime").JSX.Element;
/**
 * Props for {@link LinkActionSpinner} component.
 *
 * @see {@link LinkActionSpinner}
 */
export interface LinkActionSpinnerProps extends LinkActionStyleProps {
}
/**
 * Link action component to display a loading spinner.
 *
 * @category Components
 */
export declare function LinkActionSpinner(props: LinkActionStyleProps): import("react/jsx-runtime").JSX.Element;
/**
 * Props for {@link LinkActionEdit} component.
 *
 * @see {@link LinkActionEdit}
 */
export interface LinkActionEditProps extends LinkActionStyleProps {
}
/**
 * Link action component to start editing the link.
 *
 * This action is visible only when {@link EditorController.inAuthoringMode graph authoring mode}
 * is active.
 *
 * @category Components
 */
export declare function LinkActionEdit(props: LinkActionEditProps): import("react/jsx-runtime").JSX.Element | null;
/**
 * Props for {@link LinkActionDelete} component.
 *
 * @see {@link LinkActionDelete}
 */
export interface LinkActionDeleteProps extends LinkActionStyleProps {
}
/**
 * Link action component to delete the link.
 *
 * This action is visible only when {@link EditorController.inAuthoringMode graph authoring mode}
 * is active.
 *
 * Deleting a link adds a command to the command history.
 *
 * @category Components
 */
export declare function LinkActionDelete(props: LinkActionDeleteProps): import("react/jsx-runtime").JSX.Element | null;
/**
 * Props for {@link LinkActionMoveEndpoint} component.
 *
 * @see {@link LinkActionMoveEndpoint}
 */
export interface LinkActionMoveEndpointProps extends Omit<LinkActionStyleProps, 'dockIndex'> {
}
/**
 * Link action component to change the relation link by moving its endpoint
 * to another entity element.
 *
 * The changed endpoint is specified via {@link LinkActionStyleProps.dockSide dockSide} prop.
 *
 * This action is visible only when {@link EditorController.inAuthoringMode graph authoring mode}
 * is active.
 *
 * Changing a link adds a command to the command history.
 *
 * @category Components
 */
export declare function LinkActionMoveEndpoint(props: LinkActionMoveEndpointProps): import("react/jsx-runtime").JSX.Element | null;
/**
 * Props for {@link LinkActionRename} component.
 *
 * @see {@link LinkActionRename}
 */
export interface LinkActionRenameProps extends Pick<LinkActionStyleProps, 'className' | 'title'> {
}
/**
 * Link action component to rename a link (change its label).
 *
 * This action is visible only when {@link RenameLinkProvider.canRename} returns `true`
 * for the selected link.
 *
 * @category Components
 */
export declare function LinkActionRename(props: LinkActionRenameProps): import("react/jsx-runtime").JSX.Element | null;
//# sourceMappingURL=linkAction.d.ts.map