1import{a as J}from"./chunk-L2P47ANG.js";import{b as H}from"./chunk-DB3ZWIIB.js";import{b as X}from"./chunk-HMNYFN7F.js";import{a as j}from"./chunk-DVCEYYM5.js";import{b as q,c as G}from"./chunk-VWTPPFYN.js";import{a as A,e as V,f as W,g as U,h as z}from"./chunk-DD3TE7VE.js";import"./chunk-MXLAUV2N.js";import"./chunk-MZN2W7JY.js";import{a as L}from"./chunk-LA6MVZKI.js";import"./chunk-UV4NJ7E5.js";import"./chunk-VQZYWFFH.js";import{b as B}from"./chunk-K2XM7NBA.js";import{c as O}from"./chunk-XRSPA4HL.js";import"./chunk-4OVFEMIX.js";import"./chunk-2QELRCUI.js";import{a as R}from"./chunk-U2QFC7F4.js";import"./chunk-NKFWYRGB.js";import"./chunk-NPDQYV7Z.js";import"./chunk-RQPQTN2K.js";import{a as N}from"./chunk-AMSVRPT5.js";import{a as F}from"./chunk-IF42ABVI.js";import"./chunk-G35U2TSL.js";import{a as b}from"./chunk-TIZUEZTS.js";import"./chunk-3CVUEFNK.js";import"./chunk-XBI4FQAI.js";import{a as M}from"./chunk-GUBCWVU7.js";import"./chunk-QFTBE4YZ.js";import"./chunk-LF7XWVHL.js";import"./chunk-EYIONV64.js";import"./chunk-E7G6W2E2.js";import"./chunk-EOQAIYR4.js";import"./chunk-7VGFQHHZ.js";import"./chunk-F5K6R7SQ.js";import"./chunk-73OAJR45.js";import"./chunk-C3P6SEYP.js";import{a as P,b as k}from"./chunk-5GBDCQHG.js";import"./chunk-HFZLJHYR.js";import{a as w}from"./chunk-W2DIK4KB.js";import{d as E}from"./chunk-UUNO5GDV.js";import"./chunk-PO5J34ZD.js";import"./chunk-HNE27PEK.js";import{m as D}from"./chunk-ZPQWRLR2.js";import"./chunk-FVUU4L5U.js";import"./chunk-7O7TK5WI.js";import"./chunk-JXSELCIT.js";import"./chunk-XNSPEJTL.js";import"./chunk-KDRXFQ76.js";import"./chunk-O45SUNNM.js";import{t as I}from"./chunk-32H7SGOY.js";import"./chunk-EZQWKGWO.js";import{$b as l,Ba as _,Ca as g,Cb as f,Jb as y,Nb as S,Z as h,a as v,ac as s,cd as C,fc as r,gc as p,hc as d,ic as o,pc as x,rb as i,uc as T,wc as u}from"./chunk-PSAQVZ5Y.js";var Y=()=>({height:"20px",width:"100px"}),Z=()=>({height:"20px",width:"160px"}),$=()=>({height:"20px",width:"200px"}),K=()=>({height:"30px",width:"30px"}),ee=()=>({height:"15px",width:"120px","margin-bottom":"6px"}),te=()=>({height:"15px",width:"180px"});function ne(e,a){e&1&&(p(0,"div",10)(1,"div",11),o(2,"ngx-skeleton-loader",12)(3,"mat-divider",13)(4,"ngx-skeleton-loader",12)(5,"mat-divider",13)(6,"ngx-skeleton-loader",12),d(),p(7,"div"),o(8,"ngx-skeleton-loader",12),d()()),e&2&&(i(2),r("theme",C(6,Y)),i(),r("vertical",!0),i(),r("theme",C(7,Z)),i(),r("vertical",!0),i(),r("theme",C(8,$)),i(2),r("theme",C(9,K)))}function ie(e,a){e&1&&(p(0,"div",10)(1,"div",14),o(2,"ngx-skeleton-loader",12)(3,"ngx-skeleton-loader",12),d(),p(4,"div"),o(5,"ngx-skeleton-loader",12),d()()),e&2&&(i(2),r("theme",C(3,ee)),i(),r("theme",C(4,te)),i(2),r("theme",C(5,K)))}function re(e,a){if(e&1&&(p(0,"mat-card",2),l(1,ne,9,10,"div",10)(2,ie,6,6,"div",10),d()),e&2){let n=u();i(),s(n.mobileDevice?n.mobileDevice?2:-1:1)}}function ae(e,a){e&1&&o(0,"mat-progress-bar",3)}function oe(e,a){e&1&&(p(0,"div",17),o(1,"app-skeleton-summary-price"),d())}function ce(e,a){if(e&1&&(p(0,"div",4)(1,"div",15),o(2,"app-insurance-card-skeleton",16),d(),l(3,oe,2,0,"div",17),d()),e&2){let n=u();i(2),r("qtd",1)("fromCart",!0)("fromDetail",!1),i(),s(n.mobileDevice?-1:3)}}function me(e,a){e&1&&(p(0,"mat-card",2),o(1,"app-search-travel-insurance",18),d()),e&2&&(i(),r("openedCollapse",!1)("openSearchNewWindow",!1)("loadInsuranceSearchFlag",!1)("buttonType","outlined"))}function le(e,a){e&1&&o(0,"app-skeleton-summary-price")}function se(e,a){if(e&1&&o(0,"app-summary-price",21),e&2){let n=u(2);r("cart",n.cart)("isPackage",!1)("fromCart",!0)("fromRegister",!1)}}function pe(e,a){if(e&1&&o(0,"app-info-agent-comission",23)(1,"app-infos-oner",23),e&2){let n=u(2);r("cartId",n.cart==null?null:n.cart.cartId),i(),r("cartId",n.cart==null?null:n.cart.cartId)}}function de(e,a){if(e&1){let n=x();p(0,"div",4)(1,"div",15)(2,"div",19),o(3,"app-travel-insurance-card",20),d()(),p(4,"div",17),l(5,le,1,0,"app-skeleton-summary-price"),l(6,se,1,4,"app-summary-price",21),l(7,pe,2,2),p(8,"app-generate-template",22),T("refreshCart",function(c){_(n);let t=u();return g(t.refreshCart(c))}),d()()()}if(e&2){let n=u();i(3),r("product",n.cart==null?null:n.cart.insurance)("fromDetail",!1)("fromCart",!0),i(2),s((!n.cart||n.refreshSummaryPrice)&&!n.mobileDevice?5:-1),i(),s(n.cart&&!n.mobileDevice&&!n.refreshSummaryPrice?6:-1),i(),s(n.cart!=null&&n.cart.cartId&&!n.refreshSummaryPrice?7:-1),i(),r("cart",n.cart)("refreshSummaryPrice",n.refreshSummaryPrice)}}function ue(e,a){e&1&&o(0,"app-skeleton-summary-price",7),e&2&&r("mobileDevice",!0)}function Ce(e,a){if(e&1&&o(0,"app-summary-price",8),e&2){let n=u();r("cart",n.cart)("isPackage",!1)("fromCart",!0)("fromRegister",!1)("mobileDevice",!0)}}function fe(e,a){e&1&&o(0,"app-skeleton-summary-price")}function ve(e,a){if(e&1&&o(0,"app-summary-price",8),e&2){let n=u();r("cart",n.cart)("isPackage",!1)("fromCart",!0)("fromRegister",!1)("mobileDevice",!1)}}var Ue=(()=>{let a=class a extends j{get cartTypeEnum(){return M.INSURANCE}constructor(m,c,t,Q){super(),this.orderSummaryService=m,this.checkoutBookingService=c,this.travelInsuranceBookingService=t,this.travelInsuranceStateService=Q,this.backButtonWhereTo=E.INSURANCE_LIST,this.observeMobileBreakpoint()}
1ngOnInit(){this.cardIdParams=this.route.snapshot.params.cartid??null,this.route.queryParams.subscribe(m=>{m=R.parser(v({},m)),this.sourceType=m.source,!this.cardIdParams&&m.newCartId&&(this.cardIdParams=m.newCartId),this.travelInsuranceBookingService.getBookingTravelInsurance(this.cardIdParams).subscribe({next:c=>{this.cart=c.data,this.setSearchToComponent(this.cardIdParams),this.cart&&(this.configureViewAfterGetCart(),this.orderSummary=this.orderSummaryService.setTravelInsuranceOrderSummary(this.cart)),this.cart||(this.isExpiredCart=!0,this.openDialogCartNotFound())},error:()=>{this.cart=null,this.isExpiredCart=!0,this.openDialogCartNotFound()}})})}setSearchToComponent(m){m&&this.checkoutBookingService.searchBookingTravelInsurance(m).subscribe({next:c=>{let t=c?.data??c;this.travelInsuranceStateService.updateTravelInsuranceSearchState({destination:c?.destination??t?.destination,startDate:t?.startDate??null,endDate:t?.endDate??null,ages:Array.isArray(t?.ages)?t.ages:[]})},error:()=>{this.notificationService.snackError(this.translate.instant(D.UNEXPECTED_ERROR))}})}refreshCart(m){this.refreshSummaryPrice=!0,this.travelInsuranceBookingService.getBookingTravelInsurance(m).pipe(h(()=>this.refreshSummaryPrice=!1)).subscribe({next:c=>{this.cart=c.data,this.cart&&(this.configureViewAfterGetCart(),this.orderSummary=this.orderSummaryService.setTravelInsuranceOrderSummary(this.cart)),this.cart||(this.isExpiredCart=!0,this.openDialogCartNotFound())},error:()=>{this.cart=null,this.isExpiredCart=!0,this.openDialogCartNotFound()}})}};a.\u0275fac=function(c){return new(c||a)(f(U),f(A),f(X),f(O))},a.\u0275cmp=y({type:a,selectors:[["app-travel-insurance-cart"]],features:[S],decls:14,vars:13,consts:[[1,"container","container-content"],["app-back-button","",3,"text","whereTo"],["appearance","outlined",1,"search"],["mode","indeterminate",1,"progress"],[1,"content"],[3,"cart","isExpiredCart"],["collapsed-content",""],[3,"mobileDevice"],[3,"cart","isPackage","fromCart","fromRegister","mobileDevice"],["expanded-content",""],[1,"flex","flex-jc-sb","flex-ai-c"],[1,"flex","flex-gap"],[1,"flex",3,"theme"],[3,"vertical"],[1,"flex","flex-column"],[1,"cart-section"],[3,"qtd","fromCart","fromDetail"],[1,"summary-section"],[3,"openedCollapse","openSearchNewWindow","loadInsuranceSearchFlag","buttonType"],[1,"product-card"],[3,"product","fromDetail","fromCart"],[3,"cart","isPackage","fromCart","fromRegister"],[3,"refreshCart","cart","refreshSummaryPrice"],[3,"cartId"]],template:function(c,t){c&1&&(p(0,"div",0),o(1,"div",1),l(2,re,3,1,"mat-card",2),l(3,ae,1,0,"mat-progress-bar",3),l(4,ce,4,4,"div",4),l(5,me,2,4,"mat-card",2),l(6,de,9,8,"div",4),d(),p(7,"app-float-payment-details",5)(8,"div",6),l(9,ue,1,1,"app-skeleton-summary-price",7),l(10,Ce,1,5,"app-summary-price",8),d(),p(11,"div",9),l(12,fe,1,0,"app-skeleton-summary-price"),l(13,ve,1,5,"app-summary-price",8),d()()),c&2&&(i(),r("text","back-buttons.results")("whereTo",t.backButtonWhereTo),i(),s(!t.cart||!(t.cart!=null&&t.cart.insurance)?2:-1),i(),s(!t.cart||!(t.cart!=null&&t.cart.insurance)?3:-1),i(),s(!t.cart||!(t.cart!=null&&t.cart.insurance)?4:-1),i(),s(t.cart&&(t.cart!=null&&t.cart.insurance)?5:-1),i(),s(t.cart&&(t.cart!=null&&t.cart.insurance)?6:-1),i(),r("cart",t.cart)("isExpiredCart",t.isExpiredCart),i(2),s(!t.cart&&t.mobileDevice||t.refreshSummaryPrice?9:-1),i(),s(t.cart&&!t.refreshSummaryPrice?10:-1),i(2),s(!t.cart&&t.mobileDevice||t.refreshSummaryPrice?12:-1),i(),s(t.cart&&t.mobileDevice&&!t.refreshSummaryPrice?13:-1))},dependencies:[I,V,H,B,J,N,L,w,z,q,W,G,k,P,b,F],styles:['@media(max-width:1200px){.container-content[_ngcontent-%COMP%]{margin-bottom:140px}}.search[_ngcontent-%COMP%]{margin-top:1rem}div[app-back-button][_ngcontent-%COMP%]:not([style*="display: none"]) + .search[_ngcontent-%COMP%]{margin-top:.2rem}.content-cards[_ngcontent-%COMP%]{padding:0 16px 0 0}@media(max-width:1200px){.content-cards[_ngcontent-%COMP%]{padding:0}}.content[_ngcontent-%COMP%]{margin-top:16px;display:flex;gap:16px}.content[_ngcontent-%COMP%] .cart-section[_ngcontent-%COMP%]{width:70%;margin-bottom:1rem}.content[_ngcontent-%COMP%] .summary-section[_ngcontent-%COMP%]{width:30%}@media(max-width:1200px){.content[_ngcontent-%COMP%]{flex-direction:column}
1.content[_ngcontent-%COMP%] .cart-section[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] .summary-section[_ngcontent-%COMP%]{width:100%}}.progress[_ngcontent-%COMP%]{margin:1rem 0}']});let e=a;return e})();export{Ue as TravelInsuranceCartComponent};
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.