import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';

import '../../../../common/extension/extension.dart';
import '../../../../common/theme/theme.dart';
import '../../../components/assets/assets.gen.dart';
import '../../../router/app_router.gr.dart';
import 'feature_tile.dart';

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

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: const EdgeInsets.symmetric().copyWith(bottom: 0),
      padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 10),
      decoration: BoxDecoration(
        color: AppColor.white,
        boxShadow: [
          BoxShadow(
            color: Colors.black.withOpacity(0.04),
            blurRadius: 10,
            offset: const Offset(0, 5),
            spreadRadius: 0,
          ),
        ],
      ),
      child: Column(
        children: [
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceAround,
            crossAxisAlignment: CrossAxisAlignment.end,
            children: [
              HomeFeatureTile(
                title: context.lang.sales,
                iconPath: Assets.icons.icReportSales.path,
                onTap: () => context.router.push(SalesRoute()),
              ),
              HomeFeatureTile(
                title: context.lang.purchase,
                iconPath: Assets.icons.icReportPurchase.path,
                onTap: () => context.router.push(PurchaseRoute()),
              ),
              HomeFeatureTile(
                title: context.lang.profit_loss,
                iconPath: Assets.icons.icReportProfitLoss.path,
                onTap: () => context.router.push(FinanceRoute()),
                isHighlighted: true,
              ),
              HomeFeatureTile(
                title: context.lang.stock,
                iconPath: Assets.icons.icReportStock.path,
                onTap: () => context.router.push(InventoryRoute()),
              ),
              HomeFeatureTile(
                title: context.lang.product,
                iconPath: Assets.icons.icReportProduct.path,
                onTap: () => context.router.push(ProductRoute()),
              ),
            ],
          ),
          // Row(
          //   mainAxisAlignment: MainAxisAlignment.spaceAround,
          //   crossAxisAlignment: CrossAxisAlignment.start,
          //   children: [
          //     HomeFeatureTile(
          //       title: context.lang.form,
          //       color: const Color(0xFFE91E63),
          //       icon: LineIcons.fileAlt,
          //       onTap: () => context.router.push(DailyTasksFormRoute()),
          //     ),
          //     HomeFeatureTile(
          //       title: context.lang.schedule,
          //       color: const Color(0xFF9C27B0),
          //       icon: LineIcons.calendar,
          //       onTap: () => context.router.push(ScheduleRoute()),
          //     ),
          //     HomeFeatureTile(
          //       title: context.lang.inventory,
          //       color: const Color(0xFF00BCD4),
          //       icon: LineIcons.archive,
          //       onTap: () => context.router.push(InventoryRoute()),
          //     ),
          //     HomeFeatureTile(
          //       title: context.lang.customer,
          //       color: const Color(0xFFFF5722),
          //       icon: LineIcons.userPlus,
          //       onTap: () => context.router.push(CustomerRoute()),
          //     ),
          //   ],
          // ),
        ],
      ),
    );
  }
}
