import 'package:comwell_key_app/themes/light_theme.dart';
import 'package:flutter/material.dart';

class ComwellRadioButton extends StatelessWidget {
  final bool selected;
  final void Function()? onTap;
  const ComwellRadioButton({super.key, required this.selected, this.onTap});

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: onTap,
      child: AnimatedContainer(
        duration: const Duration(milliseconds: 50),
        curve: Curves.easeInOut,
        width: 24,
        height: 24,
        decoration: BoxDecoration(
          shape: BoxShape.circle,
          border: Border.all(
            color: selected ? sandColor : colorDivider, 
            width: selected ? 2.0 : 1.5,
          ),
        ),
        child: selected
            ? Center(
                child: Container(
                  width: 16,
                  height: 16,
                  decoration: const BoxDecoration(
                    color: sandColor,
                    shape: BoxShape.circle,
                  ),
                ),
              )
            : null,
      ),
    );
  }
}