/*
 * Community 组件的组件路由
 */
import 'package:flutter/cupertino.dart';
import 'package:router/componentRouter/facility_service.dart';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

import '../../modules/detail/facility_detail_page.dart';
import '../../modules/facility/facility_page.dart';

part 'facility_component_service.g.dart';

@Riverpod(keepAlive: true)
FacilityService facilityService(Ref ref) {
  return FacilityComponentService();
}

class FacilityComponentService extends FacilityService {
  @override
  void startFacilityPage() {
    FacilityPage.startInstance();
  }

  @override
  void startFacilityDetailPage({required String id}) {
    FacilityDetailPage.startInstance(bookingId: id);
  }
}
