import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "ngx-slick-carousel";
function PhotoCarouselComponent_div_0_div_3_div_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 10);
    i0.ɵɵtext(1, " Sensitive Content ");
    i0.ɵɵelementStart(2, "small");
    i0.ɵɵtext(3, "Click to view");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var i_r5 = i0.ɵɵnextContext().index;
    i0.ɵɵpropertyInterpolate1("id", "overlay-", i_r5, "");
} }
function PhotoCarouselComponent_div_0_div_3_Template(rf, ctx) { if (rf & 1) {
    var _r9 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 6);
    i0.ɵɵelementStart(1, "figure", 7);
    i0.ɵɵlistener("click", function PhotoCarouselComponent_div_0_div_3_Template_figure_click_1_listener() { i0.ɵɵrestoreView(_r9); var i_r5 = ctx.index; var ctx_r8 = i0.ɵɵnextContext(2); return ctx_r8.toggleSensitivePhotoWarning(i_r5); });
    i0.ɵɵelement(2, "img", 8);
    i0.ɵɵtemplate(3, PhotoCarouselComponent_div_0_div_3_div_3_Template, 4, 1, "div", 9);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var photo_r4 = ctx.$implicit;
    var i_r5 = ctx.index;
    i0.ɵɵadvance(1);
    i0.ɵɵclassProp("pcb-sensitive", photo_r4 == null ? null : photo_r4.sensitive);
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate1("id", "photo-", i_r5, "");
    i0.ɵɵproperty("src", photo_r4 == null ? null : photo_r4.variant_lg_URL, i0.ɵɵsanitizeUrl);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", photo_r4 == null ? null : photo_r4.sensitive);
} }
function PhotoCarouselComponent_div_0_ng_container_4_a_1_Template(rf, ctx) { if (rf & 1) {
    var _r13 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "a", 13);
    i0.ɵɵlistener("click", function PhotoCarouselComponent_div_0_ng_container_4_a_1_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r13); i0.ɵɵnextContext(2); var _r1 = i0.ɵɵreference(2); return _r1.slickPrev(); });
    i0.ɵɵelementEnd();
} }
function PhotoCarouselComponent_div_0_ng_container_4_a_2_Template(rf, ctx) { if (rf & 1) {
    var _r15 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "a", 14);
    i0.ɵɵlistener("click", function PhotoCarouselComponent_div_0_ng_container_4_a_2_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r15); i0.ɵɵnextContext(2); var _r1 = i0.ɵɵreference(2); return _r1.slickNext(); });
    i0.ɵɵelementEnd();
} }
function PhotoCarouselComponent_div_0_ng_container_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, PhotoCarouselComponent_div_0_ng_container_4_a_1_Template, 1, 0, "a", 11);
    i0.ɵɵtemplate(2, PhotoCarouselComponent_div_0_ng_container_4_a_2_Template, 1, 0, "a", 12);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    var ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r3.currentSlideIndex !== 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r3.currentSlideIndex !== ctx_r3.photos.length - 1);
} }
function PhotoCarouselComponent_div_0_Template(rf, ctx) { if (rf & 1) {
    var _r17 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 1);
    i0.ɵɵelementStart(1, "ngx-slick-carousel", 2, 3);
    i0.ɵɵlistener("afterChange", function PhotoCarouselComponent_div_0_Template_ngx_slick_carousel_afterChange_1_listener($event) { i0.ɵɵrestoreView(_r17); var ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.onAfterChange($event); });
    i0.ɵɵtemplate(3, PhotoCarouselComponent_div_0_div_3_Template, 4, 5, "div", 4);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(4, PhotoCarouselComponent_div_0_ng_container_4_Template, 3, 2, "ng-container", 5);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("config", ctx_r0.slideConfig);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngForOf", ctx_r0.photos);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.photos.length > 1);
} }
var PhotoCarouselComponent = /** @class */ (function () {
    function PhotoCarouselComponent() {
        this.photos = [];
        this.initialPhotoSensitivities = [];
        this.currentSlideIndex = 0;
    }
    PhotoCarouselComponent.prototype.ngOnInit = function () {
        if (!Array.isArray(this.photos)) {
            this.photos = [];
        }
        this.slideConfig = { slidesToShow: 1, slidesToScroll: 1, arrows: false, infinite: false, };
        this.initialPhotoSensitivities = this.photos.map(function (photo) { return (photo.sensitive); });
    };
    PhotoCarouselComponent.prototype.toggleSensitivePhotoWarning = function (index) {
        if (this.initialPhotoSensitivities[index]) {
            this.photos[index].sensitive = !this.photos[index].sensitive;
        }
    };
    PhotoCarouselComponent.prototype.onAfterChange = function (event) {
        this.currentSlideIndex = event.currentSlide;
    };
    PhotoCarouselComponent.ɵfac = function PhotoCarouselComponent_Factory(t) { return new (t || PhotoCarouselComponent)(); };
    PhotoCarouselComponent.ɵcmp = i0.ɵɵdefineComponent({ type: PhotoCarouselComponent, selectors: [["ins-photo-carousel"]], inputs: { photos: "photos" }, decls: 1, vars: 1, consts: [["class", "photo-carousel-block", 4, "ngIf"], [1, "photo-carousel-block"], [1, "carousel", 3, "config", "afterChange"], ["slickModal", "slick-carousel"], ["ngxSlickItem", "", "class", "slide", 4, "ngFor", "ngForOf"], [4, "ngIf"], ["ngxSlickItem", "", 1, "slide"], [1, "pcb-slide", 3, "click"], ["alt", "", 3, "id", "src"], ["class", "pcb-overlay", 3, "id", 4, "ngIf"], [1, "pcb-overlay", 3, "id"], ["class", "icn-arrow-left pcb-nav pcb-prev", 3, "click", 4, "ngIf"], ["class", "icn-arrow-right pcb-nav pcb-next", 3, "click", 4, "ngIf"], [1, "icn-arrow-left", "pcb-nav", "pcb-prev", 3, "click"], [1, "icn-arrow-right", "pcb-nav", "pcb-next", 3, "click"]], template: function PhotoCarouselComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵtemplate(0, PhotoCarouselComponent_div_0_Template, 5, 3, "div", 0);
        } if (rf & 2) {
            i0.ɵɵproperty("ngIf", ctx.photos == null ? null : ctx.photos.length);
        } }, directives: [i1.NgIf, i2.SlickCarouselComponent, i1.NgForOf, i2.SlickItemDirective], 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\"}.photo-carousel-block[_ngcontent-%COMP%]{background:#000;border-radius:10px;overflow:hidden;position:relative}.pcb-slide[_ngcontent-%COMP%]{height:200px;margin:0}@media (max-width:767px){.pcb-slide[_ngcontent-%COMP%]{height:150px}}.pcb-slide[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;position:relative;z-index:0}.pcb-slide.pcb-sensitive[_ngcontent-%COMP%]{cursor:pointer;position:relative}.pcb-slide.pcb-sensitive[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{-webkit-filter:blur(1.125rem);filter:blur(1.125rem)}.pcb-overlay[_ngcontent-%COMP%]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:1;background:rgba(0,0,0,.5);padding:5px 10px;border-radius:5px;font-weight:700;font-size:18px;text-align:center;color:#fff}.pcb-overlay[_ngcontent-%COMP%]   small[_ngcontent-%COMP%]{font-size:14px;display:block}.pcb-nav[_ngcontent-%COMP%]{position:absolute;height:100%;z-index:1;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.7);width:20px;top:0;color:#fff;cursor:pointer}.pcb-nav[_ngcontent-%COMP%]:hover{background:#000}.pcb-prev[_ngcontent-%COMP%]{left:0}.pcb-next[_ngcontent-%COMP%]{right:0}"] });
    return PhotoCarouselComponent;
}());
export { PhotoCarouselComponent };
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(PhotoCarouselComponent, [{
        type: Component,
        args: [{
                selector: 'ins-photo-carousel',
                templateUrl: './photo-carousel.component.html',
                styleUrls: ['./photo-carousel.component.scss']
            }]
    }], function () { return []; }, { photos: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 