export interface EntityReference {
    readonly id: string;
    readonly type: string;
    readonly entityRuleId: string;
    readonly page: number;
}

export interface IComponentValue {
    readonly value: string;
    readonly originalValue: string;
    readonly valueDescription: string;
    readonly componentRuleId: string;
    readonly entityReferences: EntityReference[];
}

export class ComponentValue implements IComponentValue {
    readonly value: string;
    readonly originalValue: string;
    readonly valueDescription: string;
    readonly componentRuleId: string;
    readonly entityReferences: EntityReference[];

    constructor(value: IComponentValue) {
        this.value = value.value;
        this.originalValue = value.originalValue;
        this.valueDescription = value.valueDescription;
        this.componentRuleId = value.componentRuleId;
        this.entityReferences = value.entityReferences ?? [];
    }
}
