import 'package:flutter_svg/flutter_svg.dart';

import '../../../../../../food_delivery_client.dart';

class WHomeHeader extends StatelessWidget {
  const WHomeHeader({super.key});

  @override
  Widget build(BuildContext context) {
    return BlocBuilder<HomeBloc, HomeState>(
      builder: (context, state) {
        return DecoratedBox(
          decoration: BoxDecoration(color: AppColors.cFFFFFF),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              15.verticalSpace,
              Stack(
                alignment: AlignmentGeometry.center,
                children: [
                  TextButton(
                    onPressed: () {},
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.center,
                      mainAxisSize: MainAxisSize.min,
                      children: [
                        SvgPicture.asset(AppIcons.icLocation, height: 20),
                        8.horizontalSpace,
                        Text("London Hall", style: AppTextStyles.size18Medium),
                        5.horizontalSpace,
                        SvgPicture.asset(AppIcons.icArrowBottom),
                      ],
                    ),
                  ),
                  Align(
                    alignment: AlignmentGeometry.topRight,
                    child: IconButton(
                      onPressed: () {
                        context.push(
                          Routes.filters,
                          extra: context.read<HomeBloc>(),
                        );
                      },
                      icon: SvgPicture.asset(
                        AppIcons.icFilter,
                        height: 36,
                        width: 36,
                      ),
                    ),
                  ),
                ],
              ),
            ],
          ).paddingSymmetric(horizontal: 15),
        );
      },
    );
  }
}
