1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7195],{1887:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/saved-property",function(){return r(3387)}])},59560:function(e,t,r){"use strict";var s=r(67294),a=r(87405),i=r(58865),n=r(51214);t.Z=e=>{let{endpoint:t,transformResponse:r}=e,[o,p]=(0,s.useState)({properties:[],originalProperty:null}),[l,c]=(0,s.useState)(!1),{getReq:d,deleteReq:u}=(0,a.Z)(),m=async()=>{c(!0);try{let e;let s=(await d(t)).data;e=r?r(s):{properties:(0,n.Z)(s),originalProperty:null},p(e)}catch(e){(0,i.Z)("error",null==e?void 0:e.message),p({properties:[],originalProperty:null})}finally{c(!1)}},y=async e=>{try{let r;if(t.includes("/crm/"))r="/crm/property/".concat(encodeURIComponent(e),"/");else{let s=t.endsWith("/")?t.slice(0,-1):t;r="".concat(s,"/").concat(encodeURIComponent(e))}await u(r),p(t=>({...t,properties:t.properties.filter(t=>(t.id||t.property_id)!==e)})),(0,i.Z)("success","Deleted successfully")}catch(e){(0,i.Z)("error",null==e?void 0:e.message)}};return(0,s.useEffect)(()=>{m()},[t]),{properties:o.properties,originalProperty:o.originalProperty,isLoading:l,deleteProperty:y,sortProperties:e=>{p(t=>{let r=[...t.properties].sort((t,r)=>{switch(e){case"price_asc":return(t.price||0)-(r.price||0);case"price_desc":return(r.price||0)-(t.price||0);case"date_asc":return new Date(t.created_at||t.date_created||0)-new Date(r.created_at||r.date_created||0);case"date_desc":return new Date(r.created_at||r.date_created||0)-new Date(t.created_at||t.date_created||0);case"ncr_asc":return(t.capRate||0)-(r.capRate||0);case"ncr_desc":return(r.capRate||0)-(t.capRate||0);default:return 0}});return{...t,properties:r}})},searchProperties:e=>{console.log("Searching for:",e)},refetch:m}}},3387:function(e,t,r){"use strict";r.r(t);var s=r(85893),a=r(67294);r(25675);var i=r(9008),n=r.n(i),o=r(97375);r(25001),r(12539);var p=r(84629),l=r(82727),c=r(52356),d=r(17656),u=r(53935),m=r(26402),y=r(92421),v=r(59560),h=r(1907);let g=()=>{let[e,t]=(0,a.useState)(null),{properties:r,isLoading:i,deleteProperty:u,sortProperties:m,searchProperties:g}=(0,v.Z)({endpoint:"/crm/saved-properties/",transformResponse:e=>({properties:(0,h.Z)(e),originalProperty:null})}),_={"@context":"https://schema.org","@type":"ItemList",name:"Saved Investment Properties",description:"List of saved real estate investment properties",numberOfItems:(null==r?void 0:r.length)||0,itemListElement:(null==r?void 0:r.map((e,t)=>({"@type":"ListItem",position:t+1,item:{"@type":"RealEstateListing",name:e.address,identifier:e.property_id,description:"".concat(e.beds," beds, ").concat(e.baths," baths investment property"),price:e.price,address:{"@type":"PostalAddress",streetAddress:e.address,addressLocality:e.city,addressRegion:e.state,postalCode:e.zip,addressCountry:"US"}}})))||[]};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n(),{children:[(0,s.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(_)}}),(0,s.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"WebPage",name:"Saved Investment Properties",description:"Manage and track your saved real estate investment properties",breadcrumb:{"@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://betterdeal.ai"},{"@type":"ListItem",position:2,name:"Saved Properties",item:"https://betterdeal.ai/saved-property"}]}})}})]}),(0,s.jsx)(d.Z,{title:"Saved Properties",subtitle:"Manage and track your potential investment properties",className:"pb-8"}),!!(null==r?void 0:r.length)&&(0,s.jsx)(c.Z,{onSearch:g,onSort:m,totalSaved:null==r?void 0:r.length}),(0,s.jsx)("section",{className:"pt-0",children:(0,s.jsxs)(o.Z,{children:[i&&(0,s.jsx)(p.Z,{}),!i&&!!(null==r?void 0:r.length)&&(0,s.jsx)("div",{role:"list","aria-label":"Saved properties list",children:r.map(e=>(0,s.jsx)(y.Z,{...e,handleDelete:u},e.property_id))}),!(null==r?void 0:r.length)&&!i&&(0,s.jsx)(l.Z,{})]})})]})};g.getLayout=e=>(0,s.jsx)(u.N,{children:(0,s.jsx)(m.Z,{children:e})}),g.seo={title:"Saved Properties - Your Investment Watchlist | BetterDeal AI",description:"Access and manage your saved investment properties on BetterDeal AI. Track potential investments, compare properties, and make informed decisions with our analysis tools.",keywords:"saved properties, property watchlist, investment tracking, saved real estate, property management, investment portfolio",openGraph:{type:"website",locale:"en_US",url:"https://betterdeal.ai/saved-property",site_name:"BetterDeal AI",title:"Your Saved Investment Properties - BetterDeal AI",description:"Manage your saved properties and track potential real estate investments with our advanced analysis tools.",images:[{url:"/images/saved-properties-og-image.jpg",width:1200,height:630,alt:"Saved Properties Dashboard on BetterDeal AI"}]}},t.default=g}},function(e){e.O(0,[3749,3860,742,2888,9774,179],function(){return e(e.s=1887)}),_N_E=e.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.