import { toJS } from 'mobx';
import {
  getRootStore,
  model,
  Model,
  modelAction,
  ModelAutoTypeCheckingMode,
  setGlobalConfig,
  tProp,
  types,
} from 'mobx-keystone';
import type { RootStore } from '../root-store';
import Language from './Language';

setGlobalConfig({
  modelAutoTypeChecking: ModelAutoTypeCheckingMode.AlwaysOn,
});

@model('keystone/Languages/LanguageList')
export default class LanguageList extends Model({
  languages: tProp(types.array(types.model<Language>(Language)), () => [
    new Language({
      name: 'en',
      label: 'English',
      type: 1,
      fields: [
        {
          id: 'Transaction Cancelled',
          translation: 'Transaction Cancelled',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },
        {
          id: 'Please try again',
          translation: 'Please try again',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },
        {
          id: 'Access closed',
          translation: 'Parking closed',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when veto scenario is active (Entry & Pay in lane)',
        },
        {
          id: 'Ticket',
          translation: 'Ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page bottom ticket button (Entry)',
        },
        {
          id: 'Push the button to receive a ticket',
          translation: 'Push the button to receive a ticket',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top after ticket on loop is swallowed (Entry)',
        },
        {
          id: 'Ticket is beeing printed',
          translation: 'Ticket is beeing printed',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is beeing printed (Entry)',
        },
        {
          id: 'Please take your ticket',
          translation: 'Please take your ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is on presenter (Entry)',
        },
        {
          id: 'Please drive trough',
          translation: 'Please drive through',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is taken (Entry)',
        },
        {
          id: 'Swallowed the ticket',
          translation: 'Ticket has been swallowed',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket gets swallowed (Entry)',
        },
        {
          id: 'Problem with printer',
          translation: 'Problem with printer',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when printer issue (Entry)',
        },
        {
          id: 'Please scan your ticket',
          translation: 'Please scan your ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when on loop (Pay In Lane)',
        },
        {
          id: 'Ticket OK, please drive trough',
          translation: 'Ticket OK, please drive through',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is OK (Pay in lane)',
        },
        {
          id: 'Please pay, follow the instructions on the pay terminal',
          translation: 'Follow the instructions on the pay terminal',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is not ok and you need to pay (Pay in lane)',
        },
        {
          id: 'Ticket already used',
          translation: 'Ticket already used',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is already used (Pay in lane)',
        },
        {
          id: 'Lost Ticket',
          translation: 'Lost Ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page bottom button lost ticket (Pay in lane)',
        },
        {
          id: 'Payment OK, please drive trough',
          translation: 'Payment OK, please drive through',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment is succesfull (Pay In Lane)',
        },
        {
          id: 'Payment terminal is busy, please wait',
          translation: 'Payment terminal is busy, please wait',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment terminal is busy (Pay In Lane)',
        },
        {
          id: 'No vehicle',
          translation: 'No vehicle detected',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when no car detected',
        },
        {
          id: 'Entry time',
          translation: 'Entry time',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Start time ticket',
          translation: 'Start time of the ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Current time',
          translation: 'Current time',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'The current date and time',
          translation: 'Current date and time',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Free exit time',
          translation: 'Free exit time',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End of free time ticket',
          translation: 'End of free time on the ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time left:',
          translation: 'Free time left:',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time inside parking: ',
          translation: 'Time spent at the parking: ',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Price to pay: € ',
          translation: 'Price to pay: € ',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End time ticket',
          translation: 'End time of the ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Detail',
          translation: 'Detail',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail button text when a ticket is scanned',
        },
        {
          id: 'Please follow the instructions on the payterminal to complete your payment.',
          translation:
            'Please follow the instructions on the pay terminal to complete your payment.',
          customTranslation: '',
          changed: false,
          occursWhere: 'Text displayed when need to pay',
        },
        {
          id: 'Proof of payment',
          translation: 'Proof of payment',
          customTranslation: '',
          changed: false,
          occursWhere: 'Proof of payment button text when a ticket is scanned',
        },
      ],
    }),
    new Language({
      name: 'nl',
      label: 'Nederlands',
      type: 2,
      fields: [
        {
          id: 'Transaction Cancelled',
          translation: 'Transactie geannuleerd',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },
        {
          id: 'Please try again',
          translation: 'Probeer het opnieuw',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },
           {
          id: 'Access closed',
          translation: 'Parking gesloten',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page when veto scenario is active (Entry & Pay in lane)',
        },
        {
          id: 'Ticket',
          translation: 'Ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page ticket button (Entry)',
        },
        {
          id: 'Push the button to receive a ticket',
          translation: 'Druk op de knop om een ticket te ontvangen',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when veto scenario is active (Entry)',
        },
        {
          id: 'Ticket is beeing printed',
          translation: 'Ticket wordt afgedrukt',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is beeing printed (Entry)',
        },
        {
          id: 'Please take your ticket',
          translation: 'Gelieve uw ticket te nemen',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is on presenter (Entry)',
        },
        {
          id: 'Please drive trough',
          translation: 'Gelieve door te rijden',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is taken (Entry)',
        },
        {
          id: 'Swallowed the ticket',
          translation: 'Ticket werd ingeslikt',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket gets swallowed (Entry)',
        },
        {
          id: 'Problem with printer',
          translation: 'Probleem met printer',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when printer issue (Entry)',
        },
        {
          id: 'Please scan your ticket',
          translation: 'Gelieve uw ticket te scannen',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when on loop (Pay in lane)',
        },
        {
          id: 'Ticket OK, please drive trough',
          translation: 'Ticket OK, gelieve door te rijden',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is OK (Pay in lane)',
        },
        {
          id: 'Please pay, follow the instructions on the pay terminal',
          translation: 'Volg de instructies op de betaalterminal',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is not ok and you need to pay (Pay in lane)',
        },
        {
          id: 'Ticket already used',
          translation: 'Ticket is reeds gebruikt',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is already used (Pay in lane)',
        },
        {
          id: 'Lost Ticket',
          translation: 'Ticket verloren',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page bottom button lost ticket (Pay in lane)',
        },
        {
          id: 'Payment OK, please drive trough',
          translation: 'Betaling geslaagd, gelieve door te rijden',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment is succesfull (Pay In Lane)',
        },
        {
          id: 'Payment terminal is busy, please wait',
          translation: 'Betaalterminal in gebruik, gelieve te wachten',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment terminal is busy (Pay In Lane)',
        },
        {
          id: 'No vehicle',
          translation: 'Geen voertuig gedetecteerd',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when no car detected',
        },
        {
          id: 'Entry time',
          translation: 'Starttijd',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Start time ticket',
          translation: 'Starttijd van het ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Current time',
          translation: 'Huidige tijd',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'The current date and time',
          translation: 'Huidige datum en tijd',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Free exit time',
          translation: 'Gratis uitrij tijd',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End of free time ticket',
          translation: 'Einde gratis uitrij tijd van het ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time left:',
          translation: 'Resterende gratis tijd:',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time inside parking: ',
          translation: 'Tijd gespendeerd op de parking:',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Price to pay: € ',
          translation: 'Te betalen: €',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End time ticket',
          translation: 'Eindtijd van het ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Detail',
          translation: 'Detail',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail button text when a ticket is scanned',
        },
        {
          id: 'Please follow the instructions on the payterminal to complete your payment.',
          translation: 'Volg de instructies op de betaalterminal.',
          customTranslation: '',
          changed: false,
          occursWhere: 'Text displayed when need to pay',
        },
        {
          id: 'Proof of payment',
          translation: 'Betaalbewijs',
          customTranslation: '',
          changed: false,
          occursWhere: 'Proof of payment button text when a ticket is scanned',
        },
      ],
    }),
    new Language({
      name: 'fr',
      label: 'Français',
      type: 3,
      fields: [
        {
          id: 'Transaction Cancelled',
          translation: 'Transaction annulée',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },
        {
          id: 'Please try again',
          translation: 'Veuillez réessayer',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },       
        {
          id: 'Access closed',
          translation: 'Parking fermé',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page when veto scenario is active (Entry & Pay in lane)',
        },
        {
          id: 'Ticket',
          translation: 'Ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page ticket button (Entry)',
        },
        {
          id: 'Push the button to receive a ticket',
          translation: 'Appuyez sur le bouton pour recevoir un ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when veto scenario is active (Entry)',
        },
        {
          id: 'Ticket is beeing printed',
          translation: "Le ticket est en cours d'impression",
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is beeing printed (Entry)',
        },
        {
          id: 'Please take your ticket',
          translation: 'Veuillez prendre votre ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is on presenter (Entry)',
        },
        {
          id: 'Please drive trough',
          translation: 'Veuillez avancer',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is taken (Entry)',
        },
        {
          id: 'Swallowed the ticket',
          translation: 'Ticket avalé',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket gets swallowed (Entry)',
        },
        {
          id: 'Problem with printer',
          translation: "Problème avec l'imprimante",
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when printer issue (Entry)',
        },
        {
          id: 'Please scan your ticket',
          translation: 'Veuillez scanner votre ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when on loop (Pay in lane)',
        },
        {
          id: 'Ticket OK, please drive trough',
          translation: 'Ticket OK, veuillez avancer',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is OK (Pay in lane)',
        },
        {
          id: 'Please pay, follow the instructions on the pay terminal',
          translation: 'Suivez les instructions sur le terminal de paiement',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is not ok and you need to pay (Pay in lane)',
        },
        {
          id: 'Ticket already used',
          translation: 'Ticket déjà utilisé',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is already used (Pay in lane)',
        },
        {
          id: 'Lost Ticket',
          translation: 'Ticket perdu',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page bottom button lost ticket (Pay in lane)',
        },
        {
          id: 'Payment OK, please drive trough',
          translation: 'Paiement OK, veuillez avancer',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment is succesfull (Pay In Lane)',
        },
        {
          id: 'Payment terminal is busy, please wait',
          translation: 'Terminal de paiement est occupé, veuillez patienter',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment terminal is busy (Pay In Lane)',
        },
        {
          id: 'No vehicle',
          translation: 'Aucun véhicule détecté',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when no car detected',
        },
        {
          id: 'Entry time',
          translation: "Temps d'entrée",
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Start time ticket',
          translation: 'Heure de début du ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Current time',
          translation: 'Temps actuel',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'The current date and time',
          translation: 'Date et temps actuel',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Free exit time',
          translation: 'Temps de départ gratuit',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End of free time ticket',
          translation: 'Fin du temps gratuit du ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time left:',
          translation: 'Temps gratuit restant:',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time inside parking: ',
          translation: 'Temps passé dans le parking:',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Price to pay: € ',
          translation: 'Montant à payer: €',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End time ticket',
          translation: 'Temps de fin du ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Detail',
          translation: 'Détail',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail button text when a ticket is scanned',
        },
        {
          id: 'Please follow the instructions on the payterminal to complete your payment.',
          translation:
            'Veuillez suivre les instructions sur le terminal de paiement',
          customTranslation: '',
          changed: false,
          occursWhere: 'Text displayed when need to pay',
        },
        {
          id: 'Proof of payment',
          translation: 'Preuve de paiement',
          customTranslation: '',
          changed: false,
          occursWhere: 'Proof of payment button text when a ticket is scanned',
        },
      ],
    }),
    new Language({
      name: 'de',
      label: 'Deutsch',
      type: 4,
      fields: [
        {
          id: 'Transaction Cancelled',
          translation: 'Transaktion abgebrochen',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },
        {
          id: 'Please try again',
          translation: 'Bitte versuchen Sie es erneut',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },
        
        {
          id: 'Access closed',
          translation: 'Parkplatz geschlossen',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page when veto scenario is active (Entry & Pay in lane)',
        },
        {
          id: 'Ticket',
          translation: 'Ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page ticket button (Entry)',
        },
        {
          id: 'Push the button to receive a ticket',
          translation: 'Drücken Sie den Knopf, um ein Ticket zu erhalten',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when veto scenario is active (Entry)',
        },
        {
          id: 'Ticket is beeing printed',
          translation: 'Ticket wird gedruckt',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is beeing printed (Entry)',
        },
        {
          id: 'Please take your ticket',
          translation: 'Bitte das Ticket ziehen',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is on presenter (Entry)',
        },
        {
          id: 'Please drive trough',
          translation: 'Bitte fahren Sie durch',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is taken (Entry)',
        },
        {
          id: 'Swallowed the ticket',
          translation: 'Ticket wurde geschluckt',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket gets swallowed (Entry)',
        },
        {
          id: 'Problem with printer',
          translation: 'Problem mit dem Drucker',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when printer issue (Entry)',
        },
        {
          id: 'Please scan your ticket',
          translation: 'Bitte scannen Sie Ihr Ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when on loop (Pay in lane)',
        },
        {
          id: 'Ticket OK, please drive trough',
          translation: 'Ticket OK, bitte fahren Sie durch',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is OK (Pay in lane)',
        },
        {
          id: 'Please pay, follow the instructions on the pay terminal',
          translation: 'Bitte folgen Sie den Anweisungen am Zahlungsterminal',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is not ok and you need to pay (Pay in lane)',
        },
        {
          id: 'Ticket already used',
          translation: 'Ticket bereits verwendet',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is already used (Pay in lane)',
        },
        {
          id: 'Lost Ticket',
          translation: 'Ticket verloren',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page bottom button lost ticket (Pay in lane)',
        },
        {
          id: 'Payment OK, please drive trough',
          translation: 'Zahlung OK, bitte fahren Sie durch',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment is succesfull (Pay In Lane)',
        },
        {
          id: 'Payment terminal is busy, please wait',
          translation: 'Zahlungsterminal ist beschäftigt, bitte warten',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment terminal is busy (Pay In Lane)',
        },
        {
          id: 'No vehicle',
          translation: 'Kein Fahrzeug erkannt',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when no car detected',
        },
        {
          id: 'Entry time',
          translation: 'Einfahrtszeit',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Start time ticket',
          translation: 'Startzeit des Tickets',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Current time',
          translation: 'Aktuelle Zeit',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'The current date and time',
          translation: 'Aktuelle Datum und Zeit',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Free exit time',
          translation: 'Kostenlose Ausfahrtszeit',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End of free time ticket',
          translation: 'Ende der kostenlose Ausfahrzeit des Tickets',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time left:',
          translation: 'Übrige kostenlose Zeit:',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time inside parking: ',
          translation: 'Zeit im Parkplatz verbracht:',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Price to pay: € ',
          translation: 'Zu bezahlen: €',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End time ticket',
          translation: 'Endzeit des Tickets',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Detail',
          translation: 'Detail',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail button text when a ticket is scanned',
        },
        {
          id: 'Please follow the instructions on the payterminal to complete your payment.',
          translation:
            'Bitte folgen Sie den Anweisungen am Bezahlterminal, um Ihre Zahlung abzuschließen.',
          customTranslation: '',
          changed: false,
          occursWhere: 'Text displayed when need to pay',
        },
        {
          id: 'Proof of payment',
          translation: 'Zahlungsnachweis',
          customTranslation: '',
          changed: false,
          occursWhere: 'Proof of payment button text when a ticket is scanned',
        },
      ],
    }),
    new Language({
      name: 'it',
      label: 'Italiano',
      type: 5,
      fields: [
        {
          id: 'Transaction Cancelled',
          translation: 'Transazione annullata',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },
        {
          id: 'Please try again',
          translation: 'Per favore riprova',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },        
        {
          id: 'Access closed',
          translation: 'Parcheggio chiuso',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page when veto scenario is active (Entry & Pay in lane)',
        },
        {
          id: 'Ticket',
          translation: 'Biglietto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page ticket button (Entry)',
        },
        {
          id: 'Push the button to receive a ticket',
          translation: 'Premi il pulsante per ricevere un biglietto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when veto scenario is active (Entry)',
        },
        {
          id: 'Ticket is beeing printed',
          translation: 'Il biglietto è in fase di stampa',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is beeing printed (Entry)',
        },
        {
          id: 'Please take your ticket',
          translation: 'Per favore prendi il tuo biglietto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is on presenter (Entry)',
        },
        {
          id: 'Please drive trough',
          translation: 'Per favore, attraversa',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is taken (Entry)',
        },
        {
          id: 'Swallowed the ticket',
          translation: 'Il biglietto è stato ingoiato',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket gets swallowed (Entry)',
        },
        {
          id: 'Problem with printer',
          translation: 'Problema con la stampante',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when printer issue (Entry)',
        },
        {
          id: 'Please scan your ticket',
          translation: 'Si prega di scansionare il biglietto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when on loop (Pay in lane)',
        },
        {
          id: 'Ticket OK, please drive trough',
          translation: 'Biglietto OK, per favore passa',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is OK (Pay in lane)',
        },
        {
          id: 'Please pay, follow the instructions on the pay terminal',
          translation:
            'Si prega di pagare, seguire le istruzioni sul terminale di pagamento',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is not ok and you need to pay (Pay in lane)',
        },
        {
          id: 'Ticket already used',
          translation: 'Biglietto già utilizzato',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is already used (Pay in lane)',
        },
        {
          id: 'Lost Ticket',
          translation: 'Biglietto perduto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page bottom button lost ticket (Pay in lane)',
        },
        {
          id: 'Payment OK, please drive trough',
          translation: 'Pagamento OK, si prega di guidare',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment is succesfull (Pay In Lane)',
        },
        {
          id: 'Payment terminal is busy, please wait',
          translation: 'Il terminale di pagamento è occupato, attendere',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment terminal is busy (Pay In Lane)',
        },
        {
          id: 'No vehicle',
          translation: 'Nessun veicolo',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when no car detected',
        },
        {
          id: 'Entry time',
          translation: 'Orario di ingresso',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Start time ticket',
          translation: 'Orario di inizio del biglietto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Current time',
          translation: 'Ora attuale',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'The current date and time',
          translation: "La data e l'ora correnti",
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Free exit time',
          translation: 'Orario di uscita gratuito',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End of free time ticket',
          translation: 'Fine del tempo libero del biglietto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time left:',
          translation: 'Tempo libero rimasto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time inside parking: ',
          translation: "Il tempo passava all'interno del parcheggio",
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Price to pay: € ',
          translation: 'Prezzo da pagare: €',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End time ticket',
          translation: 'Ora di fine del biglietto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Detail',
          translation: 'Dettaglio',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail button text when a ticket is scanned',
        },
        {
          id: 'Please follow the instructions on the payterminal to complete your payment.',
          translation:
            'Si prega di seguire le istruzioni sul terminale di pagamento per completare il pagamento.',
          customTranslation: '',
          changed: false,
          occursWhere: 'Text displayed when need to pay',
        },
        {
          id: 'Proof of payment',
          translation: 'Prova del pagamento',
          customTranslation: '',
          changed: false,
          occursWhere: 'Proof of payment button text when a ticket is scanned',
        },
      ],
    }),
    new Language({
      name: 'es',
      label: 'Español',
      type: 6,
      fields: [
        {
          id: 'Transaction Cancelled',
          translation: 'Transacción cancelada',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },
        {
          id: 'Please try again',
          translation: 'Por favor, inténtelo de nuevo',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },
        
        {
          id: 'Aparcamiento cerrado',
          translation: 'Acceso cerrado',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page when veto scenario is active (Entry & Pay in lane)',
        },
        {
          id: 'Ticket',
          translation: 'Boleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page ticket button (Entry)',
        },
        {
          id: 'Push the button to receive a ticket',
          translation: 'Presiona el botón para recibir un boleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when veto scenario is active (Entry)',
        },
        {
          id: 'Ticket is beeing printed',
          translation: 'Se está imprimiendo el boleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is beeing printed (Entry)',
        },
        {
          id: 'Please take your ticket',
          translation: 'Por favor tome su boleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is on presenter (Entry)',
        },
        {
          id: 'Please drive trough',
          translation: 'Por favor, conduce',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is taken (Entry)',
        },
        {
          id: 'Swallowed the ticket',
          translation: 'se ha tragado el boleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket gets swallowed (Entry)',
        },
        {
          id: 'Problem with printer',
          translation: 'Problema con la impresora',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when printer issue (Entry)',
        },
        {
          id: 'Please scan your ticket',
          translation: 'Por favor escanea tu boleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when on loop (Pay in lane)',
        },
        {
          id: 'Ticket OK, please drive trough',
          translation: 'Boleto OK, por favor conduzca',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is OK (Pay in lane)',
        },
        {
          id: 'Please pay, follow the instructions on the pay terminal',
          translation:
            'Por favor pague, siga las instrucciones en el terminal de pago',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is not ok and you need to pay (Pay in lane)',
        },
        {
          id: 'Ticket already used',
          translation: 'Boleta ya usado',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is already used (Pay in lane)',
        },
        {
          id: 'Lost Ticket',
          translation: 'Boleto perdido',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page bottom button lost ticket (Pay in lane)',
        },
        {
          id: 'Payment OK, please drive trough',
          translation: 'Pago OK, por favor conduzca',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment is succesfull (Pay In Lane)',
        },
        {
          id: 'Payment terminal is busy, please wait',
          translation: 'El terminal de pago está ocupado, por favor espere',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment terminal is busy (Pay In Lane)',
        },
        {
          id: 'No vehicle',
          translation: 'Ningún vehículo detectado',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when no car detected',
        },
        {
          id: 'Entry time',
          translation: 'Hora de entrada',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Start time ticket',
          translation: 'Hora de inicio del boleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Current time',
          translation: 'Tiempo actual',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'The current date and time',
          translation: 'Fecha y hora actual',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Free exit time',
          translation: 'Tiempo de salida libre',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End of free time ticket',
          translation: 'Fin del tiempo libre del buleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time left:',
          translation: 'Tiempo restante',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time inside parking: ',
          translation: 'Tiempo de permanencia dentro del estacionamiento:',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Price to pay: € ',
          translation: 'Precio a pagar: €',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End time ticket',
          translation: 'Hora de finalización del buleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Detail',
          translation: 'Detalle',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail button text when a ticket is scanned',
        },
        {
          id: 'Please follow the instructions on the payterminal to complete your payment.',
          translation:
            'Por favor, siga las instrucciones en la terminal de pago para completar su pago.',
          customTranslation: '',
          changed: false,
          occursWhere: 'Text displayed when need to pay',
        },
        {
          id: 'Proof of payment',
          translation: 'Prueba de pago',
          customTranslation: '',
          changed: false,
          occursWhere: 'Proof of payment button text when a ticket is scanned',
        },
      ],
    }),
    new Language({
      name: 'fr-ca',
      label: 'Français canadien',
      type: 7,
      fields: [
        {
          id: 'Transaction Cancelled',
          translation: 'Transaction annulée',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },
        {
          id: 'Please try again',
          translation: 'Veuillez réessayer',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },        
        {
          id: 'Access closed',
          translation: 'Stationnement fermé',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page when veto scenario is active (Entry & Pay in lane)',
        },
        {
          id: 'Ticket',
          translation: 'Ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page ticket button (Entry)',
        },
        {
          id: 'Push the button to receive a ticket',
          translation: 'Appuyez sur le bouton pour recevoir un ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when veto scenario is active (Entry)',
        },
        {
          id: 'Ticket is beeing printed',
          translation: "Le ticket est en cours d'impression",
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is beeing printed (Entry)',
        },
        {
          id: 'Please take your ticket',
          translation: 'Veuillez prendre votre ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is on presenter (Entry)',
        },
        {
          id: 'Please drive trough',
          translation: 'Veuillez avancer',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is taken (Entry)',
        },
        {
          id: 'Swallowed the ticket',
          translation: 'Ticket avalé',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket gets swallowed (Entry)',
        },
        {
          id: 'Problem with printer',
          translation: "Problème avec l'imprimante",
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when printer issue (Entry)',
        },
        {
          id: 'Please scan your ticket',
          translation: 'Veuillez scanner votre ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when on loop (Pay in lane)',
        },
        {
          id: 'Ticket OK, please drive trough',
          translation: 'Ticket OK, veuillez avancer',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is OK (Pay in lane)',
        },
        {
          id: 'Please pay, follow the instructions on the pay terminal',
          translation: 'Suivez les instructions sur le terminal de paiement',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is not ok and you need to pay (Pay in lane)',
        },
        {
          id: 'Ticket already used',
          translation: 'Ticket déjà utilisé',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is already used (Pay in lane)',
        },
        {
          id: 'Lost Ticket',
          translation: 'Ticket perdu',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page bottom button lost ticket (Pay in lane)',
        },
        {
          id: 'Payment OK, please drive trough',
          translation: 'Paiement OK, veuillez avancer',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment is succesfull (Pay In Lane)',
        },
        {
          id: 'Payment terminal is busy, please wait',
          translation: 'Terminal de paiement est occupé, veuillez patienter',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment terminal is busy (Pay In Lane)',
        },
        {
          id: 'No vehicle',
          translation: 'Aucun véhicule détecté',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when no car detected',
        },
        {
          id: 'Entry time',
          translation: "Temps d'entrée",
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Start time ticket',
          translation: 'Heure de début du ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Current time',
          translation: 'Temps actuel',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'The current date and time',
          translation: 'Date et temps actuel',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Free exit time',
          translation: 'Temps de départ gratuit',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End of free time ticket',
          translation: 'Fin du temps gratuit du ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time left:',
          translation: 'Temps gratuit restant:',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time inside parking: ',
          translation: 'Temps passé dans le parking:',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Price to pay: € ',
          translation: 'Montant à payer: €',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End time ticket',
          translation: 'Temps de fin du ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Detail',
          translation: 'Détail',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail button text when a ticket is scanned',
        },
        {
          id: 'Please follow the instructions on the payterminal to complete your payment.',
          translation:
            'Veuillez suivre les instructions sur le terminal de paiement',
          customTranslation: '',
          changed: false,
          occursWhere: 'Text displayed when need to pay',
        },
        {
          id: 'Proof of payment',
          translation: 'Preuve de paiement',
          customTranslation: '',
          changed: false,
          occursWhere: 'Proof of payment button text when a ticket is scanned',
        },
      ],
    }),
    new Language({
      name: 'en-ca',
      label: 'Canadian english',
      type: 8,
      fields: [
        {
          id: 'Transaction Cancelled',
          translation: 'Transaction Cancelled',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },
        {
          id: 'Please try again',
          translation: 'Please try again',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },        
        {
          id: 'Access closed',
          translation: 'Parking closed',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page when veto scenario is active (Entry & Pay in lane)',
        },
        {
          id: 'Ticket',
          translation: 'Ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page ticket button (Entry)',
        },
        {
          id: 'Push the button to receive a ticket',
          translation: 'Push the button to receive a ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when veto scenario is active (Entry)',
        },
        {
          id: 'Ticket is beeing printed',
          translation: 'Ticket is beeing printed',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is beeing printed (Entry)',
        },
        {
          id: 'Please take your ticket',
          translation: 'Please take your ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is on presenter (Entry)',
        },
        {
          id: 'Please drive trough',
          translation: 'Please drive through',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is taken (Entry)',
        },
        {
          id: 'Swallowed the ticket',
          translation: 'Ticket has been swallowed',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket gets swallowed (Entry)',
        },
        {
          id: 'Problem with printer',
          translation: 'Problem with printer',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when printer issue (Entry)',
        },
        {
          id: 'Please scan your ticket',
          translation: 'Please scan your ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when on loop (Pay in lane)',
        },
        {
          id: 'Ticket OK, please drive trough',
          translation: 'Ticket OK, please drive through',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is OK (Pay in lane)',
        },
        {
          id: 'Please pay, follow the instructions on the pay terminal',
          translation: 'Follow the instructions on the pay terminal',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is not ok and you need to pay (Pay in lane)',
        },
        {
          id: 'Ticket already used',
          translation: 'Ticket already used',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is already used (Pay in lane)',
        },
        {
          id: 'Lost Ticket',
          translation: 'Lost Ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page bottom button lost ticket (Pay in lane)',
        },
        {
          id: 'Payment OK, please drive trough',
          translation: 'Payment OK, please drive through',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment is succesfull (Pay In Lane)',
        },
        {
          id: 'Payment terminal is busy, please wait',
          translation: 'Payment terminal is busy, please wait',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment terminal is busy (Pay In Lane)',
        },
        {
          id: 'No vehicle',
          translation: 'No vehicle detected',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when no car detected',
        },
        {
          id: 'Entry time',
          translation: 'Entry time',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Start time ticket',
          translation: 'Start time of the ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Current time',
          translation: 'Current time',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'The current date and time',
          translation: 'Current date and time',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Free exit time',
          translation: 'Free exit time',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End of free time ticket',
          translation: 'End of free time on the ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time left:',
          translation: 'Free time left:',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time inside parking: ',
          translation: 'Time spent at the parking:',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Price to pay: $ ',
          translation: 'Price to pay: $',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End time ticket',
          translation: 'End time of the ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Detail',
          translation: 'Detail',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail button text when a ticket is scanned',
        },
        {
          id: 'Please follow the instructions on the payterminal to complete your payment.',
          translation:
            'Please follow the instructions on the pay terminal to complete your payment',
          customTranslation: '',
          changed: false,
          occursWhere: 'Text displayed when need to pay',
        },
        {
          id: 'Proof of payment',
          translation: 'Proof of payment',
          customTranslation: '',
          changed: false,
          occursWhere: 'Proof of payment button text when a ticket is scanned',
        },
      ],
    }),
    new Language({
      name: 'en-us',
      label: 'English US',
      type: 9,
      fields: [
        {
          id: 'Transaction Cancelled',
          translation: 'Transaction Canceled',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },
        {
          id: 'Please try again',
          translation: 'Please try again',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },        
        {
          id: 'Access closed',
          translation: 'Parking closed',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page when veto scenario is active (Entry & Pay in lane)',
        },
        {
          id: 'Ticket',
          translation: 'Ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page ticket button (Entry)',
        },
        {
          id: 'Push the button to receive a ticket',
          translation: 'Push the button to receive a ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when veto scenario is active (Entry)',
        },
        {
          id: 'Ticket is beeing printed',
          translation: 'Ticket is beeing printed',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is beeing printed (Entry)',
        },
        {
          id: 'Please take your ticket',
          translation: 'Please take your ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is on presenter (Entry)',
        },
        {
          id: 'Please drive trough',
          translation: 'Please drive through',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is taken (Entry)',
        },
        {
          id: 'Swallowed the ticket',
          translation: 'Ticket has been swallowed',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket gets swallowed (Entry)',
        },
        {
          id: 'Problem with printer',
          translation: 'Problem with printer',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when printer issue (Entry)',
        },
        {
          id: 'Please scan your ticket',
          translation: 'Please scan your ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when on loop (Pay in lane)',
        },
        {
          id: 'Ticket OK, please drive trough',
          translation: 'Ticket OK, please drive through',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is OK (Pay in lane)',
        },
        {
          id: 'Please pay, follow the instructions on the pay terminal',
          translation: 'Follow the instructions on the pay terminal',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is not ok and you need to pay (Pay in lane)',
        },
        {
          id: 'Ticket already used',
          translation: 'Ticket already used',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is already used (Pay in lane)',
        },
        {
          id: 'Lost Ticket',
          translation: 'Lost Ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page bottom button lost ticket (Pay in lane)',
        },
        {
          id: 'Payment OK, please drive trough',
          translation: 'Payment OK, please drive through',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment is succesfull (Pay In Lane)',
        },
        {
          id: 'Payment terminal is busy, please wait',
          translation: 'Payment terminal is busy, please wait',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment terminal is busy (Pay In Lane)',
        },
        {
          id: 'No vehicle',
          translation: 'No vehicle detected',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when no car detected',
        },
        {
          id: 'Entry time',
          translation: 'Entry time',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Start time ticket',
          translation: 'Start time of the ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Current time',
          translation: 'Current time',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'The current date and time',
          translation: 'Current date and time',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Free exit time',
          translation: 'Free exit time',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End of free time ticket',
          translation: 'End of free time of the ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time left:',
          translation: 'Time left:',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time inside parking: ',
          translation: 'Time spent at the parking:',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Price to pay: $ ',
          translation: 'Price to pay: $',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End time ticket',
          translation: 'End time of the ticket',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Detail',
          translation: 'Detail',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail button text when a ticket is scanned',
        },
        {
          id: 'Please follow the instructions on the payterminal to complete your payment.',
          translation:
            'Please follow the instructions on the pay terminal to complete your payment.',
          customTranslation: '',
          changed: false,
          occursWhere: 'Text displayed when need to pay',
        },
        {
          id: 'Proof of payment',
          translation: 'Proof of payment',
          customTranslation: '',
          changed: false,
          occursWhere: 'Proof of payment button text when a ticket is scanned',
        },
      ],
    }),
    new Language({
      name: 'es-us',
      label: 'American Spanish',
      type: 10,
      fields: [
        {
          id: 'Transaction Cancelled',
          translation: 'Transacción cancelada',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },
        {
          id: 'Please try again',
          translation: 'Por favor, inténtelo de nuevo',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when Transaction is cancelled',
        },
        {
          id: 'Access closed',
          translation: 'Estacionamiento cerrado',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page when veto scenario is active (Entry & Pay in lane)',
        },
        {
          id: 'Ticket',
          translation: 'Boleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page ticket button (Entry)',
        },
        {
          id: 'Push the button to receive a ticket',
          translation: 'Presiona el botón para recibir un boleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when veto scenario is active (Entry)',
        },
        {
          id: 'Ticket is beeing printed',
          translation: 'Se está imprimiendo el boleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is beeing printed (Entry)',
        },
        {
          id: 'Please take your ticket',
          translation: 'Por favor tome su boleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is on presenter (Entry)',
        },
        {
          id: 'Please drive trough',
          translation: 'Por favor, conduce',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is taken (Entry)',
        },
        {
          id: 'Swallowed the ticket',
          translation: 'Se ha tragado el boleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket gets swallowed (Entry)',
        },
        {
          id: 'Problem with printer',
          translation: 'Problema con la impresora',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when printer issue (Entry)',
        },
        {
          id: 'Please scan your ticket',
          translation: 'Por favor escanea tu boleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when on loop (Pay in lane)',
        },
        {
          id: 'Ticket OK, please drive trough',
          translation: 'Boleto OK, por favor conduzca',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page top when ticket is OK (Pay in lane)',
        },
        {
          id: 'Please pay, follow the instructions on the pay terminal',
          translation:
            'Por favor pague, siga las instrucciones en el terminal de pago',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is not ok and you need to pay (Pay in lane)',
        },
        {
          id: 'Ticket already used',
          translation: 'Boleta ya usado',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when ticket is already used (Pay in lane)',
        },
        {
          id: 'Lost Ticket',
          translation: 'Boleto perdido',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page bottom button lost ticket (Pay in lane)',
        },
        {
          id: 'Payment OK, please drive trough',
          translation: 'Pago OK, por favor conduzca',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment is succesfull (Pay In Lane)',
        },
        {
          id: 'Payment terminal is busy, please wait',
          translation: 'El terminal de pago está ocupado, por favor espere',
          customTranslation: '',
          changed: false,
          occursWhere:
            'Front page top when payment terminal is busy (Pay In Lane)',
        },
        {
          id: 'No vehicle',
          translation: 'Ningún vehículo detectado',
          customTranslation: '',
          changed: false,
          occursWhere: 'Front page when no car detected',
        },
        {
          id: 'Entry time',
          translation: 'Hora de entrada',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Start time ticket',
          translation: 'Hora de inicio del boleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Current time',
          translation: 'Tiempo actual',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'The current date and time',
          translation: 'Fecha y hora actual',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Free exit time',
          translation: 'Tiempo de salida libre',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End of free time ticket',
          translation: 'Fin del tiempo libre del buleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time left:',
          translation: 'Tiempo restante',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Time inside parking: ',
          translation: 'Tiempo de permanencia dentro del estacionamiento:',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Price to pay: $ ',
          translation: 'Precio a pagar: $',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'End time ticket',
          translation: 'Hora de finalización del buleto',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail text when a ticket is scanned',
        },
        {
          id: 'Detail',
          translation: 'Detalle',
          customTranslation: '',
          changed: false,
          occursWhere: 'Detail button text when a ticket is scanned',
        },
        {
          id: 'Please follow the instructions on the payterminal to complete your payment.',
          translation:
            'Por favor, siga las instrucciones en la terminal de pago para completar su pago.',
          customTranslation: '',
          changed: false,
          occursWhere: 'Text displayed when need to pay',
        },
        {
          id: 'Proof of payment',
          translation: 'Prueba de pago',
          customTranslation: '',
          changed: false,
          occursWhere: 'Proof of payment button text when a ticket is scanned',
        },
      ],
    }),
  ]),
  customFieldSelection: tProp(types.number, 1),
  customFieldId: tProp(types.string, ''),
}) {
  @modelAction
  t1(textToTransLate: string) {
    const rootStore = getRootStore<RootStore>(this);
    const language: Language | undefined = this.languages.find(
      (x) => x.type === rootStore?.settings.firstLanguage
    );
    if (language) {
      const field = language.fields.find((l) => l.id === textToTransLate);
      if (field) {
        if (field.changed) {
          return field.customTranslation;
        }
        return field.translation;
      }
    }
    return '';
  }

  @modelAction
  t2(textToTransLate: string) {
    const rootStore = getRootStore<RootStore>(this);
    if (rootStore?.settings.secondLanguage === 0) return undefined;
    const language: Language | undefined = this.languages.find(
      (x) => x.type === rootStore?.settings.secondLanguage
    );
    if (language) {
      const field = language.fields.find((l) => l.id === textToTransLate);
      if (field) {
        if (field.changed) {
          return field.customTranslation;
        }
        return field.translation;
      }
    }
    return '';
  }

  @modelAction
  t3(textToTransLate: string) {
    const rootStore = getRootStore<RootStore>(this);
    if (rootStore?.settings.thirdLanguage === 0) return undefined;
    const language: Language | undefined = this.languages.find(
      (x) => x.type === rootStore?.settings.thirdLanguage
    );
    if (language) {
      const field = language.fields.find((l) => l.id === textToTransLate);
      if (field) {
        if (field.changed) {
          return field.customTranslation;
        }
        return field.translation;
      }
    }
    return '';
  }

  @modelAction
  setCustomFieldSelection(customFieldSelection: number) {
    this.customFieldSelection = customFieldSelection;
  }

  @modelAction
  setCustomFieldId(customFieldId: string) {
    this.customFieldId = customFieldId;
  }

  @modelAction
  addLanguage(language: Language) {
    this.languages.push(language);
  }

  @modelAction
  removeLanguage(language: any) {
    const index = this.languages.indexOf(language);
    if (index >= 0) {
      this.languages.splice(index, 1);
    }
  }

  @modelAction
  removeLanguagesByIds(arrayOfIds: any) {
    if (typeof arrayOfIds !== 'undefined') {
      arrayOfIds.map((id: string) => {
        return this.removeLanguage(
          this.languages.find((x: { id: string }) => x.id === id)
        );
      });
    }
  }

  @modelAction
  getLanguageById(id: string) {
    return this.languages.find((x) => x.id === id);
  }

  get allKeystone() {
    return this.languages;
  }

  allFields(id: string) {
    const language: Language | undefined = this.languages.find(
      (x) => x.id === id
    );
    if (language) {
      return toJS(language.fields);
    }
    return [];
  }

  @modelAction
  changeSingleCustomTranslation(
    idLanguage: string,
    idRow: string,
    customTranslation: string
  ) {
    const language: Language | undefined = this.languages.find(
      (x) => x.id === idLanguage
    );
    if (language) {
      const languageRow = language.fields.find((x) => x.id === idRow);
      if (languageRow) {
        languageRow.customTranslation = customTranslation;
      }
    }
  }

  @modelAction
  changeSingleCustomTranslationUsed(
    idLanguage: string,
    idRow: string,
    customTranslationUsed: boolean
  ) {
    const language: Language | undefined = this.languages.find(
      (x) => x.id === idLanguage
    );
    if (language) {
      const languageRow = language.fields.find((x) => x.id === idRow);
      if (languageRow) {
        languageRow.changed = customTranslationUsed;
      }
    }
  }

  @modelAction
  changeSingleCustomChanged(
    idLanguage: string,
    idRow: string,
    changed: boolean
  ) {
    const language: Language | undefined = this.languages.find(
      (x) => x.id === idLanguage
    );
    if (language) {
      const languageRow = language.fields.find((x) => x.id === idRow);
      if (languageRow) {
        languageRow.changed = changed;
      }
    }
  }

  singleField(idLanguage: string, idRow: string) {
    const language: Language | undefined = this.languages.find(
      (x) => x.id === idLanguage
    );
    if (language) {
      const languageRow = language.fields.find((x) => x.id === idRow);
      return toJS(languageRow);
    }
    return {};
  }

  get all() {
    const all = [];
    for (let i = 0; i < this.languages.length; i += 1) {
      all.push(this.languages[i]);
    }
    return all;
  }
}
