#include "../avatarui_common.lua"

Avatar.SkinItemViewModel = function()
    local vm =
    {
        skinModel = nil,
        avatarVM = nil,

        onReleased = function(self, view)
            if self.skinModel == self.avatarVM.focusedSkin or self.skinModel.isLocked then
                return
            end

            self.avatarVM:updateFocusedSkinOnPostUpdate(self.skinModel)
        end
    }

    return vm
end
