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

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

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      height: 200,
      child: ListView.separated(
        shrinkWrap: true,
        scrollDirection: Axis.horizontal,
        padding: EdgeInsets.symmetric(horizontal: 20),
        physics: const AlwaysScrollableScrollPhysics(),
        itemBuilder: (context, index) => WFeaturedStoresItem(),
        separatorBuilder: (context, index) => 7.horizontalSpace,
        itemCount: 10,
      ),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: () {},
      borderRadius: AppUtils.kBorderRadius16,
      child: Ink(
        height: 200,
        width: 165,
        decoration: BoxDecoration(
          color: AppColors.cEFF3FE,
          borderRadius: AppUtils.kBorderRadius16,
        ),
        child: Column(
          spacing: 20,
          children: [
            Expanded(
              child: CachedNetworkImage(imageUrl: AppLocaleKeys.imageUrl),
            ),

            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [
                  Text("7Eleven", style: AppTextStyles.size16Medium),
                  Text(
                    context.loc.opensAt("10:00 AM"),
                    textAlign: TextAlign.center,
                    style: AppTextStyles.size14Regular.copyWith(
                      color: AppColors.c6B6B6B,

                    ),
                  ),
                ],
              ),
            ),
          ],
        ).paddingAll(20),
      ),
    );
  }
}
