import 'package:flutter/material.dart';
import 'package:flutter_progress_hud/flutter_progress_hud.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:flutter_zoom_drawer/flutter_zoom_drawer.dart';
import 'package:fluttericon/font_awesome5_icons.dart';
import 'package:unit2/model/offline/offline_profile.dart';
import 'package:unit2/screens/offline/passo/admin/admin_main_screen.dart';
import 'package:unit2/screens/offline/passo/passo_offline_dashboard.dart';

import '../../../theme-data.dart/colors.dart';
import '../../unit2/homepage.dart/components/dashboard/shared_card_label.dart';

class PassoOfflineMainScreen extends StatelessWidget {
  final OfflineProfile offlineProfile;
  const PassoOfflineMainScreen(this.offlineProfile, {super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          backgroundColor: primary,
          title: const Text("Rpass Offline Home"),
          centerTitle: true,
        ),
        body: Padding(
            padding: const EdgeInsets.all(24),
            child: GridView.count(
                shrinkWrap: true,
                crossAxisCount: 4,
                crossAxisSpacing: 8,
                mainAxisSpacing: 10,
                physics: const BouncingScrollPhysics(),
                padding: const EdgeInsets.symmetric(vertical: 5, horizontal: 5),
                children: [
                  CardLabel(
                      icon: FontAwesome5.tools,
                      title: "Admin Settings",
                      ontap: () {
                        Navigator.push(context,
                            MaterialPageRoute(builder: ((context) {
                          return const AdminMainScreen();
                        })));
                      }),
                  CardLabel(
                      icon: FontAwesome5.eye,
                      title: "Field Surveyor",
                      ontap: () {
                        Navigator.push(context,
                            MaterialPageRoute(builder: ((context) {
                          return PassoOfflineDashBoard(offlineProfile);
                        })));
                      }),
                ])));
  }
}
