namespace TheDatepicker { export enum ClassNameType { Container , ContainerOver , ContainerLeft , ContainerResponsive , Main , Body , BodySwipeable , Tables , Header , HeaderTop , HeaderControl , HeaderNavigation , HeaderState , HeaderMonth , HeaderYear , HeaderMonthYear , HeaderYearsToggle , Button , ButtonContent , SelectInput , Deselect , DeselectButton , HeaderTitle , HeaderTitleContent , Reset , Close , Go , GoNext , GoPrevious , Table , TableRow , TableCell , TableCellUnavailable , TableCellHighlighted , TableCellSelected , CalendarTable , CalendarTableHeader , CalendarTableHeaderCell , CalendarTableBody , YearsTable , YearsTableBody , WeekDayWeekend , Day , DayToday , DayPast , DayWeekend , DayUnavailable , DayOutside , DayHighlighted , DaySelected , DayButton , DayButtonContent , YearCellButton , YearCellButtonContent , Animated , AnimateFadeOutLeft , AnimateFadeInRight , AnimateFadeOutUp , AnimateFadeInDown , AnimateFadeOutRight , AnimateFadeInLeft , AnimateFadeOutDown , AnimateFadeInUp } export class ClassNames { private classNames_ = [ [ 'container' ] , [ 'container--over' ] , [ 'container--left' ] , [ 'container--responsive' ] , [ 'main' ] , [ 'body' ] , [ 'body--swipeable' ] , [ 'tables' ] , [ 'header' ] , [ 'top' ] , [ 'control' ] , [ 'navigation' ] , [ 'state' ] , [ 'month' ] , [ 'year' ] , [ 'month-year' ] , [ 'year-button' ] , [ 'button' ] , [ 'button-content' ] , [ 'select' ] , [ 'deselect' ] , [ 'deselect-button' ] , [ 'title' ] , [ 'title-content' ] , [ 'reset' ] , [ 'close' ] , [ 'go' ] , [ 'go-next' ] , [ 'go-previous' ] , [ 'table' ] , [ 'row' ] , [ 'cell' ] , [ 'cell--unavailable' ] , [ 'cell--highlighted' ] , [ 'cell--selected' ] , [ 'calendar' ] , [ 'calendar-header' ] , [ 'week-day' ] , [ 'calendar-body' ] , [ 'years' ] , [ 'years-body' ] , [ 'week-day--weekend' ] , [ 'day' ] , [ 'day--today' ] , [ 'day--past' ] , [ 'day--weekend' ] , [ 'day--unavailable' ] , [ 'day--outside' ] , [ 'day--highlighted' ] , [ 'day--selected' ] , [ 'day--button' ] , [ 'day-content' ] , [ 'year-cell-button' ] , [ 'year-cell-content' ] , [ 'animated' ] , [ 'fade-out-left' ] , [ 'fade-in-right' ] , [ 'fade-out-up' ] , [ 'fade-in-down' ] , [ 'fade-out-right' ] , [ 'fade-in-left' ] , [ 'fade-out-down' ] , [ 'fade-in-up' ] , ] ; public clone ( ) { const classNames = new ClassNames ( ) ; let index ; for ( index = 0 ; index < this . classNames_ . length ; index ++ ) { classNames . classNames_ = this . classNames_ . slice ( 0 ) ; } return classNames ; } public setClassName ( type , className ) { this . classNames_ [ this . checkType_ ( type ) ] = this . normalizeClassName_ ( className ) ; } public addClassName ( type , className ) { this . classNames_ [ this . checkType_ ( type ) ] . concat ( this . normalizeClassName_ ( className ) ) ; } public getClassName ( type ) { return this . classNames_ [ type ] . slice ( 0 ) ; } private checkType_ ( type ) { return Helper_ . checkNumber_ ( 'Class name type' , type , 0 , this . classNames_ . length - 1 ) ; } private normalizeClassName_ ( className ) { const parameterName = 'Class name' ; if ( typeof className !== 'object' || className . constructor !== Array ) { className = Helper_ . checkString_ ( parameterName , className as string ) . split ( /\s+/ ) ; } const result = [ ] ; for ( let index = 0 ; index < className . length ; index ++ ) { const name = Helper_ . checkString_ ( parameterName , className [ index ] ) ; if ( name ) { result . push ( name ) ; } } return result ; } } }