local S, L, O, U, D, E = unpack(select(2, ...));
local Module = S:NewModule('TalkingHead');

local PlayerState = D.Player.State;

function Module:TALKINGHEAD_REQUESTED()
    if not O.db.talking_head_suppress then
        return;
    end

    if O.db.talking_head_suppress_always then
        TalkingHeadFrame_CloseImmediately();
        return;
    end

    if not PlayerState.inInstance then
        return;
    end

    TalkingHeadFrame_CloseImmediately();
end

function Module:StartUp()
    self:RegisterEvent('TALKINGHEAD_REQUESTED');
end