import * as React from 'react'; import { createComponent, type EventName } from '@lit/react'; import { PieRadio as PieRadioLit } from './index'; import { type RadioProps } from './defs'; export * from './defs'; const PieRadioReact = createComponent({ displayName: 'PieRadio', elementClass: PieRadioLit, react: React, tagName: 'pie-radio', events: { onInput: 'input' as EventName, // Should fire whenever a user toggles the radio. onChange: 'change' as EventName, // Fires when the radio is checked (but not when unchecked). }, }); type ReactBaseType = Omit, 'onChange' | 'onInput'>; type PieRadioEvents = { onInput?: (event: InputEvent) => void; onChange?: (event: CustomEvent) => void; }; export const PieRadio = PieRadioReact as React.ForwardRefExoticComponent, 'children'>> & React.RefAttributes & PieRadioEvents & ReactBaseType>;