import * as React from 'react'; import { createComponent, type EventName } from '@lit/react'; import { PieTextInput as PieTextInputLit } from './index'; import { type TextInputProps } from './defs'; export * from './defs'; const PieTextInputReact = createComponent({ displayName: 'PieTextInput', elementClass: PieTextInputLit, react: React, tagName: 'pie-text-input', events: { onInput: 'input' as EventName, // when the input value is changed. onChange: 'change' as EventName, // when the input value is changed. }, }); type ReactBaseType = Omit, 'onChange' | 'onInput' | 'size'> type PieTextInputEvents = { onInput?: (event: InputEvent) => void; onChange?: (event: CustomEvent) => void; }; export const PieTextInput = PieTextInputReact as React.ForwardRefExoticComponent, 'children'>> & React.RefAttributes & PieTextInputEvents & ReactBaseType>;