import 'package:flutter/widgets.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

part 'language.freezed.dart';

@freezed
abstract class Language with _$Language {
  factory Language({
    required Locale locale,
    required String name,
    required String nativeName,
    required String path,
  }) = _Language;

  const Language._();

  factory Language.empty() => Language(
    locale: const Locale('id', 'ID'),
    name: '',
    path: '',
    nativeName: '',
  );

  factory Language.indonesian() => Language(
    locale: const Locale('id', 'ID'),
    name: 'Indonesian',
    nativeName: 'Bahasa Indonesia',
    path: '🇮🇩',
  );

  factory Language.english() => Language(
    locale: const Locale('en', 'US'),
    name: 'English',
    path: '🇺🇸',
    nativeName: 'English',
  );
}
