File: /var/www/vhost/disk-apps/pwa.sports-crowd.com/www/5171.15c2735e0efd9be6.js
"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[5171],{35171:(A,u,i)=>{i.r(u),i.d(u,{UserLocationsPageModule:()=>F});var a=i(56610),h=i(37222),n=i(77897),c=i(36075),f=i(73308),s=i(2978),m=i(29885);function U(e,L){if(1&e){const o=s.RV6();s.j41(0,"ion-card")(1,"ion-card-content")(2,"ion-row")(3,"ion-col",6),s.nrm(4,"ion-icon",7),s.EFF(5),s.k0s()(),s.j41(6,"ion-row",8)(7,"ion-button",9),s.bIt("click",function(){const d=s.eBV(o).$implicit,l=s.XpG();return s.Njj(l.selectAddress(d.id))}),s.EFF(8,"Seleccionar"),s.k0s()()()()}if(2&e){const o=L.$implicit;s.R7$(5),s.SpI(" ",o.direction,"")}}const g=[{path:"",component:(()=>{class e{constructor(o,t,r){this.router=o,this.userService=t,this.location=r,this.infoConfirmOrder={address:"",wayPay:"",cellphone:"",observations:"",point_sale_id:""}}ngOnInit(){}ionViewWillEnter(){this.getInfoAddressLastUsed()}getInfoAddressLastUsed(){this.userService.getInfoUser().then(o=>{this.listAddressUser=o.addresses,this.addressUserLastUsed=this.listAddressUser.find(t=>1===t.last_used),this.infoConfirmOrder.address=this.addressUserLastUsed.id})}addNewAddress(){this.router.navigate(["/address/confirmOrder/true"])}selectAddress(o){var t=this;return(0,f.A)(function*(){yield t.userService.updateLastUsedAddress(o).then(()=>{setTimeout(()=>{console.log("selectAddress"),t.location.back()},500)})})()}doRefresh(o){setTimeout(()=>{o.target.complete()},500)}static#s=this.\u0275fac=function(t){return new(t||e)(s.rXU(c.Ix),s.rXU(m.D),s.rXU(a.aZ))};static#e=this.\u0275cmp=s.VBU({type:e,selectors:[["app-user-locations"]],decls:11,vars:1,consts:[[1,"ion-no-border"],["slot","start"],["slot","fixed",3,"ionRefresh"],["pullingIcon","arrow-down-outline","refreshingSpinner","ios"],[4,"ngFor","ngForOf"],["expand","block",3,"click"],["size","12"],["name","location-outline"],[1,"ion-justify-content-end"],["size","small",3,"click"]],template:function(t,r){1&t&&(s.j41(0,"ion-header",0)(1,"ion-toolbar"),s.nrm(2,"ion-back-button",1),s.j41(3,"ion-title"),s.EFF(4,"My locations"),s.k0s()()(),s.j41(5,"ion-content")(6,"ion-refresher",2),s.bIt("ionRefresh",function(l){return r.doRefresh(l)}),s.nrm(7,"ion-refresher-content",3),s.k0s(),s.DNE(8,U,9,1,"ion-card",4),s.j41(9,"ion-button",5),s.bIt("click",function(){return r.addNewAddress()}),s.EFF(10,"Agregar ubicaci\xf3n"),s.k0s()()),2&t&&(s.R7$(8),s.Y8G("ngForOf",r.listAddressUser))},dependencies:[a.Sq,n.el,n.Jm,n.b_,n.I9,n.hU,n.W9,n.eU,n.iq,n.To,n.Ki,n.ln,n.BC,n.ai,n.tY]})}return e})()}];let p=(()=>{class e{static#s=this.\u0275fac=function(t){return new(t||e)};static#e=this.\u0275mod=s.$C({type:e});static#t=this.\u0275inj=s.G2t({imports:[c.iI.forChild(g),c.iI]})}return e})();var v=i(22882);let F=(()=>{class e{static#s=this.\u0275fac=function(t){return new(t||e)};static#e=this.\u0275mod=s.$C({type:e});static#t=this.\u0275inj=s.G2t({imports:[a.MD,h.YN,n.bv,p,v.h]})}return e})()}}]);