1import{m as T,E as F,j as s,T as c,W as O,M as r,q as b}from"./vendor-mui-BGS3mHwM.js";import{r as d,j as k,u as _}from"./vendor-redux-FtDGt7Mz.js";import{dO as B,ct as M,cD as W,cu as G,A as Q,ff as U,bY as z,fg as H}from"./index-D5apbUK-.js";import{c as Y}from"./pehc-apis-CSywMsyQ.js";import{c as $,u as J,N as K}from"./vendor-react-CUpnpRPD.js";import"./vendor-stream-CynyArsg.js";import"./vendor-pdf-Ddbn4B6C.js";import"./vendor-graphql-CuoeCPzn.js";import"./vendor-media-BEZy7yMd.js";import"./vendor-radix-NiTG7895.js";import"./vendor-mui-pickers-BdXKbjEa.js";import"./vendor-forms-BcpGzS3-.js";const ae=()=>{var x,h,f,L,j,I,S;const y=T(),l=F(y.breakpoints.up("md")),{id:n}=$(),[p,u]=d.useState(!0),i=k(B),v=k(M),{data:e,isLoading:o,isError:w,isSuccess:m,error:a}=Y({id:n}),C=((x=a==null?void 0:a.data)==null?void 0:x.message)||"Something went wrong",t={userId:(h=e==null?void 0:e.data)==null?void 0:h.userId,name:(f=e==null?void 0:e.data)==null?void 0:f.fullName,uuid:(L=e==null?void 0:e.data)==null?void 0:L.userUuid},A=_(),g=J(),N=()=>{u(!0)};if(d.useEffect(()=>{var E;!o&&m&&A(W({isLoggedIn:!0,user:t==null?void 0:t.name,uuid:t==null?void 0:t.uuid,stage:(E=G)==null?void 0:E.PROFILE_FULLFILLED,userId:t==null?void 0:t.userId,gmailLinkingEnabled:(t==null?void 0:t.gmailLinkingEnabled)&&!v}))},[o,m]),d.useEffect(()=>{p&&i.addressSet&&u(!1)},[i]),o)return s.jsx(Q,{});if(w)return s.jsx(c,{sx:{color:"#FF3333"},children:C});const P=()=>{g("/pehc/booking/buckets",{state:{orderRequestId:n}})};return((j=e==null?void 0:e.data)==null?void 0:j.status)===U?s.jsx(O,{severity:"error",children:"This request is already cancelled."}):(I=e==null?void 0:e.data)!=null&&I.orderRefId?s.jsx(K,{to:`/pehc/booking/success/${(S=e==null?void 0:e.data)==null?void 0:S.orderRefId}`}):s.jsxs(r,{display:"flex",flexDirection:"column",gap:"1em",children:[s.jsxs(r,{display:"flex",gap:"1em",alignItems:"center",children:[i.addressSet&&s.jsxs(c,{children:["Location: ",s.jsx("strong",{children:i.address})]}),s.jsx(b,{onClick:N,sx:{width:l?"fit-content":"initial"},children:"Change Location"})]}),s.jsx(b,{onClick:()=>g("/pehc/booking/buckets",{state:{orderRequestId:n}}),variant:"contained",color:"secondary",size:"xl",sx:{width:l?"fit-content":"initial"},disabled:!i.addressSet,children:"Proceed"}),s.jsx(z,{drawerStatus:p,drawerClose:()=>{},styles:{maxWidth:"376px"},children:s.jsxs(r,{padding:"24px",display:"flex",flexDirection:"column",gap:"24px",children:[s.jsx(c,{variant:"important_text_bold",children:"Set Location"}),s.jsx(H,{keepSuggestionsActive:!0,saveLocation:!1,onSuccess:P})]})})]})};export{ae 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.