import 'package:flutter/material.dart';
import 'language_dialog.dart';
import '../../../l10n/app_localizations.dart';

class PreferenceScreen extends StatelessWidget {
  const PreferenceScreen({super.key});

  @override
  Widget build(BuildContext context) {
    final loc = AppLocalizations.of(context);

    return Scaffold(
      appBar: AppBar(
        title: Text(loc.preferences), // Localized "Preferences"
      ),
      body: ListView(
        children: [
          ListTile(
            leading: const Icon(Icons.language),
            title: Text(loc.language), // Localized "Language"
            onTap: () {
              showDialog(
                context: context,
                builder: (context) => LanguageDialog(),
              );
            },
          ),
        ],
      ),
    );
  }
}
