import 'package:fis_ui/index.dart';
import 'package:flyinsono/pages/schedule/calendar/controller.dart';
import 'package:flyinsono/pages/schedule/calendar/calendar_page/calendar_left_panel.dart';
import 'package:flyinsono/pages/schedule/calendar/calendar_page/calendar_main_panel.dart';
import 'package:flyinsono/pages/schedule/calendar/popup_layer/global_click_listener.dart';
import 'package:flyinsono/pages/schedule/calendar/popup_layer/popup_layer_controller.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class CalendarPage extends FStatefulWidget {
  const CalendarPage({super.key});

  @override
  FState<CalendarPage> createState() => _CalendarPageState();
}

class _CalendarPageState extends FState<CalendarPage> {
  final PopupLayerController _popupLayerController =
      Get.put<PopupLayerController>(PopupLayerController());
  @override
  void initState() {
    super.initState();
    Get.put<CalendarController>(CalendarController());
  }

  @override
  FWidget build(BuildContext context) {
    return GlobalClickListener(
      controller: _popupLayerController,
      child: FRow(
        children: const <FWidget>[
          CalendarLeftPanel(),
          FExpanded(child: CalendarMainPanel()),
        ],
      ),
    );
  }
}
