import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:syncrow_web/utils/color_manager.dart';
import 'package:syncrow_web/utils/constants/assets.dart';

class DeviceIconWidget extends StatelessWidget {
  final String? icon;

  const DeviceIconWidget({
    super.key,
    required this.icon,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 50,
      width: 50,
      decoration: BoxDecoration(
        shape: BoxShape.circle,
        color: ColorsManager.textFieldGreyColor,
        border: Border.all(
          color: ColorsManager.neutralGray,
          width: 2,
        ),
      ),
      child: Center(
        child: SvgPicture.asset(
          icon ?? Assets.sensors,
          width: 30,
          height: 30,
        ),
      ),
    );
  }
}
