import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../click-outside.directive";
function MoreOptionsComponent_div_0_div_3_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 9);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const option_r3 = ctx.$implicit;
    const ctx_r2 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", option_r3[ctx_r2.label], " ");
} }
function MoreOptionsComponent_div_0_div_3_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 4);
    i0.ɵɵelementStart(1, "div", 5);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "a", 6);
    i0.ɵɵlistener("click", function MoreOptionsComponent_div_0_div_3_Template_a_click_3_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(2); return ctx_r4.onCloseOptions(); });
    i0.ɵɵtext(4, "\u00D7");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 7);
    i0.ɵɵtemplate(6, MoreOptionsComponent_div_0_div_3_div_6_Template, 2, 1, "div", 8);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate2("In ", (ctx_r1.options == null ? null : ctx_r1.options.length) - 1, " ", (ctx_r1.options == null ? null : ctx_r1.options.length) - 1 > 1 ? ctx_r1.pluralHeading : ctx_r1.singularHeading, "");
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngForOf", ctx_r1.options.slice(1));
} }
function MoreOptionsComponent_div_0_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 1);
    i0.ɵɵlistener("clickOutside", function MoreOptionsComponent_div_0_Template_div_clickOutside_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.onCloseOptions(); });
    i0.ɵɵelementStart(1, "a", 2);
    i0.ɵɵlistener("click", function MoreOptionsComponent_div_0_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r7); const ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.onToggleMoreList(); });
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(3, MoreOptionsComponent_div_0_div_3_Template, 7, 3, "div", 3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1("+", (ctx_r0.options == null ? null : ctx_r0.options.length) - 1, " more");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.toggleMoreList);
} }
export class MoreOptionsComponent {
    constructor() {
        this.options = [];
        this.label = '';
        this.singularHeading = '';
        this.pluralHeading = '';
        this.toggleMoreList = false;
    }
    ngOnInit() {
    }
    onCloseOptions() {
        this.toggleMoreList = false;
    }
    onToggleMoreList() {
        this.toggleMoreList = !this.toggleMoreList;
    }
}
MoreOptionsComponent.ɵfac = function MoreOptionsComponent_Factory(t) { return new (t || MoreOptionsComponent)(); };
MoreOptionsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MoreOptionsComponent, selectors: [["ins-more-options"]], inputs: { options: "options", label: "label", singularHeading: "singularHeading", pluralHeading: "pluralHeading" }, decls: 1, vars: 1, consts: [["class", "more-options-popover", 3, "clickOutside", 4, "ngIf"], [1, "more-options-popover", 3, "clickOutside"], ["id", "selected_community_more", 1, "mop-trigger", 3, "click"], ["class", "mop-menu", "id", "remaining_communities", 4, "ngIf"], ["id", "remaining_communities", 1, "mop-menu"], [1, "mop-title"], ["id", "remaining_community_close", 1, "mop-close", 3, "click"], [1, "mop-listing"], ["class", "pill-block", "id", "remaining_community_name", 4, "ngFor", "ngForOf"], ["id", "remaining_community_name", 1, "pill-block"]], template: function MoreOptionsComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵtemplate(0, MoreOptionsComponent_div_0_Template, 4, 2, "div", 0);
    } if (rf & 2) {
        i0.ɵɵproperty("ngIf", (ctx.options == null ? null : ctx.options.length) > 1);
    } }, directives: [i1.NgIf, i2.ClickOutsideDirective, i1.NgForOf], styles: ["a[_ngcontent-%COMP%]{text-decoration:none}*[_ngcontent-%COMP%]{font-family:Lato,sans-serif;outline:0}.pill-block[_ngcontent-%COMP%]{font-size:.875rem;color:#000;padding:.5rem 1.25rem;border-radius:3.125rem;background:#f8f9fb;display:inline-block}[_nghost-%COMP%]{display:contents}.more-options-popover[_ngcontent-%COMP%]{margin-left:10px;position:relative;flex:0 0 auto}.mop-trigger[_ngcontent-%COMP%]{font-size:14px;color:#c6cbc9;cursor:pointer}.mop-trigger[_ngcontent-%COMP%]:hover{text-decoration:underline}.mop-menu[_ngcontent-%COMP%]{position:absolute;bottom:100%;background:#fff;border:1px solid #e2e5e4;padding:20px 0;border-radius:5px;width:300px;box-shadow:0 2px 5px 0 rgba(208,208,208,.5);flex-direction:column;align-items:flex-start;display:flex;right:0;z-index:10;max-height:250px}.mop-menu[_ngcontent-%COMP%]   .pill-block[_ngcontent-%COMP%]{font-size:12px}.mop-menu[_ngcontent-%COMP%]   .pill-block[_ngcontent-%COMP%]:not(:last-child){margin-bottom:10px}.mop-title[_ngcontent-%COMP%]{color:#005cc9;font-size:14px;font-weight:700;margin-bottom:15px;flex:0 0 auto;padding:0 20px;width:100%}.mop-listing[_ngcontent-%COMP%]{overflow-y:auto;flex:1 1 auto;min-height:0;flex-direction:column;align-items:flex-start;display:flex;width:100%;padding:0 20px}@media (min-width:1200px){.mop-listing[_ngcontent-%COMP%]::-webkit-scrollbar{width:5px;height:5px}.mop-listing[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#fff;border-radius:0}.mop-listing[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:silver;border-radius:0}}.mop-close[_ngcontent-%COMP%]{font-size:20px;color:#c6cbc9;position:absolute;right:0;top:0;line-height:.6;padding:7px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mop-close[_ngcontent-%COMP%]:hover{color:#6e6f70}"] });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(MoreOptionsComponent, [{
        type: Component,
        args: [{
                selector: 'ins-more-options',
                templateUrl: './more-options.component.html',
                styleUrls: ['./more-options.component.scss']
            }]
    }], function () { return []; }, { options: [{
            type: Input
        }], label: [{
            type: Input
        }], singularHeading: [{
            type: Input
        }], pluralHeading: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9yZS1vcHRpb25zLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2luc3BpcmUtbGlicmFyeS8iLCJzb3VyY2VzIjpbImxpYi9tb3JlLW9wdGlvbnMvbW9yZS1vcHRpb25zLmNvbXBvbmVudC50cyIsImxpYi9tb3JlLW9wdGlvbnMvbW9yZS1vcHRpb25zLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFVLE1BQU0sZUFBZSxDQUFDOzs7OztJQ090RCw4QkFDQztJQUFBLFlBQ0Q7SUFBQSxpQkFBTTs7OztJQURMLGVBQ0Q7SUFEQyx3REFDRDs7OztJQVBGLDhCQUNDO0lBQUEsOEJBQXVCO0lBQUEsWUFDcUM7SUFBQSxpQkFBTTtJQUNsRSw0QkFBK0U7SUFBMUQsOExBQTBCO0lBQWdDLHNCQUFPO0lBQUEsaUJBQUk7SUFDMUYsOEJBQ0M7SUFBQSxpRkFDQztJQUVGLGlCQUFNO0lBQ1AsaUJBQU07OztJQVJrQixlQUNxQztJQURyQyxtTkFDcUM7SUF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