/*
 * Community 组件的组件路由
 */
import 'package:cpt_form/modules/detail/form_detail_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:router/componentRouter/form_service.dart';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

import '../../modules/form/form_page.dart';

part 'form_component_service.g.dart';

@Riverpod(keepAlive: true)
FormService formService(Ref ref) {
  return FormComponentService();
}

class FormComponentService extends FormService {
  @override
  void startFormPage() {
    FormPage.startInstance();
  }

  @override
  void startFormDetailPage(String estateFormId, String taskId, String typeId) {
    FormDetailPage.startInstance(estateFormId: estateFormId, taskId: taskId, type: typeId);
  }
}
