import { LitElement } from 'lit'; type EventTypeRequiresDetail = T extends keyof GlobalEventHandlersEventMap ? GlobalEventHandlersEventMap[T] extends CustomEvent> ? GlobalEventHandlersEventMap[T] extends CustomEvent> ? never : Partial extends GlobalEventHandlersEventMap[T]['detail'] ? never : T : never : never; type EventTypeDoesNotRequireDetail = T extends keyof GlobalEventHandlersEventMap ? GlobalEventHandlersEventMap[T] extends CustomEvent> ? GlobalEventHandlersEventMap[T] extends CustomEvent> ? T : Partial extends GlobalEventHandlersEventMap[T]['detail'] ? T : never : T : T; type EventTypesWithRequiredDetail = { [EventType in keyof GlobalEventHandlersEventMap as EventTypeRequiresDetail]: true; }; type EventTypesWithoutRequiredDetail = { [EventType in keyof GlobalEventHandlersEventMap as EventTypeDoesNotRequireDetail]: true; }; type WithRequired = T & { [P in K]-?: T[P]; }; type SlEventInit = T extends keyof GlobalEventHandlersEventMap ? GlobalEventHandlersEventMap[T] extends CustomEvent> ? GlobalEventHandlersEventMap[T] extends CustomEvent> ? CustomEventInit : Partial extends GlobalEventHandlersEventMap[T]['detail'] ? CustomEventInit : WithRequired, 'detail'> : CustomEventInit : CustomEventInit; type GetCustomEventType = T extends keyof GlobalEventHandlersEventMap ? GlobalEventHandlersEventMap[T] extends CustomEvent ? GlobalEventHandlersEventMap[T] : CustomEvent : CustomEvent; export default class ShoelaceElement extends LitElement { dir: string; lang: string; /** Emits a custom event with more convenient defaults. */ emit(name: EventTypeDoesNotRequireDetail, options?: SlEventInit | undefined): GetCustomEventType; emit(name: EventTypeRequiresDetail, options: SlEventInit): GetCustomEventType; static version: any; static define(name: string, elementConstructor?: typeof ShoelaceElement, options?: ElementDefinitionOptions): void; static dependencies: Record; constructor(); } export interface ShoelaceFormControl extends ShoelaceElement { name: string; value: unknown; disabled?: boolean; defaultValue?: unknown; defaultChecked?: boolean; form?: string; pattern?: string; min?: number | string | Date; max?: number | string | Date; step?: number | 'any'; required?: boolean; minlength?: number; maxlength?: number; readonly validity: ValidityState; readonly validationMessage: string; checkValidity: () => boolean; getForm: () => HTMLFormElement | null; reportValidity: () => boolean; setCustomValidity: (message: string) => void; } export {};