import { Injectable , Renderer2 , RendererStyleFlags2 } from '@angular/core' ; const config = Object . freeze ( { className : 'kirby-line-clamp' , lineClamp : '--line-clamp' , lineHeight : '--line-height' , } ) ; @ Injectable ( ) export class LineClampHelper { constructor ( private renderer ) { } setMaxLines ( element , maxLines ) { this . renderer . setStyle ( element , config . lineClamp , maxLines , RendererStyleFlags2 . DashCase ) ; this . renderer . addClass ( element , config . className ) ; } setLineHeight ( element , lineHeight ) { this . renderer . setStyle ( element , config . lineHeight , lineHeight , RendererStyleFlags2 . DashCase ) ; } removeLineClamp ( element ) { this . renderer . removeClass ( element , config . className ) ; this . renderer . removeStyle ( element , config . lineClamp ) ; this . renderer . removeStyle ( element , config . lineHeight ) ; } }