PageSourceSearch

https://myka.ng/assets/AuthorizedRepPage-CWYK-sme.js

js myka.ng collected 2026-10-09 22:43:51 UTC 3,863 bytes, 1 lines download raw bytes

1import{j as e,d as v,r as P}from"./vendor-react-DfYGAhtm.js";import{b as R,C as n}from"./vendor-forms-BP-7CbAP.js";import{by as g,bz as w,y as C}from"./vendor-icons-1odZwi-b.js";import{u as _,e as F}from"./vendor-state-BsBVN-fX.js";import{m as s,G as m,g as M,bq as k}from"./index-DsBgCU7r.js";import{u as A}from"./useSmeStepBreadcrumbs-eAyE9Kbh.js";import{S as H}from"./StepPageLayout-DdZUweau.js";import{C as c}from"./formRules-Cjr9zhBJ.js";import{a as t,i as I,T as a,V as j,H as x,v as h}from"./vendor-ui-DA_r9yXk.js";import{S as L}from"./SmeFormShell-D4x0eiWi.js";import{g as T,S as W}from"./flowGuard-BNgCH5A1.js";import{S as $}from"./routes-alBnq1HL.js";import"./stepBreadcrumbs-FCtSk5Kj.js";const B=()=>e.jsxs(t,{children:[e.jsx(I,{fontSize:{base:"2xl",md:"3xl"},fontWeight:"bold",color:s.text.label,mb:2,children:"Authorized Representative"}),e.jsx(a,{fontSize:"sm",color:s.text.gray,children:"Provide the details of the company representative authorized to manage this policy"})]}),p=({children:f})=>e.jsxs(x,{gap:.5,mb:2,children:[e.jsx(a,{fontSize:"sm",fontWeight:"medium",color:s.text.info,children:f}),e.jsx(a,{fontSize:"md",color:s.error[500],children:"*"})]}),d={firstName:c.name("First name"),lastName:c.name("Last name"),email:c.workEmail(),phone:c.nigerianPhone()},re=()=>{const{items:f}=A(),u=v(),b=_(),{company:S}=F(r=>r.sme),i=T(W.AuthorizedRep,S,null,[],null),{control:l,handleSubmit:y,formState:{errors:o}}=R({defaultValues:{firstName:"",lastName:"",email:"",phone:""}});if(P.useEffect(()=>{i&&u(i,{replace:!0})},[i,u]),i)return null;const N=r=>{b(k({firstName:r.firstName.trim(),lastName:r.lastName.trim(),email:r.email.trim(),phone:r.phone})),u(`/${$.BusinessProtection}`)};return e.jsx(H,{items:f,contentMaxW:"600px",children:e.jsx(L,{children:e.jsxs(j,{gap:6,align:"stretch",children:[e.jsx(B,{}),e.jsx("form",{onSubmit:y(N),children:e.jsxs(j,{gap:4,align:"stretch",children:[e.jsxs(x,{gap:3,align:"flex-start",children:[e.jsxs(t,{flex:1,children:[e.jsx(p,{children:"First Name"}),e.jsx(n,{name:"firstName",control:l,rules:d.firstName,render:({field:r})=>e.jsx(m,{...r,placeholder:"e.g. Adebayo",border:`1px solid ${s.border.primary}`,bg:"white",_hover:{bg:"white"},hasError:!!o.firstName,error:o.firstName?.message,leftIcon:e.jsx(h,{as:g,boxSize:5,color:s.orange[400]}),pl:"10"})})]}),e.jsxs(t,{flex:1,children:[e.jsx(p,{children:"Last Name"}),e.jsx(n,{name:"lastName",control:l,rules:d.lastName,render:({field:r})=>e.jsx(m,{...r,placeholder:"e.g. Johnson",border:`1px solid ${s.border.primary}`,bg:"white",_hover:{bg:"white"},hasError:!!o.lastName,error:o.lastName?.message,leftIcon:e.jsx(h,{as:g,boxSize:5,color:s.orange[400]}),pl:"10"})})]})]}),e.jsxs(t,{children:[e.jsx(p,{children:"Work Email"}),e.jsx(n,{name:"email",control:l,rules:d.email,render:({field:r})=>e.jsx(m,{...r,type:"email",placeholder:"[email protected]",border:`1px solid ${s.border.primary}`,bg:"white",_hover:{bg:"white"},hasError:!!o.email,error:o.email?.message,leftIcon:e.jsx(h,{as:w,boxSize:5,color:s.gray[400]}),pl:"10"})})]}),e.jsxs(t,{children:[e.jsx(p,{children:"Phone No"}),e.jsx(n,{name:"phone",control:l,rules:d.phone,render:({field:r})=>e.jsx(m,{type:"tel",placeholder:"Phone number",value:r.value,onChange:z=>{const E=z.target.value.replace(/\D/g,"").replace(/^0+/,"").slice(0,10);r.onChange(E)},hasError:!!o.phone,error:o.phone?.message,border:`1px solid ${s.border.primary}`,bg:"white",_hover:{bg:"white"},pl:"16",leftIcon:e.jsx(a,{fontSize:"sm",fontWeight:"600",color:s.gray[700],children:"+234"})})})]}),e.jsxs(x,{justify:"center",gap:2,pt:1,children:[e.jsx(h,{as:C,boxSize:4,color:s.success[500]}),e.jsx(a,{fontSize:"xs",color:s.text.gray,children:"Your data is encrypted and completely safe"})]}),e.jsx(x,{justify:"flex-end",children:e.jsx(M,{buttonType:"primary",text:"Continue",size:"lg",type:"submit"})})]})})]})})})};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.