﻿// Register the namespace for the control.
Type.registerNamespace('Roblox.Thumbs');

//
// Define the control properties.
//
Roblox.Thumbs.AvatarImage = function(element) { 
    Roblox.Thumbs.AvatarImage.initializeBase(this, [element]);
}

//
// Create the prototype for the control.
//
Roblox.Thumbs.AvatarImage.prototype = {

    initialize : function() {
        Roblox.Thumbs.AvatarImage.callBaseMethod(this, 'initialize');
        this._webService = Roblox.Thumbs.Avatar;
    },

    dispose : function() {
        Roblox.Thumbs.AvatarImage.callBaseMethod(this, 'dispose');
    },

    get_userID : function() {
        return this._contentID;
    },

    set_userID : function(value) {
        if (this._contentID !== value) {
            this._contentID = value;
            this.raisePropertyChanged('userID');
        }
    }
}

// Optional descriptor for JSON serialization.
Roblox.Thumbs.AvatarImage.descriptor = {
    properties: [ ]
}

// Register the class as a type that inherits from Sys.UI.Control.
Roblox.Thumbs.AvatarImage.registerClass('Roblox.Thumbs.AvatarImage', Roblox.Thumbs.Image);

Roblox.Thumbs.AvatarImage.updateUrl = function(componentID) {
    /// <summary>
    /// This static function (that is intended to be called from script emitted
    /// on the server)
    /// </summary>
    var a = $find(componentID);
    a._onUpdate();
}


if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();