import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';

class SOAPOpenItems extends StatelessWidget {
  final Function() onTap;
  final String label;

  const SOAPOpenItems({Key? key, required this.onTap, this.label = ''}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: onTap,
      child: Container(
        padding: EdgeInsets.symmetric(vertical: 8, horizontal: 8.0),
        margin: EdgeInsets.symmetric(vertical: 8),
        decoration: BoxDecoration(
          border: Border.all(color: Colors.grey.shade400, width: 0.5),
          borderRadius: BorderRadius.all(
            Radius.circular(8),
          ),
          color: Colors.white,
        ),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Expanded(
                child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                AppText(
                  "$label",
                  fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4.5,
                  fontWeight: FontWeight.w700,
                  color: Color(0xFF2E303A),
                  letterSpacing: -0.44,
                ),
                AppText(
                  "${TranslationBase.of(context).searchHere}",
                  fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
                  fontWeight: FontWeight.w500,
                  color: Color(0xFF575757),
                  letterSpacing: -0.56,
                ),
              ],
            )),
            Icon(
              Icons.add_box_rounded,
              size: 28,
              color: Color(0xFF2E303A),
            )
          ],
        ),
      ),
    );
  }
}
