PageSourceSearch

https://myka.ng/assets/EnquiryPage-CTx7TE7Q.js

js myka.ng collected 2026-10-09 22:43:56 UTC 4,414 bytes, 1 lines download raw bytes

1import{j as e,d as j,r as E}from"./vendor-react-DfYGAhtm.js";import{b as z,c as A}from"./vendor-forms-BP-7CbAP.js";import{m as r,G as m,g as u,y as F,B as b,t as T}from"./index-DsBgCU7r.js";import{s as C}from"./success-C0L8gZxS.js";import{s as M}from"./savings-specialized-hA4moY7S.js";import{u as P}from"./useAnalytics-HP01GbIH.js";import{S as _}from"./StepPageLayout-DdZUweau.js";import{M as q}from"./Modal-DS-VW05m.js";import{a as w,g as N}from"./errors-BYKXB8DF.js";import{u as R}from"./enquiryPolicyApi-9jp9YRr5.js";import{a,V as x,o as B,T as o,x as I,F as k}from"./vendor-ui-DA_r9yXk.js";import{e as D}from"./enquiryFormSchema-B3D0L4pA.js";import"./vendor-icons-1odZwi-b.js";import"./vendor-state-BsBVN-fX.js";const L=()=>R("specialized"),O=({children:t})=>e.jsx(a,{bg:"white",borderRadius:"2xl",p:{base:6,md:10},background:`linear-gradient(145deg, ${r.white.DEFAULT} 0%, ${r.orange[50]} 100%)`,border:"1px solid",borderColor:r.border.secondary,children:t}),re=()=>{const t=j(),{track:d}=P(),{submitEnquiryAsync:g,isSubmitting:c}=L(),{register:i,handleSubmit:h,formState:{errors:s}}=z({resolver:A(D),defaultValues:{name:"",phoneNumber:"",email:"",message:""}}),[y,n]=E.useState(!1),f=async l=>{try{await g({productType:"SPECIALIZED_PLAN",fullName:l.name.trim(),phone:l.phoneNumber.replace(/\D/g,""),email:l.email.trim(),message:l.message.trim()}),d(b.FORM_OTHERS_SUBMITTED,{product_type:"others"}),n(!0)}catch(p){if(w(p))return;d(b.FORM_OTHERS_SUBMIT_FAILED,{product_type:"others",failure_reason:"server_error"}),T.error(N(p)??"We could not submit your request. Please try again.")}},S=()=>{n(!1),t("/")};return e.jsxs(_,{items:[],onGoBack:()=>t(-1),contentMaxW:"800px",mobileContentOnly:!0,children:[e.jsx(O,{children:e.jsxs(x,{align:"stretch",gap:6,children:[e.jsxs(a,{children:[e.jsx(B,{src:M,alt:"Specialized Plan",boxSize:"48px",objectFit:"contain",mb:2}),e.jsx(o,{fontSize:{base:"4xl",md:"5xl"},color:r.text.primary,fontWeight:"semibold",children:"Specialized Plan"}),e.jsx(o,{fontSize:"md",color:r.text.gray,children:"Tell us about your specialized savings needs and we'll get back with options that fit."})]}),e.jsxs(a,{as:"form",onSubmit:h(f),border:"1px solid",borderColor:r.border.primary,borderRadius:"16px",p:{base:4,md:5},bg:r.white.DEFAULT,children:[e.jsxs(x,{gap:4,align:"stretch",mb:{base:4,md:6},children:[e.jsx(m,{label:"Name",placeholder:"e.g. Mr John Doe",bg:r.gray[50],border:"1px solid",borderColor:r.gray[200],error:s.name?.message,...i("name")}),e.jsx(m,{label:"Phone Number",type:"tel",placeholder:"e.g. 09000112233",inputMode:"numeric",bg:r.gray[50],border:"1px solid",borderColor:r.gray[200],error:s.phoneNumber?.message,...i("phoneNumber")}),e.jsx(m,{label:"Email Address",type:"email",placeholder:"e.g. [email protected]",bg:r.gray[50],border:"1px solid",borderColor:r.gray[200],error:s.email?.message,...i("email")}),e.jsxs(a,{children:[e.jsx(o,{fontSize:"sm",color:r.text.info,mb:2,children:"Message"}),e.jsx(I,{placeholder:"Describe your specialized needs, timeline, and any questions.",minH:"120px",resize:"vertical",p:4,borderRadius:"16px",bg:r.gray[50],border:"1px solid",borderColor:s.message?r.error[500]:r.gray[200],_focus:{borderColor:s.message?r.error[500]:r.orange[400],boxShadow:s.message?`0 0 0 1px ${r.error[500]}`:`0 0 0 1px ${r.orange[400]}`},...i("message")}),s.message?.message?e.jsx(a,{mt:1.5,children:e.jsx(o,{textStyle:"text-sm-regular",color:r.error[500],children:s.message.message})}):null]})]}),e.jsx(k,{justify:"flex-end",mt:{base:1,md:0},children:e.jsx(u,{buttonType:"primary",text:"Submit enquiry",size:"lg",type:"submit",loading:c,disabled:c,minW:"170px"})})]})]})}),e.jsx(q,{open:y,onClose:()=>n(!1),showCloseButton:!1,closeOnEscape:!1,closeOnInteractOutside:!1,maxW:"460px",contentProps:{borderRadius:"28px",overflow:"hidden"},bodyProps:{p:0},children:e.jsxs(a,{px:{base:6,md:10},py:{base:8,md:10},bg:"radial-gradient(circle at top, #E8FBEA 0%, #FFFFFF 56%)",textAlign:"center",children:[e.jsx(F,{data:C,autoplay:!0}),e.jsxs(o,{color:r.text.primary,fontSize:{base:"3xl",md:"4xl"},fontWeight:"semibold",lineHeight:"1.2",mb:3,children:["Request Submitted",e.jsx("br",{}),"Successfully"]}),e.jsx(o,{fontSize:"sm",color:r.text.gray,mb:8,children:"Great job! Your Specialized Plan enquiry has been submitted successfully."}),e.jsx(u,{buttonType:"primary",text:"Back home",size:"lg",type:"button",onClick:S,fullWidth:!0})]})})]})};export{re 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.