import type { ComponentType, FunctionComponent, ComponentClass, ElementType } from 'react'; import type { PolymorphicForwardRefExoticComponent, PolymorphicPropsWithoutRef } from 'react-polymorphic-types'; import { ResponsiveValue } from 'styled-system'; declare type GenericObjectType = { readonly [key: string]: any; }; declare type GenericNestedObjectType = { readonly [key: string]: GenericObjectType; }; declare type GenericOptionalNestedObjectType = { readonly [key: string]: string | number | GenericObjectType; }; export declare type StyledConfigType = { config?: { readonly variant: GenericObjectType; readonly [key: string]: GenericObjectType; }; }; export declare type WithPolyMorphicProps = PolymorphicPropsWithoutRef; export declare type ComponentWithConfig

= FunctionComponent

& StyledConfigType; declare type ComponentProps = Component extends PolymorphicForwardRefExoticComponent ? P : Component extends FunctionComponent ? P : Component extends ComponentClass ? P : never; declare type Intersection, T2 extends Record> = { [P in keyof T1 | keyof T2 as unknown extends T1[P] ? never : unknown extends T2[P] ? never : P]?: ResponsiveValue; }; declare type Blend = Omit & Omit & Intersection; declare type VariantKeys = { [P in keyof T]?: keyof T[P]; }; declare type OptionProps = { readonly baseStyles?: GenericOptionalNestedObjectType; readonly variants?: GenericNestedObjectType; }; export declare const styled: , Variants extends OptionProps, Component extends ComponentWithConfig>(component: Component, { baseStyles, variants }: Variants) => ComponentType>>; export {};