license import { MDCFoundation } from '@material/base/foundation' ; import { MDCTextFieldCharacterCounterAdapter } from './adapter' ; import { cssClasses , strings } from './constants' ; export class MDCTextFieldCharacterCounterFoundation extends MDCFoundation < MDCTextFieldCharacterCounterAdapter > { static override get cssClasses ( ) { return cssClasses ; } static override get strings ( ) { return strings ; } /**
     * See  MDCTextFieldCharacterCounterAdapter for typing information on parameters and return types.
      static override get defaultAdapter ( ) : MDCTextFieldCharacterCounterAdapter { return { setContent : ( ) => undefined , } ; } constructor ( adapter ? ) { super ( { ... MDCTextFieldCharacterCounterFoundation . defaultAdapter , ... adapter } ) ; } setCounterValue ( currentLength , maxLength ) { currentLength = Math . min ( currentLength , maxLength ) ; this . adapter . setContent ( `${ currentLength } / ${ maxLength }` ) ; } } export default MDCTextFieldCharacterCounterFoundation ;