<?php

namespace WPDesk\FakturyKSEF\Xml\Validators;

class ErrorMessageFactory {

	private const NIP_CODE         = '1839';
	private const MIN_LENGTH_CODE  = '1831';
	private const ELEMENT_SET_CODE = '1840';

	public static function get_message( $code ): string {
		switch ( $code ) {
			case self::NIP_CODE:
				return __( 'Invalid VAT number', 'ksef-for-flexible-invoices' );
			case self::MIN_LENGTH_CODE:
				return __( 'Invalid element length', 'ksef-for-flexible-invoices' );
			case self::ELEMENT_SET_CODE:
				return __( 'Invalid value', 'ksef-for-flexible-invoices' );
			default:
				return __( 'Unknown error', 'ksef-for-flexible-invoices' );
		}
	}
}
