import React from "react"; declare type BEMCSS = import("./css-core").BEMCSS; declare type InlineClassName = ReturnType; declare type ClassNamesTypes = string | InlineClassName; declare type InlineCSS = BEMCSS; export interface BEMComponentProperties { blockName: string; parent?: BemedFC; bemed: true; className: string; displayName: string; css?: BEMCSS; mods?: Mods; defaultMods: ModDefaults; asElement(elementName: string, blockName: string): (props: any) => React.ReactNode; } export declare type BemedFC = React.FC & BEMComponentProperties; interface Mods { [key: string]: true | string | string[] | InlineCSS | Record; } declare type ModPrimitives = string | string[] | true | InlineCSS; declare type AllModTypeds = ModPrimitives | Record; declare type ModProps> = { [P in keyof T]?: T[P] extends boolean ? boolean : T[P] extends string ? boolean : T[P] extends string[] ? boolean : T[P] extends InlineCSS ? boolean : T[P] extends undefined ? never : keyof T[P]; }; /** * Generate type for setting enum mod defaults */ declare type EnumModDefaults = { [P in keyof T]?: T[P] extends object ? T[P] extends object ? keyof T[P] : never : never; }; interface ModDefaults { [mod: string]: string | undefined; } export interface BemedOptions { className?: ClassNamesTypes | ClassNamesTypes[]; prefix?: string; separators?: { modifier?: string; element?: string; }; } /** * Create BEMBlock component type */ declare type BEMBlock = Block & BEMComponentProperties & Elements; export interface ElementBlock { (props: any): React.ReactNode; asElement(elementName: string, blockName: string): (props: any) => React.ReactNode; } export declare function createBemed(bemedOptions?: BemedOptions | undefined): React.ReactElement | null) | (new (props: any) => React.Component) = "div", DefaultProps extends React.ComponentProps = any, BEMBlockMods extends Record JSX.Element; cssString: string; sourceMap: string; render: (reactElement: T, cssChunks: { className: string; cssString: string; sourceMap: string; }[]) => T; hash: (str: string) => string; } | Record JSX.Element; cssString: string; sourceMap: string; render: (reactElement: T, cssChunks: { className: string; cssString: string; sourceMap: string; }[]) => T; hash: (str: string) => string; }>> | undefined = undefined>(blockOptions?: { name?: string | undefined; as?: BEMBlockDOMElement | undefined; defaultProps?: DefaultProps | undefined; mods?: BEMBlockMods | undefined; defaultMods?: EnumModDefaults | undefined; css?: { asCSS(selector: string): string; asStyleTag(selector: string): (props: any) => JSX.Element; cssString: string; sourceMap: string; render: (reactElement: T, cssChunks: { className: string; cssString: string; sourceMap: string; }[]) => T; hash: (str: string) => string; } | undefined; className?: string | { className: string; bemCSS: { asCSS(selector: string): string; asStyleTag(selector: string): (props: any) => JSX.Element; cssString: string; sourceMap: string; render: (reactElement: T, cssChunks: { className: string; cssString: string; sourceMap: string; }[]) => T; hash: (str: string) => string; }; } | ClassNamesTypes[] | undefined; elements?: Elements | undefined; } | undefined) => BEMBlock<(props: React.ComponentProps | (BEMBlockMods extends undefined ? React.ComponentProps : React.ComponentProps & ModProps)) => any, Elements>; export declare const bemed: React.ReactElement | null) | (new (props: any) => React.Component) = "div", DefaultProps extends React.ComponentProps = any, BEMBlockMods extends Record JSX.Element; cssString: string; sourceMap: string; render: (reactElement: T, cssChunks: { className: string; cssString: string; sourceMap: string; }[]) => T; hash: (str: string) => string; } | Record JSX.Element; cssString: string; sourceMap: string; render: (reactElement: T, cssChunks: { className: string; cssString: string; sourceMap: string; }[]) => T; hash: (str: string) => string; }>> | undefined = undefined>(blockOptions?: { name?: string | undefined; as?: BEMBlockDOMElement | undefined; defaultProps?: DefaultProps | undefined; mods?: BEMBlockMods | undefined; defaultMods?: EnumModDefaults | undefined; css?: { asCSS(selector: string): string; asStyleTag(selector: string): (props: any) => JSX.Element; cssString: string; sourceMap: string; render: (reactElement: T, cssChunks: { className: string; cssString: string; sourceMap: string; }[]) => T; hash: (str: string) => string; } | undefined; className?: string | { className: string; bemCSS: { asCSS(selector: string): string; asStyleTag(selector: string): (props: any) => JSX.Element; cssString: string; sourceMap: string; render: (reactElement: T, cssChunks: { className: string; cssString: string; sourceMap: string; }[]) => T; hash: (str: string) => string; }; } | ClassNamesTypes[] | undefined; elements?: Elements | undefined; } | undefined) => BEMBlock<(props: React.ComponentProps | (BEMBlockMods extends undefined ? React.ComponentProps : React.ComponentProps & ModProps)) => any, Elements>; export {};