"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');

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

var Fairmint_OpenCapTable_Types = require('../../../../Fairmint/OpenCapTable/Types/module');


exports.EquityCompensationReleaseOcfData = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({id: damlTypes.Text.decoder, date: damlTypes.Time.decoder, quantity: damlTypes.Numeric(10).decoder, release_price: Fairmint_OpenCapTable_Types.OcfMonetary.decoder, security_id: damlTypes.Text.decoder, settlement_date: damlTypes.Time.decoder, comments: damlTypes.List(damlTypes.Text).decoder, resulting_security_ids: damlTypes.List(damlTypes.Text).decoder, consideration_text: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), }); }),
  encode: function (__typed__) {
  return {
    id: damlTypes.Text.encode(__typed__.id),
    date: damlTypes.Time.encode(__typed__.date),
    quantity: damlTypes.Numeric(10).encode(__typed__.quantity),
    release_price: Fairmint_OpenCapTable_Types.OcfMonetary.encode(__typed__.release_price),
    security_id: damlTypes.Text.encode(__typed__.security_id),
    settlement_date: damlTypes.Time.encode(__typed__.settlement_date),
    comments: damlTypes.List(damlTypes.Text).encode(__typed__.comments),
    resulting_security_ids: damlTypes.List(damlTypes.Text).encode(__typed__.resulting_security_ids),
    consideration_text: damlTypes.Optional(damlTypes.Text).encode(__typed__.consideration_text),
  };
}
,
};



exports.EquityCompensationRelease = damlTypes.assembleTemplate(
{
  templateId: '#OpenCapTable-v29:Fairmint.OpenCapTable.OCF.EquityCompensationRelease:EquityCompensationRelease',
  templateIdWithPackageId: '0d0a4dae18b38851d07336e6254a57cd8ef4c7cf961ec006487369e064b6ca9a:Fairmint.OpenCapTable.OCF.EquityCompensationRelease:EquityCompensationRelease',
  keyDecoder: damlTypes.lazyMemo(function () { return jtv.constant(undefined); }),
  keyEncode: function () { throw 'EncodeError'; },
  decoder: damlTypes.lazyMemo(function () { return jtv.object({context: Fairmint_OpenCapTable_Types.Context.decoder, release_data: exports.EquityCompensationReleaseOcfData.decoder, }); }),
  encode: function (__typed__) {
  return {
    context: Fairmint_OpenCapTable_Types.Context.encode(__typed__.context),
    release_data: exports.EquityCompensationReleaseOcfData.encode(__typed__.release_data),
  };
}
,
  Archive: {
    template: function () { return exports.EquityCompensationRelease; },
    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__); },
  },
}

);


damlTypes.registerTemplate(exports.EquityCompensationRelease, ['0d0a4dae18b38851d07336e6254a57cd8ef4c7cf961ec006487369e064b6ca9a', '#OpenCapTable-v29']);

