import { Component, EventEmitter, Input, Output, ElementRef, ViewChild } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { User } from '../inspire-library.interface';
import { AddMediaOptions } from '../inspire-library.enum';
import { ATTACH_TO_POST_BUTTON_TEXT_REPLY, NEXT_BUTTON_TEXT_REPLY } from '../inspire-library.const';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "@angular/common";
import * as i3 from "../add-media/add-media.component";
import * as i4 from "../click-outside.directive";
const _c0 = ["replyTextArea"];
function ReplyComponent_a_1_Template(rf, ctx) { if (rf & 1) {
    const _r6 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "a", 6);
    i0.ɵɵlistener("click", function ReplyComponent_a_1_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.onCancelReply(); });
    i0.ɵɵelement(1, "i", 7);
    i0.ɵɵelementEnd();
} }
function ReplyComponent_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 8);
    i0.ɵɵelementStart(1, "div", 9);
    i0.ɵɵelementStart(2, "figure", 10);
    i0.ɵɵelement(3, "img", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 12);
    i0.ɵɵelementStart(5, "div", 13);
    i0.ɵɵtext(6);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "div", 14);
    i0.ɵɵtext(8, "Now");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "div", 15);
    i0.ɵɵelementStart(10, "div");
    i0.ɵɵtext(11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    var tmp_2_0 = null;
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("src", ctx_r1.currentUser == null ? null : ctx_r1.currentUser.avatar == null ? null : ctx_r1.currentUser.avatar.medium, i0.ɵɵsanitizeUrl);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", ctx_r1.currentUser == null ? null : ctx_r1.currentUser.nickname, " ");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r1.replyForm == null ? null : (tmp_2_0 = ctx_r1.replyForm.get("reply")) == null ? null : tmp_2_0.value);
} }
function ReplyComponent_a_3_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 19);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r7 = i0.ɵɵnextContext(2);
    var tmp_0_0 = null;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r7.replyForm == null ? null : (tmp_0_0 = ctx_r7.replyForm.get("photos")) == null ? null : tmp_0_0.value == null ? null : tmp_0_0.value.length);
} }
function ReplyComponent_a_3_Template(rf, ctx) { if (rf & 1) {
    const _r9 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "a", 16);
    i0.ɵɵlistener("click", function ReplyComponent_a_3_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.toggleIsAddPhotos(); });
    i0.ɵɵelement(1, "i", 17);
    i0.ɵɵtemplate(2, ReplyComponent_a_3_span_2_Template, 2, 1, "span", 18);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    var tmp_0_0 = null;
    const currVal_0 = ctx_r2.replyForm == null ? null : (tmp_0_0 = ctx_r2.replyForm.get("photos")) == null ? null : tmp_0_0.value == null ? null : tmp_0_0.value.length;
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", currVal_0);
} }
function ReplyComponent_ins_add_media_4_Template(rf, ctx) { if (rf & 1) {
    const _r11 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "ins-add-media", 20);
    i0.ɵɵlistener("setAttachedMedia", function ReplyComponent_ins_add_media_4_Template_ins_add_media_setAttachedMedia_0_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.onSetAttachedPhotos($event); })("updateMediaMetaData", function ReplyComponent_ins_add_media_4_Template_ins_add_media_updateMediaMetaData_0_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.onUpdatePhotoMetaData($event); })("uploadFile", function ReplyComponent_ins_add_media_4_Template_ins_add_media_uploadFile_0_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.onUpload($event); })("closeAddMedia", function ReplyComponent_ins_add_media_4_Template_ins_add_media_closeAddMedia_0_listener() { i0.ɵɵrestoreView(_r11); const ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.onCloseMedia(); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    var tmp_1_0 = null;
    const currVal_1 = ctx_r3.replyForm == null ? null : (tmp_1_0 = ctx_r3.replyForm.get("photos")) == null ? null : tmp_1_0.value;
    i0.ɵɵproperty("media", ctx_r3.photos)("attachedMedia", currVal_1)("customMediaOption", ctx_r3.addMediaOptions == null ? null : ctx_r3.addMediaOptions.mediaOptions)("nextButtonText", ctx_r3.nextButtonText)("isMobile", ctx_r3.isMobile)("attachToPostButtonText", ctx_r3.attachToPostButtonText);
} }
function ReplyComponent_div_5_div_1_Template(rf, ctx) { if (rf & 1) {
    const _r19 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 24);
    i0.ɵɵlistener("click", function ReplyComponent_div_5_div_1_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r19); const _r17 = i0.ɵɵreference(2); const ctx_r18 = i0.ɵɵnextContext(2); return ctx_r18.toggleFocus(true, _r17); });
    i0.ɵɵelement(1, "textarea", 25, 26);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r15 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("placeholder", "Reply to " + ctx_r15.authorName);
} }
function ReplyComponent_div_5_div_2_Template(rf, ctx) { if (rf & 1) {
    const _r21 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 27);
    i0.ɵɵelementStart(1, "button", 28);
    i0.ɵɵlistener("click", function ReplyComponent_div_5_div_2_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r21); const ctx_r20 = i0.ɵɵnextContext(2); return ctx_r20.togglePreviewReply(); });
    i0.ɵɵelementStart(2, "span");
    i0.ɵɵtext(3);
    i0.ɵɵelementStart(4, "span");
    i0.ɵɵtext(5, "Reply");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "button", 29);
    i0.ɵɵelementStart(7, "span");
    i0.ɵɵtext(8, " Post ");
    i0.ɵɵelementStart(9, "span");
    i0.ɵɵtext(10, "Reply");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(11, "i", 30);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r16 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("disabled", ctx_r16.replyForm.invalid);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r16.isPreviewReply ? "Edit" : "Preview", " ");
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("disabled", ctx_r16.replyForm.invalid);
} }
function ReplyComponent_div_5_Template(rf, ctx) { if (rf & 1) {
    const _r23 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 21);
    i0.ɵɵlistener("clickOutside", function ReplyComponent_div_5_Template_div_clickOutside_0_listener() { i0.ɵɵrestoreView(_r23); const ctx_r22 = i0.ɵɵnextContext(); return ctx_r22.toggleFocus(false); });
    i0.ɵɵtemplate(1, ReplyComponent_div_5_div_1_Template, 3, 1, "div", 22);
    i0.ɵɵtemplate(2, ReplyComponent_div_5_div_2_Template, 12, 3, "div", 23);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !ctx_r4.isPreviewReply);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r4.focus || ctx_r4.isPreviewReply);
} }
export class ReplyComponent {
    constructor() {
        this.authorName = '';
        this.showAddMedia = false;
        this.focus = false;
        this.showCancelReply = false;
        this.photos = [];
        this.isMobile = false;
        this.postReply = new EventEmitter();
        this.updatePhotoMetaData = new EventEmitter();
        this.uploadFile = new EventEmitter();
        this.cancelReply = new EventEmitter();
        this.isAddMedia = false;
        this.addMediaOptions = AddMediaOptions;
        this.isPreviewReply = false;
        this.nextButtonText = NEXT_BUTTON_TEXT_REPLY;
        this.attachToPostButtonText = ATTACH_TO_POST_BUTTON_TEXT_REPLY;
    }
    initForm() {
        this.replyForm = new FormGroup({
            reply: new FormControl('', Validators.required),
            photos: new FormControl([]),
        });
    }
    ngOnInit() {
        this.initForm();
        this.photos = this.photos.map(photo => (Object.assign(Object.assign({}, photo), { isSelected: false, isAttached: false })));
    }
    ngOnChanges(changes) {
        var _a, _b;
        for (const propName in changes) {
            if (changes.hasOwnProperty(propName)) {
                switch (propName) {
                    case 'focus': {
                        if (changes['focus'].currentValue) {
                            (_b = (_a = this.replyTextArea) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
                        }
                    }
                }
            }
        }
    }
    ngAfterViewInit() {
        var _a, _b;
        if (this.focus) {
            (_b = (_a = this.replyTextArea) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
        }
    }
    onSubmit() {
        var _a, _b;
        if (this.replyForm.valid) {
            const text = (_a = this.replyForm.value) === null || _a === void 0 ? void 0 : _a.reply;
            const photos = (_b = this.replyForm.value) === null || _b === void 0 ? void 0 : _b.photos;
            this.postReply.emit({ text, photos });
            this.replyForm.reset({ reply: '', photos: [] });
            this.focus = false;
            this.isPreviewReply = false;
        }
    }
    toggleFocus(value, elementRef) {
        this.focus = value;
        if (!!elementRef) {
            elementRef.focus();
        }
    }
    toggleIsAddPhotos() {
        this.isAddMedia = !this.isAddMedia;
    }
    onSetAttachedPhotos(photos) {
        this.replyForm.get('photos').setValue(photos);
        this.toggleFocus(true);
    }
    onUpdatePhotoMetaData(photos) {
        this.updatePhotoMetaData.emit(photos);
    }
    onUpload(files) {
        this.uploadFile.emit(files);
    }
    onCloseMedia() {
        this.isAddMedia = false;
    }
    togglePreviewReply() {
        this.isPreviewReply = !this.isPreviewReply;
        if (!this.isPreviewReply) {
            this.toggleFocus(true);
        }
    }
    onCancelReply() {
        this.cancelReply.emit();
    }
}
ReplyComponent.ɵfac = function ReplyComponent_Factory(t) { return new (t || ReplyComponent)(); };
ReplyComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReplyComponent, selectors: [["ins-reply"]], viewQuery: function ReplyComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, true);
    } if (rf & 2) {
        var _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.replyTextArea = _t.first);
    } }, inputs: { authorName: "authorName", currentUser: "currentUser", showAddMedia: "showAddMedia", focus: "focus", showCancelReply: "showCancelReply", photos: "photos", isMobile: "isMobile" }, outputs: { postReply: "postReply", updatePhotoMetaData: "updatePhotoMetaData", uploadFile: "uploadFile", cancelReply: "cancelReply" }, features: [i0.ɵɵNgOnChangesFeature], decls: 6, vars: 8, consts: [[1, "reply-post-form", 3, "formGroup", "ngSubmit"], ["class", "rpf-close", "id", "cancel-reply", 3, "click", 4, "ngIf"], ["id", "reply-preview", "class", "rfp-preview", 4, "ngIf"], ["id", "add-image-link", "class", "rpf-media", 3, "click", 4, "ngIf"], ["class", "rfp-media-control", 3, "media", "attachedMedia", "customMediaOption", "nextButtonText", "isMobile", "attachToPostButtonText", "setAttachedMedia", "updateMediaMetaData", "uploadFile", "closeAddMedia", 4, "ngIf"], ["class", "rpf-control", 3, "clickOutside", 4, "ngIf"], ["id", "cancel-reply", 1, "rpf-close", 3, "click"], [1, "icn-cross-o"], ["id", "reply-preview", 1, "rfp-preview"], [1, "rfp-profile"], [1, "rfp-avatar"], ["id", "avatar", "alt", "avatar", 3, "src"], [1, "rfp-meta"], ["id", "author_name", 1, "rfp-username"], ["id", "time-ago", 1, "rfp-stamp"], ["id", "reply-text", 1, "rfp-desc"], ["id", "add-image-link", 1, "rpf-media", 3, "click"], [1, "icn-img-o"], ["class", "rfp-media-count", 4, "ngIf"], [1, "rfp-media-count"], [1, "rfp-media-control", 3, "media", "attachedMedia", "customMediaOption", "nextButtonText", "isMobile", "attachToPostButtonText", "setAttachedMedia", "updateMediaMetaData", "uploadFile", "closeAddMedia"], [1, "rpf-control", 3, "clickOutside"], ["class", "rpf-input-group", 3, "click", 4, "ngIf"], ["class", "rpf-c-actions", 4, "ngIf"], [1, "rpf-input-group", 3, "click"], ["id", "reply_text", "type", "text", "formControlName", "reply", 1, "rpf-input", 3, "placeholder"], ["replyTextArea", ""], [1, "rpf-c-actions"], ["id", "toggle-preview-button", "type", "button", 1, "rpf-btn", "rpf-preview-btn", 3, "disabled", "click"], ["type", "submit", "id", "submit_btn", 1, "rpf-btn", "rpf-post-btn", 3, "disabled"], [1, "icn-bolt-up", "rpf-b-icon"]], template: function ReplyComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0);
        i0.ɵɵlistener("ngSubmit", function ReplyComponent_Template_form_ngSubmit_0_listener() { return ctx.onSubmit(); });
        i0.ɵɵtemplate(1, ReplyComponent_a_1_Template, 2, 0, "a", 1);
        i0.ɵɵtemplate(2, ReplyComponent_div_2_Template, 12, 3, "div", 2);
        i0.ɵɵtemplate(3, ReplyComponent_a_3_Template, 3, 1, "a", 3);
        i0.ɵɵtemplate(4, ReplyComponent_ins_add_media_4_Template, 1, 6, "ins-add-media", 4);
        i0.ɵɵtemplate(5, ReplyComponent_div_5_Template, 3, 2, "div", 5);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵclassProp("active", ctx.focus);
        i0.ɵɵproperty("formGroup", ctx.replyForm);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.showCancelReply);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isPreviewReply && !ctx.isAddMedia);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", !ctx.isAddMedia);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isAddMedia);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", !ctx.isAddMedia);
    } }, directives: [i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i2.NgIf, i3.AddMediaComponent, i4.ClickOutsideDirective, i1.DefaultValueAccessor, i1.NgControlStatus, i1.FormControlName], 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\"}.rpf-btn[_ngcontent-%COMP%]{border:none;border-radius:.5rem;line-height:1;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0 1rem;transition:.3s ease-in-out;background:0 0}.rpf-btn[_ngcontent-%COMP%]:hover{background:#f8f9fb}.rpf-btn[disabled][_ngcontent-%COMP%]{background:#c6cbc9;color:#6e6f70;cursor:default}.rpf-preview-btn[_ngcontent-%COMP%]{background:#009dfc;color:#fff}.rpf-preview-btn[_ngcontent-%COMP%]:not([disabled]):hover{background:#008de3}.rpf-post-btn[_ngcontent-%COMP%]{background:#005cc9;color:#fff;margin-left:1.25rem}.rpf-post-btn[_ngcontent-%COMP%]:not([disabled]):hover{background:#0050b0}[_nghost-%COMP%]{display:contents}.reply-post-form[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap}.rpf-media[_ngcontent-%COMP%]{font-size:2.8125rem;margin-right:1.375rem;color:#061a73;flex:0 0 auto;display:flex;align-items:flex-end;cursor:pointer;position:relative}.rpf-control[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;position:relative}.rpf-input-group[_ngcontent-%COMP%]{padding:18px 20px;border-radius:1.75rem;background:#eff1f1}@media (max-width:767px){.rpf-media[_ngcontent-%COMP%]{font-size:2rem}.rpf-input-group[_ngcontent-%COMP%]{padding:10px 15px;border-radius:16px}}.rpf-input[_ngcontent-%COMP%]{resize:none;border:none;width:100%;background:0 0;height:1.25rem;padding:0;font-size:1rem;overflow:hidden}.rpf-c-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-top:.75rem}.rpf-btn[_ngcontent-%COMP%]{height:2.8125rem;width:9.0625rem;font-size:.875rem}@media (max-width:767px){.rpf-btn[_ngcontent-%COMP%]{width:auto;height:32px}.rpf-btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:none}.rpf-post-btn[_ngcontent-%COMP%]{margin-left:.625rem}.active[_ngcontent-%COMP%]   .rpf-media[_ngcontent-%COMP%]{order:1;margin-right:auto}.active[_ngcontent-%COMP%]   .rpf-control[_ngcontent-%COMP%]{display:contents}.active[_ngcontent-%COMP%]   .rpf-input-group[_ngcontent-%COMP%]{width:100%}.active[_ngcontent-%COMP%]   .rpf-c-actions[_ngcontent-%COMP%]{order:2}}.rpf-b-icon[_ngcontent-%COMP%]{margin-left:.3125rem}.active.reply-post-form[_ngcontent-%COMP%]{align-items:flex-end}.active[_ngcontent-%COMP%]   .rpf-input[_ngcontent-%COMP%]{height:6.25rem;overflow-y:auto}.rfp-media-control[_ngcontent-%COMP%]{width:100%}.rfp-media-count[_ngcontent-%COMP%]{width:1.125rem;height:1.125rem;border-radius:50%;color:#fff;font-size:.6875rem;font-weight:700;display:flex;align-items:center;justify-content:center;bottom:-.3125rem;right:-.3125rem;background:#dd002e;position:absolute}.rfp-preview[_ngcontent-%COMP%]{width:100%;margin-bottom:1.875rem}.rfp-profile[_ngcontent-%COMP%]{display:flex;align-items:flex-start}.rfp-avatar[_ngcontent-%COMP%]{margin:0 .9375rem 0 0;width:3.4375rem;height:3.4375rem;border-radius:100%;flex:0 0 auto;border:1px solid #e2e5e4;overflow:hidden}.rfp-avatar[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;display:block}@media (max-width:767px){.rfp-avatar[_ngcontent-%COMP%]{width:32px;height:32px}}.rfp-meta[_ngcontent-%COMP%]{flex:1 1 auto}.rfp-username[_ngcontent-%COMP%]{color:#000;font-size:.875rem;font-weight:700}.rfp-stamp[_ngcontent-%COMP%]{font-size:.875rem;color:#6e6f70}.rfp-desc[_ngcontent-%COMP%]{color:#000;font-size:.875rem;margin-top:.625rem}.rfp-desc[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{font-weight:700;color:#000}.rfp-desc[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{text-decoration:underline}.rpf-close[_ngcontent-%COMP%]{position:absolute;right:-3px;cursor:pointer;font-size:16px;padding-left:10px;background:#fff;opacity:1;top:-10px;color:rgba(0,0,0,.2)}.rpf-close[_ngcontent-%COMP%]:hover{color:rgba(0,0,0,.5)}"] });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(ReplyComponent, [{
        type: Component,
        args: [{
                selector: 'ins-reply',
                templateUrl: './reply.component.html',
                styleUrls: ['./reply.component.scss']
            }]
    }], function () { return []; }, { replyTextArea: [{
            type: ViewChild,
            args: ['replyTextArea']
        }], authorName: [{
            type: Input
        }], currentUser: [{
            type: Input
        }], showAddMedia: [{
            type: Input
        }], focus: [{
            type: Input
        }], showCancelReply: [{
            type: Input
        }], photos: [{
            type: Input
        }], isMobile: [{
            type: Input
        }], postReply: [{
            type: Output
        }], updatePhotoMetaData: [{
            type: Output
        }], uploadFile: [{
            type: Output
        }], cancelReply: [{
            type: Output
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 