import { ActionCreator, ActionCreatorProps, Creator, FunctionWithParametersType, NotAllowedCheck, TypedAction } from './models'; declare type Join = Str extends `${infer First}${Separator}${infer Rest}` ? Join<`${First}${Rest}`, Separator> : Str; declare type Trim = Str extends ` ${infer S}` ? Trim : Str extends `${infer S} ` ? Trim : Str; declare type TitleCase = Str extends `${infer First} ${infer Rest}` ? `${Capitalize} ${TitleCase}` : Capitalize; declare type ForbiddenCharactersStr = '/ \\ | < > [ ] { } ( ) . , ! ? # % ^ & * + - ~ \' " `'; declare type ForbiddenCharacters = Str extends `${infer First} ${infer Rest}` ? First | ForbiddenCharacters : Str extends '' ? never : Str; declare type ForbiddenCharactersCheck = Str extends `${infer _}${ForbiddenCharacters}${infer _}` ? `${Name} cannot contain the following characters: ${ForbiddenCharactersStr}` : unknown; declare type EmptyStringCheck = Trim extends '' ? `${Name} cannot be an empty string or contain only spaces` : unknown; declare type StringLiteralCheck = string extends Str ? `${Name} must be a string literal type` : unknown; declare type UniqueEventNameCheck = ActionName extends ActionName> ? `${ActionName} action is already defined` : unknown; declare type NotAllowedEventPropsCheck | Creator> = PropsCreator extends ActionCreatorProps ? Props extends void ? unknown : NotAllowedCheck : PropsCreator extends Creator ? NotAllowedCheck : unknown; declare type EventCreator | Creator, Type extends string> = PropsCreator extends ActionCreatorProps ? void extends Props ? ActionCreator TypedAction> : ActionCreator) => Props & TypedAction> : PropsCreator extends Creator ? FunctionWithParametersType & TypedAction> & TypedAction : never; export declare type ActionName = Uncapitalize>>>>; export interface ActionGroupConfig | Creator>> { source: Source & StringLiteralCheck; events: { [EventName in keyof Events]: Events[EventName] & EmptyStringCheck & StringLiteralCheck & ForbiddenCharactersCheck & UniqueEventNameCheck & NotAllowedEventPropsCheck; }; } export declare type ActionGroup | Creator>> = { [EventName in keyof Events as ActionName]: EventCreator; }; export {};