import 'package:flutter/material.dart';
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
import 'package:rasadyar_chicken/presentation/widget/sale_buy_card_item.dart';
import 'package:rasadyar_core/core.dart';

import 'logic.dart';

class BuyPage extends GetView<BuyLogic> {
  const BuyPage({super.key});

  @override
  Widget build(BuildContext context) {
    return BasePage(
      routes: controller.routesName,
      isBase: true,
      widgets: [
        Row(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Wrap(
              alignment: WrapAlignment.center,
              spacing: 14.w,
              children: [
                saleOrBuyItemCard(
                  title: 'خرید داخل استان',
                  iconPath: Assets.vec.cubeSvg.path,
                  color: AppColor.greenNormalActive,
                  onTap: () {
                    Get.toNamed(ChickenRoutes.buysInProvince, id: 0);
                  },
                ),
                saleOrBuyItemCard(
                  title: 'خرید خارج استان',
                  iconPath: Assets.vec.truckFastSvg.path,
                  color: AppColor.greenNormalActive,
                  onTap: () {
                    Get.toNamed(ChickenRoutes.buysOutOfProvince, id: 0);
                  },
                ),
              ],
            ),
          ],
        ),
      ],
    );
  }
}
