import './polyfills.server.mjs';
import{a as M}from"./chunk-7GTT634J.mjs";import{Ca as T,E as r,Ea as h,G as v,M as _,Sa as g,T as a,Y as O,ba as p,cb as l,db as f,fb as u,na as o,oa as m,pa as c,s as C,ua as d,xa as y,xb as b,yb as k}from"./chunk-I24PFG4Z.mjs";var P=["panel"],z=["invoker"],w=(t,i,n)=>({hidden:t,disappear:i,appear:n}),N=(t,i,n)=>({hidden:t,"zoom-out":i,"zoom-in":n});function E(t,i){t&1&&d(0)}function x(t,i){t&1&&d(0)}var D=class t{confirm=l();cancel=l();closed=l();closeOnOutsideClick=f(!1);platformId=C(_);visible=r(!1);firstTime=r(!0);openTrigger=f(!1);panelTemplate=u("panel");invokerElement=u("invoker");ngOnChanges(i){this.openTrigger()&&this.open()}onOutsideClick(){this.closeOnOutsideClick()&&this.close()}open(){this.visible.set(!0),this.firstTime.set(!1)}close(){this.visible.set(!1),this.closed.emit(!0)}onConfirm(){this.close(),this.confirm.emit(!0)}onCancel(){this.close(),this.cancel.emit(!0)}get panelTemplateContext(){return{$implicit:{},close:()=>this.close(),onConfirm:()=>this.onConfirm(),onCancel:()=>this.onCancel()}}get invokerTemplateContext(){return{$implicit:{},open:()=>this.open()}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=O({type:t,selectors:[["ducki-dialog"]],contentQueries:function(n,e,s){n&1&&T(s,e.panelTemplate,P,5)(s,e.invokerElement,z,5),n&2&&h(2)},inputs:{closeOnOutsideClick:[1,"closeOnOutsideClick"],openTrigger:[1,"openTrigger"]},outputs:{confirm:"confirm",cancel:"cancel",closed:"closed"},features:[v],decls:5,vars:15,consts:[[4,"ngTemplateOutlet","ngTemplateOutletContext"],["appBodyHeightLimiter","",1,"dialog",3,"hasBodyToLimit"],[1,"dialog-overlay","fixed","top-0","left-0","w-full","h-full","bg-black/62","z-[110]",3,"click","ngClass"],[1,"q-panel","fixed","bg-white","rounded-2xl","overflow-hidden","z-[111]","w-full","left-[50%]","top-[50%]","flex","justify-center","items-center","-translate-[50%]","max-w-[325px]","md:max-w-[620px]",3,"ngClass"]],template:function(n,e){n&1&&(p(0,E,1,0,"ng-container",0),m(1,"section",1)(2,"div",2),y("click",function(){return e.onOutsideClick()}),c(),m(3,"div",3),p(4,x,1,0,"ng-container",0),c()()),n&2&&(o("ngTemplateOutlet",e.invokerElement())("ngTemplateOutletContext",e.invokerTemplateContext),a(),o("hasBodyToLimit",e.visible()),a(),o("ngClass",g(7,w,!e.visible()&&e.firstTime(),!e.visible()&&!e.firstTime(),e.visible())),a(),o("ngClass",g(11,N,!e.visible()&&e.firstTime(),!e.visible()&&!e.firstTime(),e.visible)),a(),o("ngTemplateOutlet",e.panelTemplate())("ngTemplateOutletContext",e.panelTemplateContext))},dependencies:[k,b,M],styles:[".dialog-overlay.appear[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_appear .4s forwards ease-in-out}.dialog-overlay.disappear[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_disappear .7s forwards ease-in-out}.q-panel.zoom-in[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_zoomIn .4s forwards ease-in-out}.q-panel.zoom-out[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_zoomOut .7s forwards ease-in-out}@keyframes _ngcontent-%COMP%_appear{0%{opacity:0}to{opacity:1;display:block}}@keyframes _ngcontent-%COMP%_disappear{50%{opacity:0}to{opacity:0;display:none;z-index:-1!important;position:relative}}@keyframes _ngcontent-%COMP%_zoomIn{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1);display:flex}}@keyframes _ngcontent-%COMP%_zoomOut{50%{opacity:0;transform:scale(.5)}to{opacity:0;transform:scale(.5);display:none;z-index:-1!important;position:fixed}}"]})};export{D as a};
