import { Money } from "bigint-money" ; import { NumberFormatter } from "../NumberFormatter" ; import { Fee } from "./Fee" ; export class BaseFee implements Fee { constructor ( private baseFee , private additionalFee ) { } public calculateFor ( amount ) { return this . baseFee . add ( this . additionalFee . calculateFor ( amount ) ) ; } public describe ( ) { const numberFormatter = new NumberFormatter ( ) ; return numberFormatter . formatMoney ( this . baseFee ) + ' + ' + this . additionalFee . describe ( ) ; } public getExtendedDescription ( ) { const numberFormatter = new NumberFormatter ( ) ; return [ 'Basisfee: ' + numberFormatter . formatMoney ( this . baseFee ) ] . concat ( this . additionalFee . getExtendedDescription ( ) ) ; } }