import 'package:flutter/material.dart';
import 'package:mc_common_app/extensions/string_extensions.dart';
import 'package:mc_common_app/theme/colors.dart';
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';

class DropDownText extends StatelessWidget {
  final String title;
  final bool showDropDownIcon;

  DropDownText({required this.title, required this.showDropDownIcon, super.key});

  @override
  Widget build(BuildContext context) {
    return Row(
      crossAxisAlignment: CrossAxisAlignment.center,
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: [
        title.toText(
          fontSize: 16,
          letterSpacing: -0.64,
        ),
        if (showDropDownIcon)
          const Icon(Icons.keyboard_arrow_down_outlined),
      ],
    ).toContainer(
      isEnabledBorder: true,
      borderRadius: 0,
      borderColor: MyColors.primaryColor,
      borderWidget: 2,
    );
  }
}
