import{a as D,b as V,e as W,f as $}from"./chunk-N7PBPSN6.js";import{d as j,f as A}from"./chunk-S3ADKFO2.js";import{E,G as F,n as R}from"./chunk-I5MYHHJE.js";import{$a as _,Ab as m,Db as T,Eb as x,Fb as u,Fc as k,Gb as o,Gc as L,Hb as l,Ib as w,Pb as y,Ta as h,Tb as M,Vb as r,Wa as n,fc as S,gb as p,ha as g,ia as v,ic as b,kc as f,lb as C,nc as P,oc as I,pc as O,zb as d}from"./chunk-CKLXM6EG.js";var N=(i,e)=>e.value;function z(i,e){if(i&1&&w(0,"img",5),i&2){let t=r().$implicit,a=r();S("active-image",a.activeTab===t.value),u("src","../../../../assets/images/"+t.image,h)}}function U(i,e){if(i&1&&(o(0,"span"),b(1),l()),i&2){let t=r().$implicit;n(),f(" ( ",t.length," )")}}function q(i,e){if(i&1){let t=y();o(0,"div",1)(1,"p-tab",2),M("click",function(){let c=g(t).$implicit,s=r();return v(s.navigateTo(c.route,c.value))}),d(2,z,1,3,"img",3),o(3,"h5",4),b(4),k(5,"translate"),d(6,U,2,1,"span"),l()()()}if(i&2){let t=e.$implicit,a=r();n(),u("value",t.value),n(),m(t.image?2:-1),n(2),f("",a.Showtranslate?L(5,4,a.translate+"."+t.title):t.title," "),n(2),m(a.showLength?6:-1)}}var B=class i{constructor(e,t){this.router=e;this.route=t}activeTab=0;tabs;default;translate;Showtranslate=!1;relativeTo=!1;showLength=!1;ngOnInit(){this.activeTab=this.default,!this.route.firstChild&&this.tabs[0]?.route&&this.router.navigate([this.tabs[0].route],{relativeTo:this.route})}tabChanged=new _;navigateTo(e,t){this.activeTab=t,this.default=t,console.log(this.activeTab),this.tabChanged.emit(this.activeTab),e&&(this.relativeTo===!0?this.router.navigate([e],{relativeTo:this.route}):this.router.navigate([e]))}onTabChange(e){console.log(e)}static \u0275fac=function(t){return new(t||i)(p(F),p(E))};static \u0275cmp=C({type:i,selectors:[["app-tabs"]],inputs:{tabs:"tabs",default:"default",translate:"translate",Showtranslate:"Showtranslate",relativeTo:"relativeTo",showLength:"showLength"},outputs:{tabChanged:"tabChanged"},decls:5,vars:1,consts:[[3,"valueChange","value"],[1,"tab"],[3,"click","value"],[3,"src","active-image"],[1,"fw-bold","mb-0"],[3,"src"]],template:function(t,a){t&1&&(o(0,"div")(1,"p-tabs",0),O("valueChange",function(s){return I(a.default,s)||(a.default=s),s}),o(2,"p-tablist"),T(3,q,7,6,"div",1,N),l()()()),t&2&&(n(),P("value",a.default),n(2),x(a.tabs))},dependencies:[$,W,D,V,R,A,j],styles:["[_nghost-%COMP%]     .p-tablist-tab-list{display:grid;width:100%;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));justify-content:space-around;border-bottom:0;padding:.6rem;border-radius:8px;background:#eff1f1;box-shadow:0 4px 4px #0000000a inset}[_nghost-%COMP%]     .p-tab{display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:8px;padding:6px 12px;font-weight:600;text-align:center;transition:all .3s ease;margin-inline:.5rem;padding:.75rem;color:#000;border:none}[_nghost-%COMP%]     .p-tab-active{background-color:#da5b30;color:#fff!important;border:none;border-radius:8px}[_nghost-%COMP%]     .p-tablist-active-bar{background-color:transparent}img.active-image[_ngcontent-%COMP%]{filter:brightness(0) invert(1);transition:filter .3s ease}"]})};export{B as a};
