1"use strict";(self.webpackChunklsk=self.webpackChunklsk||[]).push([[6818],{6818:(e,l,o)=>{o.r(l),o.d(l,{default:()=>x});var a=o(9950),i=o(10300),n=o(24492),d=o(1201),s=o(22101),t=o(70431),r=o(98374),c=o(72360),m=o(43898),v=o(73283),u=o(73561),p=o(81820),h=o(44414);const x=()=>{var e,l,o,x,f,j,b;const g=(0,n.Zp)(),N=(0,i.d4)(e=>{var l;return null===e||void 0===e||null===(l=e.userData)||void 0===l?void 0:l.business_token}),[_,y]=(0,a.useState)();let C="[a-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{2,4}$";const[w,A]=(0,a.useState)([{attachment:null}]),[F,k]=(0,a.useState)({category:"",advocate_id:"",name:"",middle_name:"",last_name:"",email:"",phone_no:"",address:"",description:"",behalf:"self",behalf_type:"LSK",institute_organization_name:"",individual_name:"",individual_email:"",individual_phone_no:"",otp:"",acc_prosecutor_name:"",acc_prosecutor_email:"",acc_prosecutor_phone_no:"",acc_prosecutor_otp:""}),[S,E]=(0,a.useState)(!1),[D,L]=(0,a.useState)(!1),[P,R]=(0,a.useState)(""),z=async()=>{E(!0);try{L(!0);var e=new FormData;e.append("business_token",N),e.append("complaint_type",null===F||void 0===F?void 0:F.category),e.append("member_id",null===F||void 0===F?void 0:F.advocate_id),"complaints"!=(null===F||void 0===F?void 0:F.category)&&"affidavits"!=(null===F||void 0===F?void 0:F.category)&&"acc_affidavits"!=(null===F||void 0===F?void 0:F.category)||e.append("on_behalf",null===F||void 0===F?void 0:F.behalf),"behalf_of"==(null===F||void 0===F?void 0:F.behalf)&&e.append("behalf_type",null===F||void 0===F?void 0:F.behalf_type),e.append("name",null===F||void 0===F?void 0:F.name),e.append("email",null===F||void 0===F?void 0:F.email),e.append("phone",null===F||void 0===F?void 0:F.phone_no),e.append("address",null===F||void 0===F?void 0:F.address),e.append("description",null===F||void 0===F?void 0:F.description),"Individual"==(null===F||void 0===F?void 0:F.behalf_type)&&(e.append("individual_name",null===F||void 0===F?void 0:F.individual_name),e.append("individual_email",null===F||void 0===F?void 0:F.individual_email),e.append("individual_phone",null===F||void 0===F?void 0:F.individual_phone_no)),"acc_affidavits"==(null===F||void 0===F?void 0:F.category)&&(e.append("acc_name",null===F||void 0===F?void 0:F.acc_prosecutor_name),e.append("acc_email",null===F||void 0===F?void 0:F.acc_prosecutor_email),e.append("acc_phone",null===F||void 0===F?void 0:F.acc_prosecutor_phone_no)),"behalf_of"!=(null===F||void 0===F?void 0:F.behalf)||"Organization"!=(null===F||void 0===F?void 0:F.behalf_type)&&"Institution"!=(null===F||void 0===F?void 0:F.behalf_type)||e.append("institute_organization_name",(null===F||void 0===F?void 0:F.institute_organization_name)||""),w.forEach((l,o)=>{e.append(`attachment[${o}]`,l.attachment||"")}),L(!0);let o=await s.A.request("post","post-complaint",e);var l;if(null!==o&&void 0!==o&&o.status)d.oR.success(null===o||void 0===o?void 0:o.message),R(null===o||void 0===o||null===(l=o.data)||void 0===l?void 0:l.refrence_no)}catch(S){d.oR.error("Failed")}finally{L(!1)}},[q,O]=(0,a.useState)({data:[]}),[T,B]=(0,a.useState)({}),I=(0,a.useRef)(null),M=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{L(!0);let l=await s.A.request("get","get-advocate-lists",{business_token:N,keyword:e});null!==l&&void 0!==l&&l.status&&O(l)}catch(S){console.error(S)}finally{L(!1)}};(0,a.useEffect)(()=>{N&&((async()=>{try{let e=await s.A.request("get","get-advocates-utilities",{list:"complaint_types",business_token:N});null!==e&&void 0!==e&&e.status&&B(null===e||void 0===e?void 0:e.data)}catch(S){}})(),M(""))},[N]);const[K,V]=(0,a.useState)({});(0,a.useEffect)(()=>{var e;const l=null===q||void 0===q||null===(e=q.data)||void 0===e?void 0:e.find(e=>(null===e||void 0===e?void 0:e.id)==(null===F||void 0===F?void 0:F.advocate_id));V(l)},[null===F||void 0===F?void 0:F.advocate_id]);const[Z,U]=(0,a.useState)(!1),[H,$]=(0,a.useState)(!1),[Q,W]=(0,a.useState)(!1),[Y,G]=(0,a.useState)(!1),J=()=>{if(E(!0),"acc_affidavits"==(null===F||void 0===F?void 0:F.category)){var e,l,o;if(H&&Y)""!=(null===F||void 0===F?void 0:F.category)&&""!=(null===F||void 0===F?void 0:F.advocate_id)&&(null===F||void 0===F||null===(e=F.phone_no)||void 0===e?void 0:e.length)>8&&(null===F||void 0===F||null===(l=F.phone_no)||void 0===l?void 0:l.length)<13&&null!==F&&void 0!==F&&null!==(o=F.email)&&void 0!==o&&o.match(C)&&""!=(null===F||void 0===F?void 0:F.name)&&((null===F||void 0===F?void 0:F.description)||"").trim().length>=5&&((null===F||void 0===F?void 0:F.description)||"").trim().length<=100&&z();else d.oR.error("Please verify OTP for both emails")}else{var a,i,n;if(!(""!=(null===F||void 0===F?void 0:F.category)&&""!=(null===F||void 0===F?void 0:F.advocate_id)&&(null===F||void 0===F||null===(a=F.phone_no)||void 0===a?void 0:a.length)>8&&(null===F||void 0===F||null===(i=F.phone_no)||void 0===i?void 0:i.length)<13&&null!==F&&void 0!==F&&null!==(n=F.email)&&void 0!==n&&n.match(C)&&""!=(null===F||void 0===F?void 0:F.name)&&((null===F||void 0===F?void 0:F.description)||"").trim().length>=5&&((null===F||void 0===F?void 0:F.description)||"").trim().length<=100))return;if("behalf_of"==(null===F||void 0===F?void 0:F.behalf)){if(""==(null===F||void 0===F?void 0:F.behalf_type))return;if("Organization"==(null===F||void 0===F?void 0:F.behalf_type)||"Institution"==(null===F||void 0===F?void 0:F.behalf_type)){if(""==(null===F||void 0===F?void 0:F.institute_organization_name))return;z()}else z()}else z()}},[X,ee]=(0,a.useState)(!1),[le,oe]=(0,a.useState)(null),[ae,ie]=(0,a.useState)({refrence_no:"",comment:"",error:!1}),[ne,de]=(0,a.useState)(""),[se,te]=(0,a.useState)(""),[re,ce]=(0,a.useState)({});(0,a.useEffect)(()=>{const e=setTimeout(()=>{te(ne)},3e3);return()=>{clearTimeout(e)}},[ne]);(0,a.useEffect)(()=>{se&&(async e=>{try{L(!0);let l=await s.A.request("get","get-track-request",{refrence_no:e});null!==l&&void 0!==l&&l.status?ce(null===l||void 0===l?void 0:l.data):ce({})}catch(S){ce({})}finally{L(!1)}})(se)},[se]);const me="complaints"==(null===F||void 0===F?void 0:F.category)||"affidavits"==(null===F||void 0===F?void 0:F.category)||"acc_affidavits"==(null===F||void 0===F?void 0:F.category),ve=me&&"behalf_of"==(null===F||void 0===F?void 0:F.behalf);return(0,h.jsxs)(h.Fragment,{children:[D&&(0,h.jsx)(t.A,{}),(0,h.jsxs)("div",{className:"bg-white",children:[(0,h.jsx)(r.A,{type:"service",subMenu:"raise-complaint"}),(0,h.jsx)("div",{className:"banner-section",children:(0,h.jsx)("div",{className:"FAQ-img text-white",children:(0,h.jsx)("div",{className:"banner-img-FAQ px-4",children:(0,h.jsxs)("div",{children:[(0,h.jsx)("div",{className:"font-40 font-semibold",children:"Raise a Complaint against an Advocate"}),(0,h.jsx)("div",{className:"pt-2 pt-md-3 line-height-130 font-20px",children:"Use this form to raise a formal complaint to the Law Society of Kenya"})]})})})}),(0,h.jsxs)("div",{className:"pageContainer",children:[(0,h.jsx)("div",{className:"border-bottom BackBar",children:(0,h.jsx)("div",{className:"container py-3",children:(0,h.jsxs)("a",{className:"link-default",onClick:()=>{g("/")},children:[" ",(0,h.jsx)("span",{children:(0,h.jsx)("svg",{className:"svgFill",width:7,height:12,viewBox:"0 0 7 12",fill:"none",children:(0,h.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.848947 6.42605L5.73793 11.315L6.95996 10.093L2.68199 5.81503L6.95996 1.53706L5.73793 0.315033L0.848947 5.20402C0.686927 5.36609 0.59591 5.58587 0.59591 5.81503C0.59591 6.0442 0.686927 6.26398 0.848947 6.42605Z"})})})," ","Back"]})})}),(0,h.jsx)("div",{className:"container",children:(0,h.jsxs)("div",{className:"max-w-940 mx-auto",children:[""==P&&(0,h.jsxs)("div",{className:"conatiner",onKeyDown:e=>{13===e.keyCode&&J()},children:[(0,h.jsx)("div",{className:"d-flex align-items-center justify-content-end",children:(0,h.jsx)("div",{className:"d-inline-flex",children:(0,h.jsxs)("a",{className:"btn btn-primary font-bold font-20px rounded-10px",onClick:()=>{g("/track-request")},children:[(0,h.jsx)("span",{className:"px-xl-2",children:"Track My Application"})," "]})})}),X&&(0,h.jsx)("div",{className:"row",children:(0,h.jsx)("div",{className:"app_container_body",children:(0,h.jsx)("div",{className:"max-w-1060 mx-auto",children:(0,h.jsx)("div",{className:"row",children:(0,h.jsx)("div",{className:"col-xl-12 col-lg-12 col-md-12 col-12",children:(0,h.jsxs)("div",{className:"layout_form_container border rounded-20px pb-2F",children:[(0,h.jsxs)("div",{className:"row",children:[(0,h.jsx)("div",{className:"col-12 col-md-12 mt-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Refrence No."}),(0,h.jsx)("input",{type:"text",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px",id:"",value:null===ae||void 0===ae?void 0:ae.refrence_no,onChange:e=>{ie({...ae,refrence_no:e.target.value}),de(e.target.value)}}),(null===ae||void 0===ae?void 0:ae.error)&&""==(null===ae||void 0===ae?void 0:ae.refrence_no)&&(0,h.jsx)("p",{className:"error mt-2",children:"Refrence Number is required."})]})}),(null===re||void 0===re?void 0:re.id)&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:"col-12 col-md-6 mt-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Name"}),(0,h.jsx)("input",{type:"text",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px",id:"",value:(null===re||void 0===re?void 0:re.name)||"-",disabled:!0})]})}),(0,h.jsx)("div",{className:"col-12 col-md-6 mt-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Email"}),(0,h.jsx)("input",{type:"text",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px",id:"",value:(null===re||void 0===re?void 0:re.email)||"-",disabled:!0})]})}),(0,h.jsx)("div",{className:"col-12 col-md-6 mt-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Phone"}),(0,h.jsx)("input",{type:"text",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px",id:"",value:(null===re||void 0===re?void 0:re.phone)||"-",disabled:!0})]})}),(0,h.jsx)("div",{className:"col-12 col-md-6 mt-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Address"}),(0,h.jsx)("input",{type:"text",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px",id:"",value:(null===re||void 0===re?void 0:re.address)||"-",disabled:!0})]})}),(0,h.jsx)("div",{className:"col-12 col-md-12 mt-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Complaint Description"}),(0,h.jsx)("input",{type:"text",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px",id:"",value:(null===re||void 0===re?void 0:re.description)||"-",disabled:!0})]})})]}),(0,h.jsx)("div",{className:"col-12 col-md-12",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Comment"}),(0,h.jsx)("textarea",{className:"form-control form-control-default",id:"",rows:5,value:null===ae||void 0===ae?void 0:ae.comment,onChange:e=>{ie({...ae,comment:e.target.value})}})]})}),(0,h.jsx)("div",{className:"col-12 col-lg-6",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Attachement"}),(0,h.jsx)("div",{className:"input-group",children:(0,h.jsx)("input",{type:"file",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px rounded-top-right-0",accept:".pdf,application/pdf",onChange:e=>oe(e.target.files[0])})})]})})]}),(0,h.jsx)("div",{className:"d-flex align-items-center justify-content-end gap-3",children:(0,h.jsxs)("div",{className:"d-inline-flex",children:[(0,h.jsxs)("a",{className:"btn font-bold h-57px font-20px rounded-10px px-4",onClick:()=>{ee(!1),E(!1)},children:[(0,h.jsx)("span",{className:"px-xl-2",children:"Cancel"})," "]}),(0,h.jsxs)("a",{className:"btn btn-primary font-bold h-57px font-20px rounded-10px px-4",onClick:()=>{(async()=>
1{if(ie({...ae,error:!0}),""!=(null===ae||void 0===ae?void 0:ae.refrence_no))try{L(!0);var e=new FormData;e.append("refrence_no",null===ae||void 0===ae?void 0:ae.refrence_no),e.append("description",null===ae||void 0===ae?void 0:ae.comment),e.append("attachment",le||"");let l=await s.A.request("post","post-track-request",e);null!==l&&void 0!==l&&l.status&&(d.oR.success(null===l||void 0===l?void 0:l.message),ie({refrence_no:"",comment:"",error:!1}))}catch(S){}finally{L(!1)}})()},children:[(0,h.jsx)("span",{className:"px-xl-2",children:"Submit"})," "]})]})})]})})})})})}),!X&&(null===F||void 0===F?void 0:F.category)&&(0,h.jsx)("div",{className:"pt-2 pt-md-3 line-height-130 font-20px",children:(0,h.jsx)(u.A,{text:"complaints"==(null===F||void 0===F?void 0:F.category)?"Submit details of your complaint against an advocate.":"affidavits"==(null===F||void 0===F?void 0:F.category)?"Upload or attach a sworn affidavit to support your complaint.":"acc_affidavits"==(null===F||void 0===F?void 0:F.category)?"Provide the Advocates Complaints Commission (ACC) affidavit as part of your filing.":""})}),!X&&(0,h.jsx)("div",{className:"row",children:(0,h.jsx)("div",{className:"app_container_body",children:(0,h.jsx)("div",{className:"max-w-1060 mx-auto",children:(0,h.jsx)("form",{action:"register-step3-next-to-KIN.php",children:(0,h.jsx)("div",{className:"row",children:(0,h.jsx)("div",{className:"col-xl-12 col-lg-12 col-md-12 col-12",children:(0,h.jsx)("div",{className:"layout_form_container border rounded-20px pb-2F",children:(0,h.jsxs)("div",{className:"row",children:[(0,h.jsx)("div",{className:"col-12 col-md-12",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Select Complaint Category *"}),(0,h.jsxs)("select",{className:"form-select form-control h-44px form-control-default border-color-C4D5EA font-16px rounded-5px font-16px ",value:null===F||void 0===F?void 0:F.category,onChange:e=>{const l=e.target.value;k({...F,category:l,behalf:"self",behalf_type:"LSK",institute_organization_name:"",individual_name:"",individual_email:"",individual_phone_no:"",acc_prosecutor_name:"",acc_prosecutor_email:"",acc_prosecutor_phone_no:"",acc_prosecutor_otp:""}),W(!1),G(!1)},children:[(0,h.jsx)("option",{value:"",children:"Select"}),null===T||void 0===T||null===(e=T.complaint_types)||void 0===e?void 0:e.map((e,l)=>(0,h.jsx)("option",{value:null===e||void 0===e?void 0:e.key,children:null===e||void 0===e?void 0:e.title},l))]}),S&&""==(null===F||void 0===F?void 0:F.category)&&(0,h.jsx)("p",{className:"error mt-2",children:"Please select category."})]})}),(0,h.jsx)("div",{className:"font-22px font-semibold mb-2 mb-md-3 mb-lg-0 mt-2 mb-2",children:"Accused Advocate"}),(0,h.jsx)("div",{className:"col-12 col-md-4 mt-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Search advocate"}),(0,h.jsx)(v.Ay,{options:null===q||void 0===q||null===(l=q.data)||void 0===l?void 0:l.map(e=>({value:e.id,label:(e.name||"").trim()})),value:(null===q||void 0===q?void 0:q.data.map(e=>({value:e.id,label:(e.name||"").trim()})).find(e=>e.value===(null===F||void 0===F?void 0:F.advocate_id)))||null,filterOption:()=>!0,onChange:e=>{k({...F,advocate_id:e?e.value:""})},onInputChange:(e,l)=>{let{action:o}=l;"input-change"===o&&(e=>{I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{M(e)},300)})(e)},placeholder:"Enter Name",isSearchable:!0,isClearable:!0,isLoading:D,noOptionsMessage:()=>D?"Searching...":"No advocates found",menuPortalTarget:document.body,styles:{menuPortal:e=>({...e,zIndex:9999}),menu:e=>({...e,zIndex:9999})}}),S&&""==(null===F||void 0===F?void 0:F.advocate_id)&&(0,h.jsx)("p",{className:"error mt-2 ",children:"Please select advocate."})]})}),(null===F||void 0===F?void 0:F.advocate_id)&&(0,h.jsx)("div",{className:"col-12 col-md-8 mt-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Advocate Name "}),(0,h.jsx)("input",{type:"text",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px",id:"",disabled:!0,value:(null===K||void 0===K?void 0:K.name)||"-"})]})}),me&&(0,h.jsx)("div",{className:"col-12 col-md-6 mt-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Complainant type *"}),(0,h.jsxs)("select",{className:"form-select form-control h-44px form-control-default border-color-C4D5EA font-16px rounded-5px font-16px ",value:null===F||void 0===F?void 0:F.behalf,onChange:e=>{const l=e.target.value;k({...F,behalf:l,behalf_type:"behalf_of"==l?null===F||void 0===F?void 0:F.behalf_type:"LSK",institute_organization_name:"",individual_name:"",individual_email:"",individual_phone_no:""})},children:[(0,h.jsx)("option",{value:"self",children:"Self"}),(0,h.jsx)("option",{value:"behalf_of",children:"On Behalf of"})]})]})}),ve&&(0,h.jsx)("div",{className:"col-12 col-md-6 mt-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Behalf of *"}),(0,h.jsxs)("select",{className:"form-select form-control h-44px form-control-default border-color-C4D5EA font-16px rounded-5px font-16px ",value:null===F||void 0===F?void 0:F.behalf_type,onCh
1ange:e=>{const l=e.target.value;k({...F,behalf_type:l,institute_organization_name:"",individual_name:"",individual_email:"",individual_phone_no:""})},children:[(0,h.jsx)("option",{selected:"",value:"",children:"Select"}),"acc_affidavits"==(null===F||void 0===F?void 0:F.category)?(0,h.jsx)("option",{value:"LSK",children:"LSK"}):(0,h.jsx)("option",{value:"Individual",children:"Individual"}),(0,h.jsx)("option",{value:"Advocates",children:"Advocates"}),(0,h.jsx)("option",{value:"Organization",children:"Organization"}),(0,h.jsx)("option",{value:"Institution",children:"Institution"})]})]})}),ve&&("Organization"==(null===F||void 0===F?void 0:F.behalf_type)||"Institution"==(null===F||void 0===F?void 0:F.behalf_type))&&(0,h.jsx)("div",{className:"col-12 col-md-12 mt-2 bg-light border rounded-5px p-3 mb-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsxs)("label",{htmlFor:"",className:"form-label font-16px",children:[null===F||void 0===F?void 0:F.behalf_type," Name *"]}),(0,h.jsx)("input",{type:"text",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px",id:"",value:null===F||void 0===F?void 0:F.institute_organization_name,onChange:e=>{k({...F,institute_organization_name:e.target.value})}}),S&&""==(null===F||void 0===F?void 0:F.institute_organization_name)&&(0,h.jsxs)("p",{className:"error mt-2",children:[null===F||void 0===F?void 0:F.behalf_type," Name is required."]})]})}),ve&&"Individual"==(null===F||void 0===F?void 0:F.behalf_type)&&(0,h.jsx)("div",{className:"col-12 col-md-12 mt-2 mb-2 border rounded-5px p-3 bg-light",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Individual Details *"}),(0,h.jsxs)("div",{className:"row",children:[(0,h.jsxs)("div",{className:"col-12 col-md-6",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Name *"}),(0,h.jsx)("input",{type:"text",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px mb-2",id:"",value:null===F||void 0===F?void 0:F.individual_name,onChange:e=>{k({...F,individual_name:e.target.value})}})]}),(0,h.jsxs)("div",{className:"col-12 col-md-6",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Email *"}),(0,h.jsx)("input",{type:"email",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px",id:"",value:null===F||void 0===F?void 0:F.individual_email,onChange:e=>{k({...F,individual_email:e.target.value})}})]}),(0,h.jsxs)("div",{className:"col-12 col-md-6",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Phone No. *"}),(0,h.jsx)("input",{type:"number",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px",id:"",value:null===F||void 0===F?void 0:F.individual_phone_no,onChange:e=>{k({...F,individual_phone_no:e.target.value})}})]})]})]})}),"acc_affidavits"==(null===F||void 0===F?void 0:F.category)&&(0,h.jsx)("div",{className:"col-12 col-md-12 mt-2 border rounded-5px p-3 bg-light mb-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"ACC Prosecutor Details *"}),(0,h.jsxs)("div",{className:"row",children:[(0,h.jsxs)("div",{className:"col-12 col-md-6",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Name *"}),(0,h.jsx)("input",{type:"text",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px mb-2",id:"",value:null===F||void 0===F?void 0:F.acc_prosecutor_name,onChange:e=>{k({...F,acc_prosecutor_name:e.target.value})}})]}),(0,h.jsxs)("div",{className:"col-12 col-md-6",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Email *"}),(0,h.jsxs)("div",{className:"position-relative d-flex align-items-center",children:[(0,h.jsx)("input",{type:"email",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px",id:"",disabled:Q,value:null===F||void 0===F?void 0:F.acc_prosecutor_email,onChange:e=>{k({...F,acc_prosecutor_email:e.target.value})}}),"acc_affidavits"==(null===F||void 0===F?void 0:F.category)&&!Q&&(0,h.jsx)("a",{className:"link-primary text-decoration-underline position-absolute end-0 pe-3",onClick:()=>{(async()=>{var e;if(null!==F&&void 0!==F&&null!==(e=F.acc_prosecutor_email)&&void 0!==e&&e.match(C))try{L(!0);let e=await s.A.request("post","get-complainaint-otp",{business_token:N,email:null===F||void 0===F?void 0:F.acc_prosecutor_email});null!==e&&void 0!==e&&e.status&&(d.oR.success(null===e||void 0===e?void 0:e.message),W(!0))}catch(S){}finally{L(!1)}else d.oR.error("Please enter a valid email address")})()},children:"Send OTP"}),"acc_affidavits"==(null===F||void 0===F?void 0:F.category)&&Q&&(0,h.jsx)("a",{className:"link-primary text-decoration-underline position-absolute end-0 pe-3",onClick:()=>{W(!1),G(!1),k({...F,acc_prosecutor_email:"",acc_prosecutor_otp:""})},children:"Change Email"})]})]}),"acc_affidavits"==(null===F||void 0===F?void 0:F.category)&&Q&&(0,h.jsx)("div",{className:"col-12 col-md-6 mt-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"OTP *"}),(0,h.jsxs)("div",{className:"position-relative d-flex align-items-center",children:[(0,h.jsx)("input",{type:"text",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px",id:"",disabled:Y,value:null===F||void 0===F?void 0:F.acc_prosecutor_otp,onChange:e=>{k({...F,acc_prosecutor_otp:e.target.value})}}),Y&&(0,h.jsx)("div",{className:"position-absolute end-0 pe-3",children:(0,h.jsxs)("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("circle",{cx:"10",cy:"10.2388",r:"10",fill:"#38B000"}),(0,h.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.75442 9.2155L4.43231 10.5376L8.39863 14.5039L15.0092 7.89339L13.6871 6.57129L8.39863 11.8597L5.75442 9.2155Z",fill:"white"})]})}),!Y&&(0,h.jsx)("a",{className:"link-primary text-decoration-underline position-absolute end-0 pe-3",onClick:()=>{(async()=>
1{if(""!=(null===F||void 0===F?void 0:F.acc_prosecutor_otp))try{L(!0);let e=await s.A.request("post","post-complainaint-otp",{business_token:N,email:null===F||void 0===F?void 0:F.acc_prosecutor_email,otp:null===F||void 0===F?void 0:F.acc_prosecutor_otp});null!==e&&void 0!==e&&e.status&&(d.oR.success(null===e||void 0===e?void 0:e.message),G(!0))}catch(S){}finally{L(!1)}else d.oR.error("Please enter OTP")})()},children:"Verify OTP"})]})]})}),(0,h.jsxs)("div",{className:"col-12 col-md-6 mt-2",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Phone No. *"}),(0,h.jsx)("input",{type:"number",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px",id:"",value:null===F||void 0===F?void 0:F.acc_prosecutor_phone_no,onChange:e=>{k({...F,acc_prosecutor_phone_no:e.target.value})}})]})]})]})}),(0,h.jsxs)("div",{className:"col-12 col-md-12 mt-2 border rounded-5px p-3 bg-light mb-2",children:[(0,h.jsx)("div",{className:"font-22px font-semibold mb-2 mb-md-3 mb-lg-0 mt-2 mb-2",children:"Complainant Details"}),(0,h.jsxs)("div",{className:"row",children:[(0,h.jsx)("div",{className:"col-12 col-md-6 mt-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Full Name *"}),(0,h.jsx)("input",{type:"text",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px",id:"",value:null===F||void 0===F?void 0:F.name,onChange:e=>{k({...F,name:e.target.value})}}),S&&""==(null===F||void 0===F?void 0:F.name)&&(0,h.jsx)("p",{className:"error mt-2",children:"Full Name is required."})]})}),(0,h.jsx)("div",{className:"col-12 col-md-6 mt-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Email *"}),(0,h.jsxs)("div",{className:"position-relative d-flex align-items-center",children:[(0,h.jsx)("input",{type:"text",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px",id:"",disabled:Z,value:null===F||void 0===F?void 0:F.email,onChange:e=>{k({...F,email:e.target.value})}}),"acc_affidavits"==(null===F||void 0===F?void 0:F.category)&&!Z&&(0,h.jsx)("a",{className:"link-primary text-decoration-underline position-absolute end-0 pe-3",onClick:()=>{(async()=>{var e;if(null!==F&&void 0!==F&&null!==(e=F.email)&&void 0!==e&&e.match(C))try{L(!0);let e=await s.A.request("post","get-complainaint-otp",{business_token:N,email:null===F||void 0===F?void 0:F.email});null!==e&&void 0!==e&&e.status&&(d.oR.success(null===e||void 0===e?void 0:e.message),U(!0))}catch(S){}finally{L(!1)}else d.oR.error("Please enter a valid email address")})()},children:"Send OTP"}),"acc_affidavits"==(null===F||void 0===F?void 0:F.category)&&Z&&(0,h.jsx)("a",{className:"link-primary text-decoration-underline position-absolute end-0 pe-3",onClick:()=>{U(!1),$(!1),k({...F,email:"",otp:""})},children:"Change Email"})]}),""==(null===F||void 0===F?void 0:F.email)&&S?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("p",{className:"error mt-2",children:"Email field is required."})," ",(0,h.jsx)("br",{})]}):null!==F&&void 0!==F&&null!==(o=F.email)&&void 0!==o&&o.match(C)||!S?"":(0,h.jsxs)(h.Fragment,{children:[" ",(0,h.jsx)("p",{className:"error",children:"Please enter a valid email address"})," ",(0,h.jsx)("br",{})]})]})}),"acc_affidavits"==(null===F||void 0===F?void 0:F.category)&&Z&&(0,h.jsx)(h.Fragment,{children:(0,h.jsx)("div",{className:"col-12 col-md-6 mt-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"OTP *"}),(0,h.jsxs)("div",{className:"position-relative d-flex align-items-center",children:[(0,h.jsx)("input",{type:"text",className:"form-control form-control-default border-color-C4D5EA font-16px h-44px rounded-5px",id:"",disabled:H,value:null===F||void 0===F?void 0:F.otp,onChange:e=>{k({...F,otp:e.target.value})}}),H&&(0,h.jsx)("div",{className:"position-absolute end-0 pe-3",children:(0,h.jsxs)("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("circle",{cx:"10",cy:"10.2388",r:"10",fill:"#38B000"}),(0,h.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.75442 9.2155L4.43231 10.5376L8.39863 14.5039L15.0092 7.89339L13.6871 6.57129L8.39863 11.8597L5.75442 9.2155Z",fill:"white"})]})}),!H&&(0,h.jsx)("a",{className:"link-primary text-decoration-underline position-absolute end-0 pe-3",onClick:()=>{(async()=>
1{if(""!=(null===F||void 0===F?void 0:F.otp))try{L(!0);let e=await s.A.request("post","post-complainaint-otp",{business_token:N,email:null===F||void 0===F?void 0:F.email,otp:null===F||void 0===F?void 0:F.otp});null!==e&&void 0!==e&&e.status&&(d.oR.success(null===e||void 0===e?void 0:e.message),$(!0))}catch(S){}finally{L(!1)}else d.oR.error("Please enter OTP")})()},children:"Verify OTP"})]})]})})}),(0,h.jsx)("div",{className:"col-12 col-md-6 mt-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Phone No. *"}),(0,h.jsx)("div",{className:"input-group mb-3",children:(0,h.jsx)("input",{type:"number",className:"form-control form-control-default rounded-bottom-left-0 rounded-top-left-0 border-color-C4D5EA font-16px h-44px rounded-5px",value:null===F||void 0===F?void 0:F.phone_no,onChange:e=>{k({...F,phone_no:e.target.value})}})}),S&&((null===F||void 0===F||null===(x=F.phone_no)||void 0===x?void 0:x.length)<9||(null===F||void 0===F||null===(f=F.phone_no)||void 0===f?void 0:f.length)>12)&&(0,h.jsx)("p",{className:"error mt-2",children:"Mobile number must be 9 to 12 digits."})]})}),(0,h.jsx)("div",{className:"col-12 col-md-6 mt-2",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Address"}),(0,h.jsx)("div",{className:"input-group mb-3",children:(0,h.jsx)("input",{type:"text",className:"form-control form-control-default rounded-bottom-left-0 rounded-top-left-0 border-color-C4D5EA font-16px h-44px rounded-5px",value:null===F||void 0===F?void 0:F.address,onChange:e=>{k({...F,address:e.target.value})}})})]})}),(0,h.jsx)("div",{className:"col-12 col-md-12",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Complaint Description *"}),(0,h.jsx)("textarea",{className:"form-control form-control-default",id:"",rows:5,value:null===F||void 0===F?void 0:F.description,onChange:e=>{k({...F,description:e.target.value})}}),S&&((null===F||void 0===F?void 0:F.description)||"").trim().length<5&&(0,h.jsx)("p",{className:"error mt-2",children:"Complaint description is required."}),S&&((null===F||void 0===F?void 0:F.description)||"").trim().length>100&&(0,h.jsx)("p",{className:"error mt-2",children:"Description is maximum 100 characters."})]})})]})]}),(0,h.jsx)("label",{htmlFor:"",className:"form-label font-18px mt-2",children:`${"acc_affidavits"==(null===F||void 0===F?void 0:F.category)||"affidavits"==(null===F||void 0===F?void 0:F.category)?"":"Signed letter of"} ${"complaints"==(null===F||void 0===F?void 0:F.category)?"Complaints":"affidavits"==(null===F||void 0===F?void 0:F.category)||"acc_affidavits"==(null===F||void 0===F?void 0:F.category)?"Commissioned Affidavit of Complaint":`${(null===T||void 0===T||null===(j=T.complaint_types)||void 0===j||null===(b=j.find(e=>(null===e||void 0===e?void 0:e.key)===(null===F||void 0===F?void 0:F.category)))||void 0===b?void 0:b.title)||""}`}`}),w.map((e,l)=>(0,h.jsx)("div",{className:"col-12 col-lg-6",children:(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsx)("label",{htmlFor:"",className:"form-label font-16px",children:"Attachments"}),(0,h.jsxs)("div",{className:"input-group",children:[(0,h.jsxs)("div",{className:"upload-wrapper d-flex position-relative w-100",children:[(0,h.jsx)("input",{type:"file",accept:"application/pdf",className:"position-absolute start-0 top-0 w-100 h-100 opacity-0",name:"attachment",onChange:e=>{((e,l)=>{const o=URL.createObjectURL(l),a=[...w];a[e].attachment=l,a[e].attachment_value=o,A(a)})(l,e.target.files[0]),e.target.value=""}}),(0,h.jsx)("div",{className:"upload-label",children:"Upload "}),(0,h.jsxs)("label",{className:"upload-input mb-0",children:[(0,h.jsx)("span",{children:"Browse File to Upload"}),(0,h.jsx)("span",{className:"upload-icon",children:(0,h.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",children:(0,h.jsx)("path",{d:"M3.71429 12.2353H9.28571V6.58824H13L6.5 0L0 6.58824H3.71429V12.2353ZM0 14.1176H13V16H0V14.1176Z",fill:"#00226F"})})})]})]}),(0,h.jsxs)("div",{className:"row mt-2",children:[(null===e||void 0===e?void 0:e.attachment_value)&&(0,h.jsxs)("a",{href:null===e||void 0===e?void 0:e.attachment_value,target:"_blank",rel:"noopener noreferrer",className:"link-primary font-18px font-semibold text-decoration-underline d-flex align-items-center gap-2",children:["View File",(0,h.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",children:(0,h.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.55547 5.55547L1.11094 10L0 8.88906L3.88906 5L0 1.11094L1.11094 0L5.55547 4.44453C5.70276 4.59187 5.7855 4.79167 5.7855 5C5.7855 5.20833 5.70276 5.40813 5.55547 5.55547Z",fill:"#00226F"})})]}),w.length>1&&(0,h.jsx)("a",{className:"link-danger text-decoration-underline font-medium DeleteFromList py-3 py-md-3",onClick:()=>(e=>{if(w.length<=1)return void d.oR.error("Minimum one attachement is required");const l=[...w];l.splice(e,1),A(l)})(l),children:"Delete"})]})]})]})})),(0,h.jsx)("div",{className:"mb-4",children:(0,h.jsxs)("a",{className:"link-primary text-decoration-underline font-medium AddMoreKin",onClick:()=>{0===w.length||w.every(e=>null!==e.attachment)?A([...w,{attachment:null}]):d.oR.error("Please upload attachment value")},children:[" ",(0,h.jsx)("span",{className:"font-semibold",children:"+"})," Add More Attachment"]})})]})})})})})})})}),!X&&(0,h.jsx)("div",{className:"fotter-btn",children:(0,h.jsx)("div",{className:"d-flex align-items-center justify-content-end gap-3",children:(0,h.jsx)("div",{className:"d-inline-flex",children:(0,h.jsxs)("a",{className:"btn btn-primary font-bold h-57px font-20px rounded-10px px-4",onClick:()=>{J()},children:[(0,h.jsx)("span",{className:"px-xl-2",children:"Submit"})," "]})})})})]}),""!=P&&(0,h.jsx)("div",{className:"app_container",children:(0,h.jsx)("div",{className:"appBodyWrapper appBodyWrapper_full",children:(0,h.jsx)("div",{className:"app_container_body pt-0 success_screen",children:(0,h.jsx)("div",{className:"success_card mx-auto max-w-550",children:(0,h.jsx)("div",{className:"dashboard_card dashboard_card_success rounded-15px border-top",children:(0,h.jsx)("div",{className:"dashboard_card_without_header rounded-15px h-auto p-4 p-md-5",children:(0,h.jsxs)("div",{children:[(0,h.jsx)("div",{className:"success_img mb-3",children:(0,h.jsx)("img",{src:m.A})}),(0,h.jsx)("div",{className:"font-34px font-bold line-height-120 text-primary-dark mb-3",children:"Raised Complaint Submitted Successfully"}),(0,h.jsxs)("div",{className:"font-20 line-height-150",children:["Your Refrence Number : ",P]}),(0,h.jsxs)("div",{className:"font-20 line-height-150",children:["Category : ",p.A.toTitleCase(null===F||void 0===F?void 0:F.category)]})]})})})})})})})]})})]}),(0,h.jsx)(c.A,{})]})]})}},43898:(e,l,o)=>{o.d(l,{A:()=>a});o(9950);const a=o.p+"static/media/success.0c6c8140dda68cb4bd91ec880a18313f.svg"}}]);
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.