import { __decorate, __extends, __metadata } from "tslib";
import { Component, Prop } from 'vue-property-decorator';
import BaseComponent from '../BaseComponent';
import { classNamesFunction } from '@uifabric-vue/utilities';
import { PersonaCoin } from './PersonaCoin';
import { PersonaSize, PersonaPresence } from './Persona.types';
var getClassNames = classNamesFunction();
var PersonaBase = /** @class */ (function (_super) {
    __extends(PersonaBase, _super);
    function PersonaBase() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.PersonaSize = PersonaSize;
        return _this;
    }
    Object.defineProperty(PersonaBase.prototype, "classNames", {
        get: function () {
            var _a = this, theme = _a.theme, className = _a.className, showSecondaryText = _a.showSecondaryText, presence = _a.presence, size = _a.size;
            return getClassNames(this.styles, {
                theme: theme,
                className: className,
                showSecondaryText: showSecondaryText,
                presence: presence,
                size: size,
            });
        },
        enumerable: false,
        configurable: true
    });
    PersonaBase.prototype.render = function (h) {
        var _a = this, classNames = _a.classNames, coinSize = _a.coinSize, text = _a.text, secondaryText = _a.secondaryText, tertiaryText = _a.tertiaryText, optionalText = _a.optionalText, hidePersonaDetails = _a.hidePersonaDetails, size = _a.size;
        var $details = (!hidePersonaDetails || (size === PersonaSize.size8 || size === PersonaSize.size10 || size === PersonaSize.tiny)) && h('div', { class: classNames.details }, [
            h('div', { class: classNames.primaryText }, text),
            h('div', { class: classNames.secondaryText }, secondaryText),
            h('div', { class: classNames.tertiaryText }, tertiaryText),
            h('div', { class: classNames.optionalText }, optionalText),
            this.$slots.default,
        ]);
        return h('div', {
            class: classNames.root,
            style: coinSize ? { height: "".concat(coinSize, "px"), minWidth: "".concat(coinSize, "px") } : {},
        }, [
            h(PersonaCoin, { props: this.$props }),
            $details,
        ]);
    };
    __decorate([
        Prop({ type: Boolean, default: false }),
        __metadata("design:type", Boolean)
    ], PersonaBase.prototype, "allowPhoneInitials", void 0);
    __decorate([
        Prop({ type: Number, default: PersonaPresence.none }),
        __metadata("design:type", Number)
    ], PersonaBase.prototype, "presence", void 0);
    __decorate([
        Prop({ type: Number, default: PersonaSize.size48 }),
        __metadata("design:type", Number)
    ], PersonaBase.prototype, "size", void 0);
    __decorate([
        Prop({ type: Number, default: 0 }),
        __metadata("design:type", Number)
    ], PersonaBase.prototype, "coinSize", void 0);
    __decorate([
        Prop({ type: [Number, String], default: undefined }),
        __metadata("design:type", Number)
    ], PersonaBase.prototype, "initialsColor", void 0);
    __decorate([
        Prop({ type: Boolean, default: false }),
        __metadata("design:type", Boolean)
    ], PersonaBase.prototype, "hidePersonaDetails", void 0);
    __decorate([
        Prop({ type: String, default: null }),
        __metadata("design:type", String)
    ], PersonaBase.prototype, "text", void 0);
    __decorate([
        Prop({ type: String, default: null }),
        __metadata("design:type", String)
    ], PersonaBase.prototype, "secondaryText", void 0);
    __decorate([
        Prop({ type: String, default: null }),
        __metadata("design:type", String)
    ], PersonaBase.prototype, "tertiaryText", void 0);
    __decorate([
        Prop({ type: String, default: null }),
        __metadata("design:type", String)
    ], PersonaBase.prototype, "optionalText", void 0);
    __decorate([
        Prop({ type: String, default: undefined }),
        __metadata("design:type", String)
    ], PersonaBase.prototype, "imageUrl", void 0);
    __decorate([
        Prop({ type: Boolean, default: false }),
        __metadata("design:type", Boolean)
    ], PersonaBase.prototype, "isOutOfOffice", void 0);
    __decorate([
        Prop({ type: Boolean, default: false }),
        __metadata("design:type", Boolean)
    ], PersonaBase.prototype, "showSecondaryText", void 0);
    PersonaBase = __decorate([
        Component
    ], PersonaBase);
    return PersonaBase;
}(BaseComponent));
export { PersonaBase };
//# sourceMappingURL=Persona.base.js.map