21The purpose of Articles 17 to 19 of the Directive, in particular, is to protect the commercial agent after termination of the contract. The regime established by the Directive for that purpose is mandatory in nature. Article 17 requires Member States to put in place a mechanism for providing reparation to the commercial agent after termination of the contract. Admittedly, that article allows the Member States to choose between indemnification and compensation for damage. However, Articles 17 and 18 prescribe a precise framework within which the Member States may exercise their discretion as to the choice of methods for calculating the indemnity or compensation to be granted.