"use strict";
/* eslint-disable-next-line no-unused-vars */
function __export(m) {
/* eslint-disable-next-line no-prototype-builtins */
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
/* eslint-disable-next-line no-unused-vars */
var jtv = require('@mojotech/json-type-validation');
/* eslint-disable-next-line no-unused-vars */
var damlTypes = require('@daml/types');
/* eslint-disable-next-line no-unused-vars */
var damlLedger = require('@daml/ledger');

var pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1 = require('../../..');
var pkg9e70a8b3510d617f8a136213f33d6a903a10ca0eeec76bb06ba55d1ed9680f69 = require('../../../DA/Internal/Template');


exports.SimpleAirdrop_Execute = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({recipientSpecs: damlTypes.List(exports.RecipientSpec).decoder, initialAmuletInputs: damlTypes.List(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.Amulet)).decoder, openMiningRoundCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.OpenMiningRound).decoder, amountPerTransfer: damlTypes.Numeric(10).decoder, }); }),
  encode: function (__typed__) {
  return {
    recipientSpecs: damlTypes.List(exports.RecipientSpec).encode(__typed__.recipientSpecs),
    initialAmuletInputs: damlTypes.List(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.Amulet)).encode(__typed__.initialAmuletInputs),
    openMiningRoundCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.OpenMiningRound).encode(__typed__.openMiningRoundCid),
    amountPerTransfer: damlTypes.Numeric(10).encode(__typed__.amountPerTransfer),
  };
}
,
};



exports.SimpleAirdrop = damlTypes.assembleTemplate(
{
  templateId: '#CantonPayments:CantonPayments.Airdrop.SimpleAirdrop:SimpleAirdrop',
  keyDecoder: damlTypes.lazyMemo(function () { return jtv.constant(undefined); }),
  keyEncode: function () { throw 'EncodeError'; },
  decoder: damlTypes.lazyMemo(function () { return jtv.object({config: exports.SimpleAirdropConfig.decoder, }); }),
  encode: function (__typed__) {
  return {
    config: exports.SimpleAirdropConfig.encode(__typed__.config),
  };
}
,
  Archive: {
    template: function () { return exports.SimpleAirdrop; },
    choiceName: 'Archive',
    argumentDecoder: damlTypes.lazyMemo(function () { return pkg9e70a8b3510d617f8a136213f33d6a903a10ca0eeec76bb06ba55d1ed9680f69.DA.Internal.Template.Archive.decoder; }),
    argumentEncode: function (__typed__) { return pkg9e70a8b3510d617f8a136213f33d6a903a10ca0eeec76bb06ba55d1ed9680f69.DA.Internal.Template.Archive.encode(__typed__); },
    resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.Unit.decoder; }),
    resultEncode: function (__typed__) { return damlTypes.Unit.encode(__typed__); },
  },
  SimpleAirdrop_Execute: {
    template: function () { return exports.SimpleAirdrop; },
    choiceName: 'SimpleAirdrop_Execute',
    argumentDecoder: damlTypes.lazyMemo(function () { return exports.SimpleAirdrop_Execute.decoder; }),
    argumentEncode: function (__typed__) { return exports.SimpleAirdrop_Execute.encode(__typed__); },
    resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.Unit.decoder; }),
    resultEncode: function (__typed__) { return damlTypes.Unit.encode(__typed__); },
  },
}

);


damlTypes.registerTemplate(exports.SimpleAirdrop, ['ba78a0a88becb5fcf5ad1f848cc261818212de5f52c4e7fb467a27a090f445cd', '#CantonPayments']);



exports.SimpleAirdropConfig = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({sender: damlTypes.Party.decoder, featuredAppRight: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.FeaturedAppRight)).decoder), amuletRulesCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.AmuletRules).decoder, dso: damlTypes.Party.decoder, }); }),
  encode: function (__typed__) {
  return {
    sender: damlTypes.Party.encode(__typed__.sender),
    featuredAppRight: damlTypes.Optional(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.FeaturedAppRight)).encode(__typed__.featuredAppRight),
    amuletRulesCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.AmuletRules).encode(__typed__.amuletRulesCid),
    dso: damlTypes.Party.encode(__typed__.dso),
  };
}
,
};



exports.RecipientSpec = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({transferPreapprovalCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.TransferPreapproval).decoder, numberOfTransfers: damlTypes.Int.decoder, }); }),
  encode: function (__typed__) {
  return {
    transferPreapprovalCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.TransferPreapproval).encode(__typed__.transferPreapprovalCid),
    numberOfTransfers: damlTypes.Int.encode(__typed__.numberOfTransfers),
  };
}
,
};

