import 'package:flutter/material.dart';
import 'package:niogu_ecommerce_v1/core/constant/app_font_size.dart';
import 'package:sizer/sizer.dart';

class CustomEmptyScreen extends StatelessWidget {
  final IconData icon;
  final String title;
  final String? subtitle;
  final double? height;
  const CustomEmptyScreen({
    super.key,
    required this.icon,
    required this.title,
    this.subtitle,
    this.height,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      height: height ?? 20.h,
      margin: EdgeInsets.symmetric(horizontal: 4.w, vertical: 2.h),
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(2.5.w),
      ),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Icon(icon, color: Colors.grey.shade300, size: 40.sp),
          SizedBox(height: 1.h),
          Text(
            title,
            style: TextStyle(
              fontWeight: FontWeight.bold,
              fontSize: AppFontSize.small.sp,
              color: Colors.grey.shade700,
            ),
          ),
          if (subtitle != null)
            Text(
              subtitle!,
              style: TextStyle(
                fontSize: (AppFontSize.small - 1.25).sp,
                color: Colors.grey.shade700,
              ),
            ),
        ],
      ),
    );
  }
}
