import{d as h}from"./chunk-7UXAANIN.js";import{l as R,r}from"./chunk-ZA2L7UBA.js";import{Aa as _,Ac as p,Cb as D,Ib as k,Jc as x,Pc as m,Qc as d,Tb as a,ac as s,bc as f,gc as C,jc as y,lc as o,pb as l,pd as L,rd as P,za as g,zc as c}from"./chunk-RG67NTNC.js";var b=()=>[];function v(t,u){if(t&1&&(s(0,"span"),c(1),m(2,"translate"),f()),t&2){let e=o(2);l(),p(d(2,1,e.linkDef.label))}}function F(t,u){if(t&1&&(s(0,"span"),c(1),f()),t&2){let e=o(2);l(),p(e.linkDef.link)}}function I(t,u){if(t&1){let e=C();s(0,"a",2),y("click",function(i){g(e);let S=o();return _(S.onLinkSelected(i))}),k(1,v,3,3,"span",1)(2,F,2,1,"span",1),f()}if(t&2){let e=o();a("routerLink",e.linkDef.link||x(5,b))("queryParams",e.linkDef.queryParams)("ngClass",e.linkDef.styleCss),l(),a("ngIf",e.linkDef.label),l(),a("ngIf",e.linkDef.link&&!e.linkDef.label)}}function w(t,u){if(t&1&&(s(0,"span"),c(1),m(2,"translate"),f()),t&2){let e=o();l(),p(d(2,1,e.linkDef.label))}}var O=(()=>{class t{static get agRenderer(){return!0}constructor(){this.linkDef={label:"",link:[],queryParams:null,styleCss:null},this.link=[]}agInit(e){this.setLinkLabelFromParams(e)}refresh(e){return this.setLinkLabelFromParams(e),!0}setLinkLabelFromParams(e){if(!r.isSet(e.colDef)||!r.isSet(e.colDef.cellRendererParams)||!r.isSet(e.data))return;let n=e.colDef.cellRendererParams;if(r.isFunction(n.getParams)){this.linkDef=n.getParams(e.data);return}r.isFunction(n.getLabel)&&(this.linkDef.label=n.getLabel(e.data)),r.isFunction(n.getLink)&&(this.linkDef.link=n.getLink(e.data)),r.isFunction(n.getQueryParams)&&(this.linkDef.queryParams=n.getQueryParams(e.data)),r.isFunction(n.getStyleCss)&&(this.linkDef.styleCss=n.getStyleCss(e.data))}onLinkSelected(e){r.isFunction(this.linkDef.onSelected)&&this.linkDef.onSelected(e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["paw-ag-router-link-renderer"]],standalone:!1,decls:2,vars:2,consts:[[3,"routerLink","queryParams","ngClass","click",4,"ngIf"],[4,"ngIf"],[3,"click","routerLink","queryParams","ngClass"]],template:function(n,i){n&1&&k(0,I,3,6,"a",0)(1,w,3,3,"span",1),n&2&&(a("ngIf",(i.linkDef==null?null:i.linkDef.link)||(i.linkDef==null?null:i.linkDef.queryParams)),l(),a("ngIf",!(i.linkDef!=null&&i.linkDef.link)&&!i.linkDef.queryParams&&i.linkDef.label))},dependencies:[L,P,R,h],styles:["[_nghost-%COMP%]   a[_ngcontent-%COMP%]{color:var(--paw-text-link);text-decoration:none;font-weight:500}[_nghost-%COMP%]   a.paw-text-primary[_ngcontent-%COMP%]{color:var(--paw-text-primary)!important;cursor:default}"]})}}return t})();export{O as a};
