import 'dart:ui' as ui;

class KioskLanguageConfigModel {
  int? id;
  int? languageID;
  ui.TextDirection languageTextDirection;
  String? languageName;
  String? languageNameN;
  String? shortForm;
  String? yourTicketNoText;
  String? waitForYourTurnText;
  String? thankYouText;
  String? goBackToMainPage;
  bool? isActive;

  KioskLanguageConfigModel({
    required this.id,
    required this.languageID,
    this.languageTextDirection = ui.TextDirection.ltr,
    required this.languageName,
    required this.languageNameN,
    required this.shortForm,
    required this.yourTicketNoText,
    required this.waitForYourTurnText,
    required this.thankYouText,
    required this.goBackToMainPage,
    required this.isActive,
  });

  factory KioskLanguageConfigModel.fromJson(Map<String, dynamic> json) {
    return KioskLanguageConfigModel(
      id: json['id'],
      languageID: json['languageID'],
      languageTextDirection: ((json['languageTextDirection'] == null || json['languageTextDirection'] == 0 ) ? ui.TextDirection.ltr : ui.TextDirection.rtl),
      // 0 for English and 1 for Others
      languageName: json['languageName'],
      languageNameN: json['languageNameN'],
      shortForm: json['shortForm'],
      yourTicketNoText: json['yourTicketNoText'],
      waitForYourTurnText: json['waitForYourTurnText'],
      thankYouText: json['thankYouText'],
      goBackToMainPage: json['goBackToMainPage'],
      isActive: json['isActive'],
    );
  }
}
