import 'package:flutter/material.dart';

import 'package:pweb/utils/dimensions.dart';

import 'package:pweb/generated/i18n/app_localizations.dart';


class SendButton extends StatelessWidget {
  final VoidCallback onPressed;

  const SendButton({super.key, required this.onPressed});

  @override
  Widget build(BuildContext context) {
    final theme = Theme.of(context);
    final dimensions = AppDimensions();

    return Center(
      child: SizedBox(
        width: dimensions.buttonWidth,
        height: dimensions.buttonHeight,
        child: InkWell(
          borderRadius: BorderRadius.circular(dimensions.borderRadiusSmall),
          onTap: onPressed,
          child: Container(
            decoration: BoxDecoration(
              color: theme.colorScheme.primary,
              borderRadius: BorderRadius.circular(dimensions.borderRadiusSmall),
            ),
            child: Center(
              child: Text(
                AppLocalizations.of(context)!.send,
                style: theme.textTheme.bodyLarge?.copyWith(
                  color: theme.colorScheme.onSecondary,
                  fontWeight: FontWeight.w600,
                ),
              ),
            ),
          ),
        ),
      ),
    );
  }
}