import 'package:cargocalculaterapp/core/theme/colors/app_colors.dart';
import 'package:flutter/material.dart';
import '../../../../../../core/theme/app_text_styles.dart';
import '../../../../../../core/utils/app_utils.dart';

class LanguageButtonWidget extends StatelessWidget {
  const LanguageButtonWidget({
    super.key,

    required this.name,
    required this.onTap,
    required this.image,
  });

  final String image;
  final String name;
  final Function() onTap;

  @override
  Widget build(BuildContext context) {
    return Expanded(
      child: InkWell(
        borderRadius: AppUtils.kBorderRadius16,
        onTap: onTap,
        child: Ink(
          padding: AppUtils.kPaddingVer16,
          decoration: BoxDecoration(
            borderRadius: AppUtils.kBorderRadius12,
            color: LightThemeColors.white20Transparent,
            border: Border.all(color: LightThemeColors.white40Transparent),
          ),
          child: Row(
           mainAxisAlignment: MainAxisAlignment.center,
            children: [
              CircleAvatar(
                maxRadius: 10,
                minRadius: 10,
                child: Image.asset(image, width: 20, height: 20),
              ),
              AppUtils.kBoxWidth8,
              Text(name, style: AppTextStyles.languageBig),
            ],
          ),
        ),
      ),
    );
  }
}
