import 'package:flutter/material.dart';
import 'package:fotodocumentation/l10n/app_localizations.dart';
import 'package:fotodocumentation/pages/ui_utils/general_style.dart';
import 'package:fotodocumentation/utils/di_container.dart';

class PictureDeleteDialog extends StatelessWidget {
  GeneralStyle get _generalStyle => DiContainer.get();

  const PictureDeleteDialog({super.key});

  @override
  Widget build(BuildContext context) {
    return AlertDialog(
      title: Text(
        AppLocalizations.of(context)!.deleteDialogTitle,
        style: TextStyle(
          fontFamily: _generalStyle.fontFamily,
          fontWeight: FontWeight.bold,
          color: _generalStyle.secondaryWidgetBackgroundColor,
        ),
      ),
      content: Text(
        AppLocalizations.of(context)!.deleteDialogText,
        style: TextStyle(
          fontFamily: _generalStyle.fontFamily,
          color: _generalStyle.secondaryTextLabelColor,
        ),
      ),
      actions: [
        TextButton(
          key: Key("picture_delete_no"),
          onPressed: () => Navigator.of(context).pop(false),
          child: Text(
            AppLocalizations.of(context)!.deleteDialogButtonCancel,
            style: TextStyle(
              fontFamily: _generalStyle.fontFamily,
              color: _generalStyle.secondaryTextLabelColor,
            ),
          ),
        ),
        TextButton(
          key: Key("picture_delete_yes"),
          onPressed: () => Navigator.of(context).pop(true),
          child: Text(
            AppLocalizations.of(context)!.deleteDialogButtonApprove,
            style: TextStyle(
              fontFamily: _generalStyle.fontFamily,
              color: _generalStyle.errorColor,
            ),
          ),
        ),
      ],
    );
  }
}
