"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MockWatermarkController = exports.WatermarkController = void 0;
var Deleter_1 = require("../../Core/Deleter");
/** @internal */
var WatermarkController = /** @class */ (function () {
    function WatermarkController(webAssemblyContext) {
        this.webAssemblyContext = webAssemblyContext;
        this.watermarkProperties = new webAssemblyContext.SCRTWaterMarkProperties();
        this.watermarkPropertyPosition = new webAssemblyContext.TSRVector2(0, 0);
        this.watermarkProperties.SetPosition(this.watermarkPropertyPosition);
        this.watermarkProperties.SetOpacity(0.5);
        webAssemblyContext.SCRTSetWaterMarkProperties(this.watermarkProperties);
    }
    WatermarkController.prototype.update = function (left, bottom, canvasWidth, isLightBackground) {
        this.watermarkPropertyPosition.x = left;
        this.watermarkPropertyPosition.y = bottom;
        this.watermarkProperties.m_fCanvasWidth = canvasWidth;
        this.watermarkProperties.SetPosition(this.watermarkPropertyPosition);
        this.watermarkProperties.m_bIsDarkBackground = isLightBackground !== undefined ? !isLightBackground : false;
        this.webAssemblyContext.SCRTSetWaterMarkProperties(this.watermarkProperties);
    };
    WatermarkController.prototype.delete = function () {
        this.watermarkProperties = (0, Deleter_1.deleteSafe)(this.watermarkProperties);
        this.watermarkPropertyPosition = (0, Deleter_1.deleteSafe)(this.watermarkPropertyPosition);
        this.webAssemblyContext = undefined;
    };
    return WatermarkController;
}());
exports.WatermarkController = WatermarkController;
/**
 * @ignore
 * @internal
 */
var MockWatermarkController = /** @class */ (function () {
    function MockWatermarkController() {
    }
    MockWatermarkController.prototype.update = function () { };
    MockWatermarkController.prototype.delete = function () { };
    return MockWatermarkController;
}());
exports.MockWatermarkController = MockWatermarkController;
