import{a as j}from"./chunk-GNEEELM2.js";import{t as N}from"./chunk-TUNJGNPO.js";import{a as D}from"./chunk-7YXUJQRT.js";import{A as T,B as F,X as Q,d as V,l as z,z as E}from"./chunk-YEFQA5EZ.js";import{$a as b,Bb as u,Cb as m,Ga as _,Gb as I,Hb as O,Ia as a,Ib as M,Jb as P,Lb as k,Nb as x,Ob as h,T as C,Wa as S,Y as d,Z as f,mb as w,nb as y,ob as L,pb as p,qb as l,rb as c,sb as g,yb as v}from"./chunk-KBLF2WKH.js";var R=["popover"];function U(e,n){if(e&1){let r=v();l(0,"ion-item",8),u("click",function(){let i=d(r).$implicit,o=m(2);return f(o.selectLang(i))}),g(1,"img",9),l(2,"ion-label"),x(3),c()()}if(e&2){let r=n.$implicit,t=m(2);k("active",r===t.langService.currentLang),a(),p("src",t.config[r].flag,_),a(2),h(t.config[r].label)}}function $(e,n){if(e&1&&(l(0,"ion-list",6),y(1,U,4,4,"ion-item",7,w),c()),e&2){let r=m();a(),L(r.langService.availableLangs)}}var q={fr:{label:"FR",flag:"assets/flags/fr.svg"},en:{label:"EN",flag:"assets/flags/gb.svg"}},ne=(()=>{let n=class n{constructor(){this.langService=C(j),this.config=q,D({chevronDown:N})}selectLang(t){this.langService.setLang(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=S({type:n,selectors:[["app-lang-selector"]],viewQuery:function(i,o){if(i&1&&I(R,5),i&2){let s;O(s=M())&&(o.popover=s.first)}},decls:8,vars:3,consts:[["popover",""],["fill","clear","size","small",1,"lang-btn",3,"click"],["alt","","aria-hidden","true",1,"flag",3,"src"],[1,"lang-code"],["name","chevron-down",1,"chevron"],["size","auto",3,"dismissOnSelect"],["lines","none",1,"lang-list"],["button","",3,"active"],["button","",3,"click"],["slot","start","alt","","aria-hidden","true",1,"flag",3,"src"]],template:function(i,o){if(i&1){let s=v();l(0,"ion-button",1),u("click",function(B){d(s);let G=P(6);return f(G.present(B))}),g(1,"img",2),l(2,"span",3),x(3),c(),g(4,"ion-icon",4),c(),l(5,"ion-popover",5,0),b(7,$,3,0,"ng-template"),c()}i&2&&(a(),p("src",o.config[o.langService.currentLang].flag,_),a(2),h(o.config[o.langService.currentLang].label),a(2),p("dismissOnSelect",!0))},dependencies:[z,Q,V,F,E,T],styles:[`

[_nghost-%COMP%] {
  display: contents;
}
.lang-btn[_ngcontent-%COMP%] {
  --padding-start: 6px;
  --padding-end: 4px;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}
.flag[_ngcontent-%COMP%] {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  display: block;
}
.lang-code[_ngcontent-%COMP%] {
  margin: 0 2px;
}
.chevron[_ngcontent-%COMP%] {
  font-size: 12px;
}
.lang-list[_ngcontent-%COMP%] {
  padding: 4px 0;
  min-width: 90px;
}
ion-item.active[_ngcontent-%COMP%] {
  --color: var(--ion-color-primary);
  font-weight: 700;
}
ion-item[_ngcontent-%COMP%]   .flag[_ngcontent-%COMP%] {
  width: 24px;
  height: 16px;
  margin-right: 8px;
}`]});let e=n;return e})();export{ne as a};
