local PT = AhUI
if not PT then return end

local G = PT.ProfessionGuides

PT.ProfessionGuides_State = {}
local S = PT.ProfessionGuides_State

local function GetCharPGConfig()
    AhUI_CharConfig = AhUI_CharConfig or {}
    AhUI_CharConfig.professionGuides =
        AhUI_CharConfig.professionGuides or {}
    return AhUI_CharConfig.professionGuides
end

function S:Save()
    local cfg = GetCharPGConfig()
    cfg.state = G:ExportState()
end

function S:Restore()
    local cfg = GetCharPGConfig()
    if cfg.state then
        G:ImportState(cfg.state)
    end
end

function S:Clear()
    local cfg = GetCharPGConfig()
    cfg.state = nil
    G:ResetManualStep()
end
