import 'dart:async';

import 'package:equatable/equatable.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

part '{{#snakeCase}}{{feature_name}}{{/snakeCase}}_event.dart';
part '{{#snakeCase}}{{feature_name}}{{/snakeCase}}_state.dart';

/// {@template {{#snakeCase}}{{feature_name}}{{/snakeCase}}_bloc}
/// {{#pascalCase}}{{feature_name}}{{/pascalCase}}Bloc description
/// {@endtemplate}
class {{#pascalCase}}{{feature_name}}{{/pascalCase}}Bloc extends Bloc<{{#pascalCase}}{{feature_name}}{{/pascalCase}}Event, {{#pascalCase}}{{feature_name}}{{/pascalCase}}State> {
  /// {@macro {{#snakeCase}}{{feature_name}}{{/snakeCase}}_bloc}
  {{#pascalCase}}{{feature_name}}{{/pascalCase}}Bloc() : super(const {{#pascalCase}}{{feature_name}}{{/pascalCase}}Initial()) {
    on<Custom{{#pascalCase}}{{feature_name}}{{/pascalCase}}Event>(_onCustom{{#pascalCase}}{{feature_name}}{{/pascalCase}}Event);
  }

  FutureOr<void> _onCustom{{#pascalCase}}{{feature_name}}{{/pascalCase}}Event(
    Custom{{#pascalCase}}{{feature_name}}{{/pascalCase}}Event event,
    Emitter<{{#pascalCase}}{{feature_name}}{{/pascalCase}}State> emit,
  ) async {
    // TODO(wyatt): Add custom UI logic
    const _ = 1 + 1;
    return;
  }
}
