1import{a as v,b as z}from"./chunk-QT6EFAZT.js";import{a as $}from"./chunk-O2K735F6.js";import{c as Q,e as H,n as U,o as Y}from"./chunk-SGGWWVGS.js";import"./chunk-JEL6HJ7P.js";import{$a as R,_a as E,hc as j,ic as O,n as M,o as N,sa as P,wa as B,ya as q}from"./chunk-YQOD7X2Z.js";import"./chunk-563YFTIG.js";import"./chunk-36JN3LZY.js";import"./chunk-WPHW6CRH.js";import{L as V,e as b,h as x,i as G,p as T,s as k,t as F,w as A}from"./chunk-76O7YCWW.js";import{e as _}from"./chunk-YYIIKC2W.js";import"./chunk-3WYGUSDH.js";import"./chunk-LU7SZU5X.js";import{A as S,q as I}from"./chunk-PO2RDVKE.js";import{N as d,Pb as f,Rb as h,Tc as C,Uc as w,Wb as r,Xb as c,Yb as l,Zb as u,db as s,lc as g,pb as m,ub as D,zc as y}from"./chunk-3URBZWPM.js";import"./chunk-ODN5LVDJ.js";function J(i,o){if(i&1&&u(0,"fab-dropdown-simple",9),i&2){let p=g(2);r("formControl",p.formGroup.get("issue"))("content",p.assessmentSchedulingIssueDropdownConfig)}}function L(i,o){i&1&&u(0,"fab-loader")}function W(i,o){if(i&1&&(c(0,"app-question-section",5),f(1,J,1,2,"fab-dropdown-simple",9)(2,L,1,0,"fab-loader"),l()),i&2){let p=g();s(),h(p.assessmentSchedulingIssueDropdownConfig?1:2)}}var me=(()=>{let o=class o{constructor(e,n){this.service=e,this.router=n,this.today=new Date,this.minDate=new Date(new Date(this.today).setDate(this.today.getDate()-45)),this.tooltip="Please select a date and scheduling issue to continue",this.config=Y(this.service.pathway,"delivery"),this.nextBtn=Q(()=>this.router.navigate(U.studentInformation),{title:"Continue to student information"}),this.formGroup=new z({assessmentDate:new v(null,{validators:[b.required]}),issue:new v(null,{showIf:[{controlName:"assessmentDate",condition:a=>a!==null}],validators:[b.required]})}),this.service.incidentData.pipe(d()).subscribe(a=>{this.initialSelection=a.issue?{value:a.issue.key,label:a.issue.value}:null,a.scheduledDate&&this.updateDateFormControl_compat(a.scheduledDate)});let t=this.service.incidentData.value;this.formGroup.patchValue({issue:t.issue?{value:t.issue.key,label:t.issue.value}:null})}ngOnInit(){this.minDate.setUTCHours(0,0,0,0),this.service.getQuestionAndAnswers().pipe(d()).subscribe(e=>{this.assessmentSchedulingIssueDropdownConfig={group:"scheduling-issue",options:e.issue.map(n=>({value:n.key,label:n.value})),placeholder:"Select reason",required:!0,label:"Please advise why you were unable to schedule the assessment"}}),this.formGroup.valueChanges.subscribe(e=>{this.service.updateDate(e.assessmentDate),this.service.updateScheduleIssueOption(e.issue?{key:e.issue.value,value:e.issue.label}:null)})}isValid(){let e=this.formGroup.valid;return this.service.setFormState({isValid:e,tooltip:this.tooltip}),e}updateDateFormControl_compat(e){e=new Date(e),this.formGroup.patchValue({assessmentDate:e})}};o.\u0275fac=function(n){return new(n||o)(m(H),m(_))},o.\u0275cmp=D({type:o,selectors:[["app-scheduling-issue"]],decls:11,vars:16,consts:[[3,"config"],[3,"formGroup"],["header","Assessment date",3,"step","stepTitle"],["for","assessment_date"],["dateFormat","dd/mm/yy","formControlName","assessmentDate","inputId","assessment_date","data-auto","assessmentDate","fluid","",3,"maxDate","minDate","showIcon"],["header","Assessment scheduling issue"],["id","nav-btns"],["id","incident-reporting-secondary-btn",3,"button"],["id","incident-reporting-primary-btn",3,"button","positionInput","visible","enabled","tooltip"],[3,"formControl","content"]],template:function(n,t){n&1&&(u(0,"fab-progress-indicator",0),c(1,"form",1)(2,"app-question-section",2)(3,"label",3),y(4,"Select the date when the assessment took place or was due to take place. You can only submit an incident which occurred within the last 45 days."),l(),u(5,"p-datepicker",4),l(),f(6,W,3,1,"app-question-section",5),C(7,"async"),l(),c(8,"section",6),u(9,"fab-button",7)(10,"fab-button",8),l()),n&2&&(r("config",t.config.progressIndicator),s(),r("formGroup",t.formGroup),s(),r("step",t.config.progressIndicator.currentStep)("stepTitle",t.config.title),s(3),r("maxDate",t.today)("minDate",t.minDate)("showIcon",!0),s(),h(w(7,14,t.formGroup.get("issue").visible$)?6:-1),s(3),r("button",t.service.genericBackButtonConfig),s(),r("button",t.nextBtn)("positionInput","left")("visible",!t.isValid())("enabled",t.isValid())("tooltip",t.tooltip))},dependencies:[q,B,S,$,P,O,j,R,E,V,T,x,G,k,F,A,N,M,I],styles:[`:root{--aat-ui-grey-25: #bfbfbf;--aat-ui-grey-55: #737373;--aat-slate: #3a5066;--aat-ui-grey-05: #f2f2f2}#incident-reporting-layout #hero-container{background-color:#dce6f0;height:100px;padding:8px;text-align:center;display:flex;justify-content:center;align-items:center;border-bottom:1px solid #000000}
1#incident-reporting-layout #nav-btns{display:flex;flex-direction:row;justify-content:center}#incident-reporting-primary-btn{margin-left:auto}#router-content{margin:0 10%}@media (min-width: 768px){#router-content{margin:0 15%}} 2`],encapsulation:2});let i=o;return i})();export{me as SchedulingIssueComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.