license import { PropertyDeclaration , ReactiveElement } from '@lit/reactive-element' ; /**
 * A value for the `aria-haspopup` ARIA attribute.
 */ export type AriaHasPopup = 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' ; /**
 * Expose protected statics on ReactiveElement
 */ interface ReactiveElementInternals { getPropertyDescriptor ( name , key ) : PropertyDescriptor ; getPropertyOptions ( name ) : PropertyDeclaration ; } see https function tsDecorator ( prototype , name , descriptor ? ) { const constructor = ( prototype . constructor as unknown as ReactiveElementInternals ) ; if ( ! descriptor ) { /**
         * lit uses internal properties with two leading underscores to
         * provide storage for accessors
         */ const litInternalPropertyKey = `__${ name }` ; descriptor = constructor . getPropertyDescriptor ( name , litInternalPropertyKey ) ; if ( ! descriptor ) { throw new Error ( '@ariaProperty must be used after a @property decorator' ) ; } } const propDescriptor = descriptor ; let attribute = '' ; if ( ! propDescriptor . set ) { throw new Error ( `@ariaProperty requires a setter for ${ name }` ) ; } if ( ( prototype as any ) . dispatchWizEvent ) { return descriptor ; } const wrappedDescriptor = { configurable : true , enumerable : true , set ( this , value ) { if ( attribute === '' ) { const options = constructor . getPropertyOptions ( name ) ; attribute = typeof options . attribute === 'string' ? options . attribute : name ; } if ( this . hasAttribute ( attribute ) ) { this . removeAttribute ( attribute ) ; } propDescriptor . set ! . call ( this , value ) ; } } ; if ( propDescriptor . get ) { wrappedDescriptor . get = function ( this ) { return propDescriptor . get ! . call ( this ) ; } ; } return wrappedDescriptor ; } example ariaProperty property category ExportDecoratedItems export function ariaProperty ( protoOrDescriptor , name ? , descriptor ? ) { if ( name !== undefined ) { return tsDecorator ( protoOrDescriptor , name , descriptor ) ; } else { throw new Error ( '@ariaProperty only supports TypeScript Decorators' ) ; } }