var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { VegaSlimmer, MapToComponentField } from 'vega-slimmer/core';
import { arrayToClassString } from '../../../../utils/ui';
import { formatAndValidResponsiveToken, formatAndValidTextColor, formatAndValidTypographyToken, } from '../../../../utils/design-token';
/** The VegaFontClassesController class is responsible for generating CSS classes based on the font properties and settings. */
export class VegaFontClassesController extends VegaSlimmer {
  /**
   * The function `getClasses` returns a string of CSS classes based on the font, color, and responsive settings.
   *
   * @returns {string} a string.
   */
  getClassName() {
    const font = this.variantController.getFontTokenByBreakpoint();
    const hostClasses = [];
    if (font) {
      hostClasses.push(formatAndValidTypographyToken(font));
    }
    if (this.color) {
      hostClasses.push(formatAndValidTextColor(this.color));
    }
    if (this.disableResponsive) {
      hostClasses.push('disable-responsive');
    }
    if (this.textAlign) {
      hostClasses.push(formatAndValidResponsiveToken(this.textAlign, 'textAlign'));
    }
    return arrayToClassString(hostClasses);
  }
}
__decorate([
  MapToComponentField()
], VegaFontClassesController.prototype, "color", void 0);
__decorate([
  MapToComponentField()
], VegaFontClassesController.prototype, "disableResponsive", void 0);
__decorate([
  MapToComponentField()
], VegaFontClassesController.prototype, "variantController", void 0);
__decorate([
  MapToComponentField()
], VegaFontClassesController.prototype, "textAlign", void 0);
