import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:satu/core/services/navigator_service.dart';
import 'package:satu/core/utils/locator.dart';
import 'package:satu/routes/route_names.dart';
import 'package:satu/shared/app_colors.dart';

class ContragentSelectBar extends StatelessWidget {

  const ContragentSelectBar({required this.value, Key? key}) : super(key: key);
  final String value;

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(color: whiteColor),
      child: Material(
          type: MaterialType.transparency,
          child: InkWell(
              onTap: () {
                locator<NavigatorService>().push(contragentSelectViewRoute);
              },
              child: Padding(
                padding: EdgeInsets.symmetric(vertical:08.w, horizontal: 15.w),
                child: Row(
                  children: [
                    Expanded(
                        child: Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        const Text(
                          'Контрагент',
                          style:
                              TextStyle(fontSize: 10, color: placeholderColor),
                        ),
                        Text(
                          value,
                          style:
                              const TextStyle(fontSize: 14, color: textColor),
                        ),
                      ],
                    )),
                    const Center(
                      child: Icon(
                        Icons.arrow_forward_ios,
                        size: 14,
                      ),
                    )
                  ],
                ),
              ))),
    );
  }
}
