import * as React from 'react' import { ThemePropTypes } from './utils' type Omit = Pick> export interface WithThemeInjectedProps { snacksTheme: ThemePropTypes } interface WithThemeProps { snacksTheme?: ThemePropTypes } type WithThemeOuterProps

= Omit & WithThemeProps // helper for applying hoc in .d.ts files export type ApplyWithTheme< T extends React.ComponentType

, P extends WithThemeInjectedProps = React.ComponentProps > = React.ComponentClass> export type ApplyWithThemeForwardRef< T extends React.ComponentType

, P extends WithThemeInjectedProps = React.ComponentProps > = React.NamedExoticComponent>> export interface WithThemeOptions { forwardRef?: boolean } declare function withTheme( options?: TOptions ): , P extends WithThemeInjectedProps>( component: T & React.ComponentType

) => TOptions extends { forwardRef: true } ? React.NamedExoticComponent>> : React.ComponentClass> declare function withTheme< T extends React.ComponentType

, P extends WithThemeInjectedProps = React.ComponentProps >(component: T): React.ComponentClass> export default withTheme