import class IScriptable
{
	public import const function GetClassName() : CName;
	public import const function IsA( className : CName ) : Bool;
	public import const function IsExactlyA( className : CName ) : Bool;
	public import static function DetectScriptableCycles();
}

importonly struct RWLock
{
	public import static function Acquire( self : ref< RWLock > );
	public import static function Release( self : ref< RWLock > );
	public import static function AcquireShared( self : ref< RWLock > );
	public import static function ReleaseShared( self : ref< RWLock > );
}

importonly class CallbackHandle extends IScriptable
{
}

export function InitializeScripts()
{
	StatsEffectsEnumToTDBID( -1 );
}

import function IsFinal() : Bool;
import function IsEP1() : Bool;
import function GetPlatformShortName() : String;

enum ELogType
{
	DEFAULT = 0,
	WARNING = 1,
	ERROR = 2,
}

import function EnumGetMax( type : CName ) : Int64;
import function EnumGetMin( type : CName ) : Int64;
import function EnumValueFromString( const enumStr : ref< String >, const enumValue : ref< String > ) : Int64;
import function EnumValueFromName( enumName : CName, enumValue : CName ) : Int64;
import function EnumValueToString( const enumStr : ref< String >, enumValue : Int64 ) : String;
import function EnumValueToName( enumName : CName, enumValue : Int64 ) : CName;
import function IsNameValid( n : CName ) : Bool;
import function IsStringValid( const n : ref< String > ) : Bool;

import enum EComparisonType
{
	Greater,
	GreaterOrEqual,
	Equal,
	NotEqual,
	Less,
	LessOrEqual,
}

function ProcessCompare( comparator : EComparisonType, valA : Float, valB : Float ) : Bool
{
	switch( comparator )
	{
		case EComparisonType.Greater:
			return valA > valB;
		case EComparisonType.GreaterOrEqual:
			return valA >= valB;
		case EComparisonType.Equal:
			return valA == valB;
		case EComparisonType.NotEqual:
			return valA != valB;
		case EComparisonType.Less:
			return valA < valB;
		default:
			return valA <= valB;
	}
}

function ProcessCompareInt( comparator : EComparisonType, valA : Int32, valB : Int32 ) : Bool
{
	switch( comparator )
	{
		case EComparisonType.Greater:
			return valA > valB;
		case EComparisonType.GreaterOrEqual:
			return valA >= valB;
		case EComparisonType.Equal:
			return valA == valB;
		case EComparisonType.NotEqual:
			return valA != valB;
		case EComparisonType.Less:
			return valA < valB;
		default:
			return valA <= valB;
	}
}

import function CompareArrayNameContents( arr1, arr2 : array< CName > ) : Bool;
