PageSourceSearch

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

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

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