(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[275],{3046:(e,t,r)=>{"use strict";r.d(t,{NewPassword:()=>d});var o=r(5155);r(2115);var s=r(63),a=r(5279),n=r(2800),l=r(8018);let d=()=>{let e=(0,s.useRouter)(),{form:t,handleChangeField:r}=a.J.useFormField({newPassword:""});return(0,o.jsx)(l.d.MotionWrapper,{children:(0,o.jsxs)(l.d.SafeAreaView,{children:[(0,o.jsx)(l.d.Header,{showGoBack:!0,title:"Reset Password"}),(0,o.jsxs)("main",{style:{marginTop:n.A.sizes.headerHeight,padding:20,width:"100%"},children:[(0,o.jsx)("p",{style:{marginBottom:25,maxWidth:302,lineHeight:1.5,color:n.A.colors.textColor},children:"Please enter your new password."}),(0,o.jsx)(l.d.Input,{placeholder:"New Password",value:t.newPassword,inputType:"password",label:"New Password",onClickAction:()=>r("newPassword","New Password"),containerStyle:{marginBottom:20}}),(0,o.jsx)(l.d.Input,{placeholder:"Confirm Password",value:t.newPassword,inputType:"password",label:"Confirm Password",onClickAction:()=>r("newPassword","Confirm New Password"),containerStyle:{marginBottom:30}}),(0,o.jsx)(l.d.Button,{label:"Reset Password",onClickAction:()=>e.push(n.A.routes.forgotPasswordSentEmail)})]})]})})}},3755:(e,t,r)=>{Promise.resolve().then(r.bind(r,3046))},5279:(e,t,r)=>{"use strict";r.d(t,{J:()=>l});var o=r(5125),s=r(2115);let a="https://george-fx.github.io/yummer-api/",n={GET_OFFERS:"".concat(a,"offers.json"),GET_DISHES:"".concat(a,"dishes.json"),GET_PROMOCODES:"".concat(a,"promocodes.json")},l={useGetDish:e=>{let[t,r]=(0,s.useState)(null),[a,l]=(0,s.useState)(!0),d=async()=>{l(!0);try{var t;let s=await o.A.get(n.GET_DISHES),a=(null!=(t=s.data.dishes)?t:s.data).find(t=>t.id===e);return r(a||null),l(!1),a}catch(e){throw l(!1),console.error("Error fetching dishes:",e),e}};return(0,s.useEffect)(()=>{d()},[e]),{dish:t,isLoading:a}},useFormField:e=>{let[t,r]=(0,s.useState)(e);return{form:t,setForm:r,handleChangeField:(e,o)=>{let s=window.prompt("Enter your ".concat(o),t[e]);null!==s&&r(t=>({...t,[e]:s}))}}},useGetDishes:()=>{let[e,t]=(0,s.useState)([]),[r,a]=(0,s.useState)(!0),l=async()=>{a(!0);try{let e=await o.A.get(n.GET_DISHES);if(!e.data)throw Error("No data in response");let r=e.data.dishes||e.data||[];t(r)}catch(e){throw console.error("API request failed:",e),e}finally{a(!1)}};return(0,s.useEffect)(()=>{l()},[]),{dishes:e,loading:r}},useBodyColor:e=>{(0,s.useEffect)(()=>{let t=document.body.style.backgroundColor;return document.body.style.backgroundColor=e,()=>{document.body.style.backgroundColor=t}},[e])},useGetOffers:()=>{let[e,t]=(0,s.useState)([]),[r,a]=(0,s.useState)(!0),l=async()=>{a(!0);try{let e=await o.A.get(n.GET_OFFERS);if(!e.data)throw Error("No data in response");let r=e.data.offers||e.data||[];t(r)}catch(e){throw console.error("API request failed:",e),e}finally{a(!1)}};return(0,s.useEffect)(()=>{l()},[]),{offers:e,loading:r}},useThemeColor:e=>{(0,s.useEffect)(()=>{let t=document.querySelector('meta[name="theme-color"]');t||((t=document.createElement("meta")).setAttribute("name","theme-color"),document.head.appendChild(t));let r=t.getAttribute("content");return t.setAttribute("content",e),()=>{r&&t.setAttribute("content",r)}},[e])},useGetPromocodes:()=>{let[e,t]=(0,s.useState)([]),[r,a]=(0,s.useState)(!0),l=async()=>{a(!0);try{let e=await o.A.get(n.GET_PROMOCODES);if(!e.data)throw Error("No data in response");let r=e.data.promocodes||e.data||[];t(r)}catch(e){throw console.error("API request failed:",e),e}finally{a(!1)}};return(0,s.useEffect)(()=>{l()},[]),{promocodes:e,loading:r}}}}},e=>{e.O(0,[171,385,125,406,18,441,315,358],()=>e(e.s=3755)),_N_E=e.O()}]);