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


exports.SetCompanyValuation = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({new_company_valuation: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Numeric(10)).decoder), }); }),
  encode: function (__typed__) {
  return {
    new_company_valuation: damlTypes.Optional(damlTypes.Numeric(10)).encode(__typed__.new_company_valuation),
  };
}
,
};



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



exports.CompanyValuationReport = damlTypes.assembleTemplate(
{
  templateId: '#OpenCapTableReports-v01:Fairmint.OpenCapTableReports.CompanyValuationReport:CompanyValuationReport',
  templateIdWithPackageId: '8183060bf1a671a9c8725c262b7b50a36d166ea6f6efdc36d11367717c1177d9:Fairmint.OpenCapTableReports.CompanyValuationReport:CompanyValuationReport',
  keyDecoder: damlTypes.lazyMemo(function () { return jtv.constant(undefined); }),
  keyEncode: function () { throw 'EncodeError'; },
  decoder: damlTypes.lazyMemo(function () { return jtv.object({company_id: damlTypes.Text.decoder, company_valuation: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Numeric(10)).decoder), last_update_at: damlTypes.Time.decoder, system_operator: damlTypes.Party.decoder, featured_app_right: damlTypes.ContractId(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.FeaturedAppRight).decoder, observers: damlTypes.List(damlTypes.Party).decoder, }); }),
  encode: function (__typed__) {
  return {
    company_id: damlTypes.Text.encode(__typed__.company_id),
    company_valuation: damlTypes.Optional(damlTypes.Numeric(10)).encode(__typed__.company_valuation),
    last_update_at: damlTypes.Time.encode(__typed__.last_update_at),
    system_operator: damlTypes.Party.encode(__typed__.system_operator),
    featured_app_right: damlTypes.ContractId(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.FeaturedAppRight).encode(__typed__.featured_app_right),
    observers: damlTypes.List(damlTypes.Party).encode(__typed__.observers),
  };
}
,
  AddObservers: {
    template: function () { return exports.CompanyValuationReport; },
    choiceName: 'AddObservers',
    argumentDecoder: damlTypes.lazyMemo(function () { return exports.AddObservers.decoder; }),
    argumentEncode: function (__typed__) { return exports.AddObservers.encode(__typed__); },
    resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.ContractId(exports.CompanyValuationReport).decoder; }),
    resultEncode: function (__typed__) { return damlTypes.ContractId(exports.CompanyValuationReport).encode(__typed__); },
  },
  Archive: {
    template: function () { return exports.CompanyValuationReport; },
    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__); },
  },
  SetCompanyValuation: {
    template: function () { return exports.CompanyValuationReport; },
    choiceName: 'SetCompanyValuation',
    argumentDecoder: damlTypes.lazyMemo(function () { return exports.SetCompanyValuation.decoder; }),
    argumentEncode: function (__typed__) { return exports.SetCompanyValuation.encode(__typed__); },
    resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.ContractId(exports.CompanyValuationReport).decoder; }),
    resultEncode: function (__typed__) { return damlTypes.ContractId(exports.CompanyValuationReport).encode(__typed__); },
  },
}

);


damlTypes.registerTemplate(exports.CompanyValuationReport, ['8183060bf1a671a9c8725c262b7b50a36d166ea6f6efdc36d11367717c1177d9', '#OpenCapTableReports-v01']);

