/* eslint-disable */ import type { ElementType, JSX, ComponentPropsWithRef, ComponentType, Component } from 'react' import type { RecipeDefinition, RecipeSelection, RecipeVariantRecord } from './recipe'; import type { Assign, DistributiveOmit, DistributiveUnion, JsxHTMLProps, JsxStyleProps, Pretty } from './system-types'; interface Dict { [k: string]: unknown } export type DataAttrs = Record<`data-${string}`, unknown> export interface UnstyledProps { /** * Whether to remove recipe styles */ unstyled?: boolean | undefined } export interface AsProps { /** * The element to render as */ as?: ElementType | undefined } export type ComponentProps = T extends ComponentType | Component ? JSX.LibraryManagedAttributes : ComponentPropsWithRef export interface PandaComponent { (props: JsxHTMLProps & UnstyledProps & AsProps, Assign>): JSX.Element displayName?: string | undefined } interface RecipeFn { __type: any } export interface JsxFactoryOptions { dataAttr?: boolean defaultProps?: Partial & DataAttrs shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean forwardProps?: string[] } export type JsxRecipeProps = JsxHTMLProps & UnstyledProps & AsProps, P>; export type JsxElement = T extends PandaComponent ? PandaComponent>> : PandaComponent export interface JsxFactory { (component: T): PandaComponent (component: T, recipe: RecipeDefinition

, options?: JsxFactoryOptions>>): JsxElement< T, RecipeSelection

> (component: T, recipeFn: P, options?: JsxFactoryOptions>): JsxElement } export type JsxElements = { [K in keyof JSX.IntrinsicElements]: PandaComponent } export type Panda = JsxFactory & JsxElements export type HTMLPandaProps = JsxHTMLProps & UnstyledProps & AsProps, JsxStyleProps> export type PandaVariantProps> = T extends PandaComponent ? Props : never