import { ImageSource } from '@nativescript/core';
import { BaseOutput } from '~/core/entities/output/baseOutput';

export class DocumentDetailDataOutput extends BaseOutput {
    /* tslint:disable variable-name */
    ID: string;
    PhotoContent: string;
    photo: ImageSource;
    /* tslint:enable variable-name */

    constructor(warehouseId = '', displayName = '') {
        super();
        this.ID = warehouseId;
    }

    setImageSource() {
        if (this.PhotoContent) {
            this.photo = ImageSource.fromBase64Sync(this.PhotoContent);
        }
    }
}
