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 AddPhotoButton extends StatelessWidget {
  final VoidCallback onTap;
  const AddPhotoButton({super.key, required this.onTap});

  @override
  Widget build(BuildContext context) {
    final bool isTablet = 100.w >= 600;

    return InkWell(
      onTap: onTap,
      borderRadius: BorderRadius.circular(2.5.w),
      child: Container(
        width: 30.w,
        height: 30.w,
        decoration: BoxDecoration(
          color: Colors.white,
          borderRadius: BorderRadius.circular(2.5.w),
          border: Border.all(
            color: Colors.grey.shade300,
            width: 1,
            style: BorderStyle.solid,
          ),
          boxShadow: [
            BoxShadow(
              color: Colors.black.withOpacity(0.03),
              blurRadius: 4,
              offset: const Offset(0, 2),
            ),
          ],
        ),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Container(
              padding: EdgeInsets.all(2.w),
              decoration: BoxDecoration(
                color: AppColor.primaryColor.withOpacity(
                  0.1,
                ), // Navy transparan
                shape: BoxShape.circle,
              ),
              child: Icon(
                Icons.add_a_photo_rounded,
                color: AppColor.primaryColor,
                size: 7.w,
              ),
            ),
            SizedBox(height: 0.8.h),
            Text(
              "Tambah\nFoto",
              textAlign: TextAlign.center,
              style: TextStyle(
                fontSize: isTablet
                    ? AppFontSize.medium.sp
                    : AppFontSize.small.sp,
                color: Colors.grey[600],
              ),
            ),
          ],
        ),
      ),
    );
  }
}