import 'package:canis_care/widgets/side_drawer_tile.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:ternav_icons/ternav_icons.dart';

import '../screens/home_screen.dart';

class SideDrawer extends StatelessWidget {
  const SideDrawer({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Drawer(
      width: MediaQuery.of(context).size.width / 1.5,
      child: ListView(
        shrinkWrap: true,
        children: [
          SizedBox(
            height: 160,
            child: DrawerHeader(
                decoration: BoxDecoration(color: Colors.blue[100]),
                child: Image.asset(
                  "images/symbols/logo.png",
                )),
          ),
          DrawerListTile(
            icon: TernavIcons.lightOutline.profile,
            title: "My Profile",
            onTap: () {},
          ),
          DrawerListTile(
            icon: TernavIcons.bold.scan,
            title: "Identify Disease",
            onTap: () {},
          ),
          DrawerListTile(
            icon: TernavIcons.bold.in_progress,
            title: "Severity Level",
            onTap: () {},
          ),
          DrawerListTile(
            icon: TernavIcons.lightOutline.info_1,
            title: "Disease Information",
            onTap: () {
              // Navigator.of(context).push(
              //   MaterialPageRoute(builder: (context) => const HomePage()),
              // );
            },
          ),
          DrawerListTile(
            icon: TernavIcons.lightOutline.message,
            title: "Chat Service",
            onTap: () {},
          ),
          const SizedBox(
            height: 10,
          ),
          Image.asset(
            "images/symbols/help.png",
            height: 120,
          ),
          const SizedBox(
            height: 10,
          ),
          Container(
            height: 100,
            margin: const EdgeInsets.all(24),
            padding: const EdgeInsets.all(16.0),
            decoration: BoxDecoration(
                color: Colors.blue[100],
                borderRadius: BorderRadius.circular(15)),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.stretch,
              mainAxisAlignment: MainAxisAlignment.spaceAround,
              children: [
                const Text("Upgrade your plan",
                    style: TextStyle(fontWeight: FontWeight.bold)),
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text("Go to Pro",
                        style: TextStyle(
                            color: Colors.blue[900],
                            fontWeight: FontWeight.w800)),
                    InkWell(
                      onTap: () {},
                      child: Container(
                        height: 30,
                        width: 30,
                        decoration: BoxDecoration(
                          border: Border.all(color: const Color(0xff369FFF)),
                          borderRadius: BorderRadius.circular(10),
                        ),
                        child: const Icon(
                          Icons.keyboard_double_arrow_right_rounded,
                          color: Colors.blue,
                        ),
                      ),
                    )
                  ],
                )
              ],
            ),
          ),
        ],
      ),
    );
  }
}
