import 'package:flutter/material.dart';

class SsoIconButton extends StatelessWidget {
  final String assetPath; // Path to your icon asset
  final VoidCallback onPressed;
  final double size;
  final Color backgroundColor;
  final Color? iconColor;
  final BoxShadow? shadow;

  const SsoIconButton({
    super.key,
    required this.assetPath,
    required this.onPressed,
    this.size = 32.0,
    this.backgroundColor = Colors.white,
    this.iconColor,
    this.shadow,
  });

  @override
  Widget build(BuildContext context) {
    return Material(
      color: Colors.transparent,
      clipBehavior: Clip.antiAlias,
      elevation: shadow != null ? 4 : 0,
      shape: const CircleBorder(),
      child: InkWell(
        onTap: onPressed,
        customBorder: const CircleBorder(),
        child: Ink(
          decoration: BoxDecoration(
            color: backgroundColor,
            shape: BoxShape.circle,
            boxShadow: shadow != null ? [shadow!] : [],
          ),
          child: Padding(
            padding: const EdgeInsets.all(8.0),
            child: Image.asset(
              height: 36,
              assetPath,
              color: iconColor,
              fit: BoxFit.contain,
            ),
          ),
        ),
      ),
    );
  }
}
