"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class ContactBook { constructor(items) { this.items = items; } getPrimaryEmailAddress() { return this.getFromEmailAddresses()[0]; } getPrimaryPhoneNumber() { return this.getFromPhoneNumbers()[0]; } getFromPhoneNumbers() { const result = []; for (const item of this.items) { for (const address of item.canSendFromAddrs) { if (address.startsWith('phone:')) { result.push(address); } } } return result; } getFromEmailAddresses() { const result = []; for (const item of this.items) { for (const address of item.canSendFromAddrs) { if (address.startsWith('email:')) { result.push(address); } } } return result; } } exports.ContactBook = ContactBook; //# sourceMappingURL=contact-book.js.map