import 'package:flutter/material.dart';

class CustomDrawer extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Drawer(
      child: ListView(
        padding: EdgeInsets.zero,
        children: <Widget>[
          DrawerHeader(
            decoration: BoxDecoration(
              color: Colors.blueAccent,
            ),
            child: Text(
              'AfterWork',
              style: TextStyle(
                color: Colors.white,
                fontSize: 24,
              ),
            ),
          ),
          ListTile(
            leading: Icon(Icons.home),
            title: Text('Accueil'),
            onTap: () {
              Navigator.pushNamed(context, '/home');
            },
          ),
          ListTile(
            leading: Icon(Icons.event),
            title: Text('Événements'),
            onTap: () {
              Navigator.pushNamed(context, '/event');
            },
          ),
          ListTile(
            leading: Icon(Icons.camera_alt),  // Icône mise à jour pour la story
            title: Text('Story'),
            onTap: () {
              Navigator.pushNamed(context, '/story');
            },
          ),
        ],
      ),
    );
  }
}
