import 'package:flutter/material.dart';
import 'package:niogu_app/core/constants/app_color.dart';
import 'package:niogu_app/core/constants/app_font_size.dart';
import 'package:sizer/sizer.dart';

class ReportHeader extends StatelessWidget {
  final String rightTitle;
  final String leftTitle;
  const ReportHeader({super.key, required this.rightTitle, required this.leftTitle});

  @override
  Widget build(BuildContext context) {
    final bool isTablet = 100.w >= 600;
    return Padding(
      padding: EdgeInsets.fromLTRB(5.w, 1.h, 5.w, 1.h),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          Text(
            rightTitle,
            style: TextStyle(
              fontSize: isTablet ? AppFontSize.medium.sp : AppFontSize.small.sp,
              fontWeight: FontWeight.bold,
              color: Colors.black87,
            ),
          ),

          TextButton.icon(
            onPressed: () {},
            style: TextButton.styleFrom(
              foregroundColor: AppColor.primaryColor,
              padding: EdgeInsets.symmetric(horizontal: 4.w),
            ),
            icon: Icon(Icons.download, size: 5.w),
            label: Text(
              leftTitle,
              style: TextStyle(
                fontWeight: FontWeight.bold,
                fontSize: isTablet
                    ? AppFontSize.medium.sp
                    : AppFontSize.small.sp,
              ),
            ),
          ),
        ],
      ),
    );
  }
}