import { InterceptorConfig } from '../InterceptorConfig';
import { registerInterceptor } from '../InterceptorGenerator';
import { InterceptorHandler } from '../InterceptorHandler';
export class ModifierLowercaseConverter extends InterceptorConfig {
  constructor() {
    super('modifierLowercaseConverter');
  }
}
ModifierLowercaseConverter.id = 'modifierLowercaseConverter';
export class ModifierLowercaseConverterHandler extends InterceptorHandler {
  run(_context, _values, _field, value) {
    if (typeof value === 'string' || value instanceof String) {
      return { value: value.toLowerCase() };
    }
    return { value };
  }
}
registerInterceptor(ModifierLowercaseConverter.id, (_config) => new ModifierLowercaseConverterHandler());
