import{d as _}from"./chunk-TNAYM34C.js";import{l as P,r as i}from"./chunk-TF4WRPB4.js";import{$b as l,Bb as u,Hb as k,Hc as d,Nc as g,Oc as L,Sb as o,ac as s,ic as p,kc as c,ob as a,pd as D,xc as f,yc as m}from"./chunk-NYZDFFAU.js";var R=()=>[];function C(n,h){if(n&1&&(l(0,"span"),f(1),g(2,"translate"),s()),n&2){let e=c();a(),m(L(2,1,e.linkDef.label))}}function b(n,h){if(n&1&&(l(0,"span"),f(1),s()),n&2){let e=c();a(),m(e.linkDef.link)}}var A=(()=>{class n{static get agRenderer(){return!0}constructor(){this.linkDef={label:"",link:[],queryParams:null},this.link=[]}agInit(e){this.setLinkLabelFromParams(e)}refresh(e){return this.setLinkLabelFromParams(e),!0}setLinkLabelFromParams(e){if(!i.isSet(e.colDef)||!i.isSet(e.colDef.cellRendererParams)||!i.isSet(e.data))return;let t=e.colDef.cellRendererParams;if(i.isFunction(t.getParams)){this.linkDef=t.getParams(e.data);return}i.isFunction(t.getLabel)&&(this.linkDef.label=t.getLabel(e.data)),i.isFunction(t.getLink)&&(this.linkDef.link=t.getLink(e.data)),i.isFunction(t.getQueryParams)&&(this.linkDef.queryParams=t.getQueryParams(e.data))}onLinkSelected(e){i.isFunction(this.linkDef.onSelected)&&this.linkDef.onSelected(e)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=u({type:n,selectors:[["paw-ag-router-link-renderer"]],standalone:!1,decls:3,vars:5,consts:[[3,"click","routerLink","queryParams"],[4,"ngIf"]],template:function(t,r){t&1&&(l(0,"a",0),p("click",function(y){return r.onLinkSelected(y)}),k(1,C,3,3,"span",1)(2,b,2,1,"span",1),s()),t&2&&(o("routerLink",r.linkDef.link||d(4,R))("queryParams",r.linkDef.queryParams),a(),o("ngIf",r.linkDef.label),a(),o("ngIf",r.linkDef.link&&!r.linkDef.label))},dependencies:[D,P,_],styles:["[_nghost-%COMP%]   a[_ngcontent-%COMP%]{color:var(--paw-text-link);text-decoration:none;font-weight:500}"]})}}return n})();export{A as a};
