1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9125],{5295:function(a,b,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/properties/operation/[operation]",function(){return c(5721)}])},5721:function(d,b,a){"use strict";a.r(b);var e=a(4924),f=a(6042),g=a(9396),h=a(5893),c=a(9669),i=a.n(c),j=a(7294),k=a(1163),l=a(4696),m=a(682),n=a(1608),o=a(1555),p=a(8182),q=a(5607),r=a(7351),s=a(3913),t=a(4415),u=a(9934),v=a(1983),w=a(7530),x=a(6893),y=a(7117),z=a(3776),A=a(4728),B=a(9664),C=a(9200),D=a(1035),E=a(6055),F=a(9995),G=a(9667),H=a(6596);b.default=function(){var K,L,M,N,O,P,Q,I,R,S,b=(0,k.useRouter)().query.operation,ag=(0,k.useRouter)(),T=(0,j.useContext)(C.G),ah=T.dynamicOptions,ai=T.setDynamicOptions,aj=T.getDynamicOptions,d=(0,j.useContext)(t._).configuration,U=(0,j.useContext)(D._).realEstate,ab=(0,j.useContext)(v.f).filter,V=(0,j.useContext)(B.b),ak=V.setSection,ac=V.isFixed,W=(0,j.useContext)(z.I),ad=W.show,ae=W.handleClose,X=(0,j.useState)({data:[]}),a=X[0],al=X[1],Y=(0,j.useState)(!0),c=Y[0],am=Y[1],Z=(0,j.use
1State)(!1),$=Z[0],an=Z[1],ao=(0,j.useRef)(!1),ap=(0,j.useRef)(),aq=(0,j.useRef)({forSale:!1,forRent:!1,forTemporaryRent:!1}),J=function(b){var a=arguments.length>1&& void 0!==arguments[1]?arguments[1]:{};ap.current={realEstateId:b,options:a},ao.current=!0,am(!0),an(!1),a.conditions=(0,g.Z)((0,f.Z)({},a.conditions),{statusId:(0,u._B)(d,window.location.pathname),typeId:(0,u.Cp)(a.conditions,window.location.pathname),operationId:(0,u.jB)(window.location.pathname)}),i().post("/api/properties",{realEstateId:b,options:a}).then(function(a){return a.data}).then(function(a){al(a),am(!1),ao.current=!1}).catch(function(){al({data:[]}),an(!0),am(!1),ao.current=!1})};switch(b){case"forSale":I="Las mejores propiedades en venta",Q=H.mI.VENTA;break;case"forRent":I="Las mejores propiedades en alquiler",Q=H.mI.ALQUILER;break;case"forTemporaryRent":I="Las mejores propiedades en alquiler temporario",Q=H.mI.ALQUILER_TEMPORARIO}(0,j.useEffect)(function(){if(ak(b),b&&Object(d).hasOwnProperty("realEstate")){var a;(0,u.K5)(d,b)||ag.push("/"),0!==Object.keys(null==ah?void 0:ah[b]).length||aq.current[b]||(aq.current[b]=!0,aj(d.realEstate.id,{operation:Q}).then(function(a){ai((0,g.Z)((0,f.Z)({},ah),(0,e.Z)({},b,a)))})),!1==ao.current&&Object.keys(null==ab?void 0:null===(a=ab.order)|| void 0===a?void 0:a[b]).length>0&&J(d.realEstate.id,{page:(0,w.zU)(ab,window.location.pathname),conditions:(0,w.pW)(ab,window.location.pathname),order:(0,w.pp)(ab,window.location.pathname)})}},[d,b,ab]);var _={forSale:{title:"Propiedades en venta",description:"Esta es la p\xe1gina de propiedades en venta."},forRent:{title:"Propiedades en alquiler",description:"Esta es la p\xe1gina de propiedades en alquiler."},forTemporaryRent:{title:"Propiedades en alquiler temporario",description:"Esta es la p\xe1gina de propiedades en alquiler temporario."}},af={title:null!==(R=null==U?void 0:U.name)&& void 0!==R?R:null===(K=_[b])|| void 0===K?void 0:K.title,description:null===(L=_[b])|| void 0===L?void 0:L.description},aa="properties";return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(A.Z,{show:ad,handleClose:ae}),(0,h.jsxs)(l.Z,(0,g.Z)((0,f.Z)({},af),{children:[ac&&(0,h.jsx)("div",{className:"first-section-with-fixed-navbar"}),(0,h.jsx)("section",{className:"py-5 ".concat(b),children:(0,h.jsx)(m.Z,{children:(0,h.jsxs)(n.Z,{children:[(0,u.es)(d,b)&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(o.Z,{lg:3,md:12,className:"mb-5 mb-lg-0 d-none d-lg-block",children:(0,h.jsx)(p.Z,{className:"bg-primary border-0 shadow-lg",children:(0,h.jsxs)(p.Z.Body,{children:[(0,h.jsx)("h5",{className:"mb-3 text-center",children:"Encontr\xe1 tu propiedad"}),(0,h.jsx)(s.Z,{listingType:aa,operation:b,getProperties:J,loading:c})]})})}),(0,h.jsx)(o.Z,{xs:12,className:"mb-5 d-block d-lg-none",children:(0,h.jsx)(q.Z,{className:"filter",children:(0,h.jsxs)(q.Z.Item,{eventKey:"0",children:[(0,h.jsx)(q.Z.Header,{children:"Encontr\xe1 tu propiedad"}),(0,h.jsx)(q.Z.Body,{children:(0,h.jsx)(s.Z,{listingType:aa,operation:b,getProperties:J,loading:c})})]})})})]}),(0,h.jsxs)(o.Z,{lg:(0,u.es)(d,b)?9:12,md:12,children:[(0,h.jsxs)(n.Z,{children:[(0,h.jsxs)(o.Z,{sm:6,xs:12,className:"mb-3",children:[(0,h.jsx)("h4",{className:"m-0 section-title",children:null!==(S=(0,u.CY)(d,b))&& void 0!==S?S:I}),(0,h.jsxs)("p",{className:"small m-0",children:[c||$?0:null==a?void 0:null===(M=a.meta)|| void 0===M?void 0:M.total," resultados"]})]}),(null==a?void 0:null===(N=a.data)|| void 0===N?void 0:N.length)>0&&(0,h.jsx)(o.Z,{sm:6,xs:12,children:(0,h.jsx)(x.Z,{getProperties:J,loading:c})})]}),(0,h.jsxs)(n.Z,{children:[(0,h.jsx)(o.Z,{xs:12,className:"mb-5",children:(0,h.jsx)(n.Z,{children:c?(0,h.jsx)(E.Z,{}):$?(0,h.jsx)(G.Z,{onRetry:function(){ap.current&&J(ap.current.realEstateId,ap.current.options)}}):(null==a?void 0:null===(O=a.data)|| void 0===O?void 0:O.length)>0?(0,h.jsx)(r.Z,{properties:null==a?void 0:a.data,columns:(0,u.es)(d,b)?2:3}):(0,h.jsx)(F.Z,{})})}),(0,h.jsx)(o.Z,{xs:12,children:!c&&(null==a?void 0:null===(P=a.data)|| void 0===P?void 0:P.length)>0&&(0,h.jsx)(y.Z,{meta:null==a?void 0:a.meta,links:null==a?void 0:a.links,getProperties:J})})]})]})]})})})]}))]})}}},function(a){a.O(0,[2344,217,9273,4696,9545,9864,6735,9774,2888,179],function(){var b;return a(a.s=5295)}),_N_E=a.O()}])
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.