package de.effigenix.infrastructure.config;

import de.effigenix.application.shared.ListCountries;
import de.effigenix.infrastructure.shared.InMemoryCountryRepository;
import de.effigenix.shared.common.CountryRepository;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SharedUseCaseConfiguration {

    @Bean
    public CountryRepository countryRepository() {
        return new InMemoryCountryRepository();
    }

    @Bean
    public ListCountries listCountries(CountryRepository countryRepository) {
        return new ListCountries(countryRepository);
    }
}
