1import{a as Ie,b as ke}from"./chunk-4M7WX3LP.js";import{a as _e}from"./chunk-JQNMLS3D.js";import{a as w}from"./chunk-YPNCABGK.js";import{f as ve,j as xe,o as Ee,p as he,q as be,u as Ce}from"./chunk-CUDLLWXM.js";import"./chunk-CFEIYY4N.js";import{h as ge,j as fe,k as ue}from"./chunk-Q2YUDMFY.js";import"./chunk-PMRT7CNA.js";import{a as H}from"./chunk-RLJZCKTK.js";import{b as se,d as me}from"./chunk-MZ46CTMZ.js";import"./chunk-PFOT56QO.js";import{$a as c,$b as pe,Ba as Q,Ca as A,D as Z,Da as g,E as q,Gb as le,Hb as ce,I as R,J as Y,L as u,Ma as F,Na as l,O as T,Oa as s,P as M,Pa as E,Qa as O,Sa as ee,Ta as te,Ua as ie,Ub as j,Wb as h,Xa as y,Yb as V,ab as p,ba as i,bb as B,cb as N,cc as de,db as L,ga as v,gb as ne,gc as b,h as $,ia as J,ja as K,l as G,na as f,nb as oe,o as z,ob as re,ra as d,ta as D,v as W,va as r,wa as o,xa as x,ya as k,yb as ae,za as S}from"./chunk-WNHH6JPN.js";var Be=(()=>{class t extends me{getAll(){return this.http.get(this.endpoint)}constructor(e,n,a,_,C){super(e,n),this.http=e,this.log=n,this.localeService=a,this.router=_,this.activatedRoute=C,this.endpoint="/orders/cancellation-reasons"}static{this.\u0275fac=function(n){return new(n||t)(u(ce),u(se),u(b),u(h),u(j))}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Oe=H.App.Enums.Orders.OrderStateEnum,P=H.App.Enums.PublicErrorCodeEnum,X=t=>({locale:t}),Ne=t=>({taxPrice:t});function je(t,m){t&1&&(r(0,"div",11),x(1,"i",12),o())}function we(t,m){t&1&&(r(0,"div",13)(1,"h3"),l(2),c(3,"translate"),o()()),t&2&&(i(2),s(p(3,1,"pages.booking_edit.complete_booking_refunded")))}function De(t,m){t&1&&(r(0,"div",13)(1,"h3"),l(2),c(3,"translate"),o()()),t&2&&(i(2),s(p(3,1,"pages.booking_edit.refund_pending")))}function Ae(t,m){if(t&1&&(r(0,"span"),l(1),o()),t&2){let e=g(4).$implicit;i(),E("(vs. ",e.vc_booking.comparison_vehicle.model_title,")")}}function Le(t,m){if(t&1&&(r(0,"p",36),l(1),f(2,Ae,2,1,"span",10),o()),t&2){let e=g(3).$implicit;i(),E("",e.vc_booking.vehicle.model_title," "),i(),d("ngIf",e.vc_booking==null||e.vc_booking.comparison_vehicle==null?null:e.vc_booking.comparison_vehicle.model_title)}}function Ve(t,m){if(t&1&&(r(0,"p",36),l(1),c(2,"translate"),o()),t&2){let e=g(3).$implicit;i(),s(p(2,1,"enums.cart.vehicle_booking_types."+e.vc_booking.booking_type))}}function He(t,m){if(t&1&&(k(0),f(1,Le,3,2,"p",26)(2,Ve,3,3,"p",26),S()),t&2){let e=g(2).$implicit;i(),d("ngIf",e.vc_booking==null||e.vc_booking.vehicle==null?null:e.vc_booking.vehicle.model_title),i(),d("ngIf",e.vc_booking==null?null:e.vc_booking.booking_type)}}function Ue(t,m){if(t&1&&(r(0,"p",36),l(1),o()),t&2){let e=g(2).$implicit;i(),s(e.versioned_article_price.localized_title)}}function Xe(t,m){if(t&1&&(r(0,"div",37),l(1),c(2,"currency"),o()),t&2){let e,n=g(2).$implicit;i(),s(B(2,1,((e=n.article_price_display==null?null:n.article_price_display.gross_price)!==null&&e!==void 0?e:n.versioned_article_price.gross_price)*n.quantity/100,"EUR"))}}function $e(t,m){t&1&&(r(0,"div",38),l(1),c(2,"translate"),o()),t&2&&(i(),s(p(2,1,"pages.booking_edit.free_item_price")))}function Ge(t,m){if(t&1&&(r(0,"tr")(1,"td",15)(2,"p",25),l(3),o(),f(4,He,3,2,"ng-container",10)(5,Ue,2,1,"p",26),r(6,"p",27)(7,"span"),l(8),c(9,"dfnsParseIso"),c(10,"formatInTimeZone"),o(),r(11,"span"),l(12," | "),o(),r(13,"span"),l(14),c(15,"dfnsParseIso"),c(16,"formatInTimeZone"),c(17,"translate"),o(),r(18,"span"),l(19," - "),o(),r(20,"span"),l(21),c(22,"dfnsParseIso"),c(23,"formatInTimeZone"),c(24,"translate"),o()()(),r(25,"td",19)(26,"div",28)(27,"div",29),x(28,"i",30),o(),r(29,"div",31),l(30),o(),r(31,"div",32),x(32,"i",33),o()(),x(33,"div",34),o(),x(34,"td",17),r(35,"td",18),f(36,Xe,3,4,"div",35)(37,$e,3,3,"ng-template",null,2,L),o()()),t&2){let e,n=F(38),a=g(),_=a.$implicit,C=a.last,I=g(3);D("last",C),i(3),s(_.versioned_article.localized_title),i(),d("ngIf",_.vc_booking),i(),d("ngIf",!_.vc_booking),i(3),s(N(10,15,p(9,13,_.slot.start_datetime_by_discount_type),"Europe/Berlin","dd.MM.yyyy",y(38,X,I.localeService.getDfnsLocale()))),i(6),O("",N(16,22,p(15,20,_.slot.start_datetime_by_discount_type),"Europe/Berlin","HH:mm",y(40,X,I.localeService.getDfnsLocale()))," ",p(17,27,"pages.booking_edit.slot_time_suffix"),""),i(7),O("",N(23,31,p(22,29,_.slot.end_datetime),"Europe/Berlin","HH:mm",y(42,X,I.localeService.getDfnsLocale()))," ",p(24,36,"pages.booking_edit.slot_time_suffix"),""),i(9),E(" ",_.quantity," "),i(6),d("ngIf",((e=_.article_price_display==null?null:_.article_price_display.gross_price)!==null&&e!==void 0?e:_.versioned_article_price.gross_price)>0)("ngIfElse",n)}}function ze(t,m){if(t&1&&(k(0),f(1,Ge,39,44,"tr",24),S()),t&2){let e=m.$implicit;
1i(),d("ngIf",e&&e.versioned_article_price&&e.versioned_article&&e.slot)}}function We(t,m){if(t&1&&(r(0,"tbody"),f(1,ze,2,1,"ng-container",23),o()),t&2){let e=g(2);i(),d("ngForOf",e.order.aggregated_items)}}function Ze(t,m){if(t&1&&(k(0),r(1,"span",39),l(2),c(3,"translate"),o(),r(4,"span",40),l(5),c(6,"currency"),o(),r(7,"p",41),l(8),c(9,"currency"),c(10,"translate"),o(),S()),t&2){let e=g(2);i(2),s(p(3,3,"pages.booking_edit.total_price")),i(3),s(B(6,5,e.order.total_gross_price/100,"EUR")),i(3),s(B(10,11,"pages.booking_edit.tax_hint",y(14,Ne,B(9,8,e.order.total_tax_price/100,"EUR"))))}}function qe(t,m){if(t&1&&(r(0,"option",52),l(1),o()),t&2){let e=m.$implicit;d("ngValue",e),i(),s(e.localized_title)}}function Ye(t,m){if(t&1){let e=Q();r(0,"div",42)(1,"div",4)(2,"div",43)(3,"p"),l(4),c(5,"translate"),o()()(),r(6,"div",4)(7,"div",44)(8,"div",45)(9,"label",46),l(10),c(11,"translate"),o()(),r(12,"select",47),ie("ngModelChange",function(a){T(e);let _=g(2);return te(_.cancellationReason,a)||(_.cancellationReason=a),M(a)}),f(13,qe,2,2,"option",48),o()()(),r(14,"div",4)(15,"div",49)(16,"button",50),A("click",function(){T(e);let a=g(2);return M(a.cancelOrder())}),l(17),c(18,"translate"),o()(),r(19,"div",49)(20,"button",51),A("click",function(){T(e),g();let a=F(26);return M(a.hide())}),l(21),c(22,"translate"),o()()()()}if(t&2){let e=g(2);i(4),s(p(5,7,"pages.booking_edit.full_cancellation_confirmation")),i(6),s(p(11,9,"pages.booking_edit.full_cancellation_reason")),i(2),ee("ngModel",e.cancellationReason),i(),d("ngForOf",e.cancellationReasons),i(3),d("disabled",!e.cancellationReason),i(),E(" ",p(18,11,"pages.booking_edit.full_cancellation_confirmation_yes_btn")," "),i(4),E(" ",p(22,13,"pages.booking_edit.full_cancellation_confirmation_no_btn")," ")}}function Je(t,m){if(t&1&&(r(0,"div",53)(1,"p",54),l(2),o()()),t&2){let e=g(2);i(2),s(e.errorMessage)}}function Ke(t,m){if(t&1&&(k(0),r(1,"div",5)(2,"table",14)(3,"thead")(4,"tr")(5,"th",15),l(6),c(7,"translate"),o(),r(8,"th",16),l(9),c(10,"translate"),o(),x(11,"th",17),r(12,"th",18),l(13),c(14,"translate"),o()()(),f(15,We,2,1,"tbody",10),r(16,"tfoot")(17,"tr"),x(18,"td",15)(19,"td",19)(20,"td",17)(21,"td",18),o()()(),r(22,"div",20),f(23,Ze,11,16,"ng-container",10),o()(),r(24,"div",13)(25,"button",21,0),l(27),c(28,"translate"),o(),f(29,Ye,23,15,"ng-template",null,1,L),o(),f(31,Je,3,1,"div",22),S()),t&2){let e=F(30),n=g();i(6),s(p(7,12,"pages.booking_edit.table.item_name")),i(3),s(p(10,14,"pages.booking_edit.table.visitors_count")),i(4),s(p(14,16,"pages.booking_edit.table.price")),i(2),d("ngIf",n.order&&n.order.aggregated_items&&n.order.aggregated_items.length>0),i(8),d("ngIf",n.order),i(2),D("disabled",!n.order.is_cancellation_allowed),d("popover",e)("disabled",!n.order.is_cancellation_allowed)("outsideClick",!0),i(2),E(" ",p(28,18,"pages.booking_edit.full_cancellation_button")," "),i(4),d("ngIf",n.errorMessage)}}var Pe=(()=>{class t{ngOnInit(){this.cdr.markForCheck(),this.activatedRoute.data.pipe(q(e=>e&&e.order,!1)).subscribe({next:e=>{e&&e.order&&(this.order=e.order,this.loading=!1,this.cdr.markForCheck())}}),this.localeChangedSubscription=this.localeService.localeChanged.pipe(Z(()=>this.order?.id?this.orderService.getExtended(this.order?.id):G(null))).subscribe({next:e=>{e&&e.data&&(this.order=e.data,this.loading=!1,this.cdr.markForCheck())}}),this.cartHeaderService.headerEnabled.next(!1),this.cancellationReasonService.getAll().subscribe({next:e=>{e.data&&(this.cancellationReasons=e.data,this.cdr.markForCheck())}})}ngOnDestroy(){this.localeChangedSubscription?.unsubscribe(),this.cartHeaderService.headerEnabled.next(!0)}removeCartItem(e,n){!this.order?.id||!this.cancellationReason||this.orderService.removeCartItem(this.order,this.cancellationReason,e).subscribe({next:a=>{a.data&&(this.order=a.data,this.cdr.markForCheck(),n.hide())}})}cancelOrder(){!this.order||!this.cancellationReason||this.orderService.cancel(this.order?.id,this.cancellationReason).subscribe({next:e=>{this.errorMessage=null,e.data&&(this.order=e.data,this.cdr.markForCheck())},error:e=>{if(e instanceof le){let n=e.error?.data?.error;n&&[P.CART_ITEM_GENERAL_EXCEPTION,P.CART_GENERAL_EXCEPTION,P.CART_EXPIRED_EXCEPTION,P.CART_ITEM_VOUCHER_EXCEPTION,P.ORDER_GENERAL_EXCEPTION].includes(n?.code)?(this.errorMessage=n.message,this.cdr.markForCheck()):this.errorMessage=e.error.message}}})}constructor(e,n,a,_,C,I,Te){this.activatedRoute=e,this.cdr=n,this.router=a,this.orderService=_,this.cancellationReasonService=C,this.localeService=I,this.cartHeaderService=Te,this.orderStates=Oe,this.loading=!0,this.cancellationReasons=[],this.errorMessage=null}static{this.\u0275fac=function(n){return new(n||t)(v(j),v(ne),v(h),v(w),v(Be),v(b),v(_e))}}static{this.\u0275cmp=J({type:t,selectors:[["app-booking-edit-page"]],decls:14,vars:11,consts:[["deleteOrderConfirmPopover","bs-popover"],["deleteOrderConfirmPopoverTemplate",""],["freeItemPrice",""],[1,"container","py-5"],[1,"row"],[1,"col-12","pb-5"],[1,"text-uppercase","text-dark"],["class","col-12 text-center py-5",4,"ngIf"],["class","col-12",4,"ngIf"],["class","col-12 ",4,"ngIf"],[4,"ngIf"],[1,"col-12","text-center","py-5"],[1,"fa-solid","fa-circle-notch","fa-spin","fa-2xl"],[1,"col-12"],[1,"shop-summary-table"],[1,"item-col"],[1,"count-col","text-center"],[1,"spacer-col"],[1,"price-col"],[1,"count-col"],[1,"float-end","text-end"],["placement","top left","container","body","type","button",1,"btn","btn-lg","btn-primary","float-lg-start","mb-3","mb-lg-0",3,"popover","disabled","outsideClick"],["class","col-12 py-3",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"last",4,"ngIf"],[1,"mb-1","text-dark"],["class","mb-1",4,"ngIf"],[1,"mb-0"],[1,"text-center"],[1,"summary-amount-button","remove","hidden"],[1,"fa-solid","fa-minus"],[1,"summary-amount"],[1,"summary-amount-button","add","hidden"],[1,"fa-solid","fa-plus"],[1,"pt-4","pt-lg-2","text-center"],["class","text-muted",4,"ngIf","ngIfElse"],[1,"mb-1"],[1,"text-muted"],[1,"text-muted","small"],[1,"h4","text-dark","mb-0","pe-3"],[1,"h5","text-dark"],[1,"mb-0","small","text-muted"],[1,"container"],[1,"col-12","text-center"],[1,"col-12","mb-2"],[1,"form-group"],["for","cancellationReason"],["id","cancellationReason",1,"form-control",3,"ngModelChange","ngModel"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"col-6"],["type","submit",1,"btn","btn-outline-secondary","w-100","float-start",3,"click","disabled"],[1,"btn","btn-primary","w-100","float-end",3,"click"],[3,"ngValue"],[1,"col-12","py-3"],[1,"mb-0","text-danger"]],template:function(n,a){n&1&&(r(0,"div",3)(1,"div",4)(2,"div",5)(3,"h1",6),l(4),c(5,"translate"),o()(),f(6,je,2,0,"div",7)(7,we,4,3,"div",8)(8,De,4,3,"div",9),r(9,"div",5)(10,"p"),l(11),c(12,"translate"),o()(),f(13,Ke,32,20,"ng-container",10),o()()),n&2&&(i(4),s(p(5,7,"pages.booking_edit.headline")),i(2),d("ngIf",a.loading),i(),d("ngIf",a.order&&(a.order.state===a.orderStates.REFUND_COMPLETED||a.order.state===a.orderStates.CANCELLED)),i(),d("ngIf",a.order&&(a.order.state===a.orderStates.REFUND_PENDING||a.order.state===a.orderStates.REFUND_STARTED)),i(3),O(" ",p(12,9,"pages.booking_edit.booking_reference")," ",a.order==null?null:a.order.booking_reference," "),i(2),d("ngIf",a.order&&a.order.aggregated_items&&a.order.aggregated_items.length>0))},dependencies:[de,oe,re,ae,pe,ue,fe,ge,ke,Ie,Ce,he,be,Ee,ve,xe],encapsulation:2,changeDetection:0})}}return t})();var Re=(()=>{class t{resolve(e){return this.orderService.getExtended(e.params.id).pipe(z(n=>n.data),W(n=>{if(n.status===404)return this.router.navigateByUrl(this.localeService.localizedPath("404")).then(),$;throw n}))}constructor(e,n,a){this.localeService=e,this.orderService=n,this.router=a}static{this.\u0275fac=function(n){return new(n||t)(u(b),u(w),u(h))}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Qe=[{path:":id",resolve:{order:Re},component:Pe}],St=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=K({type:t})}static{this.\u0275inj=Y({imports:[V.forChild(Qe),V]})}}return t})();export{St as BookingEditPageRoutingModule};
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.