import { Component, Input, Output, EventEmitter } from '@angular/core';

export interface FieldConfig {
  name: string;
  label: string;
  type: string;
  required?: boolean;
  placeholder?: string;
  validators?: any[];
  options?: any[];
  [key: string]: any; // For additional properties
}

@Component({
  template: ''
})
export class BaseFieldComponent {
  @Input() field: FieldConfig;
  @Input() value: any;
  @Output() valueChange = new EventEmitter<any>();
  
  onChange(value: any) {
    this.valueChange.emit(value);
  }
}