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';
import 'package:satu/shared/shared_styles.dart';
import 'package:satu/widgets/dialog/modal_select_dialog.dart';

class ContragentSelectBar extends StatelessWidget {
  final String value;

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

  @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: 8.w, horizontal: 15.w ),
                child: Row(
                  children: [
                    Expanded(
                        child: Column(
                          crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        Text(
                          'Контрагент',
                          style: TextStyle(fontSize: ScreenUtil().setSp(10), color: placeholderColor),
                        ),
                        Text(
                          value,
                          style: TextStyle(fontSize: ScreenUtil().setSp(14), color: textColor),
                        ),
                      ],
                    )),
                    Center(
                      child: Icon(Icons.arrow_forward_ios, size: ScreenUtil().setSp(14),),
                    )
                  ],
                ),
              ))),
    );
  }
}
