import{c as Z,d as j}from"./chunk-WJGP2CLN.js";import{b as x,d as H}from"./chunk-2ZXCNSZZ.js";import{ua as W,va as F}from"./chunk-WOPE6PPO.js";import{E as N,h as P,o as E}from"./chunk-MDIMQ3H3.js";import{Bb as M,Ca as _,Cc as S,Db as I,Dc as B,Ib as d,Ja as w,Jb as s,Kb as p,Ub as m,Xb as c,Yc as o,Za as T,Zb as h,hc as u,ib as k,nd as V,ob as y,ra as f,rc as b,sc as v,tc as D,va as a,vd as O,wa as l}from"./chunk-GJDGQISV.js";var q=i=>({"full-width w-100":i}),z=()=>({standalone:!0});function A(i,L){if(i&1){let e=m();s(0,"i",3),c("click",function(){a(e),h();let n=u(1);return l(n.showOverlay())}),p()}}function G(i,L){if(i&1){let e=m();s(0,"p-footer")(1,"button",4),c("click",function(){a(e);let n=h();return u(1).hideOverlay(),l(n.onShowCalendar())}),p()()}}var re=(()=>{class i{constructor(){this.datePipe=f(O),this.fullWidth=o(!1),this.showCloseBtn=o(!0),this.showIcon=o(!1),this.placeholder=o("Select Time"),this.showClear=o(!1),this.timeChange=new _}ngOnInit(){}ngOnChanges(e){if(e.time&&e.time.currentValue){let t=new Date,n=e.time.currentValue.split(":");t.setHours(parseInt(n[0],10)),t.setMinutes(parseInt(n[1],10)),this.time=t}}onTimeChange(e){let t=e?this.datePipe.transform(e,"HH:mm")??"":"";this.timeChange.emit(t),this.onTimePickerChange()}onShowCalendar(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="inside")}}onTimePickerChange(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="outside")}}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=k({type:i,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:[1,"fullWidth"],showCloseBtn:[1,"showCloseBtn"],showIcon:[1,"showIcon"],placeholder:[1,"placeholder"],showClear:[1,"showClear"]},outputs:{timeChange:"timeChange"},features:[w],decls:4,vars:12,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body","iconDisplay","input",3,"ngModelChange","onSelect","ngClass","baseZIndex","ngModel","timeOnly","ngModelOptions","showIcon","placeholder","showClear"],["pTemplate","inputicon"],["aria-hidden","true",1,"fa-regular","pt-1","fa-clock",3,"click"],["pButton","","type","button","label","Close","icon","pi pi-times",3,"click"]],template:function(t,n){if(t&1){let g=m();s(0,"p-datepicker",1,0),D("ngModelChange",function(r){return a(g),v(n.time,r)||(n.time=r),l(r)}),c("ngModelChange",function(r){return n.onTimeChange(r)})("onSelect",function(){return n.onShowCalendar()}),y(2,A,1,0,"ng-template",2),M(3,G,2,0,"p-footer"),p()}t&2&&(d("ngClass",B(9,q,n.fullWidth()))("baseZIndex",1e4),b("ngModel",n.time),d("timeOnly",!0)("ngModelOptions",S(11,z))("showIcon",n.showIcon())("placeholder",n.placeholder())("showClear",n.showClear()),T(3),I(n.showCloseBtn()?3:-1))},dependencies:[j,Z,W,F,N,P,E,H,x,V],styles:["p-calendar span.p-calendar.p-calendar-timeonly.custom-height{height:44px;width:55px}  p-calendar.full-width span.p-calendar.p-calendar-timeonly.custom-height{height:44px;width:100%!important}"]})}}return i})();export{re as a};
