import React from 'react';
import { Reducer, ActionCreatorsMapObject } from 'redux';
import { ComponentProps } from './types';
import { Store } from './store/async';
/**
 * The interface for a dynamic feature
 * @public
 * */
export interface Feature<LocalStore, LocalActions> {
    /** actions for the feature*/
    actions: LocalActions;
    /** the key matching the property name in the store*/
    key: keyof Store;
    /** the reducer for the feature*/
    reducer: Reducer<LocalStore>;
    /** optional initial state for the feature*/
    initialState?: LocalStore;
}
/**
 * The interface the props of a component with a feature
 * @public
 * */
export interface FeatureProps<LocalStore, LocalActions> extends ComponentProps {
    /** actions for the feature*/
    actions: LocalActions;
    /** the local store for the feature*/
    store: LocalStore;
}
/**
 * A higher order component that takes a feature and make its actions and reducer available
 * @public
 * @returns a component which has access to the feature actions and local state
 */
export default function withFeature<LocalStore, LocalActions extends ActionCreatorsMapObject>(feature: Feature<LocalStore, LocalActions>): <OwnProps>(WrappedComponent: React.ComponentType<OwnProps>) => React.ComponentType<OwnProps & ComponentProps & FeatureProps<LocalActions, LocalStore>>;
