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