import 'package:flutter/material.dart';
import '../contacts/contact_state.dart';
import '../contacts/widgets/alphabet_scroll_page.dart';

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

  @override
  Widget build(BuildContext context) {
    final contactState = ContactState.of(context);
    return Scaffold(
      body: contactState.loading
          ? const Center(child: CircularProgressIndicator())
          : AlphabetScrollPage(
              scrollOffset: contactState.scrollOffset,
              contacts: contactState.contacts,
            ),
    );
  }
}
