"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 pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda = require('../../../Splice/Api/FeaturedAppRightV1');
var pkg9e70a8b3510d617f8a136213f33d6a903a10ca0eeec76bb06ba55d1ed9680f69 = require('../../../DA/Internal/Template');

var CantonPayments_Airdrop_PersonalAirdrop = require('../../../CantonPayments/Airdrop/PersonalAirdrop/module');


exports.Factory_ExecuteBatchTransfers = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({personalAirdropCids: damlTypes.List(damlTypes.ContractId(CantonPayments_Airdrop_PersonalAirdrop.PersonalAirdrop)).decoder, amuletInputs: damlTypes.List(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.Amulet)).decoder, openMiningRoundCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.OpenMiningRound).decoder, amount: damlTypes.Numeric(10).decoder, numberOfTransfers: damlTypes.Int.decoder, lockedAmuletCid: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.LockedAmulet)).decoder), optMergeAmuletInputs: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.List(damlTypes.List(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.Amulet)))).decoder), optCreateFeaturedMarker: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Bool).decoder), }); }),
  encode: function (__typed__) {
  return {
    personalAirdropCids: damlTypes.List(damlTypes.ContractId(CantonPayments_Airdrop_PersonalAirdrop.PersonalAirdrop)).encode(__typed__.personalAirdropCids),
    amuletInputs: damlTypes.List(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.Amulet)).encode(__typed__.amuletInputs),
    openMiningRoundCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.OpenMiningRound).encode(__typed__.openMiningRoundCid),
    amount: damlTypes.Numeric(10).encode(__typed__.amount),
    numberOfTransfers: damlTypes.Int.encode(__typed__.numberOfTransfers),
    lockedAmuletCid: damlTypes.Optional(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.LockedAmulet)).encode(__typed__.lockedAmuletCid),
    optMergeAmuletInputs: damlTypes.Optional(damlTypes.List(damlTypes.List(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.Amulet)))).encode(__typed__.optMergeAmuletInputs),
    optCreateFeaturedMarker: damlTypes.Optional(damlTypes.Bool).encode(__typed__.optCreateFeaturedMarker),
  };
}
,
};



exports.Factory_JoinAirdrop = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({recipient: damlTypes.Party.decoder, }); }),
  encode: function (__typed__) {
  return {
    recipient: damlTypes.Party.encode(__typed__.recipient),
  };
}
,
};



exports.AirdropFactory = damlTypes.assembleTemplate(
{
  templateId: '#CantonPayments:CantonPayments.Airdrop.AirdropFactory:AirdropFactory',
  keyDecoder: damlTypes.lazyMemo(function () { return jtv.constant(undefined); }),
  keyEncode: function () { throw 'EncodeError'; },
  decoder: damlTypes.lazyMemo(function () { return jtv.object({dso: damlTypes.Party.decoder, sender: damlTypes.Party.decoder, provider: damlTypes.Party.decoder, featuredAppRight: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.FeaturedAppRight).decoder, amuletRulesCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.AmuletRules).decoder, appRewardBeneficiaries: damlTypes.List(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.AppRewardBeneficiary).decoder, }); }),
  encode: function (__typed__) {
  return {
    dso: damlTypes.Party.encode(__typed__.dso),
    sender: damlTypes.Party.encode(__typed__.sender),
    provider: damlTypes.Party.encode(__typed__.provider),
    featuredAppRight: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.FeaturedAppRight).encode(__typed__.featuredAppRight),
    amuletRulesCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.AmuletRules).encode(__typed__.amuletRulesCid),
    appRewardBeneficiaries: damlTypes.List(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.AppRewardBeneficiary).encode(__typed__.appRewardBeneficiaries),
  };
}
,
  Factory_JoinAirdrop: {
    template: function () { return exports.AirdropFactory; },
    choiceName: 'Factory_JoinAirdrop',
    argumentDecoder: damlTypes.lazyMemo(function () { return exports.Factory_JoinAirdrop.decoder; }),
    argumentEncode: function (__typed__) { return exports.Factory_JoinAirdrop.encode(__typed__); },
    resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.ContractId(CantonPayments_Airdrop_PersonalAirdrop.PersonalAirdrop).decoder; }),
    resultEncode: function (__typed__) { return damlTypes.ContractId(CantonPayments_Airdrop_PersonalAirdrop.PersonalAirdrop).encode(__typed__); },
  },
  Archive: {
    template: function () { return exports.AirdropFactory; },
    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__); },
  },
  Factory_ExecuteBatchTransfers: {
    template: function () { return exports.AirdropFactory; },
    choiceName: 'Factory_ExecuteBatchTransfers',
    argumentDecoder: damlTypes.lazyMemo(function () { return exports.Factory_ExecuteBatchTransfers.decoder; }),
    argumentEncode: function (__typed__) { return exports.Factory_ExecuteBatchTransfers.encode(__typed__); },
    resultDecoder: damlTypes.lazyMemo(function () { return pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.TransferResult.decoder; }),
    resultEncode: function (__typed__) { return pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.TransferResult.encode(__typed__); },
  },
}

);


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

