import { Component, Input } from '@angular/core';
import { FACEBOOK_BASE_URL, TWITTER_BASE_URL } from '../inspire-library.const';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
function CommunityPartnerComponent_div_5_a_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "a", 18);
    i0.ɵɵtext(1, " Facebook ");
    i0.ɵɵelement(2, "i", 19);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r7 = i0.ɵɵnextContext();
    const i_r2 = ctx_r7.index;
    const partner_r1 = ctx_r7.$implicit;
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵpropertyInterpolate1("id", "partner-facebook-", i_r2, "");
    i0.ɵɵproperty("href", ctx_r3.facebookBaseUrl + (partner_r1 == null ? null : partner_r1.facebook == null ? null : partner_r1.facebook.links[0] == null ? null : partner_r1.facebook.links[0].code), i0.ɵɵsanitizeUrl);
} }
function CommunityPartnerComponent_div_5_a_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "a", 18);
    i0.ɵɵtext(1, " Twitter ");
    i0.ɵɵelement(2, "i", 19);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext();
    const i_r2 = ctx_r8.index;
    const partner_r1 = ctx_r8.$implicit;
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵpropertyInterpolate1("id", "partner-twitter-", i_r2, "");
    i0.ɵɵproperty("href", ctx_r4.twitterBaseUrl + (partner_r1 == null ? null : partner_r1.twitter == null ? null : partner_r1.twitter.feeds[0] == null ? null : partner_r1.twitter.feeds[0].code), i0.ɵɵsanitizeUrl);
} }
function CommunityPartnerComponent_div_5_a_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "a", 20);
    i0.ɵɵtext(1, " Website ");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r9 = i0.ɵɵnextContext();
    const i_r2 = ctx_r9.index;
    const partner_r1 = ctx_r9.$implicit;
    i0.ɵɵpropertyInterpolate1("id", "partner-website-", i_r2, "");
    i0.ɵɵproperty("href", partner_r1 == null ? null : partner_r1.url, i0.ɵɵsanitizeUrl);
} }
function CommunityPartnerComponent_div_5_a_14_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "a", 21);
    i0.ɵɵtext(1, " Donate ");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r10 = i0.ɵɵnextContext();
    const i_r2 = ctx_r10.index;
    const partner_r1 = ctx_r10.$implicit;
    i0.ɵɵpropertyInterpolate1("id", "partner-donate-", i_r2, "");
    i0.ɵɵproperty("href", partner_r1 == null ? null : partner_r1.donate == null ? null : partner_r1.donate.links[0] == null ? null : partner_r1.donate.links[0].link, i0.ɵɵsanitizeUrl);
} }
function CommunityPartnerComponent_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 5);
    i0.ɵɵelementStart(1, "div", 6);
    i0.ɵɵelementStart(2, "div", 7);
    i0.ɵɵelementStart(3, "figure", 8);
    i0.ɵɵelement(4, "img", 9);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 10);
    i0.ɵɵelementStart(6, "h2", 11);
    i0.ɵɵtext(7);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "div", 12);
    i0.ɵɵtemplate(9, CommunityPartnerComponent_div_5_a_9_Template, 3, 2, "a", 13);
    i0.ɵɵtemplate(10, CommunityPartnerComponent_div_5_a_10_Template, 3, 2, "a", 13);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelement(11, "div", 14);
    i0.ɵɵelementStart(12, "div", 15);
    i0.ɵɵtemplate(13, CommunityPartnerComponent_div_5_a_13_Template, 2, 2, "a", 16);
    i0.ɵɵtemplate(14, CommunityPartnerComponent_div_5_a_14_Template, 2, 2, "a", 17);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const partner_r1 = ctx.$implicit;
    const i_r2 = ctx.index;
    i0.ɵɵpropertyInterpolate1("id", "community-partner-", i_r2, "");
    i0.ɵɵadvance(4);
    i0.ɵɵpropertyInterpolate1("id", "partner-image-", i_r2, "");
    i0.ɵɵproperty("src", partner_r1 == null ? null : partner_r1.logo_image, i0.ɵɵsanitizeUrl);
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate1("id", "partner-name-", i_r2, "");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(partner_r1 == null ? null : partner_r1.name);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", partner_r1 == null ? null : partner_r1.facebook == null ? null : partner_r1.facebook.links == null ? null : partner_r1.facebook.links.length);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", partner_r1 == null ? null : partner_r1.twitter == null ? null : partner_r1.twitter.feeds == null ? null : partner_r1.twitter.feeds.length);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", partner_r1 == null ? null : partner_r1.url);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", partner_r1 == null ? null : partner_r1.donate == null ? null : partner_r1.donate.links == null ? null : partner_r1.donate.links.length);
} }
export class CommunityPartnerComponent {
    constructor() {
        this.partners = [];
        this.isMobile = false;
        this.facebookBaseUrl = FACEBOOK_BASE_URL;
        this.twitterBaseUrl = TWITTER_BASE_URL;
    }
    ngOnInit() {
        if (!this.partners || !Array.isArray(this.partners)) {
            this.partners = [];
        }
    }
}
CommunityPartnerComponent.ɵfac = function CommunityPartnerComponent_Factory(t) { return new (t || CommunityPartnerComponent)(); };
CommunityPartnerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CommunityPartnerComponent, selectors: [["ins-community-partner"]], inputs: { partners: "partners", isMobile: "isMobile" }, decls: 6, vars: 3, consts: [[1, "widget-pack", "community-partners-widget"], [1, "wp-head"], [1, "wp-title"], [1, "wp-body"], ["class", "cpw-wrap", 3, "id", 4, "ngFor", "ngForOf"], [1, "cpw-wrap", 3, "id"], [1, "cpw-item"], [1, "cpw-head"], [1, "cpw-figure"], ["alt", "Partners Title", 3, "id", "src"], [1, "cpw-h-meta"], [1, "cpw-title", 3, "id"], [1, "cmw-link-group"], ["class", "cmw-link", "target", "_blank", 3, "id", "href", 4, "ngIf"], [1, "cpw-gap"], [1, "wp-foot"], ["class", "cpw-btn cpw-website", "target", "_blank", 3, "id", "href", 4, "ngIf"], ["class", "cpw-btn cpw-donate", "target", "_blank", 3, "id", "href", 4, "ngIf"], ["target", "_blank", 1, "cmw-link", 3, "id", "href"], [1, "icn-expand"], ["target", "_blank", 1, "cpw-btn", "cpw-website", 3, "id", "href"], ["target", "_blank", 1, "cpw-btn", "cpw-donate", 3, "id", "href"]], template: function CommunityPartnerComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "section", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "h1", 2);
        i0.ɵɵtext(3, "Community Partners");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "div", 3);
        i0.ɵɵtemplate(5, CommunityPartnerComponent_div_5_Template, 15, 9, "div", 4);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵclassProp("community-partners-mobile", ctx.isMobile);
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("ngForOf", ctx.partners);
    } }, directives: [i1.NgForOf, i1.NgIf], 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-title[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:#061a73;margin:0;font-family:Lato,sans-serif}.wp-link[_ngcontent-%COMP%]{color:#6e6f70;cursor:pointer}@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\"}.cpw-btn[_ngcontent-%COMP%]{border:none;border-radius:.5rem;font-size:1rem;line-height:1;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0 1rem;height:2.25rem;transition:.3s ease-in-out;background:0 0}.cpw-btn[_ngcontent-%COMP%]:hover{background:#f8f9fb}.cpw-btn[disabled][_ngcontent-%COMP%]{background:#c6cbc9;color:#6e6f70;cursor:default}.cpw-website[_ngcontent-%COMP%]{background:#009dfc;color:#fff}.cpw-website[_ngcontent-%COMP%]:not([disabled]):hover{background:#008de3}.cpw-donate[_ngcontent-%COMP%]{background:#005cc9;color:#fff}.cpw-donate[_ngcontent-%COMP%]:not([disabled]):hover{background:#0050b0}.widget-pack[_ngcontent-%COMP%]{padding-bottom:0}.widget-pack.community-partners-mobile[_ngcontent-%COMP%]{background:#f8f9fb;margin:0 -30px;padding:25px 0 0;border:none}@media (max-width:767px){.widget-pack.community-partners-mobile[_ngcontent-%COMP%]{margin:0 -16px}}.widget-pack.community-partners-mobile[_ngcontent-%COMP%]   .wp-head[_ngcontent-%COMP%]{margin-bottom:20px;padding:0 25px}.widget-pack.community-partners-mobile[_ngcontent-%COMP%]   .wp-body[_ngcontent-%COMP%]{display:flex;overflow-x:auto;padding:0 25px 25px}.widget-pack.community-partners-mobile[_ngcontent-%COMP%]   .cpw-item[_ngcontent-%COMP%]{padding:25px!important;background:#fff;border-radius:8px;width:300px;flex:0 0 auto;height:100%;display:flex;flex-direction:column}.widget-pack.community-partners-mobile[_ngcontent-%COMP%]   .wp-foot[_ngcontent-%COMP%]{margin-top:auto!important}.widget-pack.community-partners-mobile[_ngcontent-%COMP%]   .cpw-wrap[_ngcontent-%COMP%]{padding-right:20px;border:none!important}.widget-pack.community-partners-mobile[_ngcontent-%COMP%]   .cpw-wrap[_ngcontent-%COMP%]:last-child{padding-right:25px}.wp-link[_ngcontent-%COMP%]{line-height:1;text-decoration:none!important;font-size:.75rem!important}.wp-link[_ngcontent-%COMP%]:hover{text-decoration:underline;color:#d5d9d7}.wp-link[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:.5rem;margin-left:.3125rem}.cmw-link[_ngcontent-%COMP%]{font-size:.75rem;color:#005cc9;display:inline-block}.cmw-link[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:.625rem;margin-left:.3125rem}.cmw-link[_ngcontent-%COMP%]:not(:last-child){margin-right:10px}.cpw-head[_ngcontent-%COMP%]{display:flex;align-items:flex-start}.cpw-figure[_ngcontent-%COMP%]{flex:0 0 auto;margin:0 1.25rem 0 0}.cpw-figure[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:4.375rem;max-height:4.375rem}.cpw-h-meta[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.cpw-title[_ngcontent-%COMP%]{color:#000;font-weight:700;font-size:1rem;margin:0 0 .3125rem}.wp-body[_ngcontent-%COMP%]{margin:0!important}.cpw-item[_ngcontent-%COMP%]{padding:1.5625rem 0}.cpw-wrap[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid #e2e5e4}.cpw-desc[_ngcontent-%COMP%]{font-size:.875rem}.cpw-btn[_ngcontent-%COMP%]{margin:0 10px}.cpw-donate[_ngcontent-%COMP%], .cpw-website[_ngcontent-%COMP%]{flex:1 1 auto}.wp-foot[_ngcontent-%COMP%]{display:flex;align-items:center;margin:auto -.625rem 0!important}.cpw-gap[_ngcontent-%COMP%]{height:25px}"] });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(CommunityPartnerComponent, [{
        type: Component,
        args: [{
                selector: 'ins-community-partner',
                templateUrl: './community-partner.component.html',
                styleUrls: ['./community-partner.component.scss']
            }]
    }], function () { return []; }, { partners: [{
            type: Input
        }], isMobile: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 