import { D as DataModel } from './data-model-88af49fc.js';

const getUserInitials = (user) => `${user.firstName[0]}${user.lastName[0]}`;
const getUserFullName = (user) => `${user.firstName} ${user.lastName}`;
class User extends DataModel {
  static decode(json) {
    var _a, _b;
    return Object.assign(Object.create(User.prototype), Object.assign(Object.assign({}, json), { initials: json.initials || `${(_a = json.firstName) === null || _a === void 0 ? void 0 : _a[0]} ${(_b = json.lastName) === null || _b === void 0 ? void 0 : _b[0]}`, name: json.name || `${json.firstName} ${json.lastName}` }));
  }
  static generateRef(id) {
    return { _ref: 'kimlik-users', _id: id };
  }
}

export { User as U, getUserInitials as a, getUserFullName as g };
