1import{r as f,u as L,e as P,aJ as B,aK as E,aL as l,j as g,F as R,J as j}from"./index-51b326a0.js";import{u as F}from"./utils-c7625f95.js";const H=()=>{const[h,x]=f.useState(!0),a=L(),p=P(),{loading:m}=F(),{lettingsCards:e,sellingCards:o,myLettingsSearchCards:s,mySalesSearchCards:n,tenancy:t}=B();return f.useEffect(()=>{p(E())},[p]),f.useEffect(()=>{var I,v,y;if(m===!1&&(e!==void 0||o!==void 0||s!==void 0||n!==void 0||t!==void 0))if(e!=null&&e.totalProperties&&((I=e==null?void 0:e.dealsInformation)!=null&&I.length)&&e&&!o&&!s&&!n&&!t){const{propertyId:r,instructionId:i,tenancyId:c,state:d}=e.dealsInformation[0],u=l(r,i,c,d);a(u)}else if(o!=null&&o.totalProperties&&((v=o==null?void 0:o.dealsInformation)!=null&&v.length)&&!e&&o&&!s&&!n&&!t){const{propertyId:r,instructionId:i,tenancyId:c,state:d}=o.dealsInformation[0],u=l(r,i,c,d);a(u)}else if(((y=t==null?void 0:t.dealsInformation)==null?void 0:y.length)===1&&!e&&!s&&!n&&!o){const{propertyId:r,instructionId:i,tenancyId:c,state:d}=t.dealsInformation[0],u=l(r,i,c,d,"RENT");a(u)}else!e&&!o&&s&&!n&&!t?a("/account/my-lettings/overview"):!e&&!o&&!s&&n&&!t?a("/account/my-sales/overview"):(x(!1),a("/account/dashboard"))},[m,e,o,s,n,t,a]),h?g.jsx(R,{open:!0,hasBackdrop:!0}):g.jsx(j,{title:"My Foxtons: Home",description:"My Foxtons: Home"})};export{H as default};
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.