// SPDX-License-Identifier: Apache-2.0
import ValidatedDomain from "../../../core/validation/ValidatedArgs";
import { SecurityDate } from "../shared/SecurityDate";
export class Dividend extends ValidatedDomain {
    amountPerUnitOfSecurity;
    amountDecimals;
    recordTimeStamp;
    executionTimeStamp;
    snapshotId;
    isDisabled;
    constructor(amountPerUnitOfSecurity, amountDecimals, recordTimeStamp, executionTimeStamp, snapshotId, isDisabled = false) {
        super({
            executionTimeStamp: (val) => {
                return 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;
        ValidatedDomain.handleValidation(Dividend.name, this);
    }
}
