import { Component, EventEmitter, Input, Output } from '@angular/core';
import { AboutSection } from '../inspire-library.enum';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../users/users.component";
import * as i3 from "../contact/contact.component";
function AboutMoreComponent_section_7_p_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "p", 18);
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("innerHTML", ctx_r3.supportCommunityContent, i0.ɵɵsanitizeHtml);
} }
function AboutMoreComponent_section_7_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "section", 14);
    i0.ɵɵlistener("click", function AboutMoreComponent_section_7_Template_section_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.toggleAboutSection(ctx_r4.aboutSection.Support); });
    i0.ɵɵelementStart(1, "h2", 15);
    i0.ɵɵelement(2, "i");
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 16);
    i0.ɵɵtemplate(5, AboutMoreComponent_section_7_p_5_Template, 1, 1, "p", 17);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵclassMap("icn-" + (ctx_r0.showAboutSection[ctx_r0.aboutSection.Support] ? "minus" : "plus") + "-o caw-icon");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", ctx_r0.community == null ? null : ctx_r0.community.name, " Support Community ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", !ctx_r0.isMobile || ctx_r0.showAboutSection[ctx_r0.aboutSection.Support]);
} }
function AboutMoreComponent_p_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "p");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r1.community == null ? null : ctx_r1.community.cs_data == null ? null : ctx_r1.community.cs_data.extras == null ? null : ctx_r1.community.cs_data.extras.sections[0] == null ? null : ctx_r1.community.cs_data.extras.sections[0].prose);
} }
function AboutMoreComponent_section_17_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "section", 7);
    i0.ɵɵelementStart(1, "ins-contact", 19);
    i0.ɵɵlistener("toggleExpandedContent", function AboutMoreComponent_section_17_Template_ins_contact_toggleExpandedContent_1_listener() { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.toggleAboutSection(ctx_r6.aboutSection.Contact); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("enableAccordion", ctx_r2.isMobile)("expandedContent", !ctx_r2.isMobile || ctx_r2.showAboutSection[ctx_r2.aboutSection.Contact])("name", ctx_r2.community == null ? null : ctx_r2.community.partner == null ? null : ctx_r2.community.partner.name)("streetAddress", ctx_r2.community == null ? null : ctx_r2.community.partner == null ? null : ctx_r2.community.partner.metadata == null ? null : ctx_r2.community.partner.metadata.address_1)("suiteNo", ctx_r2.community == null ? null : ctx_r2.community.partner == null ? null : ctx_r2.community.partner.metadata == null ? null : ctx_r2.community.partner.metadata.address_2)("city", ctx_r2.community == null ? null : ctx_r2.community.partner == null ? null : ctx_r2.community.partner.metadata == null ? null : ctx_r2.community.partner.metadata.city)("state", ctx_r2.community == null ? null : ctx_r2.community.partner == null ? null : ctx_r2.community.partner.metadata == null ? null : ctx_r2.community.partner.metadata.state)("zipCode", ctx_r2.community == null ? null : ctx_r2.community.partner == null ? null : ctx_r2.community.partner.metadata == null ? null : ctx_r2.community.partner.metadata.postal_code)("phoneNo", ctx_r2.community == null ? null : ctx_r2.community.partner == null ? null : ctx_r2.community.partner.metadata == null ? null : ctx_r2.community.partner.metadata.phone)("faxNo", ctx_r2.community == null ? null : ctx_r2.community.partner == null ? null : ctx_r2.community.partner.metadata == null ? null : ctx_r2.community.partner.metadata.fax)("email", ctx_r2.community == null ? null : ctx_r2.community.partner == null ? null : ctx_r2.community.partner.metadata == null ? null : ctx_r2.community.partner.metadata.email)("website", ctx_r2.community == null ? null : ctx_r2.community.partner == null ? null : ctx_r2.community.partner.metadata == null ? null : ctx_r2.community.partner.metadata.web_site);
} }
export class AboutMoreComponent {
    constructor() {
        this.isMobile = false;
        this.showAboutMore = false;
        this.communityLeaders = [];
        this.envUrl = "";
        this.back = new EventEmitter();
        this.aboutSection = AboutSection;
        this.showAboutSection = {
            [AboutSection.Support]: false,
            [AboutSection.AboutCommunity]: false,
            [AboutSection.CommunityLeaders]: false,
            [AboutSection.Contact]: false
        };
        this.supportCommunityContent = '';
        this.showContactInfo = true;
    }
    ngOnInit() {
        this.init();
    }
    init() {
        this.setSupportCommunityContent();
        this.setDefaultSection();
        this.shouldShowContactInfo();
    }
    ngOnChanges() {
        this.init();
    }
    setDefaultSection() {
        if (this.supportCommunityContent) {
            this.showAboutSection[AboutSection.Support] = true;
        }
        else {
            this.showAboutSection[AboutSection.AboutCommunity] = true;
        }
    }
    shouldShowContactInfo() {
        var _a;
        this.showContactInfo = !!((_a = this.community) === null || _a === void 0 ? void 0 : _a.partner);
    }
    toggleAboutSection(section) {
        this.showAboutSection[section] = !this.showAboutSection[section];
    }
    onBackClick() {
        this.back.emit();
    }
    setSupportCommunityContent() {
        var _a, _b, _c, _d;
        this.supportCommunityContent = ((_c = (_b = (_a = this.community) === null || _a === void 0 ? void 0 : _a.partner) === null || _b === void 0 ? void 0 : _b.metadata) === null || _c === void 0 ? void 0 : _c.description) || ((_d = this.community) === null || _d === void 0 ? void 0 : _d.welcome_text);
    }
}
AboutMoreComponent.ɵfac = function AboutMoreComponent_Factory(t) { return new (t || AboutMoreComponent)(); };
AboutMoreComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AboutMoreComponent, selectors: [["ins-about-more"]], inputs: { isMobile: "isMobile", community: "community", showAboutMore: "showAboutMore", communityLeaders: "communityLeaders", envUrl: "envUrl" }, outputs: { back: "back" }, features: [i0.ɵɵNgOnChangesFeature], decls: 18, vars: 11, consts: [[1, "community-about-wrapper"], [1, "caw-head"], ["id", "go_back", "type", "button", 1, "icn-arrow-left", "caw-back", 3, "click"], [1, "caw-h-title"], [1, "caw-body"], [1, "caw-main"], ["class", "mb-4", 3, "click", 4, "ngIf"], [1, "mb-4"], [1, "caw-title", 3, "click"], [1, "caw-content"], [4, "ngIf"], [1, "caw-side"], ["heading", "Community Leaders", 3, "enableAccordion", "expandedContent", "users", "envUrl", "toggleExpandedContent"], ["class", "mb-4", 4, "ngIf"], [1, "mb-4", 3, "click"], [1, "caw-title"], [1, "caw-content", "caw-support"], [3, "innerHTML", 4, "ngIf"], [3, "innerHTML"], [3, "enableAccordion", "expandedContent", "name", "streetAddress", "suiteNo", "city", "state", "zipCode", "phoneNo", "faxNo", "email", "website", "toggleExpandedContent"]], template: function AboutMoreComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "button", 2);
        i0.ɵɵlistener("click", function AboutMoreComponent_Template_button_click_2_listener() { return ctx.onBackClick(); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵtext(4, "About this Community");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(5, "div", 4);
        i0.ɵɵelementStart(6, "div", 5);
        i0.ɵɵtemplate(7, AboutMoreComponent_section_7_Template, 6, 4, "section", 6);
        i0.ɵɵelementStart(8, "section", 7);
        i0.ɵɵelementStart(9, "h2", 8);
        i0.ɵɵlistener("click", function AboutMoreComponent_Template_h2_click_9_listener() { return ctx.toggleAboutSection(ctx.aboutSection.AboutCommunity); });
        i0.ɵɵelement(10, "i");
        i0.ɵɵtext(11, " About this Community ");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(12, "div", 9);
        i0.ɵɵtemplate(13, AboutMoreComponent_p_13_Template, 2, 1, "p", 10);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(14, "div", 11);
        i0.ɵɵelementStart(15, "section", 7);
        i0.ɵɵelementStart(16, "ins-users", 12);
        i0.ɵɵlistener("toggleExpandedContent", function AboutMoreComponent_Template_ins_users_toggleExpandedContent_16_listener() { return ctx.toggleAboutSection(ctx.aboutSection.CommunityLeaders); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(17, AboutMoreComponent_section_17_Template, 2, 12, "section", 13);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵclassProp("active", ctx.showAboutMore && ctx.isMobile);
        i0.ɵɵadvance(7);
        i0.ɵɵproperty("ngIf", ctx.supportCommunityContent);
        i0.ɵɵadvance(3);
        i0.ɵɵclassMap("icn-" + (ctx.showAboutSection[ctx.aboutSection.AboutCommunity] ? "minus" : "plus") + "-o caw-icon");
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", !ctx.isMobile || ctx.showAboutSection[ctx.aboutSection.AboutCommunity]);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("enableAccordion", ctx.isMobile)("expandedContent", !ctx.isMobile || ctx.showAboutSection[ctx.aboutSection.CommunityLeaders])("users", ctx.communityLeaders)("envUrl", ctx.envUrl);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.showContactInfo);
    } }, directives: [i1.NgIf, i2.UsersComponent, i3.ContactComponent], styles: ["a[_ngcontent-%COMP%]{text-decoration:none}*[_ngcontent-%COMP%]{font-family:Lato,sans-serif;outline:0}@font-face{font-family:ins-icons;src:url(/assets/fonts/icons/ins-icons.ttf?nf14g1) format(\"truetype\"),url(/assets/fonts/icons/ins-icons.woff?nf14g1) format(\"woff\"),url(/assets/fonts/icons/ins-icons.svg?nf14g1#ins-icons) format(\"svg\");font-weight:400;font-style:normal;font-display:block}.ins-icon[_ngcontent-%COMP%], [class*=\" icn-\"][_ngcontent-%COMP%], [class^=icn-][_ngcontent-%COMP%]{font-family:ins-icons!important;speak:never;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icn-minus-o[_ngcontent-%COMP%]:before{content:\"\\e93a\"}.icn-disclaimer[_ngcontent-%COMP%]:before{content:\"\\e934\"}.icn-leave-community[_ngcontent-%COMP%]:before{content:\"\\e935\"}.icn-stethoscope[_ngcontent-%COMP%]:before{content:\"\\e936\"}.icn-join-community[_ngcontent-%COMP%]:before{content:\"\\e937\"}.icn-resources[_ngcontent-%COMP%]:before{content:\"\\e938\"}.icn-help[_ngcontent-%COMP%]:before{content:\"\\e939\"}.icn-checked[_ngcontent-%COMP%]:before{content:\"\\e933\"}.icn-plus[_ngcontent-%COMP%]:before{content:\"\\e932\"}.icn-expand[_ngcontent-%COMP%]:before{content:\"\\e931\"}.icn-Invite[_ngcontent-%COMP%]:before{content:\"\\e930\"}.icn-report[_ngcontent-%COMP%]:before{content:\"\\e92f\"}.icn-unfollow[_ngcontent-%COMP%]:before{content:\"\\e92e\"}.icn-block[_ngcontent-%COMP%]:before{content:\"\\e92d\"}.icn-trash[_ngcontent-%COMP%]:before{content:\"\\e92b\"}.icn-follow[_ngcontent-%COMP%]:before{content:\"\\e92c\"}.icn-lock[_ngcontent-%COMP%]:before{content:\"\\e92a\"}.icn-bolt-left[_ngcontent-%COMP%]:before{content:\"\\e925\"}.icn-bolt-right[_ngcontent-%COMP%]:before{content:\"\\e926\"}.icn-bolt-down[_ngcontent-%COMP%]:before{content:\"\\e927\"}.icn-bolt-up[_ngcontent-%COMP%]:before{content:\"\\e928\"}.icn-img-o[_ngcontent-%COMP%]:before{content:\"\\e929\"}.icn-tick[_ngcontent-%COMP%]:before{content:\"\\e924\"}.icn-tick-o[_ngcontent-%COMP%]:before{content:\"\\e923\"}.icn-cross-o[_ngcontent-%COMP%]:before{content:\"\\e922\"}.icn-plus-o[_ngcontent-%COMP%]:before{content:\"\\e921\"}.icn-hide[_ngcontent-%COMP%]:before{content:\"\\e920\"}.icn-menu[_ngcontent-%COMP%]:before{content:\"\\e900\"}.icn-more[_ngcontent-%COMP%]:before{content:\"\\e901\"}.icn-msgs[_ngcontent-%COMP%]:before{content:\"\\e902\"}.icn-pin[_ngcontent-%COMP%]:before{content:\"\\e903\"}.icn-reply[_ngcontent-%COMP%]:before{content:\"\\e904\"}.icn-search[_ngcontent-%COMP%]:before{content:\"\\e905\"}.icn-settings[_ngcontent-%COMP%]:before{content:\"\\e906\"}.icn-treatment[_ngcontent-%COMP%]:before{content:\"\\e907\"}.icn-aid[_ngcontent-%COMP%]:before{content:\"\\e908\"}.icn-apple[_ngcontent-%COMP%]:before{content:\"\\e909\"}.icn-arrow-down[_ngcontent-%COMP%]:before{content:\"\\e90a\"}.icn-arrow-up[_ngcontent-%COMP%]:before{content:\"\\e91d\"}.icn-arrow-left[_ngcontent-%COMP%]:before{content:\"\\e91e\"}.icn-arrow-right[_ngcontent-%COMP%]:before{content:\"\\e91f\"}.icn-bell[_ngcontent-%COMP%]:before{content:\"\\e90b\"}.icn-bookmark-o[_ngcontent-%COMP%]:before{content:\"\\e90c\"}.icn-calendar[_ngcontent-%COMP%]:before{content:\"\\e90d\"}.icn-check[_ngcontent-%COMP%]:before{content:\"\\e90e\"}.icn-community[_ngcontent-%COMP%]:before{content:\"\\e90f\"}.icn-d-arrow-up[_ngcontent-%COMP%]:before{content:\"\\e910\"}.icn-discussion[_ngcontent-%COMP%]:before{content:\"\\e911\"}.icn-edit[_ngcontent-%COMP%]:before{content:\"\\e912\"}.icn-facebook[_ngcontent-%COMP%]:before{content:\"\\e913\"}.icn-filters[_ngcontent-%COMP%]:before{content:\"\\e914\"}.icn-friends[_ngcontent-%COMP%]:before{content:\"\\e915\"}.icn-google[_ngcontent-%COMP%]:before{content:\"\\e916\"}.icn-heart[_ngcontent-%COMP%]:before{content:\"\\e917\"}.icn-home[_ngcontent-%COMP%]:before{content:\"\\e918\"}.icn-img[_ngcontent-%COMP%]:before{content:\"\\e919\"}.icn-inspire[_ngcontent-%COMP%]:before{content:\"\\e91a\"}.icn-journal[_ngcontent-%COMP%]:before{content:\"\\e91b\"}.icn-like[_ngcontent-%COMP%]:before{content:\"\\e91c\"}.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}.pill-block[_ngcontent-%COMP%]{font-size:.875rem;color:#000;padding:.5rem 1.25rem;border-radius:3.125rem;background:#f8f9fb;display:inline-block}.community-about-wrapper[_ngcontent-%COMP%]{display:flex;font-size:14px;color:#000}@media (max-width:1299px){.community-about-wrapper[_ngcontent-%COMP%]{position:fixed;top:218px;z-index:1;bottom:0;left:0;right:0;border-radius:0;padding:0;transition:.3s ease-in-out;transform:translateY(100%);background:#fff;flex-direction:column}.community-about-wrapper.active[_ngcontent-%COMP%]{transform:translateY(0)}}.community-about-wrapper[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0}.community-about-wrapper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#009dfc}.caw-head[_ngcontent-%COMP%]{height:50px;display:flex;align-items:center;justify-content:center;border-bottom:1px solid #e2e5e4;position:relative;flex:0 0 auto}.caw-h-title[_ngcontent-%COMP%]{color:#000;font-size:16px;font-weight:700}.caw-back[_ngcontent-%COMP%]{border:none;background:0 0;color:#000;padding:0;margin:0;left:16px;font-size:16px;position:absolute}.caw-body[_ngcontent-%COMP%]{margin:0}@media (max-width:1299px){.caw-body[_ngcontent-%COMP%]{padding:25px;overflow-y:auto;flex:1 1 auto}}.caw-main[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.caw-side[_ngcontent-%COMP%]{flex:0 0 auto}@media (min-width:1300px){.caw-head[_ngcontent-%COMP%]{display:none}.caw-body[_ngcontent-%COMP%]{display:flex;margin:25px 0}.caw-side[_ngcontent-%COMP%]{width:200px;margin-left:30px}}.caw-title[_ngcontent-%COMP%]{color:#061a73;font-family:Lato,sans-serif;font-weight:600;font-size:16px;margin:0 0 12px;display:flex;align-items:center}.caw-icon[_ngcontent-%COMP%]{font-size:16px;margin-right:18px}@media (min-width:1300px){.caw-icon[_ngcontent-%COMP%]{display:none}}@media (max-width:1299px){.caw-content[_ngcontent-%COMP%]{margin-left:34px}}[_nghost-%COMP%]     .caw-support img{height:auto!important;max-width:100%}"] });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(AboutMoreComponent, [{
        type: Component,
        args: [{
                selector: 'ins-about-more',
                templateUrl: './about-more.component.html',
                styleUrls: ['./about-more.component.scss']
            }]
    }], function () { return []; }, { isMobile: [{
            type: Input
        }], community: [{
            type: Input
        }], showAboutMore: [{
            type: Input
        }], communityLeaders: [{
            type: Input
        }], envUrl: [{
            type: Input
        }], back: [{
            type: Output
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 