"use strict";
// SPDX-License-Identifier: Apache-2.0
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Dividend = void 0;
const ValidatedArgs_1 = __importDefault(require("../../../core/validation/ValidatedArgs"));
const SecurityDate_1 = require("../shared/SecurityDate");
class Dividend extends ValidatedArgs_1.default {
    amountPerUnitOfSecurity;
    amountDecimals;
    recordTimeStamp;
    executionTimeStamp;
    snapshotId;
    isDisabled;
    constructor(amountPerUnitOfSecurity, amountDecimals, recordTimeStamp, executionTimeStamp, snapshotId, isDisabled = false) {
        super({
            executionTimeStamp: (val) => {
                return SecurityDate_1.SecurityDate.checkDateTimestamp(val, this.recordTimeStamp);
            },
        });
        this.amountPerUnitOfSecurity = amountPerUnitOfSecurity;
        this.amountDecimals = amountDecimals;
        this.recordTimeStamp = recordTimeStamp;
        this.executionTimeStamp = executionTimeStamp;
        this.snapshotId = snapshotId ? snapshotId : undefined;
        this.isDisabled = isDisabled;
        ValidatedArgs_1.default.handleValidation(Dividend.name, this);
    }
}
exports.Dividend = Dividend;
