import 'package:cs_resources/theme/theme_config.dart';
import 'package:flutter/material.dart';
import 'package:auto_route/auto_route.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:router/ext/auto_router_extensions.dart';
import 'package:widgets/my_load_image.dart';
import 'package:cs_resources/generated/assets.dart';
import 'package:widgets/my_appbar.dart';
import '../../../router/page/notice_board_page_router.dart';
import '../../notice_board/vm/notice_board_view_model.dart';

@RoutePage()
class NoticeBoardPage extends HookConsumerWidget {
  const NoticeBoardPage({Key? key}) : super(key: key);

  //启动当前页面
  static void startInstance({BuildContext? context}) {
    if (context != null) {
      context.router.push(const NoticeBoardPageRoute());
    } else {
      appRouter.push(const NoticeBoardPageRoute());
    }
  }

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    final _viewModel = ref.read(noticeBoardViewModelProvider.notifier);

    return Scaffold(
      // appBar: MyAppBar.titleBar(context, "Test Title"),
      body: Container(
        child: Column(
          children: [

            MyAppBar.titleBar(context, "Test Title"),
            const Padding(
              padding: EdgeInsets.fromLTRB(15, 0, 15, 30),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Column(children: [
                    MyAssetImage(
                      Assets.noticeBoardAnnouncementIcon,
                      height: 70,
                      width: 70,
                    ),
                    Text(
                      "Announcement",
                      style: TextStyle(
                        color: Colors.black,
                        fontSize: 15,
                        fontWeight: FontWeight.bold,
                        height: 1.5,
                      ),
                    )
                  ]),
                  Column(children: [
                    MyAssetImage(
                      Assets.noticeBoardEventIcon,
                      height: 70,
                      width: 70,
                    ),
                    Text(
                      "Event",
                      style: TextStyle(
                        color: Colors.black,
                        fontSize: 15,
                        fontWeight: FontWeight.bold,
                        height: 1.5,
                      ),
                    )
                  ]),
                  Column(children: [
                    MyAssetImage(
                      Assets.noticeBoardDocumentsIcon,
                      height: 70,
                      width: 70,
                    ),
                    Text(
                      "Documents",
                      style: TextStyle(
                        color: Colors.black,
                        fontSize: 15,
                        fontWeight: FontWeight.bold,
                        height: 1.5,
                      ),
                    )
                  ]),
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}
