define('application/widgets/player/channelswitcher', [
'rofl/widgets/component',
'rofl/widgets/label'
], function (
Component,
Label
) {
'use strict';
var ChannelSwitcher;
ChannelSwitcher = Component.extend({
/**
* Initialises the switch channel component.
*
* @param {string} [id] - Id of the channelswitcher. Optional.
*/
init: function init (id) {
init.base.call(this, id || 'channelswitcher');
this.addClass('channelswitcher');
this._build();
},
/**
* Builds the channel switcher.
*
* @private
*/
_build: function () {
var title = this._title = new Label({text: '', classNames: ['channel'] });
this.appendChildWidget(title);
},
/**
* Builds the channel switcher.
*
* @param {string} [text] - Set the channelswitcher label.
*/
setLabel: function (text) {
this._title.setText(text);
}
});
return ChannelSwitcher;
});