import 'package:flutter/material.dart';
import 'package:intl/intl.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 HeaderStockInProductionSection extends StatelessWidget {
  final DateTime selectedDate;
  final String currentUserName;
  final VoidCallback onTap;
  const HeaderStockInProductionSection({
    super.key,
    required this.selectedDate,
    required this.currentUserName,
    required this.onTap,
  });

  @override
  Widget build(BuildContext context) {
    final bool isTablet = 100.w >= 600;
    return Container(
      padding: EdgeInsets.all(4.w),
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.circular(2.5.w),
        border: Border.all(color: Colors.grey.shade200),
        boxShadow: [
          BoxShadow(
            color: Colors.black.withOpacity(0.02),
            blurRadius: 5,
            offset: const Offset(0, 2),
          ),
        ],
      ),
      child: Column(
        children: [
          InkWell(
            onTap: onTap,
            child: Row(
              children: [
                Container(
                  padding: EdgeInsets.all(2.w),
                  decoration: BoxDecoration(
                    color: Colors.blue[50],
                    borderRadius: BorderRadius.circular(2.w),
                  ),
                  child: Icon(
                    Icons.calendar_today_rounded,
                    color: AppColor.primaryColor,
                    size: 5.w,
                  ),
                ),
                SizedBox(width: 3.w),
                Expanded(
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Text(
                        "Tanggal Produksi",
                        style: TextStyle(
                          color: Colors.grey[600],
                          fontSize: isTablet
                              ? AppFontSize.medium.sp
                              : AppFontSize.small.sp,
                        ),
                      ),
                      SizedBox(height: 0.5.h),
                      Text(
                        DateFormat('EEEE, dd MMMM yyyy').format(selectedDate),
                        style: TextStyle(
                          fontWeight: FontWeight.bold,
                          fontSize: isTablet
                              ? AppFontSize.medium.sp
                              : AppFontSize.small.sp,
                        ),
                      ),
                    ],
                  ),
                ),
                Icon(Icons.edit_outlined, size: 5.w, color: Colors.grey[400]),
              ],
            ),
          ),
          /**
          Divider(height: 3.h, color: Colors.grey[100]),
          Row(
            children: [
              Container(
                padding: EdgeInsets.all(2.w),
                decoration: BoxDecoration(
                  color: Colors.orange[50],
                  borderRadius: BorderRadius.circular(2.w),
                ),
                child: Icon(
                  Icons.person_outline_rounded,
                  color: Colors.orange,
                  size: 5.w,
                ),
              ),
              SizedBox(width: 3.w),
              Expanded(
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Text(
                      "Penanggung Jawab",
                      style: TextStyle(
                        color: Colors.grey[600],
                        fontSize: isTablet
                            ? AppFontSize.medium.sp
                            : AppFontSize.small.sp,
                      ),
                    ),
                    SizedBox(height: 0.5.h),
                    Text(
                      currentUserName,
                      style: TextStyle(
                        fontWeight: FontWeight.bold,
                        fontSize: isTablet
                            ? AppFontSize.medium.sp
                            : AppFontSize.small.sp,
                      ),
                    ),
                  ],
                ),
              ),
            ],
          ),
          */
        ],
      ),
    );
  }
}
