import { customAttribute , inject } from 'aurelia-framework' ; import { MdcComponent } from '@aurelia-mdc-web/base' ; import { MDCSelectIconFoundation , MDCSelectIconAdapter } from '@material/select' ; export const mdcIconStrings = { ATTRIBUTE : 'mdc-select-icon' } ; @ inject ( Element ) @ customAttribute ( mdcIconStrings . ATTRIBUTE ) export class MdcSelectIcon extends MdcComponent < MDCSelectIconFoundation > { async initialise ( ) { this . root . classList . add ( 'mdc-select__icon' ) ; } getDefaultFoundation ( ) { const adapter = { getAttr : ( attr ) => this . root . getAttribute ( attr ) , setAttr : ( attr , value ) => this . root . setAttribute ( attr , value ) , removeAttr : ( attr ) => this . root . removeAttribute ( attr ) , setContent : ( content ) => { this . root . textContent = content ; } , registerInteractionHandler : ( evtType , handler ) => this . listen ( evtType , handler ) , deregisterInteractionHandler : ( evtType , handler ) => this . unlisten ( evtType , handler ) , notifyIconAction : ( ) => this . emit ( MDCSelectIconFoundation . strings . ICON_EVENT , { } , true ) , } ; return new MDCSelectIconFoundation ( adapter ) ; } } hidden export interface IMdcSelectIconElement extends HTMLElement { au : { 'mdc-select-icon' : { viewModel : MdcSelectIcon ; } ; } ; }