import{f as j,g as k}from"./chunk-VWJFXZ25.js";import{a as M}from"./chunk-Y7ZORWP7.js";import{a as U}from"./chunk-CFFHWVA5.js";import{a as I,b as p}from"./chunk-C7V3KKPV.js";import{A as N,f as C,i as E,y as F}from"./chunk-2YE7XEKS.js";import{$d as i,Vd as e,Wd as s,Xd as S,_d as x,a as l,ae as T,b as y,ba as o,c as v,de as D,ie as n,je as g,ka as $,le as a,oe as c,pa as L,w as A}from"./chunk-UNHECMG2.js";var H=i({Id:s,JobTrainer:n(s),ApprenticeshipManagerId:s,ContractDateFrom:n(c),ContractDateTo:n(c)}),X=i({Id:s,StudentId:s,CompanyName:g(e),CompanyNameAddition:g(e)});var O=i({Id:s,RepresentativeId:s,RepresentativeAfterMajority:S});var G=i({Id:s}),J=T({HRef:n(e)}),q=T({From:c,To:c,EventNumber:e,EventDesignation:e,Designation:n(e)}),z=D([G,J,q]),w=i({Id:e,LessonRef:z,StudentRef:a,TypeRef:a,Type:n(e),ConfirmationState:n(e),ConfirmationStateId:s,Comment:n(e),StudentFullName:e,RegistrationId:s,HRef:e});var K=i({Id:e,LessonRef:a,StudentRef:a,TypeRef:a,Type:n(e),Comment:n(e),StudentFullName:e,HRef:e});var V=i({LessonRef:a,StudentRef:a,TypeRef:a,Comment:n(e),StudentFullName:e,Type:n(e),RegistrationId:s,HRef:e});var W=i({Id:s,From:c,To:c,EventId:s,EventNumber:e,EventDesignation:e,EventLocation:n(e),EventManagerInformation:g(e),Rooms:g(x(i({Id:s,Designation:e})))});function B(f,m,b={}){var d=b,{additionalFields:t}=d,r=v(d,["additionalFields"]);let u=r.params instanceof C?r.params:new C({fromObject:r.params});return u=u.set("fields",["Id","From","To","EventId","EventNumber","EventDesignation","EventLocation","Rooms",...t??[]].join(",")).set("expand","Rooms"),f.get(m,y(l({},r),{params:u})).pipe(o(p(W)))}var R=class extends U{constructor(m,t,r,b,d,u="Id"){super(m,t,r,b),this.labelAttr=d,this.keyAttr=u,this.typeaheadCodec=i(F(this.codec.props,[this.keyAttr,this.labelAttr]))}getTypeaheadItems(m,t){let r={params:{fields:[this.keyAttr,this.labelAttr].join(","),[`filter.${this.labelAttr}`]:`~*${m}*`}};return this.http.get(`${this.baseUrl}/`,t?this.mergeHttpParams(r,t):r).pipe(o(p(this.typeaheadCodec)),A(b=>b.map(d=>({Key:d[this.keyAttr],Value:d[this.labelAttr]}))))}getTypeaheadItemByKey(m){return this.http.get(`${this.baseUrl}/${m}`,{params:{fields:[this.keyAttr,this.labelAttr].join(",")}}).pipe(o(I(this.typeaheadCodec)),A(t=>({Key:t[this.keyAttr],Value:t[this.labelAttr]})))}mergeHttpParams(m,t){let r={params:l(l({},m.params),t.params)};return t.params.fields&&(r.params.fields=m.params.fields.concat(",",t.params.fields)),r}};var Mt=(()=>{class f extends R{constructor(){let t=L(E),r=L(N);super(t,r,j,"Students","FullName")}getWithClassRegistrations(t,r){return this.http.get(`${this.baseUrl}/${t}`,y(l({},r),{params:{expand:"ClassRegistrations"}})).pipe(o(I(k)))}getLegalRepresentatives(t,r){return this.http.get(`${this.baseUrl}/${t}/LegalRepresentatives`,{params:r}).pipe(o(p(O)))}getCurrentApprenticeshipContracts(t,r){return this.http.get(`${this.baseUrl}/${t}/ApprenticeshipContracts/Current`,r).pipe(o(p(H)))}getLessonAbsences(t,r){return this.http.get(`${this.baseUrl}/${t}/LessonAbsences`,{params:r}).pipe(o(p(w)))}getLessonIncidents(t,r){return this.http.get(`${this.baseUrl}/${t}/LessonIncidents`,{params:r}).pipe(o(p(V)))}getLessonDispensations(t,r){return this.http.get(`${this.baseUrl}/${t}/LessonDispensations`,{params:r}).pipe(o(p(K)))}getTimetableEntries(t,r={}){return B(this.http,`${this.baseUrl}/${t}/TimetableEntries/CurrentSemester`,{params:r,additionalFields:["EventManagerInformation"]})}getAdditionalInformations(t){return this.http.get(`${this.baseUrl}/${t}/AdditionalInformations`).pipe(o(p(M)))}static{this.\u0275fac=function(r){return new(r||f)}}static{this.\u0275prov=$({token:f,factory:f.\u0275fac,providedIn:"root"})}}return f})();export{H as a,X as b,w as c,B as d,R as e,Mt as f};
