import 'package:flutter/material.dart';
import 'package:gap/gap.dart';
import 'package:pharmacy_mobile/widgets/text_widget.dart';

class DescriptionMenuWidget extends StatelessWidget {
  final String title;
  final String description;
  final double margin;

  const DescriptionMenuWidget({super.key, required this.title, required this.margin, required this.description});

  @override
  Widget build(BuildContext context) {
    return Container(
      width: MediaQuery.of(context).size.width,
      padding: const EdgeInsets.only(top: 20, bottom: 12),
      decoration:
          BoxDecoration(borderRadius: BorderRadius.circular(12), color: const Color.fromRGBO(255, 255, 255, 0.275)),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.start,
        children: [
          const Gap(24),
          Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              TextWidget(
                text: title,
                size: 16,
                bold: true,
              ),
              const Gap(4),
              TextWidget(
                text: description,
                size: 12,
              ),
              const Gap(8),
              SizedBox(
                width: MediaQuery.of(context).size.width - 72,
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.end,
                  children: [
                    Container(
                      decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(20), color: const Color.fromRGBO(62, 21, 68, 0.702)),
                      padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
                      child: const TextWidget(
                        text: "Tap to read more",
                        size: 8,
                      ),
                    ),
                  ],
                ),
              )
            ],
          ),
        ],
      ),
    );
  }
}
