import { TCanCallback } from '../../AUtils/cbF';
import { IABaseProps } from '../ABase/ABase';
import { EDir12, IAEvent, IOffset, TActionRef, TPromisable } from '../ATypes/ATypes';
export interface IAFloatMenuActions {
    /**
     * close : () => void
     *
     * Description : close AFloatMenu
     */
    close: () => void;
    /**
     * open : (elem : HTMLElement) => void
     *
     * Description : open AFloatMenu
     */
    open: (elem: HTMLElement) => void;
}
export interface IAFloatMenuContentProps<T> {
    /**
     * def : IAFloatMenuDef<T>
     *
     * Description : def of AFloatMenu
     */
    def: IAFloatMenuDef<T>;
    /**
     * defKey : keyof T
     *
     * Description : defKey of AFloatMenu
     */
    defKey: keyof T;
}
export interface IAFloatMenuDef<T> extends Omit<IABaseProps, 'content'> {
    /**
     * content? : TCanCallback<IAFloatMenuContentProps, React.ReactNode>
     *
     * Description : content of AFloatMenu
     */
    content?: TCanCallback<IAFloatMenuContentProps<T>, React.ReactNode>;
    /**
     * noDisplay? : boolean
     *
     * Description : decides whether to display the menu or not
     */
    noDisplay?: boolean;
}
export type TAFloatMenuDefs<T> = {
    [key in keyof T]?: IAFloatMenuDef<T>;
};
export interface IAFloatMenuProps<T> {
    /**
     * actionRef? : TActionRef<IAFloatMenuActions>
     *
     * Description : actionRef of AFloatMenu
     */
    actionRef?: TActionRef<IAFloatMenuActions>;
    /**
     * defaultDef? : IAFloatMenuDef<T>
     *
     * Description : defaultDef of AFloatMenu. it will affect all defs.
     */
    defaultDef?: IAFloatMenuDef<T>;
    /**
     * defs : TAFloatMenuDefs<T>
     *
     * Description : defs of AFloatMenu
     */
    defs: TAFloatMenuDefs<T>;
    /**
     * floatWrapperClassName? : string
     *
     * Description : className of float wrapper
     */
    floatWrapperClassName?: string;
    /**
     * offset? : IOffset
     *
     * Description : offset of AFloatMenu
     */
    offset?: IOffset;
    /**
     * onClick? : (e : IAEvent, key : keyof T) => any
     *
     * Description : onClick of AFloatMenu
     */
    onClick?: (e: IAEvent, key?: keyof T) => any;
    /**
     * onClose? : () => any
     *
     * Description : onClose of AFloatMenu
     */
    onClose?: () => any;
    /**
     * onPaperClick : (e: IAEvent) => void;
     *
     * Description : onPaperClick of the dialog. it runs cancel by default
     */
    onPaperClick?: (e: IAEvent) => TPromisable<any>;
    /**
     * anchorElem : HTMLElement | null
     *
     * Description : anchorElem of AFloatMenu
     */
    /**
     * position? : EDir12 = EDir12.ES
     *
     * Description : position of AFloatMenu based on anchorRef
     */
    position?: EDir12;
    /**
     * width? : string | number
     *
     * Description : width of AFloatMenu
     */
    width?: string | number;
}
/**
 * AComponent : AFloatMenu
 *
 * Description : AFloatMenu is a floating component with menues to click.
 *
 * Basic Usage :
 *
 *     const defs = {
 *       testDefKey : {
 *         content : ({defKey, def}) => <div>{defKey}</div>,
 *       },
 *       testDefKey2 : {}
 *     }
 *     const defaultDef = {
 *       content : ({defKey, def}) => <div>I am test defaultDef!</div>,
 *     }
 *     const anchorRef = useRef<HTMLDivElement>(null);
 *
 *     if (case 1)
 *       <div ref={anchorRef}>I am anchor</div>
 *       <AFloatMenu defs={defs} defaultDef={defaultDef} anchorRef={anchorRef}/>
 */
export declare const AFloatMenu: <T>(props: IAFloatMenuProps<T>) => import('react').ReactPortal | null;
