import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { LoadingService } from '../../../../services/loading/loading.service';
import * as i0 from "@angular/core";
import * as i1 from "@angular/router";
import * as i2 from "../../../../services/loading/loading.service";
import * as i3 from "rpx-xui-translation";
const _c0 = (a0, a1, a2) => ["/", "cases", "case-details", a0, a1, a2, "tasks"];
export class MultipleTasksExistComponent {
    route;
    loadingService;
    caseId;
    jurisdiction;
    caseType;
    constructor(route, loadingService) {
        this.route = route;
        this.loadingService = loadingService;
        this.caseId = this.route.snapshot.data.case.case_id;
        this.jurisdiction = this.route.snapshot.data.case.case_type.jurisdiction.id;
        this.caseType = this.route.snapshot.data.case.case_type.id;
    }
    ngOnInit() {
        // Check if the loading service has a shared spinner
        if (this.loadingService.hasSharedSpinner()) {
            this.loadingService.unregisterSharedSpinner();
        }
    }
    static ɵfac = function MultipleTasksExistComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MultipleTasksExistComponent)(i0.ɵɵdirectiveInject(i1.ActivatedRoute), i0.ɵɵdirectiveInject(i2.LoadingService)); };
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MultipleTasksExistComponent, selectors: [["app-multiple-tasks-exist"]], decls: 24, vars: 23, consts: [[1, "govuk-!-margin-9"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], ["href", "#"], [1, "govuk-form-group", "govuk-form-group--error"], [1, "govuk-heading-m"], [3, "routerLink"]], template: function MultipleTasksExistComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h2", 2);
            i0.ɵɵtext(3);
            i0.ɵɵpipe(4, "rpxTranslate");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(5, "div", 3)(6, "ul", 4)(7, "li")(8, "a", 5);
            i0.ɵɵtext(9);
            i0.ɵɵpipe(10, "rpxTranslate");
            i0.ɵɵelementEnd()()()()();
            i0.ɵɵelementStart(11, "div", 6)(12, "h2", 7);
            i0.ɵɵtext(13);
            i0.ɵɵpipe(14, "rpxTranslate");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(15, "p");
            i0.ɵɵtext(16);
            i0.ɵɵpipe(17, "rpxTranslate");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(18, "p");
            i0.ɵɵtext(19);
            i0.ɵɵpipe(20, "rpxTranslate");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(21, "a", 8);
            i0.ɵɵtext(22);
            i0.ɵɵpipe(23, "rpxTranslate");
            i0.ɵɵelementEnd()()();
        } if (rf & 2) {
            i0.ɵɵadvance(3);
            i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 7, "There is a problem"), " ");
            i0.ɵɵadvance(6);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(10, 9, "Multiple tasks exist"));
            i0.ɵɵadvance(4);
            i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(14, 11, "Multiple tasks exist"), " ");
            i0.ɵɵadvance(3);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(17, 13, "You're starting work which could complete more than one of the active tasks for this case."));
            i0.ɵɵadvance(3);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(20, 15, "Return to tasks tab and start the event from there."));
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction3(19, _c0, ctx.jurisdiction, ctx.caseType, ctx.caseId));
            i0.ɵɵadvance();
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(23, 17, "Return to tasks tab"));
        } }, dependencies: [i1.RouterLink, i3.RpxTranslatePipe], encapsulation: 2 });
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MultipleTasksExistComponent, [{
        type: Component,
        args: [{ selector: 'app-multiple-tasks-exist', template: "<div class=\"govuk-!-margin-9\">\n  <div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"error-summary\">\n    <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n      {{'There is a problem' | rpxTranslate}}\n    </h2>\n    <div class=\"govuk-error-summary__body\">\n      <ul class=\"govuk-list govuk-error-summary__list\">\n        <li>\n          <a href=\"#\">{{'Multiple tasks exist' | rpxTranslate}}</a>\n        </li>\n      </ul>\n    </div>\n  </div>\n\n  <div class=\"govuk-form-group govuk-form-group--error\">\n    <h2 class=\"govuk-heading-m\">\n      {{'Multiple tasks exist' | rpxTranslate}}\n    </h2>\n    <p>{{\"You're starting work which could complete more than one of the active tasks for this case.\" | rpxTranslate}}</p>\n    <p>{{'Return to tasks tab and start the event from there.' | rpxTranslate}}</p>\n    <a [routerLink]=\"['/', 'cases', 'case-details', jurisdiction, caseType, caseId, 'tasks']\">{{'Return to tasks tab' | rpxTranslate}}</a>\n  </div>\n</div>\n" }]
    }], () => [{ type: i1.ActivatedRoute }, { type: i2.LoadingService }], null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MultipleTasksExistComponent, { className: "MultipleTasksExistComponent", filePath: "lib/shared/components/event-start/components/multiple-tasks-exist/multiple-tasks-exist.component.ts", lineNumber: 9 }); })();
//# sourceMappingURL=data:application/json;base64, 