1import{a as u,c as I,d as Q}from"./chunk-HTWPRUVQ.js";import{a as E}from"./chunk-6N7JK7IB.js";import{G as A}from"./chunk-SU7S3GV3.js";import{a as M}from"./chunk-XFNOPY4D.js";import{Eb as a,Gb as r,Jc as l,Kc as p,Lb as d,Mb as x,Mh as R,Nb as y,Nh as $,Ob as _,Pc as v,Tc as D,V as f,Xa as B,Zb as o,ca as g,cb as i,mc as b,nd as L,ob as k,oc as q,ph as N,u as C,ua as O,vc as T,wc as h,xc as s}from"./chunk-PMSJWPYZ.js";function F(t,c){if(t&1&&_(0,"p",3),t&2){o(3);let e=s(0);d("innerHtml",e.subtitle,B)}}function w(t,c){if(t&1&&(_(0,"trn-link",4),l(1,"cxTranslate")),t&2){o(3);let e=s(0);d("ariaLabel",p(1,3,"link_labels.read_more_about_norway_quota_calculation"))("label",e.link.linkName)("target",e.link.target+"")}}function S(t,c){if(t&1&&(x(0,"div",0)(1,"trn-status-message",1),_(2,"trn-quota-traveler-message",2),a(3,F,1,1,"p",3),a(4,w,2,5,"trn-link",4),y()()),t&2){let e=o(2),n=s(0);i(),d("title",n.title)("type",e.travelersCountToFulfillQuotaOrder()>1?"info-warning":"info"),i(),d("count",e.travelersCountToFulfillQuotaOrder())("age20",e.ageRestriction20Order()),i(),r(n.subtitle?3:-1),i(),r(n.link?4:-1)}}function P(t,c){if(t&1&&a(0,S,5,6,"div",0),t&2){let e,n=o(),m=s(0);r(m&&((e=n.order())==null||e.entries==null?null:e.entries.length)!==void 0&&!n.hideQuotaBannerOrder()?0:-1)}}function H(t,c){t&1&&(x(0,"div",5)(1,"div",6),b(2),l(3,"cxTranslate"),y()()),t&2&&(i(2),q(" ",p(3,1,"cart.quota_not_calculated")," "))}function z(t,c){if(t&1&&(_(0,"trn-quota-traveler-message",2),l(1,"async")),t&2){o();let e=s(0),n=o(2);d("count",e)("age20",p(1,2,n.ageRestriction20$)??!1)}}function V(t,c){if(t&1&&_(0,"p",3),t&2){o(3);let e=s(0);d("innerHtml",e.subtitle,B)}}function j(t,c){if(t&1&&(_(0,"trn-link",4),l(1,"cxTranslate")),t&2){o(3);let e=s(0);d("ariaLabel",p(1,3,"link_labels.read_more_about_norway_quota_calculation"))("label",e.link.linkName)("target",e.link.target+"")}}function K(t,c){if(t&1&&(T(0),l(1,"async"),x(2,"div",0)(3,"trn-status-message",1),a(4,H,4,3,"div",5),l(5,"async"),a(6,z,2,4,"trn-quota-traveler-message",2),a(7,V,1,1,"p",3),a(8,j,2,5,"trn-link",4),y()()),t&2){let e=o(2),n=s(0),m=h(p(1,6,e.travelersCountToFulfillQuota$));i(3),d("title",n.title)("type",m>1?"info-warning":"info"),i(),r(p(5,9,e.hasQuotaCalculationError$)?4:-1),i(2),r(m?6:-1),i(),r(n.subtitle?7:-1),i(),r(n.link?8:-1)}}function G(t,c){if(t&1&&(T(0),l(1,"async"),a(2,K,9,11,"div",0),l(3,"async")),t&2){let e=o(),n=p(1,1,e.cart$);i(2),r((n==null||n.entries==null?null:n.entries.length)!==void 0&&p(3,3,e.hideQuotaBanner$)===!1?2:-1)}}var pe=(()=>{class t{activeCartService=O(A);cmsService=O(N);order=D();componentData$=this.cmsService.getComponentData("QuotaNotificationComponent");cart$=this.activeCartService.getActive();travelersCountToFulfillQuota$=this.cart$.pipe(C(e=>Q(e.quotas?.messages?.entry).travelers),f(),g(1));hasQuotaCalculationError$=this.cart$.pipe(C(e=>(e.quotas?.messages?.entry||[]).some(n=>n.key===u.QUOTA_NOT_CALCULATED)),f(),g(1));hideQuotaBanner$=this.cart$.pipe(C(e=>e.quotas?.messages?.entry.some(n=>n.key===u.QUOTA_NOT_REQUIRED&&n.value==="true"||n.key===u.NO_QUOTA_IN_CART&&n.value==="true"||n.key===u.TRAVELER_COUNT&&n.value==="0")),f(),g(1));ageRestriction20$=this.cart$.pipe(C(e=>Q(e.quotas?.messages?.entry).age20),f(),g(1));quotaInfoOrder=v(()=>Q(this.order()?.quotas?.messages?.entry));travelersCountToFulfillQuotaOrder=v(()=>this.quotaInfoOrder().travelers);hideQuotaBannerOrder=v(()=>this.order()?.quotas?.messages?.entry.some(e=>e.key===u.QUOTA_NOT_REQUIRED&&e.value==="true"||e.key===u.NO_QUOTA_IN_CART&&e.value==="true"||e.key===u.TRAVELER_COUNT&&e.value==="0"));ageRestriction20Order=v(()=>this.quotaInfoOrder().age20);static \u0275fac=function(n){return new(n||t)};static \u0275cmp=k({type:t,selectors:[["trn-quota-banner"]],inputs:{order:[1,"order"]},decls:4,vars:4,consts:[[1,"wrapper"],[3,"title","type"],[3,"count","age20"],[1,"quota-message-text",3,"innerHtml"],["iconPlacement","icon-right","icon","open_in_new","url","/kundeservice/kvote",3,"ariaLabel","label","target"],[1,"quota-wrapper"],[1,"quota-message","bold"]],template:function(n,m){if(n&1&&(T(0),l(1,"async"),a(2,P,1,1)(3,G,4,5)),n&2){let U=h(p(1,1,m.componentData$));
1i(2),r(m.order()?2:U?3:-1)}},dependencies:[$,E,M,I,L,R],styles:["[_nghost-%COMP%]:empty{display:none}.quota-wrapper[_ngcontent-%COMP%]{display:flex;gap:4px;align-items:center}.quota-message-text[_ngcontent-%COMP%]{font-size:12px;line-height:14px;letter-spacing:normal;padding-top:1px;padding-bottom:1px}trn-link[_ngcontent-%COMP%]{margin-top:4px}"]})}return t})();export{pe as a};
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.