/*
 * Community 组件的组件路由
 */
import 'package:cpt_services/modules/services/services_main_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:router/componentRouter/service_service.dart';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

import '../../modules/services/clean_order_detail/clean_order_detail_page.dart';
import '../../modules/services/services_page.dart';

part 'services_component_service.g.dart';

@Riverpod(keepAlive: true)
ServiceService servicesService(Ref ref) {
  return ServicesComponentService();
}

class ServicesComponentService extends ServiceService {

  @override
  void startServicePage() {
    ServicesMainPage.startInstance();
  }

  @override
  void startServiceOrderDetailPage(String id) {
    CleanOrderDetailPage.startInstance(id: int.parse(id!));
  }
}
