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

import '../../../../common/theme/theme.dart';
import 'feature_tile.dart';

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

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: const EdgeInsets.symmetric(
        vertical: 24,
        horizontal: AppValue.padding,
      ).copyWith(bottom: 0),
      padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 10),
      decoration: BoxDecoration(
        color: AppColor.white,
        borderRadius: BorderRadius.circular(AppValue.radius),
        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.start,
            children: [
              HomeFeatureTile(
                title: 'Penjualan',
                color: const Color(0xFF4CAF50),
                icon: LineIcons.receipt,
                onTap: () {},
              ),
              HomeFeatureTile(
                title: 'Pembelian',
                color: const Color(0xFF2196F3),
                icon: LineIcons.shoppingCart,
                onTap: () {},
              ),
              HomeFeatureTile(
                title: 'Biaya',
                color: const Color(0xFF8BC34A),
                icon: LineIcons.moneyCheck,
                onTap: () {},
              ),
              HomeFeatureTile(
                title: 'Product',
                color: const Color(0xFFFF9800),
                icon: LineIcons.box,
                onTap: () {},
              ),
            ],
          ),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceAround,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              HomeFeatureTile(
                title: 'Laporan',
                color: const Color(0xFFE91E63),
                icon: LineIcons.pieChart,
                onTap: () {},
              ),
              HomeFeatureTile(
                title: 'Kas & Bank',
                color: const Color(0xFF9C27B0),
                icon: LineIcons.university,
                onTap: () {},
              ),
              HomeFeatureTile(
                title: 'Aset Tetap',
                color: const Color(0xFF00BCD4),
                icon: LineIcons.businessTime,
                onTap: () {},
              ),
              HomeFeatureTile(
                title: 'Kontak',
                color: const Color(0xFFFF5722),
                icon: LineIcons.userPlus,
                onTap: () {},
              ),
            ],
          ),
        ],
      ),
    );
  }
}
