1import{a as J}from"./chunk-JIUW2NDX.js";import{c as q}from"./chunk-FADYZEWG.js";import{c as V,g as j,k as D,w as H}from"./chunk-IE2LXO6Z.js";import{A as B,F as k,Xa as F,fb as W,jb as z,z as $}from"./chunk-G3GF4MNW.js";import"./chunk-OV3XIWDY.js";import{$c as U,Fb as u,Jc as L,Kc as A,Oc as G,Oe as w,Pc as R,Qc as b,Ub as x,Uc as P,Vb as _,Xb as f,Zc as h,_c as M,fc as o,gc as l,ib as r,jb as m,lc as T,me as I,pe as X,qc as d,qe as N,ra as C,sa as O,tc as E,uc as s,yb as v,ze as y}from"./chunk-PNRWEGN3.js";import"./chunk-C64XCO5X.js";import"./chunk-AEO2GD2U.js";var Q=n=>({active:n}),K=n=>({defaultValue:n});function Y(n,c){if(n&1){let e=T();o(0,"li")(1,"button",23),E("click",function(){let i=C(e).$implicit,a=s(2);return O(a.toggleTag(i));}),o(2,"span"),L(3),l()()();}if(n&2){let e=c.$implicit,t=s(2);r(),f("active",(t.selectedTags==null?null:t.selectedTags.indexOf(e))>-1),r(2),A(e);}}function Z(n,c){if(n&1&&(o(0,"div",22)(1,"ul",20),u(2,Y,4,3,"li",21),l()()),n&2){let e=s();r(2),_("ngForOf",e.tagsList);}}function ee(n,c){if(n&1){let e=T();o(0,"li")(1,"button",23),E("click",function(){let i=C(e).$implicit,a=s(2);return O(a.toggleGenre(i.slug));}),o(2,"span"),L(3),l()()();}if(n&2){let e=c.$implicit,t=s(2);r(),f("active",(t.selectedGenres==null?null:t.selectedGenres.indexOf(e.slug))>-1),r(2),A(e.name);}}function te(n,c){if(n&1&&(o(0,"div",24)(1,"label",25),d(2,4),l(),o(3,"ul",20),u(4,ee,4,3,"li",21),l()()),n&2){let e=c.ngIf;r(4),_("ngForOf",e);}}function ie(n,c){if(n&1){let e=T();o(0,"li")(1,"button",23),E("click",function(){let i=C(e).$implicit,a=s();return O(a.selectedWhereToWatch=i);}),o(2,"span"),L(3),h(4,"cammelCase"),h(5,"titleLocalize"),l()()();}if(n&2){let e=c.$implicit,t=s();r(),f("active",t.selectedWhereToWatch===e),r(2),A(U(5,5,M(4,3,e),P(8,K,e)));}}var Le=(()=>{class n{constructor(e,t,i,a){this.movieService=e,this.genresService=t,this.env=i,this.router=a,this.selectedGenres=[],this.selectedTags=[],this.whereToWatchList=["watch-at-home","in-cinemas","at-festivals"],this.tagsList=["female-directors","award-winning","green-productions"];}ngOnInit(){this.genreList$=this.genresService.getFilteredGenres();}toggleGenre(e){let t=this.selectedGenres.indexOf(e);t<0?this.selectedGenres.push(e):this.selectedGenres.splice(t,1);}toggleTag(e){let t=this.selectedTags.indexOf(e);t<0?this.selectedTags.push(e):this.selectedTags.splice(t,1);}getUrl(){return"/movies/"+(this.selectedWhereToWatch||"all")+"/";}getQueryParams(){let e={};return this.selectedGenres.length>0&&(e.genre=this.getJoinedString(this.selectedGenres)),this.selectedTags.length>0&&(e.tags=this.getJoinedString(this.selectedTags)),this.movieTitle&&(e.keyword=this.movieTitle),e||null;}getJoinedString(e){return e.join(",");}onSearchEnter(){this.router.navigate([this.getUrl()],{queryParams:this.getQueryParams()});}static{this.ɵfac=function(t){return new(t||n)(m(F),m(J),m(k),m($));};}static{this.ɵcmp=v({type:n,selectors:[["ush-explore-catalogue"]],decls:22,vars:13,consts:()=>{let e;e="Search Film Title, Actor, Director";let t;t="Explore our catalogue";let i;i="Search";let a;a="More filters";let p;p="Watch Now";let S;return S="Search Film Title, Actor, Director",[t,i,a,p,S,[1,"explore-catalogue-container"],["data-translate","title.explore-our-catalogue",1,"title"],[1,"search-header"],["type","text","pInputText","","placeholder",e,3,"keydown.enter","ngModelChange","ngModel"],[1,"button",3,"routerLink","queryParams"],["data-translate","public.commons.search"],[1,"panel"],[1,"panel-header"],["data-translate","public.filters.control.moreFilter",1,"header-msg","subtitle"],[3,"click","className"],[1,"panel-content",3,"ngClass"],["class","p-field p-col-12 tags",4,"ngIf"],["class","p-field p-col-12 genres",4,"ngIf"],[1,"p-field","p-col-12"],["data-translate","movie.cta.watchAtHome",1,"header-msg","subtitle"],[1,"multiselectbox"],[4,"ngFor","ngForOf"],[1,"p-field","p-col-12","tags"],[1,"filter-item",3,"click"],[1,"p-field","p-col-12","genres"],["data-translate","public.filters.movieCast.placeholder",1,"header-msg","subtitle"]];},template:function(t,i){t&1&&(o(0,"div",5)(1,"div",6),d(2,0),l(),o(3,"div",7)(4,"input",8),E("keydown.enter",function(){return i.onSearchEnter();}),b("ngModelChange",function(p){return R(i.movieTitle,p)||(i.movieTitle=p),p;}),l(),o(5,"a",9)(6,"span",10),d(7,1),l()()(),o(8,"div",11)(9,"div",12)(10,"span",13),d(11,2),l(),o(12,"span",14),E("click",function(){return i.panelActive=!i.panelActive;}),l()(),o(13,"div",15),u(14,Z,3,1,"div",16)(15,te,5,1,"div",17),h(16,"async"),o(17,"div",18)(18,"label",19),d(19,3),l(),o(20,"ul",20),u(21,ie,6,10,"li",21),l()()()()()),t&2&&(r(4),G("ngModel",i.movieTitle),x("data-translate","public.filters.movieCast.placeholder"),r(),_("routerLink",i.getUrl())("queryParams",i.getQueryParams()),r(7),_("className",i.panelActive?"pi pi-minus":"pi pi-plus"),r(),_("ngClass",P(11,Q,i.panelActive)),r(),_("ngIf",i.tagsList),r(),_("ngIf",M(16,9,i.genreList$)),r(6),_("ngForOf",i.whereToWatchList));},dependencies:[w,I,X,N,y,B,H,V,j,D,z,W,q],styles:['.explore-catalogue-container[_ngcontent-%COMP%]{position:relative;background-color:var(--colorLightGrey);padding:0 5%}.explore-catalogue-container[_ngcontent-%COMP%]:before{content:"";z-index:-1;position:absolute;top:-15vh;left:0;height:15vh;width:100%;background-color:var(--colorLightGrey)}@media all and (min-width: 992px){.explore-catalogue-container[_ngcontent-%COMP%]{padding:0 20%}}.explore-catalogue-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:50px;text-align:center;color:var(--brandColor)!important}.search-header[_ngcontent-%COMP%]{display:flex;margin-top:20px;margin-bottom:20px}.search-header[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{margin-left:10px;padding:0 20px}.search-header[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex-grow:1;border:none;background-color:#fff;height:45px;padding:10px}.header-msg[_ngcontent-%COMP%]{color:#000}.multiselectbox[_ngcontent-%COMP%]{justify-content:left}.multiselectbox[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{width:auto}.pi[_ngcontent-%COMP%]{margin-left:10px;cursor:pointer}.panel-content[_ngcontent-%COMP%]{background:unset!important;max-height:0;padding:0;transition:var(--transitionsTime);overflow:hidden}.panel-content.active[_ngcontent-%COMP%]{max-height:600px;padding:20px 0}.panel-header[_ngcontent-%COMP%]{background:unset;border:unset;display:flex;justify-content:center;padding-bottom:10px;align-items:center}@media all and (min-width: 992px){.panel-header[_ngcontent-%COMP%]{justify-content:flex-end}}.p-link[_ngcontent-%COMP%]:focus{box-shadow:unset!important}.filter-item[_ngcontent-%COMP%]{width:max-content;background-color:var(--colorDarkGrey);text-transform:capitalize;border-radius:20px;padding:10px 30px;border:none;letter-spacing:.87px;font-size:15px;cursor:pointer;transition:var(--transitionsTime);margin:5px}.filter-item[_ngcontent-%COMP%]:hover, .filter-item[_ngcontent-%COMP%]:focus{background-color:var(--brandColor)}.active[_ngcontent-%COMP%]{background-color:var(--brandColor)}']});}}return n;})();export{Le as ExploreCatalogueComponent};/**i18n:6e5e96d574f1ea6171f9d93024e7b424b49819de6d2f6104183cebba1bc5032e*/
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.