objectdef MRConfigConverter
{
    member OgreProfileToMRProfile(string ogreSettingsFilePath, string mrSettingsFilePath)
    {
        variable settingsetref ogreSetttings
        variable settingsetref profiles

        LavishSettings:Import[${ogreSettingsFilePath}]

        profiles:Set[${LavishSettings[Profiles]}]
        

    }
}

; objectdef SettingsHelper
; {
;     method ConvertFromOgre(string settingsFile)
;     {
;          ; variable settingsetref Profiles
;     ; variable settingsetref AliasSettings
;     ; variable settingsetref CurrentProfile
;     ; variable settingsetref CastStackSettings
;     ; variable collection:CastStackAbility CastStack
;     ; variable collection:string Aliases
;         LavishSettings:Import[${settingsFile}]
;         Profiles:Set[${LavishSettings[Profiles]}]
        
;         CurrentProfile:Set[${Profiles.FindSet[${Profiles.FindSetting[DefaultProfiles]}]}]
;         CastStackSettings:Set[${CurrentProfile.FindSet["CastStack"]}]
;         AliasSettings:Set[${CurrentProfile.FindSet["Aliases"]}}]
;          ; variable string settingsFile = "profiles/EQ2Save_${EQ2.ServerName}_${Me.Name}.xml"
;         ; echo "Init ${settingsFile}"
;         ; LavishSettings:Import[${settingsFile}]
;         ; Profiles:Set[${LavishSettings[Profiles]}]
        
;         ; CurrentProfile:Set[${Profiles.FindSet[${Profiles.FindSetting[DefaultProfiles]}]}]
;         ; CastStackSettings:Set[${CurrentProfile.FindSet["CastStack"]}]
;         ; AliasSettings:Set[${CurrentProfile.FindSet["Aliases"]}}]

;         ; variable iterator CastStackIterator
;         ; CastStackSettings:GetSetIterator[CastStackIterator]
;         ; if ${CastStackIterator:First(exists)}
;         ; {
;         ;     do
;         ;     {
;         ;         CastStack:Set[ \
;         ;             "${CastStackIterator.Value.FindSetting[__SourceName]}", \
;         ;             "${CastStackIterator.Value.FindSetting[__SourceName]}", \
;         ;             "${CastStackIterator.Value.FindSetting[Target]}", \
;         ;             "${CastStackIterator.Value.FindSetting[Type]}", \
;         ;             "${CastStackIterator.Value.FindSetting["%"]}", \
;         ;             "${CastStackIterator.Value.FindSetting[Tag]}"\
;         ;         ]
;         ;     }
;         ;     while ${CastStackIterator:Next(exists)}
;         ; }

;         ; variable iterator AliasIterator
;         ; AliasSettings:GetSetIterator[AliasIterator]

;         ; if ${AliasIterator:First(exists)}
;         ; {
;         ;     do
;         ;     {
;         ;         echo "Alias: ${AliasIterator.Value.FindSetting["__SourceName"]}", "${AliasIterator.Value.FindSetting["For"]}
;         ;         Aliases:Set["${AliasIterator.Value.FindSetting["__SourceName"]}", "${AliasIterator.Value.FindSetting["For"]}"]
;         ;     }
;         ;     while ${AliasIterator:Next(exists)}
;         ; }

;         ; echo "######"
;         ; echo "Aliases: ${Aliases.AsJSON~}"
;         ; echo "######"

;         ; variable BotSettings settings
;         ; variable jsonvalue jo="{}"
;         ; jo:Set["CastStack", "${CastStack.AsJSON~}"]
;         ; jo:Set["Aliases", "${Aliases.AsJSON~}"]
;         ; settings:FromJSON[jo]
;         ; settings.AsJSON:WriteFile["profiles/${EQ2.ServerName}_${Me.Name}.json", TRUE]
;     }

;     member:BotSettings LoadSettings(string filename)
;     {
        
;     }
; }