import type { OperatorList } from './OperatorList';

export default class ContentModel {
    parts: string[];
    opList: OperatorList;

    constructor(parts: string[], opList: OperatorList) {
        this.parts = parts;
        this.opList = opList;
    }

    public toDisplay(): string {

        let text = "";
        if (this.parts.length > 1) {
            for (const part of this.parts) {
                text += part;
            }
        } else if (this.parts.length == 1) {
            text = this.parts[0];
        }
        return text;
    }
}