export class Scenario {
    constructor() {
        const RGLDocReaderFrame = {
            RGLDocReaderFrameScenarioDefault: 0,
            RGLDocReaderFrameMax: 1,
            RGLDocReaderFrameNone: 2
        }
        const RGLDocReaderOrientation = {
            GLDocReaderOrientationRotate: 0,
            RGLDocReaderOrientationPortrait: 1,
            RGLDocReaderOrientationLandscape: 2
        }
        this.RGLDocReaderOrientation = RGLDocReaderOrientation;
        this.RGLDocReaderFrame = RGLDocReaderFrame;

        this.name = "";//String
        this.caption = "";//String
        this.description = "";//String
        this.uvTorch = false;//boolean
        this.frame = RGLDocReaderFrame.RGLDocReaderFrameScenarioDefault;//ios
        this.frameKWHLandscape = null;//ios
        this.frameKWHPortrait = null;//ios
        this.barcodeExt = false;//ios
        this.faceExt = false;//ios
        this.multiPageOff = false;//ios
        this.frameOrientation = RGLDocReaderOrientation.GLDocReaderOrientationRotate;
    }

    static fromJson(jsonObject) {
        var result = new Scenario();
        result.name = jsonObject["name"];
        result.caption = jsonObject["caption"];
        result.description = jsonObject["description"];
        result.uvTorch = jsonObject["uvTorch"];
        result.frame = jsonObject["frame"];
        result.frameKWHLandscape = jsonObject["frameKWHLandscape"];
        result.frameKWHPortrait = jsonObject["frameKWHPortrait"];
        result.barcodeExt = jsonObject["barcodeExt"];
        result.faceExt = jsonObject["faceExt"];
        result.multiPageOff = jsonObject["multiPageOff"];
        result.frameOrientation = jsonObject["frameOrientation"];

        return result;
    }
}
