/*
 * Copyright (c)  04 Feb 2025, Andrew Grant of Carrick Software .
 * All rights reserved.
 */

package scot.carricksoftware.grants;

import org.springframework.stereotype.Component;
import scot.carricksoftware.grants.commands.places.countries.CountryCommandImpl;
import scot.carricksoftware.grants.commands.places.organisations.OrganisationCommand;
import scot.carricksoftware.grants.commands.places.organisations.OrganisationCommandImpl;
import scot.carricksoftware.grants.commands.places.places.PlaceCommand;
import scot.carricksoftware.grants.commands.places.places.PlaceCommandImpl;
import scot.carricksoftware.grants.commands.places.countries.CountryCommand;
import scot.carricksoftware.grants.commands.places.regions.RegionCommand;
import scot.carricksoftware.grants.commands.places.regions.RegionCommandImpl;
import scot.carricksoftware.grants.domains.places.Country;
import scot.carricksoftware.grants.domains.places.Organisation;
import scot.carricksoftware.grants.domains.places.Place;
import scot.carricksoftware.grants.domains.places.Region;

import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;

@SuppressWarnings("unused")
@Component
public class GenerateRandomPlaceValues {

    @SuppressWarnings("unused")
    public static Place GetRandomPlace() {
        Place place = new Place();
        place.setName(GetRandomString());
        place.setRegion(GetRandomRegion());
        return place;
    }

    @SuppressWarnings("unused")
    public static PlaceCommand GetRandomPlaceCommand() {
        PlaceCommand placeCommand = new PlaceCommandImpl();
        placeCommand.setName(GetRandomString());
        placeCommand.setRegion(GetRandomRegion());
        return placeCommand;
    }

    public static Country GetRandomCountry() {
        Country country = new Country();
        country.setName(GetRandomString());
        return country;
    }

    @SuppressWarnings("unused")
    public static CountryCommand GetRandomCountryCommand() {
        CountryCommand countryCommand = new CountryCommandImpl();
        countryCommand.setName(GetRandomString());
        return countryCommand;
    }

    public static Region GetRandomRegion() {
        Region region = new Region();
        region.setName(GetRandomString());
        region.setCountry(GetRandomCountry());
        return region;
    }

    @SuppressWarnings("unused")
    public static RegionCommand GetRandomRegionCommand() {
        RegionCommand regionCommand = new RegionCommandImpl();
        regionCommand.setName(GetRandomString());
        regionCommand.setCountry(GetRandomCountry());
        return regionCommand;
    }

    @SuppressWarnings("unused")
    public static Organisation GetRandomOrganisation() {
        Organisation organisation = new Organisation();
        organisation.setName(GetRandomString());
        return organisation;
    }

    @SuppressWarnings("unused")
    public static OrganisationCommand GetRandomOrganisationCommand() {
        OrganisationCommand organisationCommand = new OrganisationCommandImpl();
        organisationCommand.setName(GetRandomString());
        return organisationCommand;
    }


}
