"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_Conversion = require('../../../../Fairmint/OpenCapTable/Types/Conversion/module');
var Fairmint_OpenCapTable_Types_Core = require('../../../../Fairmint/OpenCapTable/Types/Core/module');


exports.StockClassConversionRatioAdjustmentOcfData = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({id: damlTypes.Text.decoder, date: damlTypes.Time.decoder, new_ratio_conversion_mechanism: Fairmint_OpenCapTable_Types_Conversion.OcfRatioConversionMechanism.decoder, stock_class_id: damlTypes.Text.decoder, comments: damlTypes.List(damlTypes.Text).decoder, }); }),
  encode: function (__typed__) {
  return {
    id: damlTypes.Text.encode(__typed__.id),
    date: damlTypes.Time.encode(__typed__.date),
    new_ratio_conversion_mechanism: Fairmint_OpenCapTable_Types_Conversion.OcfRatioConversionMechanism.encode(__typed__.new_ratio_conversion_mechanism),
    stock_class_id: damlTypes.Text.encode(__typed__.stock_class_id),
    comments: damlTypes.List(damlTypes.Text).encode(__typed__.comments),
  };
}
,
};



exports.StockClassConversionRatioAdjustment = damlTypes.assembleTemplate(
{
  templateId: '#OpenCapTable-v32:Fairmint.OpenCapTable.OCF.StockClassConversionRatioAdjustment:StockClassConversionRatioAdjustment',
  templateIdWithPackageId: 'a27d41ef28900c05b37cfa7dcec7fff43819ef9f5803e1e1c66ed3152c5d5401:Fairmint.OpenCapTable.OCF.StockClassConversionRatioAdjustment:StockClassConversionRatioAdjustment',
  keyDecoder: damlTypes.lazyMemo(function () { return jtv.constant(undefined); }),
  keyEncode: function () { throw 'EncodeError'; },
  decoder: damlTypes.lazyMemo(function () { return jtv.object({context: Fairmint_OpenCapTable_Types_Core.Context.decoder, adjustment_data: exports.StockClassConversionRatioAdjustmentOcfData.decoder, }); }),
  encode: function (__typed__) {
  return {
    context: Fairmint_OpenCapTable_Types_Core.Context.encode(__typed__.context),
    adjustment_data: exports.StockClassConversionRatioAdjustmentOcfData.encode(__typed__.adjustment_data),
  };
}
,
  Archive: {
    template: function () { return exports.StockClassConversionRatioAdjustment; },
    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.StockClassConversionRatioAdjustment, ['a27d41ef28900c05b37cfa7dcec7fff43819ef9f5803e1e1c66ed3152c5d5401', '#OpenCapTable-v32']);

