import { Component, Input } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { QueryCreateContext } from '../../models/query-create-context.enum';
import * as i0 from "@angular/core";
import * as i1 from "@angular/router";
import * as i2 from "@angular/common";
import * as i3 from "../../../markdown/markdown.component";
import * as i4 from "rpx-xui-translation";
function QueryConfirmationComponent_main_0_ng_container_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "div", 5)(2, "h1", 6);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "rpxTranslate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 7);
    i0.ɵɵelement(6, "ccd-markdown", 8);
    i0.ɵɵpipe(7, "rpxTranslate");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(8, "div", 9)(9, "h3", 10);
    i0.ɵɵtext(10);
    i0.ɵɵpipe(11, "rpxTranslate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(12, "ccd-markdown", 8);
    i0.ɵɵpipe(13, "rpxTranslate");
    i0.ɵɵelementStart(14, "p");
    i0.ɵɵtext(15);
    i0.ɵɵpipe(16, "rpxTranslate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(17, "p");
    i0.ɵɵtext(18);
    i0.ɵɵpipe(19, "rpxTranslate");
    i0.ɵɵelementStart(20, "a", 11);
    i0.ɵɵtext(21);
    i0.ɵɵpipe(22, "rpxTranslate");
    i0.ɵɵelementEnd()()();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 11, "Query submitted"));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("content", i0.ɵɵpipeBind1(7, 13, ctx_r0.callbackConfirmationMessageText == null ? null : ctx_r0.callbackConfirmationMessageText.header));
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(11, 15, "What happens next"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("content", i0.ɵɵpipeBind1(13, 17, ctx_r0.callbackConfirmationMessageText == null ? null : ctx_r0.callbackConfirmationMessageText.body));
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(16, 19, "When the response is available it will be added to the 'Queries' section."));
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(19, 21, "You can"), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate3("routerLink", "/cases/case-details/", ctx_r0.jurisdiction, "/", ctx_r0.caseType, "/", ctx_r0.caseId, "");
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(22, 23, "Go back to the case"));
} }
function QueryConfirmationComponent_main_0_ng_container_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "div", 5)(2, "h1", 6);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "rpxTranslate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 12);
    i0.ɵɵtext(6);
    i0.ɵɵpipe(7, "rpxTranslate");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(8, "div", 9);
    i0.ɵɵtext(9);
    i0.ɵɵpipe(10, "rpxTranslate");
    i0.ɵɵelementStart(11, "a", 13);
    i0.ɵɵtext(12);
    i0.ɵɵpipe(13, "rpxTranslate");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(14, " or ");
    i0.ɵɵelementStart(15, "a", 14);
    i0.ɵɵtext(16);
    i0.ɵɵpipe(17, "rpxTranslate");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 13, "Query response submitted"));
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 15, "This query response has been added to the case"));
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 17, "You can"), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate3("routerLink", "/cases/case-details/", ctx_r0.jurisdiction, "/", ctx_r0.caseType, "/", ctx_r0.caseId, "/tasks");
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(13, 19, "return to tasks"));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate3("routerLink", "/cases/case-details/", ctx_r0.jurisdiction, "/", ctx_r0.caseType, "/", ctx_r0.caseId, "");
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(17, 21, "Go back to the case"));
} }
function QueryConfirmationComponent_main_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "main", 1)(1, "div", 2)(2, "div", 3);
    i0.ɵɵtemplate(3, QueryConfirmationComponent_main_0_ng_container_3_Template, 23, 25, "ng-container", 4)(4, QueryConfirmationComponent_main_0_ng_container_4_Template, 18, 23, "ng-container", 4);
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", ctx_r0.queryCreateContext === ctx_r0.queryCreateContextEnum.NEW_QUERY || ctx_r0.queryCreateContext === ctx_r0.queryCreateContextEnum.FOLLOWUP);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r0.queryCreateContext === ctx_r0.queryCreateContextEnum.RESPOND);
} }
export class QueryConfirmationComponent {
    route;
    queryCreateContext;
    callbackConfirmationMessageText = {};
    caseId = '';
    jurisdiction = '';
    caseType = '';
    queryCreateContextEnum = QueryCreateContext;
    constructor(route) {
        this.route = route;
    }
    ngOnInit() {
        this.caseId = this.route.snapshot.params.cid;
        this.jurisdiction = this.route.snapshot.params.jurisdiction;
        this.caseType = this.route.snapshot.params.caseType;
    }
    static ɵfac = function QueryConfirmationComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryConfirmationComponent)(i0.ɵɵdirectiveInject(i1.ActivatedRoute)); };
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryConfirmationComponent, selectors: [["ccd-query-confirmation"]], inputs: { queryCreateContext: "queryCreateContext", callbackConfirmationMessageText: "callbackConfirmationMessageText" }, decls: 1, vars: 1, consts: [["class", "govuk-main-wrapper", 4, "ngIf"], [1, "govuk-main-wrapper"], [1, "govuk-grid-row"], [1, "govuk-grid-column-two-thirds"], [4, "ngIf"], [1, "govuk-panel", "govuk-panel--confirmation"], [1, "govuk-panel__title"], [1, "qm-confirmation", "govuk-panel__body"], [3, "content"], [1, "govuk-body"], [1, "govuk-heading-s"], [1, "govuk-link", 3, "routerLink"], [1, "govuk-panel__body"], ["id", "tasks-link", 1, "govuk-link", 3, "routerLink"], ["id", "case-link", 1, "govuk-link", 3, "routerLink"]], template: function QueryConfirmationComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵtemplate(0, QueryConfirmationComponent_main_0_Template, 5, 2, "main", 0);
        } if (rf & 2) {
            i0.ɵɵproperty("ngIf", ctx.queryCreateContext);
        } }, dependencies: [i2.NgIf, i1.RouterLink, i3.MarkdownComponent, i4.RpxTranslatePipe], encapsulation: 2 });
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryConfirmationComponent, [{
        type: Component,
        args: [{ selector: 'ccd-query-confirmation', template: "<main class=\"govuk-main-wrapper\" *ngIf=\"queryCreateContext\">\n  <div class=\"govuk-grid-row\">\n    <div class=\"govuk-grid-column-two-thirds\">\n      <ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY || queryCreateContext === queryCreateContextEnum.FOLLOWUP\">\n        <div class=\"govuk-panel govuk-panel--confirmation\">\n          <h1 class=\"govuk-panel__title\">{{'Query submitted' | rpxTranslate}}</h1>\n          <div class=\"qm-confirmation govuk-panel__body\">\n            <ccd-markdown [content]=\"callbackConfirmationMessageText?.header | rpxTranslate\"></ccd-markdown>\n          </div>\n        </div>\n        <div class=\"govuk-body\">\n          <h3 class=\"govuk-heading-s\">{{'What happens next' | rpxTranslate}}</h3>\n          <ccd-markdown [content]=\"callbackConfirmationMessageText?.body | rpxTranslate\"></ccd-markdown>\n          <p>{{'When the response is available it will be added to the \\'Queries\\' section.' | rpxTranslate}}</p>\n          <p>\n            {{'You can' | rpxTranslate}}\n            <a class=\"govuk-link\" routerLink=\"/cases/case-details/{{jurisdiction}}/{{caseType}}/{{caseId}}\">{{'Go back to the case' | rpxTranslate}}</a>\n          </p>\n        </div>\n      </ng-container>\n      <ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.RESPOND\">\n        <div class=\"govuk-panel govuk-panel--confirmation\">\n          <h1 class=\"govuk-panel__title\">{{'Query response submitted' | rpxTranslate}}</h1>\n          <div class=\"govuk-panel__body\">{{'This query response has been added to the case' | rpxTranslate}}</div>\n        </div>\n        <div class=\"govuk-body\">\n          {{'You can' | rpxTranslate}}\n          <a class=\"govuk-link\" id=\"tasks-link\" routerLink=\"/cases/case-details/{{jurisdiction}}/{{caseType}}/{{caseId}}/tasks\">{{'return to tasks' | rpxTranslate}}</a> or\n          <a class=\"govuk-link\" id=\"case-link\" routerLink=\"/cases/case-details/{{jurisdiction}}/{{caseType}}/{{caseId}}\">{{'Go back to the case' | rpxTranslate}}</a>\n        </div>\n      </ng-container>\n    </div>\n  </div>\n</main>\n" }]
    }], () => [{ type: i1.ActivatedRoute }], { queryCreateContext: [{
            type: Input
        }], callbackConfirmationMessageText: [{
            type: Input
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryConfirmationComponent, { className: "QueryConfirmationComponent", filePath: "lib/shared/components/palette/query-management/components/query-confirmation/query-confirmation.component.ts", lineNumber: 9 }); })();
//# sourceMappingURL=data:application/json;base64, 