import * as tslib_1 from "tslib";
import * as React from 'react';
import { autobind, css } from '../../Utilities';
import { Icon } from '../../Icon';
import { PersonaPresence as PersonaPresenceEnum } from './Persona.types';
import * as stylesImport from './Persona.scss';
var styles = stylesImport;
var PersonaPresence = /** @class */ (function (_super) {
    tslib_1.__extends(PersonaPresence, _super);
    function PersonaPresence(props) {
        return _super.call(this, props) || this;
    }
    PersonaPresence.prototype.render = function () {
        var presence = this.props.presence;
        if (presence === PersonaPresenceEnum.none) {
            return null;
        }
        return (React.createElement("div", { className: css('ms-Persona-presence', styles.presence) },
            React.createElement(Icon, { className: css('ms-Persona-presenceIcon', styles.presenceIcon), iconName: this._determineIcon() })));
    };
    PersonaPresence.prototype._determineIcon = function () {
        var presence = this.props.presence;
        if (presence !== PersonaPresenceEnum.none) {
            var userPresence = PersonaPresenceEnum[presence];
            switch (userPresence) {
                case 'online':
                    userPresence = 'SkypeCheck';
                    break;
                case 'away':
                    userPresence = 'SkypeClock';
                    break;
                case 'dnd':
                    userPresence = 'SkypeMinus';
                    break;
                default:
                    userPresence = '';
            }
            return userPresence;
        }
    };
    tslib_1.__decorate([
        autobind
    ], PersonaPresence.prototype, "_determineIcon", null);
    return PersonaPresence;
}(React.Component));
export { PersonaPresence };
//# sourceMappingURL=PersonaPresence.js.map