import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

class AtomImageSvgTheme extends StatelessWidget {
  final String filename;
  final double width;
  final double height;

  const AtomImageSvgTheme(
      {super.key,
      required this.filename,
      required this.width,
      required this.height});

  @override
  Widget build(BuildContext context) {
    final brightness = MediaQuery.of(context).platformBrightness;
    final isDarkMode = brightness == Brightness.dark;
    final path = "assets/images/${isDarkMode ? "dark" : "light"}/$filename.svg";

    return SvgPicture.asset(path, width: width, height: height);
  }
}
