import 'package:injectable/injectable.dart';
import 'package:krow/core/entity/event_entity.dart';
import 'package:krow/core/sevices/create_event_service/create_event_service_repository.dart';
import 'package:krow/core/sevices/create_event_service/data/create_event_service_api_provider.dart';
import 'package:krow/core/sevices/create_event_service/data/models/create_event_input_model.dart';

@Singleton(as: CreateEventServiceRepository)
class CreateEventServiceRepositoryImpl extends CreateEventServiceRepository {
  final CreateEventServiceApiProvider _apiProvider;

  CreateEventServiceRepositoryImpl(
      {required CreateEventServiceApiProvider apiProvider})
      : _apiProvider = apiProvider;

  @override
  Future<String> createEvent(CreateEventInputModel input) async {
    return _apiProvider.createEvent(input);
  }

  @override
  Future<void> deleteDraft(String id) {
    return _apiProvider.deleteDraft(id);
  }

  @override
  Future<void> publishEvent(String id) {
    return _apiProvider.publishEvent(id);
  }

  @override
  Future<void> updateEvent(CreateEventInputModel input) {
    return _apiProvider.updateEvent(input);
  }
}
