enum ERadioStationList
{
	AGGRO_INDUSTRIAL = 0,
	ELECTRO_INDUSTRIAL = 1,
	HIP_HOP = 2,
	AGGRO_TECHNO = 3,
	DOWNTEMPO = 4,
	ATTITUDE_ROCK = 5,
	POP = 6,
	LATINO = 7,
	METAL = 8,
	MINIMAL_TECHNO = 9,
	JAZZ = 10,
	GROWL = 11,
	DARK_STAR = 12,
	IMPULSE_FM = 13,
}

class RadioStationDataProvider
{

	public constexpr static function GetStationsCount() : Int32
	{
		return 14;
	}

	public static function GetRadioStationUIIndex( index : Int32 ) : Int32
	{
		if( index == ( ( Int32 )( ERadioStationList.DOWNTEMPO ) ) )
		{
			return 0;
		}
		if( index == ( ( Int32 )( ERadioStationList.AGGRO_INDUSTRIAL ) ) )
		{
			return 1;
		}
		if( index == ( ( Int32 )( ERadioStationList.GROWL ) ) )
		{
			return 2;
		}
		if( index == ( ( Int32 )( ERadioStationList.JAZZ ) ) )
		{
			return 3;
		}
		if( index == ( ( Int32 )( ERadioStationList.ELECTRO_INDUSTRIAL ) ) )
		{
			return 4;
		}
		if( index == ( ( Int32 )( ERadioStationList.MINIMAL_TECHNO ) ) )
		{
			return 5;
		}
		if( index == ( ( Int32 )( ERadioStationList.METAL ) ) )
		{
			return 6;
		}
		if( index == ( ( Int32 )( ERadioStationList.POP ) ) )
		{
			return 7;
		}
		if( index == ( ( Int32 )( ERadioStationList.IMPULSE_FM ) ) )
		{
			return 8;
		}
		if( index == ( ( Int32 )( ERadioStationList.HIP_HOP ) ) )
		{
			return 9;
		}
		if( index == ( ( Int32 )( ERadioStationList.AGGRO_TECHNO ) ) )
		{
			return 10;
		}
		if( index == ( ( Int32 )( ERadioStationList.LATINO ) ) )
		{
			return 11;
		}
		if( index == ( ( Int32 )( ERadioStationList.ATTITUDE_ROCK ) ) )
		{
			return 12;
		}
		if( index == ( ( Int32 )( ERadioStationList.DARK_STAR ) ) )
		{
			return 13;
		}
		return 0;
	}

	public static function GetRadioStationByUIIndex( index : Int32 ) : ERadioStationList
	{
		if( index == 0 )
		{
			return ERadioStationList.DOWNTEMPO;
		}
		if( index == 1 )
		{
			return ERadioStationList.AGGRO_INDUSTRIAL;
		}
		if( index == 2 )
		{
			return ERadioStationList.GROWL;
		}
		if( index == 3 )
		{
			return ERadioStationList.JAZZ;
		}
		if( index == 4 )
		{
			return ERadioStationList.ELECTRO_INDUSTRIAL;
		}
		if( index == 5 )
		{
			return ERadioStationList.MINIMAL_TECHNO;
		}
		if( index == 6 )
		{
			return ERadioStationList.METAL;
		}
		if( index == 7 )
		{
			return ERadioStationList.POP;
		}
		if( index == 8 )
		{
			return ERadioStationList.IMPULSE_FM;
		}
		if( index == 9 )
		{
			return ERadioStationList.HIP_HOP;
		}
		if( index == 10 )
		{
			return ERadioStationList.AGGRO_TECHNO;
		}
		if( index == 11 )
		{
			return ERadioStationList.LATINO;
		}
		if( index == 12 )
		{
			return ERadioStationList.ATTITUDE_ROCK;
		}
		if( index == 13 )
		{
			return ERadioStationList.DARK_STAR;
		}
		return ERadioStationList.DOWNTEMPO;
	}

	public static function GetStationName( radioStationType : ERadioStationList ) : CName
	{
		switch( radioStationType )
		{
			case ERadioStationList.AGGRO_INDUSTRIAL:
				return 'radio_station_02_aggro_ind';
			case ERadioStationList.ELECTRO_INDUSTRIAL:
				return 'radio_station_03_elec_ind';
			case ERadioStationList.HIP_HOP:
				return 'radio_station_04_hiphop';
			case ERadioStationList.AGGRO_TECHNO:
				return 'radio_station_07_aggro_techno';
			case ERadioStationList.DOWNTEMPO:
				return 'radio_station_09_downtempo';
			case ERadioStationList.ATTITUDE_ROCK:
				return 'radio_station_01_att_rock';
			case ERadioStationList.POP:
				return 'radio_station_05_pop';
			case ERadioStationList.LATINO:
				return 'radio_station_10_latino';
			case ERadioStationList.METAL:
				return 'radio_station_11_metal';
			case ERadioStationList.MINIMAL_TECHNO:
				return 'radio_station_06_minim_techno';
			case ERadioStationList.JAZZ:
				return 'radio_station_08_jazz';
			case ERadioStationList.GROWL:
				return 'radio_station_12_growl_fm';
			case ERadioStationList.DARK_STAR:
				return 'radio_station_13_dark_star';
			case ERadioStationList.IMPULSE_FM:
				return 'radio_station_14_impulse_fm';
		}
		return 'station_none';
	}

	public static function GetStationNameByIndex( index : Int32, optional isUI : Bool ) : CName
	{
		if( index == -1 )
		{
			return 'station_none';
		}
		return GetStationName( ( ( isUI ) ? ( GetRadioStationByUIIndex( index ) ) : ( ( ( ERadioStationList )( index ) ) ) ) );
	}

	public static function GetChannelName( radioStationType : ERadioStationList ) : String
	{
		switch( radioStationType )
		{
			case ERadioStationList.AGGRO_INDUSTRIAL:
				return "Gameplay-Devices-Radio-RadioStationAggroIndie";
			case ERadioStationList.ELECTRO_INDUSTRIAL:
				return "Gameplay-Devices-Radio-RadioStationElectroIndie";
			case ERadioStationList.HIP_HOP:
				return "Gameplay-Devices-Radio-RadioStationHipHop";
			case ERadioStationList.AGGRO_TECHNO:
				return "Gameplay-Devices-Radio-RadioStationAggroTechno";
			case ERadioStationList.DOWNTEMPO:
				return "Gameplay-Devices-Radio-RadioStationDownTempo";
			case ERadioStationList.ATTITUDE_ROCK:
				return "Gameplay-Devices-Radio-RadioStationAttRock";
			case ERadioStationList.POP:
				return "Gameplay-Devices-Radio-RadioStationPop";
			case ERadioStationList.LATINO:
				return "Gameplay-Devices-Radio-RadioStationLatino";
			case ERadioStationList.METAL:
				return "Gameplay-Devices-Radio-RadioStationMetal";
			case ERadioStationList.MINIMAL_TECHNO:
				return "Gameplay-Devices-Radio-RadioStationMinimalTechno";
			case ERadioStationList.JAZZ:
				return "Gameplay-Devices-Radio-RadioStationJazz";
			case ERadioStationList.GROWL:
				return "Gameplay-Devices-Radio-RadioStationGrowlFm";
			case ERadioStationList.DARK_STAR:
				return "Gameplay-Devices-Radio-RadioStationDarkStar";
			case ERadioStationList.IMPULSE_FM:
				return "Gameplay-Devices-Radio-RadioStationImpulseFM";
		}
		return "";
	}

	public static function GetRandomStation() : ERadioStationList
	{
		var station : ERadioStationList;
		station = ( ( ERadioStationList )( RandRange( 0, RadioStationDataProvider.GetStationsCount() ) ) );
		while( station == ERadioStationList.MINIMAL_TECHNO )
		{
			station = ( ( ERadioStationList )( RandRange( 0, RadioStationDataProvider.GetStationsCount() ) ) );
		}
		return station;
	}

	public static function GetNextStationTo( station : ERadioStationList ) : ERadioStationList
	{
		return GetNextStationTo( ( ( Int32 )( station ) ) );
	}

	public static function GetNextStationTo( currentIndex : Int32 ) : ERadioStationList
	{
		var uiCurrentIndex : Int32;
		var uiNextIndex : Int32;
		uiCurrentIndex = GetRadioStationUIIndex( currentIndex );
		uiCurrentIndex = ( ( uiCurrentIndex == 4 ) ? ( 5 ) : ( uiCurrentIndex ) );
		uiNextIndex = ( uiCurrentIndex + 1 ) % GetStationsCount();
		return GetRadioStationByUIIndex( uiNextIndex );
	}

	public static function GetNextStationPocketRadio( currentIndex : Int32 ) : ERadioStationList
	{
		var uiCurrentIndex : Int32;
		var uiNextIndex : Int32;
		if( currentIndex == -1 )
		{
			return GetRadioStationByUIIndex( 0 );
		}
		uiCurrentIndex = GetRadioStationUIIndex( currentIndex );
		uiNextIndex = ( uiCurrentIndex + 1 ) % GetStationsCount();
		return GetRadioStationByUIIndex( uiNextIndex );
	}

	public static function GetPreviousStationTo( station : ERadioStationList ) : ERadioStationList
	{
		return GetPreviousStationTo( ( ( Int32 )( station ) ) );
	}

	public static function GetPreviousStationTo( currentIndex : Int32 ) : ERadioStationList
	{
		var uiCurrentIndex : Int32;
		var uiPrevIndex : Int32;
		uiCurrentIndex = GetRadioStationUIIndex( currentIndex );
		uiCurrentIndex = ( ( uiCurrentIndex == 6 ) ? ( 5 ) : ( uiCurrentIndex ) );
		uiPrevIndex = ( ( uiCurrentIndex - 1 ) + GetStationsCount() ) % GetStationsCount();
		return GetRadioStationByUIIndex( uiPrevIndex );
	}

}

