import { RoutingParameter } from './RoutingParameter';
export interface SelectedDimension {
    [key: string]: string[];
}
export declare type RequestParameterValue = number | string;
export declare type RequestParameters<Extra extends RoutingParameter = never> = {
    [K in string]?: RequestParameterValue | Extra;
};
export interface PageRequest<P extends RequestParameters<RoutingParameter> = RequestParameters> {
    pageName: string;
    parameters: P;
    dimensions: SelectedDimension;
}
export declare type RequestState<Parameters extends RequestParameters<RoutingParameter> = RequestParameters> = PageRequest<Parameters> | null;
export declare type RequestChange = (currentState: RequestState) => IncompleteRequestState;
export declare type DynamicRequestParameters = RequestParameters<RoutingParameter>;
export declare type IncompleteRequestState = Partial<RequestState<DynamicRequestParameters>> & {
    pageName: string;
} | null;
export declare type RoutingParameterResolver = (name: string) => RequestParameterValue | undefined;
export declare type RoutingLinkTarget = string | RequestChange | IncompleteRequestState;
declare type Params = any;
declare type RouteName = string;
declare type ParamsByName<K extends RouteName, T = Params> = T extends {
    name: K;
} ? T : never;
interface RouteConfigWithoutMapping {
    path: string;
    paramsToObject?: undefined;
    objectToParams?: undefined;
}
interface RouteConfigWithMapping<N, T extends Params = any> {
    path: string;
    paramsToObject: (params: T) => {
        [K in Exclude<keyof N, 'name'>]: N[K];
    };
    objectToParams: (params: N) => T;
}
export declare type RouteConfig<N> = RouteConfigWithMapping<N> | RouteConfigWithoutMapping;
export declare type RouteMap<N extends RouteName = RouteName> = {
    [K in N]: RouteConfig<ParamsByName<N>>;
};
export {};
//# sourceMappingURL=types.d.ts.map