import{d as m,e as h}from"./chunk-2MELUOYA.js";import{Aa as u,Bd as l,Ka as n,La as f,Oa as r,jb as c,kb as a,nb as d,oa as i,ra as o}from"./chunk-GJDGQISV.js";var I=(()=>{class t extends m{autofocus=!1;focused=!1;platformId=o(r);document=o(u);host=o(f);onAfterContentChecked(){this.autofocus===!1?this.host.nativeElement.removeAttribute("autofocus"):this.host.nativeElement.setAttribute("autofocus",!0),this.focused||this.autoFocus()}onAfterViewChecked(){this.focused||this.autoFocus()}autoFocus(){l(this.platformId)&&this.autofocus&&setTimeout(()=>{let e=h.getFocusableElements(this.host?.nativeElement);e.length===0&&this.host.nativeElement.focus(),e.length>0&&e[0].focus(),this.focused=!0})}static \u0275fac=(()=>{let e;return function(p){return(e||(e=n(t)))(p||t)}})();static \u0275dir=a({type:t,selectors:[["","pAutoFocus",""]],inputs:{autofocus:[0,"pAutoFocus","autofocus"]},features:[d]})}return t})(),C=(()=>{class t{static \u0275fac=function(s){return new(s||t)};static \u0275mod=c({type:t});static \u0275inj=i({})}return t})();export{I as a,C as b};
