text: "use strict";
  /*
   * Copyright 2019 NEM
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BalanceChangeReceipt = void 0;
  const catbuffer_typescript_1 = require("catbuffer-typescript");
  const Receipt_1 = require("./Receipt");
  const ReceiptVersion_1 = require("./ReceiptVersion");
  /**
   * Balance Change: A mosaic credit or debit was triggered.
   */
  class BalanceChangeReceipt extends Receipt_1.Receipt {
      /**
       * Balance change expiry receipt
       * @param targetAddress - The target account address.
       * @param mosaicId - The mosaic id.
       * @param amount - The amount of mosaic.
       * @param version - The receipt version
       * @param type - The receipt type
       * @param size - the receipt size
       */
      constructor(
      /**
       * The target account address.
       */
      targetAddress, 
      /**
       * The mosaic id.
       */
      mosaicId, 
      /**
       * The amount of mosaic.
       */
      amount, version, type, size) {
          super(version, type, size);
          this.targetAddress = targetAddress;
          this.mosaicId = mosaicId;
          this.amount = amount;
      }
      /**
       * @internal
       * Generate buffer
       * @return {Uint8Array}
       */
      serialize() {
          return new catbuffer_typescript_1.BalanceChangeReceiptBuilder(ReceiptVersion_1.ReceiptVersion.BALANCE_CHANGE, this.type.valueOf(), new catbuffer_typescript_1.MosaicBuilder(this.mosaicId.toBuilder(), new catbuffer_typescript_1.AmountDto(this.amount.toDTO())), this.targetAddress.toBuilder()).serialize();
      }
  }
  exports.BalanceChangeReceipt = BalanceChangeReceipt;
  //# sourceMappingURL=BalanceChangeReceipt.js.map