import { Component, EventEmitter, Input, Output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
function MyFriendsComponent_ng_container_5_div_1_Template(rf, ctx) { if (rf & 1) {
    const _r6 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 8);
    i0.ɵɵlistener("click", function MyFriendsComponent_ng_container_5_div_1_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r6); const friend_r4 = ctx.$implicit; const ctx_r5 = i0.ɵɵnextContext(2); return ctx_r5.onSelectFriend(friend_r4); });
    i0.ɵɵelementStart(1, "figure", 9);
    i0.ɵɵelement(2, "img", 10);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "div", 11);
    i0.ɵɵelementStart(4, "div", 12);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const friend_r4 = ctx.$implicit;
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate2("src", "", ctx_r3.envUrl, "/api/member/", friend_r4 == null ? null : friend_r4.nickname, "/avatar/s", i0.ɵɵsanitizeUrl);
    i0.ɵɵproperty("alt", friend_r4 == null ? null : friend_r4.nickname);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate((friend_r4 == null ? null : friend_r4.nickname) || "");
} }
function MyFriendsComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, MyFriendsComponent_ng_container_5_div_1_Template, 6, 4, "div", 7);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", ctx_r0.friends.slice(0, ctx_r0.maxCount));
} }
function MyFriendsComponent_p_6_Template(rf, ctx) { if (rf & 1) {
    const _r8 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "p", 13);
    i0.ɵɵelementStart(1, "a", 14);
    i0.ɵɵlistener("click", function MyFriendsComponent_p_6_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.onFindFriends(); });
    i0.ɵɵtext(2, "Find people");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(3, " who understand what you're going through. ");
    i0.ɵɵelementEnd();
} }
function MyFriendsComponent_div_7_Template(rf, ctx) { if (rf & 1) {
    const _r10 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 15);
    i0.ɵɵelementStart(1, "a", 16);
    i0.ɵɵlistener("click", function MyFriendsComponent_div_7_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(); return ctx_r9.onViewAll(); });
    i0.ɵɵtext(2, "View all");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} }
export class MyFriendsComponent {
    constructor() {
        this.friends = [];
        this.maxCount = 5;
        this.viewAll = new EventEmitter();
        this.selectSingleFriend = new EventEmitter();
        this.findFriend = new EventEmitter();
    }
    ngOnInit() {
    }
    onViewAll() {
        this.viewAll.emit();
    }
    onSelectFriend(friend) {
        this.selectSingleFriend.emit(friend);
    }
    onFindFriends() {
        this.findFriend.emit();
    }
}
MyFriendsComponent.ɵfac = function MyFriendsComponent_Factory(t) { return new (t || MyFriendsComponent)(); };
MyFriendsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MyFriendsComponent, selectors: [["ins-my-friends"]], inputs: { envUrl: "envUrl", friends: "friends", maxCount: "maxCount" }, outputs: { viewAll: "viewAll", selectSingleFriend: "selectSingleFriend", findFriend: "findFriend" }, decls: 8, vars: 3, consts: [[1, "widget-pack"], [1, "wp-head"], [1, "wp-title"], [1, "wp-body"], [4, "ngIf"], ["class", "neutral-info", 4, "ngIf"], ["class", "wp-foot", 4, "ngIf"], ["class", "avatar-block cursor-pointer", 3, "click", 4, "ngFor", "ngForOf"], [1, "avatar-block", "cursor-pointer", 3, "click"], [1, "ab-fig"], [3, "src", "alt"], [1, "ab-meta"], [1, "ab-label"], [1, "neutral-info"], ["id", "find-friends", 1, "cursor-pointer", 3, "click"], [1, "wp-foot"], [1, "wp-link", 3, "click"]], template: function MyFriendsComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "section", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "h1", 2);
        i0.ɵɵtext(3, "My Friends");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "div", 3);
        i0.ɵɵtemplate(5, MyFriendsComponent_ng_container_5_Template, 2, 1, "ng-container", 4);
        i0.ɵɵtemplate(6, MyFriendsComponent_p_6_Template, 4, 0, "p", 5);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(7, MyFriendsComponent_div_7_Template, 3, 0, "div", 6);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("ngIf", ctx.friends == null ? null : ctx.friends.length);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", !(ctx.friends == null ? null : ctx.friends.length));
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.friends && (ctx.friends == null ? null : ctx.friends.length) > ctx.maxCount);
    } }, directives: [i1.NgIf, i1.NgForOf], styles: ["a[_ngcontent-%COMP%]{text-decoration:none}*[_ngcontent-%COMP%]{font-family:Lato,sans-serif;outline:0}.widget-pack[_ngcontent-%COMP%]{background:#fff;border-radius:.5rem;padding:.9375rem}.wp-body[_ngcontent-%COMP%], .wp-foot[_ngcontent-%COMP%]{margin-top:.9375rem}.wp-title[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:#061a73;margin:0;font-family:Lato,sans-serif}.wp-link[_ngcontent-%COMP%]{color:#6e6f70;font-size:.875rem;cursor:pointer}.wp-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.avatar-block[_ngcontent-%COMP%]{display:flex;align-items:center}.avatar-block[_ngcontent-%COMP%]   .ab-fig[_ngcontent-%COMP%]{width:2rem;height:2rem;border-radius:50%;margin:0 .75rem 0 0;flex:0 0 auto;position:relative;overflow:hidden;border:1px solid #e2e5e4;background:#fff}.avatar-block[_ngcontent-%COMP%]   .ab-fig[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{display:block;width:100%;height:100%;-o-object-fit:cover;object-fit:cover;image-rendering:auto}.avatar-block[_ngcontent-%COMP%]   .ab-meta[_ngcontent-%COMP%]{flex:1 1 auto}.avatar-block[_ngcontent-%COMP%]   .ab-label[_ngcontent-%COMP%]{font-size:.875rem;color:#000;line-height:1.3}.avatar-block[_ngcontent-%COMP%]   .ab-stamp[_ngcontent-%COMP%]{flex:0 0 auto;font-size:.75rem;color:#e1e3e2;margin-left:.625rem}.avatar-block[_ngcontent-%COMP%]:not(:last-child){margin-bottom:.625rem}.neutral-info[_ngcontent-%COMP%]{color:#6e6f70;font-size:.8125rem}"] });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(MyFriendsComponent, [{
        type: Component,
        args: [{
                selector: 'ins-my-friends',
                templateUrl: './my-friends.component.html',
                styleUrls: ['./my-friends.component.scss']
            }]
    }], function () { return []; }, { envUrl: [{
            type: Input
        }], friends: [{
            type: Input
        }], maxCount: [{
            type: Input
        }], viewAll: [{
            type: Output
        }], selectSingleFriend: [{
            type: Output
        }], findFriend: [{
            type: Output
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 