var MEDELA = MEDELA || {};
MEDELA.locationfinder = MEDELA.locationfinder || {};

/**
 * Class for handling infowindow label data delivered with json response
 *
 * @namespace MEDELA.locationfinder
 * @class InfowindowLabels
 * @uses jQuery
 * @constructor
 * @param {Object} labelData object with the structor <strong>labels = { 'label' : 'value' }</strong>
 */

(function () {
    function InfowindowLabels(labelData) {
        var self = this;

        /**
         * @property {Object} labelData
         */
        this.labelData = labelData;
    }

    InfowindowLabels.prototype = {
        /**
         * Returns labelData object
         * @method getLabelData
         * @return object
         */
        'getLabelData' : function () {
            return this.labelData;
        },

        /**
         * Return value for given label
         * @method getValueOfLabel
         * @param {String} label
         * @returns {String} value
         */
        'getValueOfLabel' : function (label) {
            if (this.labelData[label]) {
                return this.labelData[label];
            } else {
                return label;
            }

        }
    };
    MEDELA.locationfinder.InfowindowLabels = InfowindowLabels;
}());
