import { isBreakpointsForPrefixType, isFlexAlignItemType } from '../../../types/type-guard';
import { LogUtility } from '../../../utils/log';
import { FlexAlignItem } from '../../../constants/ui';
import { ResponsiveClassStringFormatter } from './responsive-class-string-formatter';
/**
 * A class for format FlexAlignItemType with BreakpointsForPrefixType to CSS class string
 *
 * @augments ResponsiveClassStringFormatter
 */
class ResponsiveFlexAlignItemFormatter extends ResponsiveClassStringFormatter {
  /**
   * This function takes a FlexAlignItemType and a breakpoint and returns CSS class string.
   *
   * @param {FlexAlignItemType} input - FlexAlignItemType input
   * @param {BreakpointsForPrefixType} [breakpoint] - Breakpoints for prefix of the class
   * @returns {string} - A string.
   */
  formatToken(input, breakpoint) {
    const prefix = isBreakpointsForPrefixType(breakpoint) ? `${breakpoint}:` : '';
    if (isFlexAlignItemType(input)) {
      return `${prefix}v-items-${input}`;
    }
    else {
      LogUtility.warn(`The flex alignItem value ${input} is invalid, it must be a value of: `, FlexAlignItem);
      return '';
    }
  }
}
export default new ResponsiveFlexAlignItemFormatter();
