export declare const FORWARD = "@redux-forward/FORWARD";
export declare const ADDRESS_PREFIX = "@@KG_";
import { Dispatch } from 'redux';
import { ActionTypes } from './action-types';
interface IKeplerGlAction {
    type: (typeof ActionTypes)[keyof typeof ActionTypes];
    payload?: any;
    meta?: {
        _forward_?: string;
        _addr_?: string;
        _id_?: string;
        [key: string]: any;
    };
}
export declare const getActionForwardAddress: (id: string) => string;
/**
 * Wrap an action into a forward action that only modify the state of a specific
 * kepler.gl instance. kepler.gl reducer will look for signatures in the action to
 * determine whether it needs to be forwarded to a specific instance reducer.
 *
 * wrapTo can be curried. You can create a curried action wrapper by only supply the `id` argument
 *
 * A forward action looks like this
 * ```js
 *  {
 *    type: "@@kepler.gl/LAYER_CONFIG_CHANGE",
 *    payload: {
 *      type: '@@kepler.gl/LAYER_CONFIG_CHANGE',
 *      payload: {},
 *      meta: {
 *       // id of instance
 *        _id_: id
 *       // other meta
 *      }
 *    },
 *    meta: {
 *      _forward_: '@redux-forward/FORWARD',
 *      _addr_: '@@KG_id'
 *    }
 *  };
 * ```
 *
 * @memberof forwardActions
 * @param {string} id - The id to forward to
 * @param {Object} action - the action object {type: string, payload: *}
 * @returns {{type: string, payload: {type: string, payload: *, meta: {_id_: string}, meta: {_forward_: string, _addr_: string}}}}
 * @public
 * @example
 *
 * import {wrapTo, togglePerspective} from '@kepler.gl/actions';
 *
 * // This action will only dispatch to the KeplerGl instance with `id: map_1`
 * this.props.dispatch(wrapTo('map_1', togglePerspective()));
 *
 * // You can also create a curried action for each instance
 * const wrapToMap1 = wrapTo('map_1');
 * this.props.dispatch(wrapToMap1(togglePerspective()));
 */
export declare const wrapTo: import("lodash").CurriedFunction2<string, IKeplerGlAction, {
    type: string;
    payload: {
        meta: {
            _id_: string;
            _forward_?: string;
            _addr_?: string;
        };
        type: (typeof ActionTypes)[keyof typeof ActionTypes];
        payload?: any;
    };
    meta: {
        _forward_: string;
        _addr_: string;
        _id_?: string;
    };
}>;
/**
 * Whether an action is a forward action
 * @memberof forwardActions
 * @param {Object} action - the action object
 * @returns {boolean} boolean - whether the action is a forward action
 * @public
 */
export declare const isForwardAction: (action: IKeplerGlAction) => boolean;
/**
 * Unwrap an action
 * @memberof forwardActions
 * @param {Object} action - the action object
 * @returns {Object} - unwrapped action
 * @public
 */
export declare const unwrap: (action: IKeplerGlAction) => any;
/**
 * Given an id, returns the action for that id.
 * If the action is not a forward action, return the action
 * @memberof forwardActions
 * @param {String} id
 * @param {Object} action
 * @private
 */
export declare const _actionFor: (id: string, action: IKeplerGlAction) => any;
/**
 * Returns an action dispatcher that wraps and forwards the actions to a specific instance
 * @memberof forwardActions
 * @param {string} id - instance id
 * @param {Function} dispatch - action dispatcher
 * @public
 * @example
 *
 * // action and forward dispatcher
 * import {toggleSplitMap, forwardTo} from '@kepler.gl/actions';
 * import {connect} from 'react-redux';
 *
 * const MapContainer = props => (
 *  <div>
 *   <button onClick={() => props.keplerGlDispatch(toggleSplitMap())}/>
 *  </div>
 * )
 *
 * const mapDispatchToProps = (dispatch, props) => ({
 *  dispatch,
 *  keplerGlDispatch: forwardTo(‘foo’, dispatch)
 * });
 *
 * export default connect(
 *  state => state,
 *  mapDispatchToProps
 * )(MapContainer);
 */
export declare const forwardTo: (id: string, dispatch: Dispatch<IKeplerGlAction>) => (action: IKeplerGlAction) => {
    type: string;
    payload: {
        meta: {
            _id_: string;
            _forward_?: string;
            _addr_?: string;
        };
        type: (typeof ActionTypes)[keyof typeof ActionTypes];
        payload?: any;
    };
    meta: {
        _forward_: string;
        _addr_: string;
        _id_?: string;
    };
};
/**
 * Update the state of a kepler.gl instance
 * @memberof forwardActions
 * @param {Object} state
 * @param {string} id
 * @param {Object} nextState
 * @private
 */
export declare const _updateProperty: (state: any, id: string, nextState: any) => any;
export {};
