// Generated from Fairmint/OpenCapTable/OCF/VestingTerms.daml
/* eslint-disable @typescript-eslint/camelcase */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/no-use-before-define */
import * as jtv from '@mojotech/json-type-validation';
import * as damlTypes from '@daml/types';

import * as pkg9e70a8b3510d617f8a136213f33d6a903a10ca0eeec76bb06ba55d1ed9680f69 from '../../../../DA/Internal/Template';

import * as Fairmint_OpenCapTable_Types from '../../../../Fairmint/OpenCapTable/Types/module';

export declare type OcfVestingCondition = {
  id: string;
  trigger: OcfVestingTrigger;
  next_condition_ids: string[];
  description: damlTypes.Optional<string>;
  portion: damlTypes.Optional<OcfVestingConditionPortion>;
  quantity: damlTypes.Optional<damlTypes.Numeric>;
};

export declare const OcfVestingCondition:
  damlTypes.Serializable<OcfVestingCondition> & {
  }
;


export declare type OcfVestingConditionPortion = {
  numerator: damlTypes.Numeric;
  denominator: damlTypes.Numeric;
  remainder: boolean;
};

export declare const OcfVestingConditionPortion:
  damlTypes.Serializable<OcfVestingConditionPortion> & {
  }
;


export declare type OcfVestingTrigger =
  |  { tag: 'OcfVestingStartTrigger'; value: {} }
  |  { tag: 'OcfVestingScheduleAbsoluteTrigger'; value: OcfVestingTrigger.OcfVestingScheduleAbsoluteTrigger }
  |  { tag: 'OcfVestingScheduleRelativeTrigger'; value: OcfVestingTrigger.OcfVestingScheduleRelativeTrigger }
  |  { tag: 'OcfVestingEventTrigger'; value: {} }
;

export declare const OcfVestingTrigger:
  damlTypes.Serializable<OcfVestingTrigger> & {
  OcfVestingScheduleAbsoluteTrigger: damlTypes.Serializable<OcfVestingTrigger.OcfVestingScheduleAbsoluteTrigger>;
  OcfVestingScheduleRelativeTrigger: damlTypes.Serializable<OcfVestingTrigger.OcfVestingScheduleRelativeTrigger>;
  }
;


export namespace OcfVestingTrigger {
  type OcfVestingScheduleAbsoluteTrigger = {
    date: damlTypes.Time;
  };
} //namespace OcfVestingTrigger


export namespace OcfVestingTrigger {
  type OcfVestingScheduleRelativeTrigger = {
    period: OcfVestingPeriod;
    relative_to_condition_id: string;
  };
} //namespace OcfVestingTrigger


export declare type OcfVestingPeriod =
  |  { tag: 'OcfVestingPeriodDays'; value: OcfVestingPeriod.OcfVestingPeriodDays }
  |  { tag: 'OcfVestingPeriodMonths'; value: OcfVestingPeriod.OcfVestingPeriodMonths }
;

export declare const OcfVestingPeriod:
  damlTypes.Serializable<OcfVestingPeriod> & {
  OcfVestingPeriodDays: damlTypes.Serializable<OcfVestingPeriod.OcfVestingPeriodDays>;
  OcfVestingPeriodMonths: damlTypes.Serializable<OcfVestingPeriod.OcfVestingPeriodMonths>;
  }
;


export namespace OcfVestingPeriod {
  type OcfVestingPeriodDays = {
    length_: damlTypes.Int;
    occurrences: damlTypes.Int;
    cliff_installment: damlTypes.Optional<damlTypes.Int>;
  };
} //namespace OcfVestingPeriod


export namespace OcfVestingPeriod {
  type OcfVestingPeriodMonths = {
    length_: damlTypes.Int;
    occurrences: damlTypes.Int;
    day_of_month: OcfVestingDayOfMonth;
    cliff_installment: damlTypes.Optional<damlTypes.Int>;
  };
} //namespace OcfVestingPeriod


export declare type OcfVestingDayOfMonth =
  | 'OcfVestingDay01'
  | 'OcfVestingDay02'
  | 'OcfVestingDay03'
  | 'OcfVestingDay04'
  | 'OcfVestingDay05'
  | 'OcfVestingDay06'
  | 'OcfVestingDay07'
  | 'OcfVestingDay08'
  | 'OcfVestingDay09'
  | 'OcfVestingDay10'
  | 'OcfVestingDay11'
  | 'OcfVestingDay12'
  | 'OcfVestingDay13'
  | 'OcfVestingDay14'
  | 'OcfVestingDay15'
  | 'OcfVestingDay16'
  | 'OcfVestingDay17'
  | 'OcfVestingDay18'
  | 'OcfVestingDay19'
  | 'OcfVestingDay20'
  | 'OcfVestingDay21'
  | 'OcfVestingDay22'
  | 'OcfVestingDay23'
  | 'OcfVestingDay24'
  | 'OcfVestingDay25'
  | 'OcfVestingDay26'
  | 'OcfVestingDay27'
  | 'OcfVestingDay28'
  | 'OcfVestingDay29OrLast'
  | 'OcfVestingDay30OrLast'
  | 'OcfVestingDay31OrLast'
  | 'OcfVestingStartDayOrLast'
;

export declare const OcfVestingDayOfMonth:
  damlTypes.Serializable<OcfVestingDayOfMonth> & {
  }
& { readonly keys: OcfVestingDayOfMonth[] } & { readonly [e in OcfVestingDayOfMonth]: e }
;


export declare type OcfAllocationType =
  | 'OcfAllocationCumulativeRounding'
  | 'OcfAllocationCumulativeRoundDown'
  | 'OcfAllocationFrontLoaded'
  | 'OcfAllocationBackLoaded'
  | 'OcfAllocationFrontLoadedToSingleTranche'
  | 'OcfAllocationBackLoadedToSingleTranche'
  | 'OcfAllocationFractional'
;

export declare const OcfAllocationType:
  damlTypes.Serializable<OcfAllocationType> & {
  }
& { readonly keys: OcfAllocationType[] } & { readonly [e in OcfAllocationType]: e }
;


export declare type VestingTermsOcfData = {
  id: string;
  allocation_type: OcfAllocationType;
  description: string;
  name: string;
  comments: string[];
  vesting_conditions: OcfVestingCondition[];
};

export declare const VestingTermsOcfData:
  damlTypes.Serializable<VestingTermsOcfData> & {
  }
;


export declare type VestingTerms = {
  context: Fairmint_OpenCapTable_Types.Context;
  vesting_terms_data: VestingTermsOcfData;
};

export declare interface VestingTermsInterface {
  Archive: damlTypes.Choice<VestingTerms, pkg9e70a8b3510d617f8a136213f33d6a903a10ca0eeec76bb06ba55d1ed9680f69.DA.Internal.Template.Archive, {}, undefined> & damlTypes.ChoiceFrom<damlTypes.Template<VestingTerms, undefined>>;
}
export declare const VestingTerms:
  damlTypes.Template<VestingTerms, undefined, '#OpenCapTable-v26:Fairmint.OpenCapTable.OCF.VestingTerms:VestingTerms'> &
  damlTypes.ToInterface<VestingTerms, never> &
  VestingTermsInterface;

export declare namespace VestingTerms {
}


