import{G as H,e as j,f as z,vb as A}from"./chunk-ROXKKVPK.js";import{A as I,Aa as P,C as p,D as u,Gb as E,Ic as B,Jc as F,Q as M,Qb as T,Rc as Q,S as r,X as v,bc as N,cc as U,da as _,ea as f,fb as V,fc as D,ga as k,ha as y,ia as O,ja as c,ka as a,kc as R,la as s,ma as g,ra as w,ta as m,va as C,xb as x,ya as S,za as b}from"./chunk-ZVAMPSQU.js";import{j as h}from"./chunk-FB5LSH2R.js";var q=["swiperContainer"];function L(i,t){if(i&1){let l=w();a(0,"ion-icon",9),m("click",function(){p(l);let n=C();return u(n.slidePrev())}),s()}}function W(i,t){if(i&1&&(a(0,"swiper-slide")(1,"div",10),g(2,"img",11),s()()),i&2){let l=t.$implicit;r(2),c("src",l,M)}}function Y(i,t){if(i&1){let l=w();a(0,"ion-icon",12),m("click",function(){p(l);let n=C();return u(n.slideNext())}),s()}}var me=(()=>{let t=class t{constructor(){this.modalCtrl=I(F),this.slideNum=0,this.swiperModules=[E],A({arrowBackOutline:j,arrowForwardOutline:z,closeOutline:H})}ionViewWillEnter(){let e=this.getSwiperInstance();e&&(e.update(),e.on("slideChange",()=>{this.slideDidChange()}))}getSwiperInstance(){var e;return(e=this.swiperContainer)==null?void 0:e.nativeElement.swiper}slidePrev(){var e;(e=this.getSwiperInstance())==null||e.slidePrev()}slideNext(){var e;(e=this.getSwiperInstance())==null||e.slideNext()}slideDidChange(){return h(this,null,function*(){let e=this.getSwiperInstance(),n=e==null?void 0:e.activeIndex;typeof n=="number"&&(this.slideNum=n)})}dismiss(){this.modalCtrl.dismiss()}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=v({type:t,selectors:[["image-viewer"]],viewQuery:function(n,o){if(n&1&&S(q,7),n&2){let d;b(d=P())&&(o.swiperContainer=d.first)}},inputs:{imageUrls:"imageUrls"},decls:12,vars:4,consts:[["swiperContainer",""],["color","dark"],["slot","start"],[3,"click"],["slot","icon-only","name","close-outline"],["color","dark","fullscreen","true",3,"forceOverscroll"],["name","arrow-back-outline",1,"back"],["pagination","true","centeredSlides","true",3,"modules"],["name","arrow-forward-outline",1,"forward"],["name","arrow-back-outline",1,"back",3,"click"],[1,"image-container"],[3,"src"],["name","arrow-forward-outline",1,"forward",3,"click"]],template:function(n,o){n&1&&(a(0,"ion-header")(1,"ion-toolbar",1)(2,"ion-buttons",2)(3,"ion-button",3),m("click",function(){return o.dismiss()}),g(4,"ion-icon",4),s()()()(),a(5,"ion-content",5),_(6,L,1,0,"ion-icon",6),a(7,"swiper-container",7,0),y(9,W,3,1,"swiper-slide",null,k),s(),_(11,Y,1,0,"ion-icon",8),s()),n&2&&(r(5),c("forceOverscroll",!1),r(),f(o.slideNum>0?6:-1),r(),c("modules",o.swiperModules),r(2),O(o.imageUrls),r(2),f(o.slideNum<o.imageUrls.length-1?11:-1))},dependencies:[V,T,x,R,B,U,N,Q,D],styles:["ion-content[_ngcontent-%COMP%]   swiper-container[_ngcontent-%COMP%]{height:100%}ion-content[_ngcontent-%COMP%]   ion-icon[_ngcontent-%COMP%]{cursor:pointer;z-index:2;font-size:50px;position:absolute;top:50%;background:#000000bf;border-radius:40px;transform:translateY(-50%)}ion-content[_ngcontent-%COMP%]   .back[_ngcontent-%COMP%]{left:5px}ion-content[_ngcontent-%COMP%]   .forward[_ngcontent-%COMP%]{right:5px}.image-container[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:center}.image-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:100%;object-fit:contain}"]});let i=t;return i})();export{me as a};
