@djb25/digit-ui-module-ekyc 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var e,t=require("react"),a=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,l=require("react-router-dom"),n=require("@djb25/digit-ui-react-components"),r=require("react-i18next");function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e}).apply(null,arguments)}function i(e,t){if(null==e)return{};var a={};for(var l in e)if({}.hasOwnProperty.call(e,l)){if(-1!==t.indexOf(l))continue;a[l]=e[l]}return a}const s=e=>{let{countData:t}=e;const{t:l}=r.useTranslation();return a.createElement("div",{className:"ekyc-status-container"},a.createElement("div",{className:"ekyc-status-card"},a.createElement("div",{className:"count"},(null==t?void 0:t.total)||0),a.createElement("div",{className:"label"},l("EKYC_TOTAL"))),a.createElement("div",{className:"ekyc-status-card"},a.createElement("div",{className:"count pending"},(null==t?void 0:t.pending)||0),a.createElement("div",{className:"label"},l("EKYC_PENDING"))),a.createElement("div",{className:"ekyc-status-card"},a.createElement("div",{className:"count completed"},(null==t?void 0:t.completed)||0),a.createElement("div",{className:"label"},l("EKYC_COMPLETED"))))},c=["tableConfig","filterComponent"],d=e=>{let{filterComponent:o}=e,d=i(e,c);const{data:m,isLoading:E,onSort:p,onNextPage:u,onPrevPage:C,currentPage:g,pageSizeLimit:x,onPageSizeChange:f,parentRoute:y,searchParams:h,sortParams:v,totalRecords:b,countData:S}=d,{t:_}=r.useTranslation(),[N,A]=a.useState(()=>{var e;return null===(e=Digit.ComponentRegistryService)||void 0===e?void 0:e.getComponent(o)}),R=t.useMemo(()=>[{Header:_("EKYC_APPLICATION_NO"),accessor:"applicationNumber",Cell:e=>{var t;let{row:n}=e;const r=(null===(t=n.original)||void 0===t?void 0:t.applicationNumber)||"NA";return a.createElement(l.Link,{to:y+"/application-details/"+r},a.createElement("span",{className:"ekyc-application-link"},r))}},{Header:_("EKYC_CITIZEN_NAME"),accessor:"citizenName",Cell:e=>{var t;let{row:l}=e;return a.createElement("span",null,(null===(t=l.original)||void 0===t?void 0:t.citizenName)||"NA")}},{Header:_("EKYC_MOBILE_NO"),accessor:"mobileNumber",Cell:e=>{var t;let{row:l}=e;return a.createElement("span",null,(null===(t=l.original)||void 0===t?void 0:t.mobileNumber)||"NA")}},{Header:_("EKYC_STATUS"),accessor:"status",Cell:e=>{var t;let{row:l}=e;const n=(null===(t=l.original)||void 0===t?void 0:t.status)||"DEFAULT";return a.createElement("span",{className:"ekyc-status-tag "+n},_("EKYC_STATUS_"+n))}}],[_,y]),T=t.useMemo(()=>(null==m?void 0:m.items)||[],[m]);return a.createElement("div",{className:"inbox-container"},a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},a.createElement("div",{className:"icon-container",style:{color:"#F47738",marginRight:"12px"}},a.createElement(n.HomeIcon,{style:{width:"24px",height:"24px"}})),a.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},_("ACTION_TEST_EKYC"))),a.createElement("div",null,N&&a.createElement(N,{defaultSearchParams:d.defaultSearchParams,onFilterChange:d.onSearch,searchParams:h,type:"desktop",moduleCode:"EKYC"}))),a.createElement("div",{style:{flex:1,marginLeft:"16px"}},a.createElement(n.Card,{className:"ekyc-metrics-card",style:{marginBottom:"16px",padding:"16px"}},a.createElement(s,{countData:S})),a.createElement("div",{className:"result",style:{flex:1}},a.createElement(n.Card,{className:"ekyc-table-card",style:{padding:0}},a.createElement(n.Table,{t:_,data:T,columns:R,isLoading:E,onSort:p,sortParams:v,totalRecords:b,onNextPage:u,onPrevPage:C,currentPage:g,pageSizeLimit:x,onPageSizeChange:f,getCellProps:e=>({className:"ekyc-table-cell"})})))))},m=["onSearch","searchParams","FilterComponent","children"],E=e=>{let{onSearch:l,searchParams:s,FilterComponent:c,children:d}=e,E=i(e,m);const{t:p}=r.useTranslation(),[u,C]=t.useState(()=>o({},s)),g=(e,t)=>{C(a=>o({},a,{[e]:t}))},x=e=>{e&&e.preventDefault&&e.preventDefault(),l(u)};return a.createElement("div",{className:"inbox-container"},a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},a.createElement("div",{className:"icon-container",style:{color:"#F47738",marginRight:"12px"}},a.createElement(n.HomeIcon,{style:{width:"24px",height:"24px"}})),a.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},p("ACTION_CREATE_EKYC"))),a.createElement("div",null,c&&a.createElement(c,{defaultSearchParams:E.defaultSearchParams,onFilterChange:E.onSearch,searchParams:s,type:"desktop",moduleCode:"EKYC"}))),a.createElement("div",{style:{flex:1,marginLeft:"16px"}},a.createElement(n.Card,{className:"ekyc-search-card",style:{padding:"24px",marginBottom:"24px",borderRadius:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.05)"}},a.createElement(n.Header,{style:{fontSize:"24px",marginBottom:"20px",fontWeight:"700",color:"#0B0C0C"}},p("EKYC_SEARCH_CONSUMER_HEADER")),a.createElement("form",{onSubmit:x},a.createElement("div",{style:{display:"flex",gap:"24px",alignItems:"flex-end",flexWrap:"wrap"}},a.createElement("div",{style:{flex:"1",minWidth:"250px"}},a.createElement("div",{className:"filter-label",style:{fontWeight:"600",marginBottom:"8px",fontSize:"14px",color:"#505A5F"}},p("EKYC_K_NUMBER")),a.createElement("div",{style:{position:"relative"}},a.createElement(n.TextInput,{value:null==u?void 0:u.kNumber,onChange:e=>g("kNumber",e.target.value),placeholder:p("EKYC_K_NUMBER_PLACEHOLDER"),style:{borderRadius:"8px",paddingLeft:"12px",height:"44px"}}))),a.createElement("div",{style:{flex:"1",minWidth:"250px"}},a.createElement("div",{className:"filter-label",style:{fontWeight:"600",marginBottom:"8px",fontSize:"14px",color:"#505A5F"}},p("EKYC_K_NAME")),a.createElement("div",{style:{position:"relative"}},a.createElement(n.TextInput,{value:null==u?void 0:u.kName,onChange:e=>g("kName",e.target.value),placeholder:p("EKYC_K_NAME_PLACEHOLDER"),style:{borderRadius:"8px",paddingLeft:"12px",height:"44px"}}))),a.createElement("div",{style:{display:"flex",gap:"12px",alignItems:"center"}},a.createElement("button",{type:"button",onClick:()=>{const e={kNumber:"",kName:""};C(e),l(e)},style:{background:"none",border:"none",color:"#0076f3ff",fontWeight:"600",cursor:"pointer",fontSize:"14px",padding:"10px"}},p("ES_COMMON_CLEAR")),a.createElement(n.SubmitBar,{label:p("ES_COMMON_SEARCH"),onSubmit:x,style:{margin:0,borderRadius:"8px",height:"44px",padding:"0 32px",marginTop:"-55px"}}))))),d))},p=e=>{var t;let{data:o,isLoading:i,onSearch:c,searchParams:d,parentRoute:m,countData:p}=e;const{t:u}=r.useTranslation(),C=(null==o||null===(t=o.items)||void 0===t?void 0:t.map(e=>({[u("EKYC_APPLICATION_NO")]:e.applicationNumber,[u("EKYC_CITIZEN_NAME")]:e.citizenName,[u("EKYC_MOBILE_NO")]:e.mobileNumber,[u("EKYC_STATUS")]:a.createElement("span",{className:"ekyc-status-tag "+e.status},u("EKYC_STATUS_"+e.status))})))||[];return a.createElement("div",{className:"inbox-wrapper"},a.createElement("div",{className:"ekyc-header-container module-header"},a.createElement(n.Header,{className:"title"},u("EKYC_INBOX_HEADER")),a.createElement(l.Link,{to:m+"/create-kyc"},a.createElement(n.SubmitBar,{label:u("EKYC_CREATE_KYC")}))),a.createElement("div",{className:"ekyc-metrics-section"},a.createElement(s,{countData:p})),a.createElement(E,{onSearch:c,searchParams:d}),a.createElement("div",{className:"mobile-data-container"},i?a.createElement(n.Loader,null):(null==C?void 0:C.length)>0?a.createElement(n.DetailsCard,{data:C,t:u,serviceRequestIdKey:u("EKYC_APPLICATION_NO"),linkPrefix:m+"/application-details/"}):a.createElement(n.Card,null,u("ES_COMMON_NO_DATA").split("\\n").map((e,t)=>a.createElement("p",{key:t,style:{textAlign:"center"}},e)))))},u=["searchParams","onFilterChange","defaultSearchParams","statusMap","moduleCode"],C=e=>{let{searchParams:l,onFilterChange:s,defaultSearchParams:c}=e,d=i(e,u);const{t:m}=r.useTranslation(),[E,p]=t.useState(()=>o({},l));return a.createElement(n.FilterForm,{onSubmit:()=>{s(E)},handleSubmit:e=>t=>{t&&t.preventDefault(),e()},onResetFilterForm:()=>{p(o({},c)),s(o({},c))},id:"ekyc-filter-form",onMobileExclusiveFilterPopupFormClose:d.onClose},a.createElement(n.FilterFormField,null,a.createElement("div",{className:"filter-label",style:{fontWeight:"normal"}},m("EKYC_STATUS"),":"),a.createElement(n.Dropdown,{option:[{label:m("EKYC_STATUS_ALL"),value:""},{label:m("EKYC_STATUS_COMPLETED"),value:"COMPLETED"},{label:m("EKYC_STATUS_PENDING"),value:"PENDING"},{label:m("EKYC_STATUS_REJECTED"),value:"REJECTED"}],optionKey:"label",select:e=>{(e=>{let t=e.delete,a=o({},E,e);t&&t.forEach(e=>delete a[e]),delete e.delete,p(o({},a))})({status:e})},selected:(null==E?void 0:E.status)||{label:m("EKYC_STATUS_ALL"),value:""}})))},g=[{applicationNumber:"EKYC-2024-001",citizenName:"Rahul Sharma",mobileNumber:"9876543210",status:"COMPLETED"},{applicationNumber:"EKYC-2024-002",citizenName:"Anjali Devi",mobileNumber:"9123456789",status:"PENDING"},{applicationNumber:"EKYC-2024-003",citizenName:"Amit Kumar",mobileNumber:"8888888888",status:"REJECTED"},{applicationNumber:"EKYC-2024-004",citizenName:"Priya Singh",mobileNumber:"7777777777",status:"COMPLETED"},{applicationNumber:"EKYC-2024-005",citizenName:"Suresh Gupta",mobileNumber:"6666666666",status:"PENDING"}],x=e=>{let{parentRoute:l,businessService:n="EKYC",initialStates:i={}}=e;Digit.ULBService.getCurrentTenantId();const{t:s}=r.useTranslation(),[c,m]=t.useState(i.pageOffset||0),[E,u]=t.useState(i.pageSize||10),[C,x]=t.useState(i.sortParams||[{id:"createdTime",desc:!0}]),f=t.useMemo(()=>({label:s("EKYC_STATUS_ALL"),value:""}),[s]),[y,h]=t.useState(i.searchParams||{status:f}),v=t.useMemo(()=>g.filter(e=>{var t;let a=!0;const l=void 0!==(null===(t=y.status)||void 0===t?void 0:t.value)?y.status.value:y.status;return l&&e.status!==l&&(a=!1),a}),[y]),b=t.useMemo(()=>({total:g.length,completed:g.filter(e=>"COMPLETED"===e.status).length,pending:g.filter(e=>"PENDING"===e.status).length,rejected:g.filter(e=>"REJECTED"===e.status).length}),[]),S=t.useCallback(e=>{h(t=>o({},t,e)),m(0)},[]),_=t.useCallback(e=>{e.length>0&&x(e)},[]),N=t.useMemo(()=>[{label:s("EKYC_STATUS"),name:"status",type:"dropdown",options:[{label:s("CHOOSE_STATUS"),value:""},{label:s("EKYC_STATUS_COMPLETED"),value:"COMPLETED"},{label:s("EKYC_STATUS_PENDING"),value:"PENDING"},{label:s("EKYC_STATUS_REJECTED"),value:"REJECTED"}],optionsKey:"label"}],[s]);return a.createElement("div",{className:"ekyc-employee-container"},a.createElement("div",{className:"inbox-main-container"},Digit.Utils.browser.isMobile()?a.createElement(p,{data:{items:v,totalCount:v.length},isLoading:!1,onSearch:S,searchFields:N,searchParams:y,parentRoute:l,countData:b}):a.createElement(d,{businessService:n,data:{items:v,totalCount:v.length},isLoading:!1,searchFields:N,onSearch:S,onSort:_,onNextPage:()=>m(e=>e+E),onPrevPage:()=>m(e=>Math.max(e-E,0)),currentPage:Math.floor(c/E),pageSizeLimit:E,onPageSizeChange:e=>{const t=Number(e.target.value);u(t),m(0)},parentRoute:l,searchParams:y,sortParams:C,totalRecords:v.length,countData:b,filterComponent:"EKYC_INBOX_FILTER"})))},f=e=>{let{kNumber:o,kName:i,connectionDetails:s,isLoading:c}=e;const{t:d}=r.useTranslation(),m=l.useHistory(),{path:E}=l.useRouteMatch(),[p,u]=t.useState(!1),[C,g]=t.useState({code:"SELF",name:"EKYC_SELF"}),x=()=>{u(!0)};return c?a.createElement(n.Loader,null):s?a.createElement(a.Fragment,null,a.createElement(n.Card,{className:"ekyc-create-card",style:{padding:"24px"}},a.createElement(n.CardHeader,null,d("EKYC_K_NUMBER_DETAILS")),a.createElement(n.StatusTable,null,a.createElement(n.Row,{label:d("EKYC_K_NUMBER"),text:o||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_K_NAME"),text:i||d("CS_NA")})),a.createElement(n.CardHeader,{style:{marginTop:"24px"}},d("EKYC_CONNECTION_DETAILS")),null!=s&&s.connectionDetailsInfo?a.createElement(n.StatusTable,null,a.createElement(n.Row,{label:d("EKYC_CONSUMER_NAME"),text:s.connectionDetailsInfo.consumerName||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_ADDRESS"),text:s.connectionDetailsInfo.address||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_CONNECTION_TYPE"),text:s.connectionDetailsInfo.connectionType||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_METER_NO"),text:s.connectionDetailsInfo.meterNumber||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_PHONE_NO"),text:s.connectionDetailsInfo.phoneNumber||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_EMAIL"),text:s.connectionDetailsInfo.email||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_STATUS"),text:s.connectionDetailsInfo.statusflag||d("CS_NA")})):a.createElement(n.CardLabel,null,d("EKYC_NO_CONNECTION_DETAILS_FOUND")),a.createElement("button",{type:"button",onClick:x,style:{background:"none",border:"none",color:"#0076f3ff",fontWeight:"600",cursor:"pointer",fontSize:"14px",padding:"10px"}},d("")),a.createElement(n.SubmitBar,{label:d("EKYC_START_VERIFICATION"),onSubmit:x,style:{borderRadius:"12px",marginLeft:"1100px"}})),p&&a.createElement(n.Modal,{headerBarMain:d("EKYC_SELECT_VERIFICATION_TYPE"),headerBarEnd:a.createElement("span",{onClick:()=>u(!1),style:{cursor:"pointer",padding:"8px"}},"X"),actionSaveLabel:d("ES_COMMON_CONFIRM"),actionSaveOnSubmit:()=>{const e=E.includes("/create-kyc")?E.replace("/create-kyc",""):E.replace("/k-details","");m.push(e+"/aadhaar-verification",{kNumber:o,selectedOption:C,connectionDetails:s}),u(!1)},actionCancelLabel:d("ES_COMMON_CANCEL"),actionCancelOnSubmit:()=>u(!1),style:{borderRadius:"12px"}},a.createElement("div",{style:{padding:"24px"}},a.createElement(n.RadioButtons,{options:[{code:"SELF",name:"EKYC_SELF"},{code:"OTHER",name:"EKYC_OTHER"}],optionsKey:"name",selectedOption:C,onSelect:g,style:{display:"flex",flexDirection:"column",gap:"12px",buttonStyle:{borderRadius:"5px"}},t:d})))):null},y=()=>{const{t:e}=r.useTranslation(),[l,o]=t.useState(()=>{const e=sessionStorage.getItem("EKYC_CREATE_SEARCH_PARAMS");return e?JSON.parse(e):{kNumber:"",kName:""}}),[i,s]=t.useState(()=>"true"===sessionStorage.getItem("EKYC_CREATE_SEARCH_PERFORMED")),[c,d]=t.useState(null),m=Digit.ULBService.getCurrentTenantId(),{isLoading:p,data:u}=Digit.Hooks.ekyc.useGetConnection({tenantId:m,details:{kno:l.kNumber}},{enabled:i&&!!l.kNumber}),{mutate:C,isLoading:g}=Digit.Hooks.ekyc.useValidateUser(m,{onSuccess:t=>{var a;"successful"===(null==t||null===(a=t.responseInfo)||void 0===a?void 0:a.status)||(d({error:!0,label:(null==t?void 0:t.message)||e("EKYC_VALIDATION_FAILED")}),s(!1),sessionStorage.removeItem("EKYC_CREATE_SEARCH_PERFORMED"))},onError:t=>{var a,l,n,r;d({error:!0,label:(null==t||null===(a=t.response)||void 0===a||null===(l=a.data)||void 0===l||null===(n=l.Errors)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.message)||e("EKYC_VALIDATION_ERROR_PLEASE_ENTER_THE_CORRECT_CREDENTIALS")}),s(!1),sessionStorage.removeItem("EKYC_CREATE_SEARCH_PERFORMED")}});return a.createElement(E,{onSearch:t=>{if(!t.kNumber&&!t.kName)return o({kNumber:"",kName:""}),s(!1),sessionStorage.removeItem("EKYC_CREATE_SEARCH_PARAMS"),void sessionStorage.removeItem("EKYC_CREATE_SEARCH_PERFORMED");t.kNumber&&t.kName?(o(t),s(!0),sessionStorage.setItem("EKYC_CREATE_SEARCH_PARAMS",JSON.stringify(t)),sessionStorage.setItem("EKYC_CREATE_SEARCH_PERFORMED","true"),C({kno:t.kNumber,name:t.kName})):d({error:!0,label:e("EKYC_FILL_ALL_FIELDS")})},searchParams:l},i&&a.createElement(f,{kNumber:l.kNumber,kName:l.kName,connectionDetails:u,isLoading:p||g}),!i&&!p&&a.createElement(n.Card,{style:{textAlign:"center",padding:"40px"}},a.createElement("div",{style:{color:"#667085"}},e("EKYC_SEARCH_TO_VIEW_DETAILS"))),c&&a.createElement(n.Toast,{error:c.error,label:c.label,onClose:()=>{d(null)},isDsc:!0}))};"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));const h=e=>{let{isSection:o=!1,onComplete:i,parentState:s}=e;const{t:c}=r.useTranslation(),d=l.useHistory(),m=l.useLocation(),E=s||m.state||{kNumber:"EKYC-1234567890",selectedOption:{code:"SELF",name:"EKYC_SELF"},connectionDetails:null},[p,u]=t.useState({code:"AADHAAR",name:"EKYC_AADHAAR_ADDRESS"}),[C,g]=t.useState({code:"NO",name:"CORE_COMMON_NO"}),[x,f]=t.useState(""),[y,h]=t.useState(""),[v,b]=t.useState(""),[S,_]=t.useState(""),[N,A]=t.useState(""),[R,T]=t.useState(null),[D,I]=t.useState(!1),L=t.useRef(null),F=[{code:"AADHAAR",name:"EKYC_AADHAAR_ADDRESS"},{code:"OLD",name:"EKYC_OLD_ADDRESS"}],O=[{code:"YES",name:"CORE_COMMON_YES"},{code:"NO",name:"CORE_COMMON_NO"}],H=()=>{if(i)i({addressType:p,fullAddress:x,flatNo:y,building:v,landmark:S,pincode:N,doorPhoto:R});else{const{kNumber:e,selectedOption:t,connectionDetails:a}=E;d.push("/digit-ui/employee/ekyc/property-info",{kNumber:e,selectedOption:t,connectionDetails:a,addressDetails:{addressType:p,fullAddress:x,flatNo:y,building:v,landmark:S,pincode:N,doorPhoto:R}})}},Y=e=>{const t=e.target.files[0];if(t){const e=new FileReader;e.onloadend=()=>{T(e.result)},e.readAsDataURL(t)}},k=()=>{L.current.click()},K=()=>{"geolocation"in navigator?(I(!0),navigator.geolocation.getCurrentPosition(function(e){try{const{latitude:t,longitude:a}=e.coords;return Promise.resolve(function(e,l){try{var n=function(e,l){try{var n=Promise.resolve(fetch("https://nominatim.openstreetmap.org/reverse?format=json&lat="+t+"&lon="+a+"&zoom=18&addressdetails=1")).then(function(e){if(!e.ok)throw new Error("Failed to fetch address");return Promise.resolve(e.json()).then(function(e){if(e&&e.address){var t,a,l,n,r,o,i,s,c,d,m;const E=[null===(t=e.address)||void 0===t?void 0:t.amenity,null===(a=e.address)||void 0===a?void 0:a.road,null===(l=e.address)||void 0===l?void 0:l.neighbourhood,null===(n=e.address)||void 0===n?void 0:n.suburb,null===(r=e.address)||void 0===r?void 0:r.city,null===(o=e.address)||void 0===o?void 0:o.state,null===(i=e.address)||void 0===i?void 0:i.postcode].filter(Boolean).join(", ");f(E||""),A((null===(s=e.address)||void 0===s?void 0:s.postcode)||""),_((null===(c=e.address)||void 0===c?void 0:c.suburb)||(null===(d=e.address)||void 0===d?void 0:d.neighbourhood)||""),h((null===(m=e.address)||void 0===m?void 0:m.amenity)||"")}})})}catch(e){return l(e)}return n&&n.then?n.then(void 0,l):n}(0,function(e){console.error("Error reverse geocoding:",e)})}catch(e){return l(!0,e)}return n&&n.then?n.then(l.bind(null,!1),l.bind(null,!0)):l(!1,n)}(0,function(e,t){if(I(!1),e)throw t;return t}))}catch(e){return Promise.reject(e)}},e=>{console.error("Error getting location:",e),I(!1),alert(c("LOCATION_FETCH_FAILED")||"Failed to fetch your current location. Please ensure location permissions are granted.")},{enableHighAccuracy:!0,timeout:1e4,maximumAge:0})):alert(c("GEOLOCATION_NOT_SUPPORTED")||"Geolocation is not supported by your browser")},M=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M14.4 6L13.6 4H5V21H7V14H12.6L13.4 16H20V6H14.4Z",fill:"#00703C"})),P=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M2 7V17C2 18.1 2.9 19 4 19H20C21.1 19 22 18.1 22 17V7C22 5.9 21.1 5 20 5H4C2.9 5 2 5.9 2 7ZM12 11H14V13H12V11ZM12 7H14V9H12V7ZM16 11H20V13H16V11ZM16 7H20V9H16V7ZM4 7H10V15H4V7ZM20 17H4V16H20V17Z",fill:"#3D51B0"})),w=()=>a.createElement("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M9 2L7.17 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6C22 4.9 21.1 4 20 4H16.83L15 2H9ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17ZM12 9C10.34 9 9 10.34 9 12C9 13.66 10.34 15 12 15C13.66 15 15 13.66 15 12C15 10.34 13.66 9 12 9Z",fill:"#0068faff"})),B=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M12 8C9.79 8 8 9.79 8 12C8 14.21 9.79 16 12 16C14.21 16 16 14.21 16 12C16 9.79 14.21 8 12 8ZM20.94 11C20.48 6.83 17.17 3.52 13 3.06V1H11V3.06C6.83 3.52 3.52 6.83 3.06 11H1V13H3.06C3.52 17.17 6.83 20.48 11 20.94V23H13V20.94C17.17 20.48 20.48 17.17 20.94 13H23V11H20.94ZM12 19C8.13 19 5 15.87 5 12C5 8.13 8.13 5 12 5C15.87 5 19 8.13 19 12C19 15.87 15.87 19 12 19Z",fill:"#0068faff"})),V=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M13 13V11H15V13H13ZM13 9V7H15V9H13ZM17 13V11H19V13H17ZM17 9V7H19V9H17ZM11 13V11H9V13H11ZM11 9V7H9V9H11ZM7 13V11H5V13H7ZM7 9V7H5V9H7ZM21 3H3C1.9 3 1 3.9 1 5V19C1 20.1 1.9 21 3 21H21C22.1 21 23 20.1 23 19V5C23 3.9 22.1 3 21 3ZM21 19H3V5H21V19Z",fill:"#0068faff"})),z=()=>a.createElement("div",{style:{animation:"fadeSlideIn 0.3s ease"}},o&&a.createElement("hr",{style:{margin:"40px 0",border:"0",borderTop:"2px solid #EAECF0"}}),a.createElement(n.Header,{style:{marginBottom:"24px"}},c("EKYC_ADDRESS_DETAILS_HEADER")||"Address Details"),a.createElement("div",{style:{marginBottom:"32px"}},a.createElement(n.RadioButtons,{options:F,optionsKey:"name",selectedOption:p,onSelect:u,t:c,innerStyles:{display:"flex",alignItems:"center"},style:{display:"flex",gap:"50px",justifyContent:"flex-start"}})),"AADHAAR"===p.code&&a.createElement("div",{style:{backgroundColor:"#F9FAFB",padding:"16px",borderRadius:"12px",marginBottom:"24px",border:"1px solid #EAECF0",display:"flex",alignItems:"flex-start",gap:"12px",animation:"fadeSlideIn 0.3s ease"}},a.createElement("div",{style:{backgroundColor:"#E7F4EE",padding:"8px",borderRadius:"8px"}},a.createElement(n.LocationIcon,{className:"icon",styles:{fill:"#00703C",width:"20px",height:"20px"}})),a.createElement("div",{style:{fontSize:"16px",lineHeight:"1.6",color:"#344054",fontWeight:"500"}},"H.No. 123, Sector 15, Rohini",a.createElement("br",null),"Delhi - 110085")),"OLD"===p.code&&a.createElement("div",{style:{animation:"fadeSlideIn 0.3s ease"}},a.createElement("div",{style:{marginBottom:"24px"}},a.createElement(n.CardLabel,{style:{marginBottom:"12px",fontWeight:"600",color:"#344054"}},c("EKYC_ADDRESS_CORRECTION_PROMPT")||"Do you want to correct the address?"),a.createElement(n.RadioButtons,{options:O,optionsKey:"name",selectedOption:C,onSelect:g,t:c,innerStyles:{display:"flex",alignItems:"center"},style:{display:"flex",gap:"50px",justifyContent:"flex-start"}})),a.createElement("div",{style:{border:"1px solid #D0D5DD",borderRadius:"12px",padding:"14px 16px",display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"24px",cursor:D?"not-allowed":"pointer",backgroundColor:D?"#F2F4F7":"#FFFFFF",transition:"all 0.2s ease",opacity:D?.7:1,boxShadow:"0px 1px 2px rgba(16, 24, 40, 0.05)"},onClick:D?void 0:K,onMouseOver:e=>D?null:e.currentTarget.style.backgroundColor="#F9FAFB",onMouseOut:e=>D?null:e.currentTarget.style.backgroundColor="#FFFFFF"},a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"12px"}},a.createElement("div",{style:{backgroundColor:"#EEF4FF",padding:"8px",borderRadius:"8px"}},D?a.createElement("div",{className:"location-loader",style:{width:"20px",height:"20px",border:"2px solid #0068faff",borderTopColor:"transparent",borderRadius:"50%",animation:"spin 1s linear infinite"}}):a.createElement(B,null)),a.createElement("span",{style:{fontWeight:"600",color:"#344054"}},D?c("EKYC_FETCHING_LOCATION")||"Fetching Location...":c("EKYC_USE_CURRENT_LOCATION")||"Use Current Location")),!D&&a.createElement("span",{style:{fontSize:"20px",color:"#98A2B3"}},"›")),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_FULL_ADDRESS")||"Full Address"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"16px",zIndex:1,opacity:.6}},a.createElement(n.PropertyHouse,{styles:{fill:"#0068faff",width:"20px",height:"20px"}})),a.createElement(n.TextInput,{value:x,onChange:e=>f(e.target.value),placeholder:c("EKYC_ENTER_FULL_ADDRESS")||"Enter Full Address",textInputStyle:{paddingLeft:"40px",minHeight:"80px"}}))),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"24px"}},a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_FLAT_HOUSE_NUMBER")||"Flat/House Number"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(n.PropertyHouse,{styles:{fill:"#0068faff",width:"20px",height:"20px"}})),a.createElement(n.TextInput,{value:y,onChange:e=>h(e.target.value),placeholder:c("EKYC_ENTER_FLAT_NO")||"e.g. 45-B",textInputStyle:{paddingLeft:"40px"}}))),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_BUILDING_TOWER")||"Building/Tower"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(n.PropertyHouse,{styles:{fill:"#0068faff",width:"20px",height:"20px"}})),a.createElement(n.TextInput,{value:v,onChange:e=>b(e.target.value),placeholder:c("EKYC_ENTER_BUILDING")||"e.g. Tower 4",textInputStyle:{paddingLeft:"40px"}})))),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_LANDMARK")||"Landmark"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(n.LocationIcon,{className:"icon",styles:{fill:"#0068faff",width:"20px",height:"20px"}})),a.createElement(n.TextInput,{value:S,onChange:e=>_(e.target.value),placeholder:c("EKYC_ENTER_LANDMARK")||"Near Central Park",textInputStyle:{paddingLeft:"40px"}}))),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_PINCODE")||"Pincode"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(V,null)),a.createElement(n.TextInput,{value:N,onChange:e=>A(e.target.value),placeholder:c("EKYC_ENTER_PINCODE")||"6-digit pincode",textInputStyle:{paddingLeft:"40px"},maxLength:6})))),a.createElement("hr",{style:{margin:"32px 0",border:"0",borderTop:"1px solid #EAECF0"}}),a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px",marginBottom:"20px"}},a.createElement("div",{style:{backgroundColor:"#EEF4FF",padding:"8px",borderRadius:"8px"}},a.createElement(n.PropertyHouse,{styles:{fill:"#0068faff",width:"24px",height:"24px"}})),a.createElement(n.CardHeader,{style:{margin:0,fontSize:"20px"}},c("EKYC_ADMINISTRATIVE_DIVISION")||"Administrative Division")),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"24px",marginBottom:"32px"}},a.createElement("div",{style:{backgroundColor:"#F9FAFB",padding:"16px",borderRadius:"12px",display:"flex",alignItems:"center",gap:"16px",border:"1px solid #EAECF0"}},a.createElement("div",{style:{backgroundColor:"#E7F4EE",padding:"10px",borderRadius:"10px",display:"flex"}},a.createElement(M,null)),a.createElement("div",null,a.createElement("div",{style:{color:"#00703C",fontSize:"12px",fontWeight:"700",textTransform:"uppercase",letterSpacing:"0.5px"}},c("EKYC_ASSEMBLY")||"ASSEMBLY"),a.createElement("div",{style:{fontSize:"15px",fontWeight:"700",color:"#101828",marginTop:"2px"}},"AC-12 Chandni Chowk"))),a.createElement("div",{style:{backgroundColor:"#F9FAFB",padding:"16px",borderRadius:"12px",display:"flex",alignItems:"center",gap:"16px",border:"1px solid #EAECF0"}},a.createElement("div",{style:{backgroundColor:"#EEF4FF",padding:"10px",borderRadius:"10px",display:"flex"}},a.createElement(P,null)),a.createElement("div",null,a.createElement("div",{style:{color:"#0068faff",fontSize:"12px",fontWeight:"700",textTransform:"uppercase",letterSpacing:"0.5px"}},c("EKYC_WARD")||"WARD"),a.createElement("div",{style:{fontSize:"15px",fontWeight:"700",color:"#101828",marginTop:"2px"}},"WARD-45 Civil Lines")))),a.createElement(n.CardHeader,{style:{fontSize:"18px",color:"#101828",marginBottom:"4px"}},c("EKYC_DOOR_PHOTO_HEADER")||"Door Photo with GPS Stamp"),a.createElement("div",{style:{color:"#667085",fontSize:"14px",marginBottom:"16px"}},c("EKYC_REQUIRED_FOR_VERIFICATION")||"Required for verification"),a.createElement("div",{style:{backgroundColor:"#FFFAEB",padding:"14px",borderRadius:"12px",display:"flex",alignItems:"center",gap:"12px",marginBottom:"20px",border:"1px solid #FEDF89"}},a.createElement(n.InfoBannerIcon,{fill:"#B54708"}),a.createElement("div",null,a.createElement("div",{style:{fontWeight:"700",color:"#B54708",fontSize:"14px"}},c("EKYC_IMPORTANT")||"Important"),a.createElement("div",{style:{fontSize:"13px",color:"#B54708",marginTop:"2px"}},c("EKYC_CAPTURE_LIVE_CAMERA")||"Capture with live camera for GPS metadata"))),a.createElement("div",{style:{border:"2px dashed #D0D5DD",borderRadius:"16px",padding:R?"12px":"40px 24px",textAlign:"center",cursor:"pointer",position:"relative",overflow:"hidden",minHeight:"180px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"#F9FAFB",transition:"all 0.2s ease",boxShadow:"inset 0px 2px 4px rgba(0, 0, 0, 0.02)"},onClick:R?void 0:k,onMouseOver:e=>R?null:e.currentTarget.style.borderColor="#0068faff",onMouseOut:e=>R?null:e.currentTarget.style.borderColor="#D0D5DD"},a.createElement("input",{type:"file",ref:L,onChange:Y,accept:"image/*",style:{display:"none"}}),R?a.createElement("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",justifyContent:"center"}},a.createElement("img",{src:R,alt:"Door",style:{width:"100%",maxHeight:"300px",objectFit:"cover",borderRadius:"12px",display:"block"}}),a.createElement("div",{style:{position:"absolute",top:"12px",right:"12px"}},a.createElement("button",{onClick:e=>{e.stopPropagation(),T(null),L.current&&(L.current.value="")},style:{background:"#FFFFFF",border:"1px solid #EAECF0",borderRadius:"8px",padding:"8px",display:"flex",boxShadow:"0px 1px 2px rgba(16, 24, 40, 0.05)",cursor:"pointer"}},a.createElement(n.RemoveableTag,{text:"",onClick:()=>{},extraStyles:{tagStyles:{margin:0,padding:0}}})))):a.createElement(t.Fragment,null,a.createElement("div",{style:{backgroundColor:"#FFFFFF",width:"64px",height:"64px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 16px",boxShadow:"0px 1px 3px rgba(16, 24, 40, 0.1)"}},a.createElement(w,null)),a.createElement("div",{style:{fontWeight:"700",fontSize:"16px",marginBottom:"4px",color:"#101828"}},c("EKYC_TAP_TO_CAPTURE")||"Tap to Capture"),a.createElement("div",{style:{color:"#667085",fontSize:"14px"}},c("EKYC_CAPTURE_DOOR_IMAGE")||"Capture Door Image"))),a.createElement(n.ActionBar,null,a.createElement(n.SubmitBar,{label:o?c("EKYC_COMPLETE_VERIFICATION_AND_PROCEED")||"Complete & Proceed":c("EKYC_COMPLETE_VERIFICATION")||"Complete Verification",onSubmit:H})));return o?z():a.createElement("div",{className:"inbox-container"},a.createElement("style",null,"\n @keyframes spin { to { transform: rotate(360deg); } }\n @keyframes fadeSlideIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }\n "),a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},a.createElement("div",{className:"icon-container",style:{color:"#0068faff",marginRight:"12px"}},a.createElement(n.HomeIcon,{style:{width:"24px",height:"24px"}})),a.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},c("EKYC_PROCESS"))),a.createElement("div",{style:{padding:"8px 16px"}},a.createElement(n.ConnectingCheckPoints,null,a.createElement(n.CheckPoint,{label:c("EKYC_STEP_AADHAAR")||"Aadhaar",isCompleted:!0}),a.createElement(n.CheckPoint,{label:c("EKYC_STEP_ADDRESS")||"Address",isCompleted:!0}),a.createElement(n.CheckPoint,{label:c("EKYC_STEP_REVIEW")||"Review"})))),a.createElement("div",{style:{flex:1,marginLeft:"16px"}},a.createElement(n.Card,null,a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"}},a.createElement(n.Header,null,c("EKYC_ADDRESS_DETAILS_HEADER")||"Address Details"),a.createElement("div",{style:{fontSize:"14px",fontWeight:"700",color:"#505A5F"}},c("EKYC_K_NUMBER"),": ",a.createElement("span",{style:{color:"#0B0C0C"}},null==E?void 0:E.kNumber))),z())))},v=e=>{let{size:t=22,color:l="#6366f1"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12.01 3c-1.98 0-3.86.47-5.57 1.41-.24.13-.54.04-.67-.2-.13-.24-.04-.55.2-.68C7.82 2.52 9.86 2 12.01 2c2.13 0 3.96.46 5.57 1.41.24.13.33.43.2.67-.09.13-.24.39-.39.39zM12 21c-.28 0-.5-.22-.5-.5v-4.42c-2.33-.21-4.44-1.35-5.94-3.21-1.5-1.86-2.22-4.18-2.02-6.52.05-.59.55-1.03 1.14-.98s1.03.55.98 1.14c-.15 1.76.39 3.51 1.52 4.91 1.12 1.4 2.7 2.26 4.45 2.42.21.02.37.19.37.4v6.26c0 .28-.22.5-.5.5z",fill:l}),a.createElement("path",{d:"M12 11c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z",fill:l}))},b=e=>{let{size:t=16,color:l="#64748b"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2",stroke:l,strokeWidth:"2",strokeLinecap:"round"}),a.createElement("circle",{cx:"12",cy:"7",r:"4",stroke:l,strokeWidth:"2"}))},S=e=>{let{size:t=16,color:l="#64748b"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07A19.5 19.5 0 013.07 10.6 19.79 19.79 0 0 0 3 1.82C3 .72 3.72 0 4.82 0h3a2 2 0 012 1.72c.127.96.361 1.903.7 2.81a2 2 0 01-.45 2.11L8.91 7.91a16 16 0 006.16 6.16l1.27-1.27a2 2 0 012.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0122 16.92z",stroke:l,strokeWidth:"2",strokeLinecap:"round"}))},_=e=>{let{size:t=16}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347z",fill:"#25D366"}),a.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12c0 1.89.525 3.66 1.438 5.168L2 22l4.832-1.438A9.96 9.96 0 0012 22c5.523 0 10-4.477 10-10S17.523 2 12 2z",stroke:"#25D366",strokeWidth:"2",strokeLinecap:"round"}))},N=e=>{let{size:t=16,color:l="#64748b"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z",stroke:l,strokeWidth:"2",strokeLinecap:"round"}),a.createElement("path",{d:"M22 6l-10 7L2 6",stroke:l,strokeWidth:"2",strokeLinecap:"round"}))},A=e=>{let{size:t=16,color:l="#64748b"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2",stroke:l,strokeWidth:"2",strokeLinecap:"round"}),a.createElement("circle",{cx:"9",cy:"7",r:"4",stroke:l,strokeWidth:"2"}),a.createElement("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87",stroke:l,strokeWidth:"2",strokeLinecap:"round"}),a.createElement("path",{d:"M16 3.13a4 4 0 0 1 0 7.75",stroke:l,strokeWidth:"2",strokeLinecap:"round"}))},R=()=>{var e,o,i,s;const{t:c}=r.useTranslation(),d=l.useLocation(),m=l.useHistory(),E=t.useRef(null),{kNumber:p,selectedOption:u,connectionDetails:C}=d.state||{kNumber:"EKYC-1234567890",selectedOption:{code:"SELF",name:"EKYC_SELF"},connectionDetails:{connectionDetailsInfo:{consumerName:"Rajesh Kumar Singh",address:"House No. 45, Sector 12, New Delhi - 110001",phoneNumber:"9876543210",email:"rajesh.singh@example.com"}}},[g,x]=t.useState(""),[f,y]=t.useState(!1),[R,T]=t.useState(!1),[D,I]=t.useState({code:"NO",name:"CORE_COMMON_NO"}),[L,F]=t.useState((null==C||null===(e=C.connectionDetailsInfo)||void 0===e?void 0:e.consumerName)||""),[O,H]=t.useState({code:"NO",name:"CORE_COMMON_NO"}),[Y,k]=t.useState((null==C||null===(o=C.connectionDetailsInfo)||void 0===o?void 0:o.phoneNumber)||""),[K,M]=t.useState((null==C||null===(i=C.connectionDetailsInfo)||void 0===i?void 0:i.phoneNumber)||""),[P,w]=t.useState((null==C||null===(s=C.connectionDetailsInfo)||void 0===s?void 0:s.email)||""),[B,V]=t.useState(""),[z,W]=t.useState(!1),[U,Z]=t.useState(null),X=[{code:"YES",name:"CORE_COMMON_YES"},{code:"NO",name:"CORE_COMMON_NO"}];return a.createElement("div",{className:"inbox-container"},a.createElement("style",null,"\n @keyframes spin { to { transform: rotate(360deg); } }\n @keyframes fadeSlideIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }\n @keyframes pulseGreen { 0%,100% { box-shadow:0 0 0 0 rgba(22,163,74,0.4); } 50% { box-shadow:0 0 0 8px rgba(22,163,74,0); } }\n "),a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},a.createElement("div",{className:"icon-container",style:{color:"#0068faff",marginRight:"12px"}},a.createElement(n.HomeIcon,{style:{width:"24px",height:"24px"}})),a.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},c("EKYC_PROCESS"))),a.createElement("div",{style:{padding:"8px 16px"}},a.createElement(n.ConnectingCheckPoints,null,a.createElement(n.CheckPoint,{label:c("EKYC_STEP_AADHAAR")||"Aadhaar",isCompleted:z}),a.createElement(n.CheckPoint,{label:c("EKYC_STEP_ADDRESS")||"Address",isCompleted:null!==U}),a.createElement(n.CheckPoint,{label:c("EKYC_STEP_REVIEW")||"Review"})))),a.createElement("div",{style:{flex:1,marginLeft:"16px"}},a.createElement(n.Card,null,a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"}},a.createElement(n.Header,null,c("EKYC_AADHAAR_VERIFICATION_HEADER")||"Aadhaar Verification"),a.createElement("div",{style:{fontSize:"14px",fontWeight:"700",color:"#505A5F"}},c("EKYC_K_NUMBER"),": ",a.createElement("span",{style:{color:"#0B0C0C"}},p))),a.createElement(n.CardHeader,{style:{fontSize:"20px",marginBottom:"16px"}},c("EKYC_AADHAAR_NUMBER_HEADER")||"Aadhaar Number"),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_LAST_4_DIGIT_AADHAAR")||"Last 4-digit Aadhaar Number"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(v,{size:20})),a.createElement(n.TextInput,{value:g,onChange:e=>{const t=e.target.value;t.length<=4&&/^\d*$/.test(t)&&x(t)},placeholder:c("EKYC_ENTER_LAST_4_DIGIT")||"Enter last 4 digits",textInputStyle:{paddingLeft:"40px"},maxLength:4}),f&&a.createElement("div",{style:{position:"absolute",right:"12px",top:"50%",transform:"translateY(-50%)"}},a.createElement(n.TickMark,{fillColor:"#00703C"})))),!f&&a.createElement(n.SubmitBar,{label:R?c("EKYC_VERIFYING")||"Verifying...":c("EKYC_VERIFY_AADHAAR_BTN")||"Verify Aadhaar",onSubmit:()=>{4===g.length&&(T(!0),setTimeout(()=>{T(!1),y(!0)},1200))},disabled:4!==g.length||R,style:{marginTop:"16px",opacity:4!==g.length?.6:1}}),f&&a.createElement("div",{style:{backgroundColor:"#E7F4EE",padding:"20px",borderRadius:"8px",marginTop:"24px",marginBottom:"24px",border:"1px solid #D1E9DB",animation:"fadeSlideIn 0.4s ease"}},a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px",marginBottom:"16px"}},a.createElement("div",{style:{backgroundColor:"#D1E9DB",padding:"4px",borderRadius:"50%",display:"flex",animation:"pulseGreen 2s ease infinite"}},a.createElement(n.TickMark,{fillColor:"#00703C"})),a.createElement("span",{style:{fontWeight:"700",color:"#00703C",fontSize:"18px"}},c("EKYC_AADHAAR_VERIFIED_SUCCESS")||"Aadhaar Verified Successfully")),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"16px"}},a.createElement("div",{style:{display:"flex",flexDirection:"column"}},a.createElement("span",{style:{color:"#667085",fontSize:"12px",fontWeight:"700",textTransform:"uppercase"}},c("EKYC_NAME")),a.createElement("span",{style:{fontWeight:"700",fontSize:"16px",color:"#101828"}},"Rajesh Kumar Singh")),a.createElement("div",{style:{display:"flex",flexDirection:"column"}},a.createElement("span",{style:{color:"#667085",fontSize:"12px",fontWeight:"700",textTransform:"uppercase"}},c("EKYC_AADHAAR")),a.createElement("span",{style:{fontWeight:"700",fontSize:"16px",color:"#101828"}},"XXXX XXXX ",g)),a.createElement("div",{style:{display:"flex",flexDirection:"column",gridColumn:"span 2"}},a.createElement("span",{style:{color:"#667085",fontSize:"12px",fontWeight:"700",textTransform:"uppercase"}},c("EKYC_ADDRESS")),a.createElement("span",{style:{fontWeight:"500",fontSize:"15px",color:"#344054"}},"House No. 45, Sector 12, New Delhi - 110001")))),a.createElement("hr",{style:{margin:"32px 0",border:"0",borderTop:"1px solid #EAECF0"}}),a.createElement(n.CardHeader,{style:{fontSize:"20px",marginBottom:"16px"}},c("EKYC_CONTACT_DETAILS_HEADER")||"Contact Details"),a.createElement(n.LabelFieldPair,{style:{animation:"fadeSlideIn 0.3s ease"}},a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"20px"}},a.createElement(n.CardLabel,{style:{fontWeight:"600",marginBottom:"0"}},c("EKYC_USER_NAME")||"Corrected Name"),a.createElement(n.RadioButtons,{options:X,optionsKey:"name",selectedOption:D,onSelect:I,t:c,innerStyles:{display:"flex",gap:"24px"},style:{display:"flex",gap:"50px",marginBottom:"0"}})),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:"YES"===D.code?.6:.3}},a.createElement(b,{size:18,color:"YES"===D.code?"#64748b":"#94a3b8"})),a.createElement(n.TextInput,{value:L,onChange:e=>F(e.target.value),placeholder:c("EKYC_ENTER_NAME_PLACEHOLDER")||"Enter full name",textInputStyle:{paddingLeft:"40px"},disabled:"YES"!==D.code}))),a.createElement(n.LabelFieldPair,null,a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"20px",padding:"10px"}},a.createElement(n.CardLabel,{style:{fontWeight:"600",marginBottom:"0"}},c("EKYC_USER_MOBILE_NUMBER")||"User Mobile Number"),a.createElement(n.RadioButtons,{options:X,optionsKey:"name",selectedOption:O,onSelect:H,t:c,innerStyles:{display:"flex",gap:"24px"},style:{display:"flex",gap:"50px",marginBottom:"0"}})),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:"YES"===O.code?.6:.3}},a.createElement(S,{size:18,color:"YES"===O.code?"#64748b":"#94a3b8"})),a.createElement(n.TextInput,{value:Y,onChange:e=>k(e.target.value),placeholder:"+91 XXXXX XXXXX",textInputStyle:{paddingLeft:"40px"},disabled:"YES"!==O.code}))),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"24px",marginTop:"24px"}},a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_WHATSAPP_NUMBER")||"WhatsApp Number"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(_,{size:18})),a.createElement(n.TextInput,{value:K,onChange:e=>M(e.target.value),placeholder:"+91 XXXXX XXXXX",textInputStyle:{paddingLeft:"40px"}}))),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_EMAIL_ADDRESS")||"Email Address"," ",a.createElement("span",{style:{fontWeight:"400",color:"#667085"}},"(",c("EKYC_OPTIONAL")||"Optional",")")),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(N,{size:18})),a.createElement(n.TextInput,{value:P,onChange:e=>w(e.target.value),placeholder:c("EKYC_EMAIL_ADDRESS_PLACEHOLDER")||"example@email.com",textInputStyle:{paddingLeft:"40px"}})))),a.createElement("hr",{style:{margin:"32px 0",border:"0",borderTop:"1px solid #EAECF0"}}),a.createElement(n.CardHeader,{style:{fontSize:"20px",marginBottom:"16px"}},c("EKYC_FAMILY_DETAILS_HEADER")||"Family Details"),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_NO_OF_PERSONS")||"Number of Family Members"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(A,{size:18})),a.createElement(n.TextInput,{value:B,onChange:e=>{/^\d*$/.test(e.target.value)&&V(e.target.value)},placeholder:c("EKYC_ENTER_NO_OF_PERSONS")||"Enter total number of persons",textInputStyle:{paddingLeft:"40px"}}))),!z&&a.createElement(n.ActionBar,null,a.createElement(n.SubmitBar,{label:c("ES_COMMON_SAVE_CONTINUE")||"Save & Continue",onSubmit:()=>{W(!0),setTimeout(()=>{var e;null===(e=E.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"})},100)}})),z&&a.createElement("div",{ref:E},a.createElement(h,{isSection:!0,onComplete:e=>{Z(e),m.push("/digit-ui/employee/ekyc/property-info",{kNumber:p,selectedOption:u,connectionDetails:C,aadhaarDetails:{aadhaarLastFour:g,isAadhaarVerified:f,userName:L,mobileNumber:Y,whatsappNumber:K,email:P,noOfPersons:B},addressDetails:e})},parentState:{kNumber:p,selectedOption:u,connectionDetails:C}})),a.createElement("div",{style:{textAlign:"center",marginTop:"24px"}},a.createElement("p",{style:{fontSize:"12px",color:"#667085",display:"flex",alignItems:"center",justifyContent:"center",gap:"4px"}},a.createElement("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"}),a.createElement("path",{d:"M12 11V17M12 7H12.01",strokeLinecap:"round"})),c("EKYC_SECURE_DATA_NOTICE")||"Your data is encrypted and secure")))))},T=()=>{const{t:e}=r.useTranslation(),o=l.useHistory(),i=l.useLocation(),{kNumber:s}=i.state||{kNumber:"EKYC-1234567890"},[c,d]=t.useState("OWNER"),[m,E]=t.useState(""),[p,u]=t.useState(null),[C,g]=t.useState(null),[x,f]=t.useState(null),[y,h]=t.useState(null),[v,b]=t.useState(null),[S,_]=t.useState(null),N=t.useRef(null),A=t.useRef(null),R=()=>a.createElement("div",{style:{backgroundColor:"#E8EAF6",padding:"8px",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center"}},a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M20 6H16V4C16 2.89 15.11 2 14 2H10C8.89 2 8 2.89 8 4V6H4C2.89 6 2 6.89 2 8V19C2 20.11 2.89 21 4 21H20C21.11 21 22 20.11 22 19V8C22 6.89 21.11 6 20 6ZM10 4H14V6H10V4ZM20 19H4V8H20V19ZM13 13V10H11V13H8L12 17L16 13H13Z",fill:"#3D51B0"}))),T=()=>a.createElement("div",{style:{backgroundColor:"#E8EAF6",padding:"8px",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center"}},a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M12 7V3H2V21H22V7H12ZM6 19H4V17H6V19ZM6 15H4V13H6V15ZM6 11H4V9H6V11ZM6 7H4V5H6V7ZM10 19H8V17H10V19ZM10 15H8V13H10V15ZM10 11H8V9H10V11ZM10 7H8V5H10V7ZM20 19H12V9H20V19ZM18 11H14V13H18V11ZM18 15H14V17H18V15Z",fill:"#3D51B0"}))),D=()=>a.createElement("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M14 2H6C4.9 2 4 2.9 4 4V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V8L14 2ZM13 9V3.5L18.5 9H13Z",fill:"#1976D2"}),a.createElement("path",{d:"M11 14H13V18H11V14ZM11 12H13V13H11V12Z",fill:"white"}),a.createElement("path",{d:"M8 16H9V17H8V16Z",fill:"white"}),a.createElement("path",{d:"M15 16H16V17H15V16Z",fill:"white"}),a.createElement("path",{d:"M12 15.5L14 13.5H10L12 15.5Z",fill:"white"}),a.createElement("path",{d:"M12 18V14M12 14L10 16M12 14L14 16",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),I=()=>a.createElement("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M9 2L7.17 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6C22 4.9 21.1 4 20 4H16.83L15 2H9ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17ZM12 9C10.34 9 9 10.34 9 12C9 13.66 10.34 15 12 15C13.66 15 15 13.66 15 12C15 10.34 13.66 9 12 9Z",fill:"#3D51B0"}));return a.createElement("div",{className:"inbox-container"},a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},a.createElement("div",{className:"icon-container",style:{color:"#0068faff",marginRight:"12px"}},a.createElement(n.HomeIcon,{style:{width:"24px",height:"24px"}})),a.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},e("EKYC_PROCESS"))),a.createElement("div",{style:{padding:"8px 16px"}},a.createElement(n.ConnectingCheckPoints,null,a.createElement(n.CheckPoint,{label:e("EKYC_STEP_AADHAAR")||"Aadhaar",isCompleted:!0}),a.createElement(n.CheckPoint,{label:e("EKYC_STEP_ADDRESS")||"Address",isCompleted:!0}),a.createElement(n.CheckPoint,{label:e("EKYC_STEP_PROPERTY")||"Property",isCompleted:!1}),a.createElement(n.CheckPoint,{label:e("EKYC_STEP_REVIEW")||"Review"})))),a.createElement("div",{style:{flex:1,marginLeft:"16px"}},a.createElement(n.Card,null,a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"}},a.createElement(n.Header,null,e("Property Details")),a.createElement("div",{style:{fontSize:"14px",fontWeight:"700",color:"#505A5F"}},e("EKYC_K_NUMBER"),": ",a.createElement("span",{style:{color:"#0B0C0C"}},s))),a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"}},a.createElement(R,null),a.createElement("span",{style:{fontSize:"20px",fontWeight:"700",color:"#101828"}},e("Property Details"))),a.createElement(n.Card,{style:{padding:"20px",borderRadius:"16px",border:"1px solid #EAECF0",marginBottom:"24px"}},a.createElement("div",{style:{marginBottom:"24px"}},a.createElement(n.CardLabel,{style:{fontSize:"14px",fontWeight:"600",color:"#667085",marginBottom:"12px"}},e("Property_Owner")),a.createElement("div",{style:{display:"flex",backgroundColor:"#F2F4F7",padding:"4px",borderRadius:"12px"}},a.createElement("button",{onClick:()=>d("OWNER"),style:{flex:1,padding:"10px",borderRadius:"10px",border:"none",backgroundColor:"OWNER"===c?"#3D51B0":"transparent",color:"OWNER"===c?"#FFFFFF":"#667085",fontWeight:"600",cursor:"pointer",transition:"all 0.2s"}},e("Owner")),a.createElement("button",{onClick:()=>d("TENANT"),style:{flex:1,padding:"10px",borderRadius:"10px",border:"none",backgroundColor:"TENANT"===c?"#3D51B0":"transparent",color:"TENANT"===c?"#FFFFFF":"#667085",fontWeight:"600",cursor:"pointer",transition:"all 0.2s"}},e("Tenant")))),a.createElement("div",{style:{marginBottom:"8px"}},a.createElement(n.CardLabel,{style:{fontSize:"14px",fontWeight:"600",color:"#667085",marginBottom:"12px"}},e("PID_Number")," ",a.createElement("span",{style:{fontStyle:"italic",fontWeight:"400",color:"#98A2B3"}},e("Optional"))),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement(n.TextInput,{value:m,onChange:e=>E(e.target.value),placeholder:e("Enter_PID_Number"),textInputStyle:{paddingLeft:"44px",borderRadius:"12px",border:"1px solid #D0D5DD",height:"56px"}}),a.createElement("div",{style:{position:"absolute",left:"16px",top:"50%",transform:"translateY(-50%)",color:"#3D51B0",fontSize:"20px",fontWeight:"600"}},"#")))),a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"}},a.createElement(T,null),a.createElement("span",{style:{fontSize:"20px",fontWeight:"700",color:"#101828"}},e("Building_Info"))),a.createElement(n.Card,{style:{padding:"20px",borderRadius:"16px",border:"1px solid #EAECF0",marginBottom:"24px"}},[{label:"Type_of_Connection",state:p,setState:u},{label:"Connection_Category",state:C,setState:g},{label:"User_Type",state:x,setState:f},{label:"No_of_Floor",state:y,setState:h}].map((t,l)=>a.createElement("div",{key:l,style:{marginBottom:"20px"}},a.createElement(n.CardLabel,{style:{fontSize:"14px",fontWeight:"600",color:"#344054",marginBottom:"8px"}},e(t.label)),a.createElement(n.Dropdown,{selected:t.state,select:t.setState,option:[{label:"Select "+t.label,value:""}],optionKey:"label",t:e,style:{borderRadius:"12px",border:"1px solid #D0D5DD",height:"48px"}}))),a.createElement("div",{style:{display:"flex",gap:"24px",alignItems:"stretch",flexWrap:"wrap"}},a.createElement("div",{style:{flex:1,minWidth:"300px",display:"flex",flexDirection:"column"}},a.createElement(n.CardLabel,{style:{fontSize:"14px",fontWeight:"600",color:"#344054",marginBottom:"8px"}},e("Upload_Property_Document")),a.createElement("div",{style:{flex:1,backgroundColor:"#EBF5FF",border:"1px solid #B2DDFF",borderRadius:"16px",padding:"32px 24px",textAlign:"center",cursor:"pointer",display:"flex",flexDirection:"column",justifyContent:"center"},onClick:()=>N.current.click()},a.createElement("input",{type:"file",ref:N,style:{display:"none"},accept:".pdf"}),a.createElement("div",{style:{color:"#1570EF",fontWeight:"600",fontSize:"16px",marginBottom:"20px",lineHeight:"1.5"}},e("Upload_your_property_document_in_PDF_Only")),a.createElement("div",{style:{display:"flex",justifyContent:"center"}},a.createElement("div",{style:{backgroundColor:"#FFFFFF",padding:"12px",borderRadius:"12px",boxShadow:"0px 1px 2px rgba(16, 24, 40, 0.05)"}},a.createElement(D,null))))),a.createElement("div",{style:{flex:1,minWidth:"300px",display:"flex",flexDirection:"column"}},a.createElement(n.CardLabel,{style:{fontSize:"14px",fontWeight:"600",color:"#344054",marginBottom:"8px"}},e("Capture_Building_Image")),a.createElement("div",{style:{flex:1,border:"1px solid #D0D5DD",borderRadius:"16px",padding:"40px 24px",textAlign:"center",cursor:"pointer",backgroundColor:"#FFFFFF",display:"flex",flexDirection:"column",justifyContent:"center"},onClick:()=>A.current.click()},a.createElement("input",{type:"file",ref:A,style:{display:"none"},accept:"image/*",capture:"environment"}),a.createElement("div",{style:{backgroundColor:"#EEF4FF",width:"56px",height:"56px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 16px"}},a.createElement(I,null)),a.createElement("div",{style:{fontWeight:"600",color:"#101828",fontSize:"16px",marginBottom:"4px"}},e("Tap_to_Capture")),a.createElement("div",{style:{color:"#667085",fontSize:"14px"}},e("Building_Photo"))))),a.createElement("div",{style:{marginTop:"24px",backgroundColor:"#EFF8FF",padding:"16px",borderRadius:"12px",display:"flex",gap:"12px",border:"1px solid #B2DDFF"}},a.createElement("div",{style:{color:"#1570EF"}},a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM11 15H9V9H11V15ZM11 7H9V5H11V7Z",fill:"currentColor"}))),a.createElement("div",{style:{color:"#175CD3",fontSize:"14px",fontWeight:"500",lineHeight:"1.4"}},e("This_section_is_enabled_only_if_user_is_not_the_owner."))),a.createElement(n.SubmitBar,{label:e("Save_&_Continue"),onSubmit:()=>{o.push("/digit-ui/employee/ekyc/dashboard")},style:{borderRadius:"8px",height:"48px",marginTop:"24px",marginRight:"1100px"}})))))},D=e=>{let{path:t}=e;const{t:o}=r.useTranslation(),i=l.useLocation();sessionStorage.removeItem("revalidateddone");const s=[{icon:n.HomeIcon,path:"/digit-ui/employee"},{label:o((()=>{const e=i.pathname;return e.includes("/dashboard")?"ES_COMMON_INBOX":e.includes("/create-kyc")?"EKYC_CREATE_KYC":e.includes("/k-details")?"EKYC_K_DETAILS":e.includes("/aadhaar-verification")?"EKYC_AADHAAR_VERIFICATION":e.includes("/address-details")?"EKYC_ADDRESS_DETAILS":e.includes("/property-info")?"EKYC_PROPERTY_INFO":"ES_COMMON_INBOX"})())}];return a.createElement(n.AppContainer,null,a.createElement("div",{className:"ground-container employee-app-container"},a.createElement(n.ModuleHeader,{leftContent:a.createElement(a.Fragment,null,a.createElement(n.ArrowLeft,{className:"icon"}),"Back"),onLeftClick:()=>window.history.back(),breadcrumbs:s}),a.createElement(l.Switch,null,a.createElement(n.PrivateRoute,{path:t+"/dashboard",component:()=>a.createElement(x,{parentRoute:t,businessService:"EKYC",moduleCode:"EKYC",isInbox:!0})}),a.createElement(n.PrivateRoute,{path:t+"/create-kyc",component:()=>a.createElement(y,null)}),a.createElement(n.PrivateRoute,{path:t+"/aadhaar-verification",component:()=>a.createElement(R,null)}),a.createElement(n.PrivateRoute,{path:t+"/address-details",component:()=>a.createElement(h,null)}),a.createElement(n.PrivateRoute,{path:t+"/property-info",component:()=>a.createElement(T,null)}),a.createElement(n.PrivateRoute,{path:t+"/",component:()=>a.createElement(x,{parentRoute:t,businessService:"EKYC",moduleCode:"EKYC",isInbox:!0})}))))},I=e=>{let{stateCode:t,userType:n,tenants:r}=e;const{path:o,url:i}=l.useRouteMatch(),s=Digit.StoreData.getCurrentLanguage(),{isLoading:c}=Digit.Services.useStore({stateCode:t,moduleCode:"EKYC",language:s});return Digit.SessionStorage.set("EKYC_TENANTS",r),c?null:"employee"===n?a.createElement(D,{path:o,url:i,userType:n,tenants:r}):null},L={EKYCModule:I,EKYCCard:()=>{const{t:e}=r.useTranslation(),t={Icon:a.createElement(n.PersonIcon,null),moduleName:e("ACTION_TEST_EKYC"),kpis:[{count:"-",label:e("TOTAL_EKYC"),link:"/digit-ui/employee/ekyc/dashboard"}],links:[{label:e("EKYC_DASHBOARD"),link:"/digit-ui/employee/ekyc/dashboard"},{label:e("EKYC_CREATE_KYC"),link:"/digit-ui/employee/ekyc/create-kyc"}]};return a.createElement(n.EmployeeModuleCard,t)},EKYCInbox:x,EKYCDesktopInbox:d,EKYCMobileInbox:p,EKYC_INBOX_FILTER:e=>a.createElement(C,e)};exports.EkycModule=I,exports.default=I,exports.initEkycComponents=()=>{Object.entries(L).forEach(e=>{let[t,a]=e;Digit.ComponentRegistryService.setComponent(t,a)})};
1
+ var e,t=require("react"),a=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,l=require("react-router-dom"),n=require("@djb25/digit-ui-react-components"),r=require("react-i18next");const o=e=>{let{countData:t}=e;const{t:l}=r.useTranslation();return a.createElement("div",{className:"ekyc-status-container"},a.createElement("div",{className:"ekyc-status-card"},a.createElement("div",{className:"count"},(null==t?void 0:t.total)||0),a.createElement("div",{className:"label"},l("EKYC_TOTAL"))),a.createElement("div",{className:"ekyc-status-card"},a.createElement("div",{className:"count pending"},(null==t?void 0:t.pending)||0),a.createElement("div",{className:"label"},l("EKYC_PENDING"))),a.createElement("div",{className:"ekyc-status-card"},a.createElement("div",{className:"count completed"},(null==t?void 0:t.completed)||0),a.createElement("div",{className:"label"},l("EKYC_COMPLETED"))))},i=e=>{let{filterComponent:i,...s}=e;const{data:c,isLoading:d,onSort:m,onNextPage:E,onPrevPage:p,currentPage:u,pageSizeLimit:C,onPageSizeChange:g,parentRoute:x,searchParams:y,sortParams:f,totalRecords:h,countData:b}=s,{t:S}=r.useTranslation(),[v,_]=a.useState(()=>{var e;return null===(e=Digit.ComponentRegistryService)||void 0===e?void 0:e.getComponent(i)}),N=t.useMemo(()=>[{Header:S("EKYC_APPLICATION_NO"),accessor:"applicationNumber",Cell:e=>{var t;let{row:n}=e;const r=(null===(t=n.original)||void 0===t?void 0:t.applicationNumber)||"NA";return a.createElement(l.Link,{to:`${x}/application-details/${r}`},a.createElement("span",{className:"ekyc-application-link"},r))}},{Header:S("EKYC_CITIZEN_NAME"),accessor:"citizenName",Cell:e=>{var t;let{row:l}=e;return a.createElement("span",null,(null===(t=l.original)||void 0===t?void 0:t.citizenName)||"NA")}},{Header:S("EKYC_MOBILE_NO"),accessor:"mobileNumber",Cell:e=>{var t;let{row:l}=e;return a.createElement("span",null,(null===(t=l.original)||void 0===t?void 0:t.mobileNumber)||"NA")}},{Header:S("EKYC_STATUS"),accessor:"status",Cell:e=>{var t;let{row:l}=e;const n=(null===(t=l.original)||void 0===t?void 0:t.status)||"DEFAULT";return a.createElement("span",{className:"ekyc-status-tag "+n},S("EKYC_STATUS_"+n))}}],[S,x]),A=t.useMemo(()=>(null==c?void 0:c.items)||[],[c]);return a.createElement("div",{className:"inbox-container"},a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},a.createElement("div",{className:"icon-container",style:{color:"#F47738",marginRight:"12px"}},a.createElement(n.HomeIcon,{style:{width:"24px",height:"24px"}})),a.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},S("ACTION_TEST_EKYC"))),a.createElement("div",null,v&&a.createElement(v,{defaultSearchParams:s.defaultSearchParams,onFilterChange:s.onSearch,searchParams:y,type:"desktop",moduleCode:"EKYC"}))),a.createElement("div",{style:{flex:1,marginLeft:"16px"}},a.createElement(n.Card,{className:"ekyc-metrics-card",style:{marginBottom:"16px",padding:"16px"}},a.createElement(o,{countData:b})),a.createElement("div",{className:"result",style:{flex:1}},a.createElement(n.Card,{className:"ekyc-table-card",style:{padding:0}},a.createElement(n.Table,{t:S,data:A,columns:N,isLoading:d,onSort:m,sortParams:f,totalRecords:h,onNextPage:E,onPrevPage:p,currentPage:u,pageSizeLimit:C,onPageSizeChange:g,getCellProps:e=>({className:"ekyc-table-cell"})})))))},s=e=>{let{onSearch:l,searchParams:o,FilterComponent:i,children:s,...c}=e;const{t:d}=r.useTranslation(),[m,E]=t.useState(()=>({...o})),p=(e,t)=>{E(a=>({...a,[e]:t}))},u=e=>{e&&e.preventDefault&&e.preventDefault(),l(m)};return a.createElement("div",{className:"inbox-container"},a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},a.createElement("div",{className:"icon-container",style:{color:"#F47738",marginRight:"12px"}},a.createElement(n.HomeIcon,{style:{width:"24px",height:"24px"}})),a.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},d("ACTION_CREATE_EKYC"))),a.createElement("div",null,i&&a.createElement(i,{defaultSearchParams:c.defaultSearchParams,onFilterChange:c.onSearch,searchParams:o,type:"desktop",moduleCode:"EKYC"}))),a.createElement("div",{style:{flex:1,marginLeft:"16px"}},a.createElement(n.Card,{className:"ekyc-search-card",style:{padding:"24px",marginBottom:"24px",borderRadius:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.05)"}},a.createElement(n.Header,{style:{fontSize:"24px",marginBottom:"20px",fontWeight:"700",color:"#0B0C0C"}},d("EKYC_SEARCH_CONSUMER_HEADER")),a.createElement("form",{onSubmit:u},a.createElement("div",{style:{display:"flex",gap:"24px",alignItems:"flex-end",flexWrap:"wrap"}},a.createElement("div",{style:{flex:"1",minWidth:"250px"}},a.createElement("div",{className:"filter-label",style:{fontWeight:"600",marginBottom:"8px",fontSize:"14px",color:"#505A5F"}},d("EKYC_K_NUMBER")),a.createElement("div",{style:{position:"relative"}},a.createElement(n.TextInput,{value:null==m?void 0:m.kNumber,onChange:e=>p("kNumber",e.target.value),placeholder:d("EKYC_K_NUMBER_PLACEHOLDER"),style:{borderRadius:"8px",paddingLeft:"12px",height:"44px"}}))),a.createElement("div",{style:{flex:"1",minWidth:"250px"}},a.createElement("div",{className:"filter-label",style:{fontWeight:"600",marginBottom:"8px",fontSize:"14px",color:"#505A5F"}},d("EKYC_K_NAME")),a.createElement("div",{style:{position:"relative"}},a.createElement(n.TextInput,{value:null==m?void 0:m.kName,onChange:e=>p("kName",e.target.value),placeholder:d("EKYC_K_NAME_PLACEHOLDER"),style:{borderRadius:"8px",paddingLeft:"12px",height:"44px"}}))),a.createElement("div",{style:{display:"flex",gap:"12px",alignItems:"center"}},a.createElement("button",{type:"button",onClick:()=>{const e={kNumber:"",kName:""};E(e),l(e)},style:{background:"none",border:"none",color:"#0076f3ff",fontWeight:"600",cursor:"pointer",fontSize:"14px",padding:"10px"}},d("ES_COMMON_CLEAR")),a.createElement(n.SubmitBar,{label:d("ES_COMMON_SEARCH"),onSubmit:u,style:{margin:0,borderRadius:"8px",height:"44px",padding:"0 32px",marginTop:"-55px"}}))))),s))},c=e=>{var t;let{data:i,isLoading:c,onSearch:d,searchParams:m,parentRoute:E,countData:p}=e;const{t:u}=r.useTranslation(),C=(null==i||null===(t=i.items)||void 0===t?void 0:t.map(e=>({[u("EKYC_APPLICATION_NO")]:e.applicationNumber,[u("EKYC_CITIZEN_NAME")]:e.citizenName,[u("EKYC_MOBILE_NO")]:e.mobileNumber,[u("EKYC_STATUS")]:a.createElement("span",{className:"ekyc-status-tag "+e.status},u("EKYC_STATUS_"+e.status))})))||[];return a.createElement("div",{className:"inbox-wrapper"},a.createElement("div",{className:"ekyc-header-container module-header"},a.createElement(n.Header,{className:"title"},u("EKYC_INBOX_HEADER")),a.createElement(l.Link,{to:E+"/create-kyc"},a.createElement(n.SubmitBar,{label:u("EKYC_CREATE_KYC")}))),a.createElement("div",{className:"ekyc-metrics-section"},a.createElement(o,{countData:p})),a.createElement(s,{onSearch:d,searchParams:m}),a.createElement("div",{className:"mobile-data-container"},c?a.createElement(n.Loader,null):(null==C?void 0:C.length)>0?a.createElement(n.DetailsCard,{data:C,t:u,serviceRequestIdKey:u("EKYC_APPLICATION_NO"),linkPrefix:E+"/application-details/"}):a.createElement(n.Card,null,u("ES_COMMON_NO_DATA").split("\\n").map((e,t)=>a.createElement("p",{key:t,style:{textAlign:"center"}},e)))))},d=e=>{let{searchParams:l,onFilterChange:o,defaultSearchParams:i,...s}=e;const{t:c}=r.useTranslation(),[d,m]=t.useState(()=>({...l}));return a.createElement(n.FilterForm,{onSubmit:()=>{o(d)},handleSubmit:e=>t=>{t&&t.preventDefault(),e()},onResetFilterForm:()=>{m({...i}),o({...i})},id:"ekyc-filter-form",onMobileExclusiveFilterPopupFormClose:s.onClose},a.createElement(n.FilterFormField,null,a.createElement("div",{className:"filter-label",style:{fontWeight:"normal"}},c("EKYC_STATUS"),":"),a.createElement(n.Dropdown,{option:[{label:c("EKYC_STATUS_ALL"),value:""},{label:c("EKYC_STATUS_COMPLETED"),value:"COMPLETED"},{label:c("EKYC_STATUS_PENDING"),value:"PENDING"},{label:c("EKYC_STATUS_REJECTED"),value:"REJECTED"}],optionKey:"label",select:e=>{(e=>{let t=e.delete,a={...d,...e};t&&t.forEach(e=>delete a[e]),delete e.delete,m({...a})})({status:e})},selected:(null==d?void 0:d.status)||{label:c("EKYC_STATUS_ALL"),value:""}})))},m=[{applicationNumber:"EKYC-2024-001",citizenName:"Rahul Sharma",mobileNumber:"9876543210",status:"COMPLETED"},{applicationNumber:"EKYC-2024-002",citizenName:"Anjali Devi",mobileNumber:"9123456789",status:"PENDING"},{applicationNumber:"EKYC-2024-003",citizenName:"Amit Kumar",mobileNumber:"8888888888",status:"REJECTED"},{applicationNumber:"EKYC-2024-004",citizenName:"Priya Singh",mobileNumber:"7777777777",status:"COMPLETED"},{applicationNumber:"EKYC-2024-005",citizenName:"Suresh Gupta",mobileNumber:"6666666666",status:"PENDING"}],E=e=>{let{parentRoute:l,businessService:n="EKYC",initialStates:o={}}=e;Digit.ULBService.getCurrentTenantId();const{t:s}=r.useTranslation(),[d,E]=t.useState(o.pageOffset||0),[p,u]=t.useState(o.pageSize||10),[C,g]=t.useState(o.sortParams||[{id:"createdTime",desc:!0}]),x=t.useMemo(()=>({label:s("EKYC_STATUS_ALL"),value:""}),[s]),[y,f]=t.useState(o.searchParams||{status:x}),h=t.useMemo(()=>m.filter(e=>{var t;let a=!0;const l=void 0!==(null===(t=y.status)||void 0===t?void 0:t.value)?y.status.value:y.status;return l&&e.status!==l&&(a=!1),a}),[y]),b=t.useMemo(()=>({total:m.length,completed:m.filter(e=>"COMPLETED"===e.status).length,pending:m.filter(e=>"PENDING"===e.status).length,rejected:m.filter(e=>"REJECTED"===e.status).length}),[]),S=t.useCallback(e=>{f(t=>({...t,...e})),E(0)},[]),v=t.useCallback(e=>{e.length>0&&g(e)},[]),_=t.useMemo(()=>[{label:s("EKYC_STATUS"),name:"status",type:"dropdown",options:[{label:s("CHOOSE_STATUS"),value:""},{label:s("EKYC_STATUS_COMPLETED"),value:"COMPLETED"},{label:s("EKYC_STATUS_PENDING"),value:"PENDING"},{label:s("EKYC_STATUS_REJECTED"),value:"REJECTED"}],optionsKey:"label"}],[s]);return a.createElement("div",{className:"ekyc-employee-container"},a.createElement("div",{className:"inbox-main-container"},Digit.Utils.browser.isMobile()?a.createElement(c,{data:{items:h,totalCount:h.length},isLoading:!1,onSearch:S,searchFields:_,searchParams:y,parentRoute:l,countData:b}):a.createElement(i,{businessService:n,data:{items:h,totalCount:h.length},isLoading:!1,searchFields:_,onSearch:S,onSort:v,onNextPage:()=>E(e=>e+p),onPrevPage:()=>E(e=>Math.max(e-p,0)),currentPage:Math.floor(d/p),pageSizeLimit:p,onPageSizeChange:e=>{const t=Number(e.target.value);u(t),E(0)},parentRoute:l,searchParams:y,sortParams:C,totalRecords:h.length,countData:b,filterComponent:"EKYC_INBOX_FILTER"})))},p=e=>{let{kNumber:o,kName:i,connectionDetails:s,isLoading:c}=e;const{t:d}=r.useTranslation(),m=l.useHistory(),{path:E}=l.useRouteMatch(),[p,u]=t.useState(!1),[C,g]=t.useState({code:"SELF",name:"EKYC_SELF"});return c?a.createElement(n.Loader,null):s?a.createElement(a.Fragment,null,a.createElement(n.Card,{className:"ekyc-create-card",style:{padding:"24px"}},a.createElement(n.CardHeader,null,d("EKYC_K_NUMBER_DETAILS")),a.createElement(n.StatusTable,null,a.createElement(n.Row,{label:d("EKYC_K_NUMBER"),text:o||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_K_NAME"),text:i||d("CS_NA")})),a.createElement(n.CardHeader,{style:{marginTop:"24px"}},d("EKYC_CONNECTION_DETAILS")),null!=s&&s.connectionDetailsInfo?a.createElement(n.StatusTable,null,a.createElement(n.Row,{label:d("EKYC_CONSUMER_NAME"),text:s.connectionDetailsInfo.consumerName||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_ADDRESS"),text:s.connectionDetailsInfo.address||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_CONNECTION_TYPE"),text:s.connectionDetailsInfo.connectionType||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_METER_NO"),text:s.connectionDetailsInfo.meterNumber||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_PHONE_NO"),text:s.connectionDetailsInfo.phoneNumber||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_EMAIL"),text:s.connectionDetailsInfo.email||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_STATUS"),text:s.connectionDetailsInfo.statusflag||d("CS_NA")})):a.createElement(n.CardLabel,null,d("EKYC_NO_CONNECTION_DETAILS_FOUND")),a.createElement("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"16px"}},a.createElement(n.SubmitBar,{label:d("EKYC_START_VERIFICATION"),onSubmit:()=>{u(!0)},style:{borderRadius:"12px",margin:0}}))),p&&a.createElement(n.Modal,{headerBarMain:d("EKYC_SELECT_VERIFICATION_TYPE"),headerBarEnd:a.createElement("span",{onClick:()=>u(!1),style:{cursor:"pointer",padding:"8px"}},"X"),actionSaveLabel:d("ES_COMMON_CONFIRM"),actionSaveOnSubmit:()=>{const e=E.includes("/create-kyc")?E.replace("/create-kyc",""):E.replace("/k-details","");m.push(e+"/aadhaar-verification",{kNumber:o,selectedOption:C,connectionDetails:s}),u(!1)},actionCancelLabel:d("ES_COMMON_CANCEL"),actionCancelOnSubmit:()=>u(!1),style:{borderRadius:"12px"}},a.createElement("div",{style:{padding:"24px"}},a.createElement(n.RadioButtons,{options:[{code:"SELF",name:"EKYC_SELF"},{code:"OTHER",name:"EKYC_OTHER"}],optionsKey:"name",selectedOption:C,onSelect:g,style:{display:"flex",flexDirection:"column",gap:"12px",buttonStyle:{borderRadius:"5px"}},t:d})))):null},u=()=>{const{t:e}=r.useTranslation(),[l,o]=t.useState(()=>{const e=sessionStorage.getItem("EKYC_CREATE_SEARCH_PARAMS");return e?JSON.parse(e):{kNumber:"",kName:""}}),[i,c]=t.useState(()=>"true"===sessionStorage.getItem("EKYC_CREATE_SEARCH_PERFORMED")),[d,m]=t.useState(null),E=Digit.ULBService.getCurrentTenantId(),{isLoading:u,data:C}=Digit.Hooks.ekyc.useGetConnection({tenantId:E,details:{kno:l.kNumber}},{enabled:i&&!!l.kNumber}),{mutate:g,isLoading:x}=Digit.Hooks.ekyc.useValidateUser(E,{onSuccess:t=>{var a;"successful"===(null==t||null===(a=t.responseInfo)||void 0===a?void 0:a.status)||(m({error:!0,label:(null==t?void 0:t.message)||e("EKYC_VALIDATION_FAILED")}),c(!1),sessionStorage.removeItem("EKYC_CREATE_SEARCH_PERFORMED"))},onError:t=>{var a,l,n,r;m({error:!0,label:(null==t||null===(a=t.response)||void 0===a||null===(l=a.data)||void 0===l||null===(n=l.Errors)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.message)||e("EKYC_VALIDATION_ERROR_PLEASE_ENTER_THE_CORRECT_CREDENTIALS")}),c(!1),sessionStorage.removeItem("EKYC_CREATE_SEARCH_PERFORMED")}});return a.createElement(s,{onSearch:t=>{if(!t.kNumber&&!t.kName)return o({kNumber:"",kName:""}),c(!1),sessionStorage.removeItem("EKYC_CREATE_SEARCH_PARAMS"),void sessionStorage.removeItem("EKYC_CREATE_SEARCH_PERFORMED");t.kNumber&&t.kName?(o(t),c(!0),sessionStorage.setItem("EKYC_CREATE_SEARCH_PARAMS",JSON.stringify(t)),sessionStorage.setItem("EKYC_CREATE_SEARCH_PERFORMED","true"),g({kno:t.kNumber,name:t.kName})):m({error:!0,label:e("EKYC_FILL_ALL_FIELDS")})},searchParams:l},i&&a.createElement(p,{kNumber:l.kNumber,kName:l.kName,connectionDetails:C,isLoading:u||x}),!i&&!u&&a.createElement(n.Card,{style:{textAlign:"center",padding:"40px"}},a.createElement("div",{style:{color:"#667085"}},e("EKYC_SEARCH_TO_VIEW_DETAILS"))),d&&a.createElement(n.Toast,{error:d.error,label:d.label,onClose:()=>{m(null)},isDsc:!0}))};"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));const C=e=>{let{isSection:o=!1,onComplete:i,parentState:s}=e;const{t:c}=r.useTranslation(),d=l.useHistory(),m=l.useLocation(),E=s||m.state||{kNumber:"EKYC-1234567890",selectedOption:{code:"SELF",name:"EKYC_SELF"},connectionDetails:null},[p,u]=t.useState({code:"AADHAAR",name:"EKYC_AADHAAR_ADDRESS"}),[C,g]=t.useState({code:"NO",name:"CORE_COMMON_NO"}),[x,y]=t.useState(""),[f,h]=t.useState(""),[b,S]=t.useState(""),[v,_]=t.useState(""),[N,A]=t.useState(""),[R,T]=t.useState(null),[D,I]=t.useState(!1),F=t.useRef(null),Y=[{code:"AADHAAR",name:"EKYC_AADHAAR_ADDRESS"},{code:"OLD",name:"EKYC_OLD_ADDRESS"}],k=[{code:"YES",name:"CORE_COMMON_YES"},{code:"NO",name:"CORE_COMMON_NO"}],O=()=>{if(i)i({addressType:p,fullAddress:x,flatNo:f,building:b,landmark:v,pincode:N,doorPhoto:R});else{const{kNumber:e,selectedOption:t,connectionDetails:a}=E;d.push("/digit-ui/employee/ekyc/property-info",{kNumber:e,selectedOption:t,connectionDetails:a,addressDetails:{addressType:p,fullAddress:x,flatNo:f,building:b,landmark:v,pincode:N,doorPhoto:R}})}},H=e=>{const t=e.target.files[0];if(t){const e=new FileReader;e.onloadend=()=>{T(e.result)},e.readAsDataURL(t)}},L=()=>{F.current.click()},K=()=>{"geolocation"in navigator?(I(!0),navigator.geolocation.getCurrentPosition(function(e){try{const{latitude:t,longitude:a}=e.coords;return Promise.resolve(function(e,l){try{var n=function(e,l){try{var n=Promise.resolve(fetch(`https://nominatim.openstreetmap.org/reverse?format=json&lat=${t}&lon=${a}&zoom=18&addressdetails=1`)).then(function(e){if(!e.ok)throw new Error("Failed to fetch address");return Promise.resolve(e.json()).then(function(e){if(e&&e.address){var t,a,l,n,r,o,i,s,c,d,m;const E=[null===(t=e.address)||void 0===t?void 0:t.amenity,null===(a=e.address)||void 0===a?void 0:a.road,null===(l=e.address)||void 0===l?void 0:l.neighbourhood,null===(n=e.address)||void 0===n?void 0:n.suburb,null===(r=e.address)||void 0===r?void 0:r.city,null===(o=e.address)||void 0===o?void 0:o.state,null===(i=e.address)||void 0===i?void 0:i.postcode].filter(Boolean).join(", ");y(E||""),A((null===(s=e.address)||void 0===s?void 0:s.postcode)||""),_((null===(c=e.address)||void 0===c?void 0:c.suburb)||(null===(d=e.address)||void 0===d?void 0:d.neighbourhood)||""),h((null===(m=e.address)||void 0===m?void 0:m.amenity)||"")}})})}catch(e){return l(e)}return n&&n.then?n.then(void 0,l):n}(0,function(e){console.error("Error reverse geocoding:",e)})}catch(e){return l(!0,e)}return n&&n.then?n.then(l.bind(null,!1),l.bind(null,!0)):l(!1,n)}(0,function(e,t){if(I(!1),e)throw t;return t}))}catch(e){return Promise.reject(e)}},e=>{console.error("Error getting location:",e),I(!1),alert(c("LOCATION_FETCH_FAILED")||"Failed to fetch your current location. Please ensure location permissions are granted.")},{enableHighAccuracy:!0,timeout:1e4,maximumAge:0})):alert(c("GEOLOCATION_NOT_SUPPORTED")||"Geolocation is not supported by your browser")},P=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M14.4 6L13.6 4H5V21H7V14H12.6L13.4 16H20V6H14.4Z",fill:"#00703C"})),M=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M2 7V17C2 18.1 2.9 19 4 19H20C21.1 19 22 18.1 22 17V7C22 5.9 21.1 5 20 5H4C2.9 5 2 5.9 2 7ZM12 11H14V13H12V11ZM12 7H14V9H12V7ZM16 11H20V13H16V11ZM16 7H20V9H16V7ZM4 7H10V15H4V7ZM20 17H4V16H20V17Z",fill:"#3D51B0"})),w=()=>a.createElement("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M9 2L7.17 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6C22 4.9 21.1 4 20 4H16.83L15 2H9ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17ZM12 9C10.34 9 9 10.34 9 12C9 13.66 10.34 15 12 15C13.66 15 15 13.66 15 12C15 10.34 13.66 9 12 9Z",fill:"#0068faff"})),B=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M12 8C9.79 8 8 9.79 8 12C8 14.21 9.79 16 12 16C14.21 16 16 14.21 16 12C16 9.79 14.21 8 12 8ZM20.94 11C20.48 6.83 17.17 3.52 13 3.06V1H11V3.06C6.83 3.52 3.52 6.83 3.06 11H1V13H3.06C3.52 17.17 6.83 20.48 11 20.94V23H13V20.94C17.17 20.48 20.48 17.17 20.94 13H23V11H20.94ZM12 19C8.13 19 5 15.87 5 12C5 8.13 8.13 5 12 5C15.87 5 19 8.13 19 12C19 15.87 15.87 19 12 19Z",fill:"#0068faff"})),V=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M13 13V11H15V13H13ZM13 9V7H15V9H13ZM17 13V11H19V13H17ZM17 9V7H19V9H17ZM11 13V11H9V13H11ZM11 9V7H9V9H11ZM7 13V11H5V13H7ZM7 9V7H5V9H7ZM21 3H3C1.9 3 1 3.9 1 5V19C1 20.1 1.9 21 3 21H21C22.1 21 23 20.1 23 19V5C23 3.9 22.1 3 21 3ZM21 19H3V5H21V19Z",fill:"#0068faff"})),z=()=>a.createElement("div",{style:{animation:"fadeSlideIn 0.3s ease"}},o&&a.createElement("hr",{style:{margin:"40px 0",border:"0",borderTop:"2px solid #EAECF0"}}),a.createElement(n.Header,{style:{marginBottom:"24px"}},c("EKYC_ADDRESS_DETAILS_HEADER")||"Address Details"),a.createElement("div",{style:{marginBottom:"32px"}},a.createElement(n.RadioButtons,{options:Y,optionsKey:"name",selectedOption:p,onSelect:u,t:c,innerStyles:{display:"flex",alignItems:"center"},style:{display:"flex",gap:"50px",justifyContent:"flex-start"}})),"AADHAAR"===p.code&&a.createElement("div",{style:{backgroundColor:"#F9FAFB",padding:"16px",borderRadius:"12px",marginBottom:"24px",border:"1px solid #EAECF0",display:"flex",alignItems:"flex-start",gap:"12px",animation:"fadeSlideIn 0.3s ease"}},a.createElement("div",{style:{backgroundColor:"#E7F4EE",padding:"8px",borderRadius:"8px"}},a.createElement(n.LocationIcon,{className:"icon",styles:{fill:"#00703C",width:"20px",height:"20px"}})),a.createElement("div",{style:{fontSize:"16px",lineHeight:"1.6",color:"#344054",fontWeight:"500"}},"H.No. 123, Sector 15, Rohini",a.createElement("br",null),"Delhi - 110085")),"OLD"===p.code&&a.createElement("div",{style:{animation:"fadeSlideIn 0.3s ease"}},a.createElement("div",{style:{marginBottom:"24px"}},a.createElement(n.CardLabel,{style:{marginBottom:"12px",fontWeight:"600",color:"#344054"}},c("EKYC_ADDRESS_CORRECTION_PROMPT")||"Do you want to correct the address?"),a.createElement(n.RadioButtons,{options:k,optionsKey:"name",selectedOption:C,onSelect:g,t:c,innerStyles:{display:"flex",alignItems:"center"},style:{display:"flex",gap:"50px",justifyContent:"flex-start"}})),a.createElement("div",{style:{border:"1px solid #D0D5DD",borderRadius:"12px",padding:"14px 16px",display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"24px",cursor:D?"not-allowed":"pointer",backgroundColor:D?"#F2F4F7":"#FFFFFF",transition:"all 0.2s ease",opacity:D?.7:1,boxShadow:"0px 1px 2px rgba(16, 24, 40, 0.05)"},onClick:D?void 0:K,onMouseOver:e=>D?null:e.currentTarget.style.backgroundColor="#F9FAFB",onMouseOut:e=>D?null:e.currentTarget.style.backgroundColor="#FFFFFF"},a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"12px"}},a.createElement("div",{style:{backgroundColor:"#EEF4FF",padding:"8px",borderRadius:"8px"}},D?a.createElement("div",{className:"location-loader",style:{width:"20px",height:"20px",border:"2px solid #0068faff",borderTopColor:"transparent",borderRadius:"50%",animation:"spin 1s linear infinite"}}):a.createElement(B,null)),a.createElement("span",{style:{fontWeight:"600",color:"#344054"}},D?c("EKYC_FETCHING_LOCATION")||"Fetching Location...":c("EKYC_USE_CURRENT_LOCATION")||"Use Current Location")),!D&&a.createElement("span",{style:{fontSize:"20px",color:"#98A2B3"}},"›")),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_FULL_ADDRESS")||"Full Address"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"16px",zIndex:1,opacity:.6}},a.createElement(n.PropertyHouse,{styles:{fill:"#0068faff",width:"20px",height:"20px"}})),a.createElement(n.TextInput,{value:x,onChange:e=>y(e.target.value),placeholder:c("EKYC_ENTER_FULL_ADDRESS")||"Enter Full Address",textInputStyle:{paddingLeft:"40px",minHeight:"80px"}}))),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"24px"}},a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_FLAT_HOUSE_NUMBER")||"Flat/House Number"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(n.PropertyHouse,{styles:{fill:"#0068faff",width:"20px",height:"20px"}})),a.createElement(n.TextInput,{value:f,onChange:e=>h(e.target.value),placeholder:c("EKYC_ENTER_FLAT_NO")||"e.g. 45-B",textInputStyle:{paddingLeft:"40px"}}))),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_BUILDING_TOWER")||"Building/Tower"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(n.PropertyHouse,{styles:{fill:"#0068faff",width:"20px",height:"20px"}})),a.createElement(n.TextInput,{value:b,onChange:e=>S(e.target.value),placeholder:c("EKYC_ENTER_BUILDING")||"e.g. Tower 4",textInputStyle:{paddingLeft:"40px"}})))),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_LANDMARK")||"Landmark"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(n.LocationIcon,{className:"icon",styles:{fill:"#0068faff",width:"20px",height:"20px"}})),a.createElement(n.TextInput,{value:v,onChange:e=>_(e.target.value),placeholder:c("EKYC_ENTER_LANDMARK")||"Near Central Park",textInputStyle:{paddingLeft:"40px"}}))),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_PINCODE")||"Pincode"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(V,null)),a.createElement(n.TextInput,{value:N,onChange:e=>A(e.target.value),placeholder:c("EKYC_ENTER_PINCODE")||"6-digit pincode",textInputStyle:{paddingLeft:"40px"},maxLength:6})))),a.createElement("hr",{style:{margin:"32px 0",border:"0",borderTop:"1px solid #EAECF0"}}),a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px",marginBottom:"20px"}},a.createElement("div",{style:{backgroundColor:"#EEF4FF",padding:"8px",borderRadius:"8px"}},a.createElement(n.PropertyHouse,{styles:{fill:"#0068faff",width:"24px",height:"24px"}})),a.createElement(n.CardHeader,{style:{margin:0,fontSize:"20px"}},c("EKYC_ADMINISTRATIVE_DIVISION")||"Administrative Division")),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"24px",marginBottom:"32px"}},a.createElement("div",{style:{backgroundColor:"#F9FAFB",padding:"16px",borderRadius:"12px",display:"flex",alignItems:"center",gap:"16px",border:"1px solid #EAECF0"}},a.createElement("div",{style:{backgroundColor:"#E7F4EE",padding:"10px",borderRadius:"10px",display:"flex"}},a.createElement(P,null)),a.createElement("div",null,a.createElement("div",{style:{color:"#00703C",fontSize:"12px",fontWeight:"700",textTransform:"uppercase",letterSpacing:"0.5px"}},c("EKYC_ASSEMBLY")||"ASSEMBLY"),a.createElement("div",{style:{fontSize:"15px",fontWeight:"700",color:"#101828",marginTop:"2px"}},"AC-12 Chandni Chowk"))),a.createElement("div",{style:{backgroundColor:"#F9FAFB",padding:"16px",borderRadius:"12px",display:"flex",alignItems:"center",gap:"16px",border:"1px solid #EAECF0"}},a.createElement("div",{style:{backgroundColor:"#EEF4FF",padding:"10px",borderRadius:"10px",display:"flex"}},a.createElement(M,null)),a.createElement("div",null,a.createElement("div",{style:{color:"#0068faff",fontSize:"12px",fontWeight:"700",textTransform:"uppercase",letterSpacing:"0.5px"}},c("EKYC_WARD")||"WARD"),a.createElement("div",{style:{fontSize:"15px",fontWeight:"700",color:"#101828",marginTop:"2px"}},"WARD-45 Civil Lines")))),a.createElement(n.CardHeader,{style:{fontSize:"18px",color:"#101828",marginBottom:"4px"}},c("EKYC_DOOR_PHOTO_HEADER")||"Door Photo with GPS Stamp"),a.createElement("div",{style:{color:"#667085",fontSize:"14px",marginBottom:"16px"}},c("EKYC_REQUIRED_FOR_VERIFICATION")||"Required for verification"),a.createElement("div",{style:{backgroundColor:"#FFFAEB",padding:"14px",borderRadius:"12px",display:"flex",alignItems:"center",gap:"12px",marginBottom:"20px",border:"1px solid #FEDF89"}},a.createElement(n.InfoBannerIcon,{fill:"#B54708"}),a.createElement("div",null,a.createElement("div",{style:{fontWeight:"700",color:"#B54708",fontSize:"14px"}},c("EKYC_IMPORTANT")||"Important"),a.createElement("div",{style:{fontSize:"13px",color:"#B54708",marginTop:"2px"}},c("EKYC_CAPTURE_LIVE_CAMERA")||"Capture with live camera for GPS metadata"))),a.createElement("div",{style:{border:"2px dashed #D0D5DD",borderRadius:"16px",padding:R?"12px":"40px 24px",textAlign:"center",cursor:"pointer",position:"relative",overflow:"hidden",minHeight:"180px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"#F9FAFB",transition:"all 0.2s ease",boxShadow:"inset 0px 2px 4px rgba(0, 0, 0, 0.02)"},onClick:R?void 0:L,onMouseOver:e=>R?null:e.currentTarget.style.borderColor="#0068faff",onMouseOut:e=>R?null:e.currentTarget.style.borderColor="#D0D5DD"},a.createElement("input",{type:"file",ref:F,onChange:H,accept:"image/*",style:{display:"none"}}),R?a.createElement("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",justifyContent:"center"}},a.createElement("img",{src:R,alt:"Door",style:{width:"100%",maxHeight:"300px",objectFit:"cover",borderRadius:"12px",display:"block"}}),a.createElement("div",{style:{position:"absolute",top:"12px",right:"12px"}},a.createElement("button",{onClick:e=>{e.stopPropagation(),T(null),F.current&&(F.current.value="")},style:{background:"#FFFFFF",border:"1px solid #EAECF0",borderRadius:"8px",padding:"8px",display:"flex",boxShadow:"0px 1px 2px rgba(16, 24, 40, 0.05)",cursor:"pointer"}},a.createElement(n.RemoveableTag,{text:"",onClick:()=>{},extraStyles:{tagStyles:{margin:0,padding:0}}})))):a.createElement(t.Fragment,null,a.createElement("div",{style:{backgroundColor:"#FFFFFF",width:"64px",height:"64px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 16px",boxShadow:"0px 1px 3px rgba(16, 24, 40, 0.1)"}},a.createElement(w,null)),a.createElement("div",{style:{fontWeight:"700",fontSize:"16px",marginBottom:"4px",color:"#101828"}},c("EKYC_TAP_TO_CAPTURE")||"Tap to Capture"),a.createElement("div",{style:{color:"#667085",fontSize:"14px"}},c("EKYC_CAPTURE_DOOR_IMAGE")||"Capture Door Image"))),a.createElement(n.ActionBar,null,a.createElement(n.SubmitBar,{label:o?c("EKYC_COMPLETE_VERIFICATION_AND_PROCEED")||"Complete & Proceed":c("EKYC_COMPLETE_VERIFICATION")||"Complete Verification",onSubmit:O})));return o?z():a.createElement("div",{className:"inbox-container"},a.createElement("style",null,"\n @keyframes spin { to { transform: rotate(360deg); } }\n @keyframes fadeSlideIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }\n "),a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},a.createElement("div",{className:"icon-container",style:{color:"#0068faff",marginRight:"12px"}},a.createElement(n.HomeIcon,{style:{width:"24px",height:"24px"}})),a.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},c("EKYC_PROCESS"))),a.createElement("div",{style:{backgroundColor:"#FFFFFF",padding:"16px",borderRadius:"8px",border:"1px solid #EAECF0",boxShadow:"0 2px 4px rgba(0,0,0,0.02)"}},a.createElement(n.ConnectingCheckPoints,null,a.createElement(n.CheckPoint,{label:c("EKYC_STEP_AADHAAR")||"Aadhaar",isCompleted:!0}),a.createElement(n.CheckPoint,{label:c("EKYC_STEP_ADDRESS")||"Address",isCompleted:!0}),a.createElement(n.CheckPoint,{label:c("EKYC_STEP_PROPERTY")||"Property",isCompleted:!1}),a.createElement(n.CheckPoint,{label:c("EKYC_STEP_REVIEW")||"Review"})))),a.createElement("div",{style:{flex:1,marginLeft:"16px"}},a.createElement(n.Card,null,a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"}},a.createElement(n.Header,null,c("EKYC_ADDRESS_DETAILS_HEADER")||"Address Details"),a.createElement("div",{style:{fontSize:"14px",fontWeight:"700",color:"#505A5F"}},c("EKYC_K_NUMBER"),": ",a.createElement("span",{style:{color:"#0B0C0C"}},null==E?void 0:E.kNumber))),z())))},g=e=>{let{size:t=22,color:l="#6366f1"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12.01 3c-1.98 0-3.86.47-5.57 1.41-.24.13-.54.04-.67-.2-.13-.24-.04-.55.2-.68C7.82 2.52 9.86 2 12.01 2c2.13 0 3.96.46 5.57 1.41.24.13.33.43.2.67-.09.13-.24.39-.39.39zM12 21c-.28 0-.5-.22-.5-.5v-4.42c-2.33-.21-4.44-1.35-5.94-3.21-1.5-1.86-2.22-4.18-2.02-6.52.05-.59.55-1.03 1.14-.98s1.03.55.98 1.14c-.15 1.76.39 3.51 1.52 4.91 1.12 1.4 2.7 2.26 4.45 2.42.21.02.37.19.37.4v6.26c0 .28-.22.5-.5.5z",fill:l}),a.createElement("path",{d:"M12 11c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z",fill:l}))},x=e=>{let{size:t=16,color:l="#64748b"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2",stroke:l,strokeWidth:"2",strokeLinecap:"round"}),a.createElement("circle",{cx:"12",cy:"7",r:"4",stroke:l,strokeWidth:"2"}))},y=e=>{let{size:t=16,color:l="#64748b"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07A19.5 19.5 0 013.07 10.6 19.79 19.79 0 0 0 3 1.82C3 .72 3.72 0 4.82 0h3a2 2 0 012 1.72c.127.96.361 1.903.7 2.81a2 2 0 01-.45 2.11L8.91 7.91a16 16 0 006.16 6.16l1.27-1.27a2 2 0 012.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0122 16.92z",stroke:l,strokeWidth:"2",strokeLinecap:"round"}))},f=e=>{let{size:t=16}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347z",fill:"#25D366"}),a.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12c0 1.89.525 3.66 1.438 5.168L2 22l4.832-1.438A9.96 9.96 0 0012 22c5.523 0 10-4.477 10-10S17.523 2 12 2z",stroke:"#25D366",strokeWidth:"2",strokeLinecap:"round"}))},h=e=>{let{size:t=16,color:l="#64748b"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z",stroke:l,strokeWidth:"2",strokeLinecap:"round"}),a.createElement("path",{d:"M22 6l-10 7L2 6",stroke:l,strokeWidth:"2",strokeLinecap:"round"}))},b=e=>{let{size:t=16,color:l="#64748b"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2",stroke:l,strokeWidth:"2",strokeLinecap:"round"}),a.createElement("circle",{cx:"9",cy:"7",r:"4",stroke:l,strokeWidth:"2"}),a.createElement("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87",stroke:l,strokeWidth:"2",strokeLinecap:"round"}),a.createElement("path",{d:"M16 3.13a4 4 0 0 1 0 7.75",stroke:l,strokeWidth:"2",strokeLinecap:"round"}))},S=()=>{var e,o,i,s;const{t:c}=r.useTranslation(),d=l.useLocation(),m=l.useHistory(),E=t.useRef(null),{kNumber:p,selectedOption:u,connectionDetails:S}=d.state||{kNumber:"EKYC-1234567890",selectedOption:{code:"SELF",name:"EKYC_SELF"},connectionDetails:{connectionDetailsInfo:{consumerName:"Rajesh Kumar Singh",address:"House No. 45, Sector 12, New Delhi - 110001",phoneNumber:"9876543210",email:"rajesh.singh@example.com"}}},[v,_]=t.useState(""),[N,A]=t.useState(!1),[R,T]=t.useState(!1),[D,I]=t.useState({code:"NO",name:"CORE_COMMON_NO"}),[F,Y]=t.useState((null==S||null===(e=S.connectionDetailsInfo)||void 0===e?void 0:e.consumerName)||""),[k,O]=t.useState({code:"NO",name:"CORE_COMMON_NO"}),[H,L]=t.useState((null==S||null===(o=S.connectionDetailsInfo)||void 0===o?void 0:o.phoneNumber)||""),[K,P]=t.useState((null==S||null===(i=S.connectionDetailsInfo)||void 0===i?void 0:i.phoneNumber)||""),[M,w]=t.useState((null==S||null===(s=S.connectionDetailsInfo)||void 0===s?void 0:s.email)||""),[B,V]=t.useState(""),[z,W]=t.useState(!1),[U,Z]=t.useState(null),X=[{code:"YES",name:"CORE_COMMON_YES"},{code:"NO",name:"CORE_COMMON_NO"}];return a.createElement("div",{className:"inbox-container"},a.createElement("style",null,"\n @keyframes spin { to { transform: rotate(360deg); } }\n @keyframes fadeSlideIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }\n @keyframes pulseGreen { 0%,100% { box-shadow:0 0 0 0 rgba(22,163,74,0.4); } 50% { box-shadow:0 0 0 8px rgba(22,163,74,0); } }\n "),a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},a.createElement("div",{className:"icon-container",style:{color:"#0068faff",marginRight:"12px"}},a.createElement(n.HomeIcon,{style:{width:"24px",height:"24px"}})),a.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},c("EKYC_PROCESS"))),a.createElement("div",{style:{backgroundColor:"#FFFFFF",padding:"16px",borderRadius:"8px",border:"1px solid #EAECF0",boxShadow:"0 2px 4px rgba(0,0,0,0.02)"}},a.createElement(n.ConnectingCheckPoints,null,a.createElement(n.CheckPoint,{label:c("EKYC_STEP_AADHAAR")||"Aadhaar",isCompleted:z}),a.createElement(n.CheckPoint,{label:c("EKYC_STEP_ADDRESS")||"Address",isCompleted:null!==U}),a.createElement(n.CheckPoint,{label:c("EKYC_STEP_PROPERTY")||"Property",isCompleted:!1}),a.createElement(n.CheckPoint,{label:c("EKYC_STEP_REVIEW")||"Review"})))),a.createElement("div",{style:{flex:1,marginLeft:"16px"}},a.createElement(n.Card,null,a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"}},a.createElement(n.Header,null,c("EKYC_AADHAAR_VERIFICATION_HEADER")||"Aadhaar Verification"),a.createElement("div",{style:{fontSize:"14px",fontWeight:"700",color:"#505A5F"}},c("EKYC_K_NUMBER"),": ",a.createElement("span",{style:{color:"#0B0C0C"}},p))),a.createElement(n.CardHeader,{style:{fontSize:"20px",marginBottom:"16px"}},c("EKYC_AADHAAR_NUMBER_HEADER")||"Aadhaar Number"),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_LAST_4_DIGIT_AADHAAR")||"Last 4-digit Aadhaar Number"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(g,{size:20})),a.createElement(n.TextInput,{value:v,onChange:e=>{const t=e.target.value;t.length<=4&&/^\d*$/.test(t)&&_(t)},placeholder:c("EKYC_ENTER_LAST_4_DIGIT")||"Enter last 4 digits",textInputStyle:{paddingLeft:"40px"},maxLength:4}),N&&a.createElement("div",{style:{position:"absolute",right:"12px",top:"50%",transform:"translateY(-50%)"}},a.createElement(n.TickMark,{fillColor:"#00703C"})))),!N&&a.createElement(n.SubmitBar,{label:R?c("EKYC_VERIFYING")||"Verifying...":c("EKYC_VERIFY_AADHAAR_BTN")||"Verify Aadhaar",onSubmit:()=>{4===v.length&&(T(!0),setTimeout(()=>{T(!1),A(!0)},1200))},disabled:4!==v.length||R,style:{marginTop:"16px",opacity:4!==v.length?.6:1}}),N&&a.createElement("div",{style:{backgroundColor:"#E7F4EE",padding:"20px",borderRadius:"8px",marginTop:"24px",marginBottom:"24px",border:"1px solid #D1E9DB",animation:"fadeSlideIn 0.4s ease"}},a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px",marginBottom:"16px"}},a.createElement("div",{style:{backgroundColor:"#D1E9DB",padding:"4px",borderRadius:"50%",display:"flex",animation:"pulseGreen 2s ease infinite"}},a.createElement(n.TickMark,{fillColor:"#00703C"})),a.createElement("span",{style:{fontWeight:"700",color:"#00703C",fontSize:"18px"}},c("EKYC_AADHAAR_VERIFIED_SUCCESS")||"Aadhaar Verified Successfully")),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"16px"}},a.createElement("div",{style:{display:"flex",flexDirection:"column"}},a.createElement("span",{style:{color:"#667085",fontSize:"12px",fontWeight:"700",textTransform:"uppercase"}},c("EKYC_NAME")),a.createElement("span",{style:{fontWeight:"700",fontSize:"16px",color:"#101828"}},"Rajesh Kumar Singh")),a.createElement("div",{style:{display:"flex",flexDirection:"column"}},a.createElement("span",{style:{color:"#667085",fontSize:"12px",fontWeight:"700",textTransform:"uppercase"}},c("EKYC_AADHAAR")),a.createElement("span",{style:{fontWeight:"700",fontSize:"16px",color:"#101828"}},"XXXX XXXX ",v)),a.createElement("div",{style:{display:"flex",flexDirection:"column",gridColumn:"span 2"}},a.createElement("span",{style:{color:"#667085",fontSize:"12px",fontWeight:"700",textTransform:"uppercase"}},c("EKYC_ADDRESS")),a.createElement("span",{style:{fontWeight:"500",fontSize:"15px",color:"#344054"}},"House No. 45, Sector 12, New Delhi - 110001")))),a.createElement("hr",{style:{margin:"32px 0",border:"0",borderTop:"1px solid #EAECF0"}}),a.createElement(n.CardHeader,{style:{fontSize:"20px",marginBottom:"16px"}},c("EKYC_CONTACT_DETAILS_HEADER")||"Contact Details"),a.createElement(n.LabelFieldPair,{style:{animation:"fadeSlideIn 0.3s ease"}},a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"20px"}},a.createElement(n.CardLabel,{style:{fontWeight:"600",marginBottom:"0"}},c("EKYC_USER_NAME")||"Corrected Name"),a.createElement(n.RadioButtons,{options:X,optionsKey:"name",selectedOption:D,onSelect:I,t:c,innerStyles:{display:"flex",gap:"24px"},style:{display:"flex",gap:"50px",marginBottom:"0"}})),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:"YES"===D.code?.6:.3}},a.createElement(x,{size:18,color:"YES"===D.code?"#64748b":"#94a3b8"})),a.createElement(n.TextInput,{value:F,onChange:e=>Y(e.target.value),placeholder:c("EKYC_ENTER_NAME_PLACEHOLDER")||"Enter full name",textInputStyle:{paddingLeft:"40px"},disabled:"YES"!==D.code}))),a.createElement(n.LabelFieldPair,null,a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"20px",padding:"10px"}},a.createElement(n.CardLabel,{style:{fontWeight:"600",marginBottom:"0"}},c("EKYC_USER_MOBILE_NUMBER")||"User Mobile Number"),a.createElement(n.RadioButtons,{options:X,optionsKey:"name",selectedOption:k,onSelect:O,t:c,innerStyles:{display:"flex",gap:"24px"},style:{display:"flex",gap:"50px",marginBottom:"0"}})),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:"YES"===k.code?.6:.3}},a.createElement(y,{size:18,color:"YES"===k.code?"#64748b":"#94a3b8"})),a.createElement(n.TextInput,{value:H,onChange:e=>L(e.target.value),placeholder:"+91 XXXXX XXXXX",textInputStyle:{paddingLeft:"40px"},disabled:"YES"!==k.code}))),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"24px",marginTop:"24px"}},a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_WHATSAPP_NUMBER")||"WhatsApp Number"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(f,{size:18})),a.createElement(n.TextInput,{value:K,onChange:e=>P(e.target.value),placeholder:"+91 XXXXX XXXXX",textInputStyle:{paddingLeft:"40px"}}))),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_EMAIL_ADDRESS")||"Email Address"," ",a.createElement("span",{style:{fontWeight:"400",color:"#667085"}},"(",c("EKYC_OPTIONAL")||"Optional",")")),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(h,{size:18})),a.createElement(n.TextInput,{value:M,onChange:e=>w(e.target.value),placeholder:c("EKYC_EMAIL_ADDRESS_PLACEHOLDER")||"example@email.com",textInputStyle:{paddingLeft:"40px"}})))),a.createElement("hr",{style:{margin:"32px 0",border:"0",borderTop:"1px solid #EAECF0"}}),a.createElement(n.CardHeader,{style:{fontSize:"20px",marginBottom:"16px"}},c("EKYC_FAMILY_DETAILS_HEADER")||"Family Details"),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_NO_OF_PERSONS")||"Number of Family Members"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(b,{size:18})),a.createElement(n.TextInput,{value:B,onChange:e=>{/^\d*$/.test(e.target.value)&&V(e.target.value)},placeholder:c("EKYC_ENTER_NO_OF_PERSONS")||"Enter total number of persons",textInputStyle:{paddingLeft:"40px"}}))),!z&&a.createElement(n.ActionBar,null,a.createElement(n.SubmitBar,{label:c("ES_COMMON_SAVE_CONTINUE")||"Save & Continue",onSubmit:()=>{W(!0),setTimeout(()=>{var e;null===(e=E.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"})},100)}})),z&&a.createElement("div",{ref:E},a.createElement(C,{isSection:!0,onComplete:e=>{Z(e),m.push("/digit-ui/employee/ekyc/property-info",{kNumber:p,selectedOption:u,connectionDetails:S,aadhaarDetails:{aadhaarLastFour:v,isAadhaarVerified:N,userName:F,mobileNumber:H,whatsappNumber:K,email:M,noOfPersons:B},addressDetails:e})},parentState:{kNumber:p,selectedOption:u,connectionDetails:S}})),a.createElement("div",{style:{textAlign:"center",marginTop:"24px"}},a.createElement("p",{style:{fontSize:"12px",color:"#667085",display:"flex",alignItems:"center",justifyContent:"center",gap:"4px"}},a.createElement("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"}),a.createElement("path",{d:"M12 11V17M12 7H12.01",strokeLinecap:"round"})),c("EKYC_SECURE_DATA_NOTICE")||"Your data is encrypted and secure")))))},v=()=>{var e,o,i,s,c,d,m,E;const{t:p}=r.useTranslation(),u=l.useHistory(),C=l.useLocation(),{kNumber:g}=C.state||{kNumber:"EKYC-1234567890"},x=Digit.ULBService.getCurrentTenantId(),{data:y}=Digit.Hooks.ekyc.useGetPropertyType(x),{data:f}=Digit.Hooks.ekyc.useGetConnectionTypeV2(x),{data:h}=Digit.Hooks.ekyc.useGetUserType(x),{data:b}=Digit.Hooks.ekyc.useGetFloorCount(x),[S,v]=t.useState("OWNER"),[_,N]=t.useState(""),[A,R]=t.useState(null),[T,D]=t.useState(null),[I,F]=t.useState(null),[Y,k]=t.useState(null),[O,H]=t.useState(null),[L,K]=t.useState(null),P=t.useRef(null),M=t.useRef(null),w=()=>a.createElement("div",{style:{backgroundColor:"#E8EAF6",padding:"8px",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center"}},a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M20 6H16V4C16 2.89 15.11 2 14 2H10C8.89 2 8 2.89 8 4V6H4C2.89 6 2 6.89 2 8V19C2 20.11 2.89 21 4 21H20C21.11 21 22 20.11 22 19V8C22 6.89 21.11 6 20 6ZM10 4H14V6H10V4ZM20 19H4V8H20V19ZM13 13V10H11V13H8L12 17L16 13H13Z",fill:"#3D51B0"}))),B=()=>a.createElement("div",{style:{backgroundColor:"#E8EAF6",padding:"8px",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center"}},a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M12 7V3H2V21H22V7H12ZM6 19H4V17H6V19ZM6 15H4V13H6V15ZM6 11H4V9H6V11ZM6 7H4V5H6V7ZM10 19H8V17H10V19ZM10 15H8V13H10V15ZM10 11H8V9H10V11ZM10 7H8V5H10V7ZM20 19H12V9H20V19ZM18 11H14V13H18V11ZM18 15H14V17H18V15Z",fill:"#3D51B0"}))),V=()=>a.createElement("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M14 2H6C4.9 2 4 2.9 4 4V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V8L14 2ZM13 9V3.5L18.5 9H13Z",fill:"#1976D2"}),a.createElement("path",{d:"M11 14H13V18H11V14ZM11 12H13V13H11V12Z",fill:"white"}),a.createElement("path",{d:"M8 16H9V17H8V16Z",fill:"white"}),a.createElement("path",{d:"M15 16H16V17H15V16Z",fill:"white"}),a.createElement("path",{d:"M12 15.5L14 13.5H10L12 15.5Z",fill:"white"}),a.createElement("path",{d:"M12 18V14M12 14L10 16M12 14L14 16",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),z=()=>a.createElement("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M9 2L7.17 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6C22 4.9 21.1 4 20 4H16.83L15 2H9ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17ZM12 9C10.34 9 9 10.34 9 12C9 13.66 10.34 15 12 15C13.66 15 15 13.66 15 12C15 10.34 13.66 9 12 9Z",fill:"#3D51B0"}));return a.createElement("div",{className:"inbox-container"},a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},a.createElement("div",{className:"icon-container",style:{color:"#0068faff",marginRight:"12px"}},a.createElement(n.HomeIcon,{style:{width:"24px",height:"24px"}})),a.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},p("EKYC_PROCESS"))),a.createElement("div",{style:{backgroundColor:"#FFFFFF",padding:"16px",borderRadius:"8px",border:"1px solid #EAECF0",boxShadow:"0 2px 4px rgba(0,0,0,0.02)"}},a.createElement(n.ConnectingCheckPoints,null,a.createElement(n.CheckPoint,{label:p("EKYC_STEP_AADHAAR")||"Aadhaar",isCompleted:!0}),a.createElement(n.CheckPoint,{label:p("EKYC_STEP_ADDRESS")||"Address",isCompleted:!0}),a.createElement(n.CheckPoint,{label:p("EKYC_STEP_PROPERTY")||"Property",isCompleted:!1}),a.createElement(n.CheckPoint,{label:p("EKYC_STEP_REVIEW")||"Review"})))),a.createElement("div",{style:{flex:1,marginLeft:"16px"}},a.createElement(n.Card,null,a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"}},a.createElement(n.Header,null,p("Property Details")),a.createElement("div",{style:{fontSize:"14px",fontWeight:"700",color:"#505A5F"}},p("EKYC_K_NUMBER"),": ",a.createElement("span",{style:{color:"#0B0C0C"}},g))),a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"}},a.createElement(w,null),a.createElement("span",{style:{fontSize:"20px",fontWeight:"700",color:"#101828"}},p("Property Details"))),a.createElement(n.Card,{style:{padding:"20px",borderRadius:"16px",border:"1px solid #EAECF0",marginBottom:"24px"}},a.createElement("div",{style:{marginBottom:"24px"}},a.createElement(n.CardLabel,{style:{fontSize:"14px",fontWeight:"600",color:"#667085",marginBottom:"12px"}},p("Property_Owner")),a.createElement("div",{style:{display:"flex",backgroundColor:"#F2F4F7",padding:"4px",borderRadius:"12px"}},a.createElement("button",{onClick:()=>v("OWNER"),style:{flex:1,padding:"10px",borderRadius:"10px",border:"none",backgroundColor:"OWNER"===S?"#3D51B0":"transparent",color:"OWNER"===S?"#FFFFFF":"#667085",fontWeight:"600",cursor:"pointer",transition:"all 0.2s"}},p("Owner")),a.createElement("button",{onClick:()=>v("TENANT"),style:{flex:1,padding:"10px",borderRadius:"10px",border:"none",backgroundColor:"TENANT"===S?"#3D51B0":"transparent",color:"TENANT"===S?"#FFFFFF":"#667085",fontWeight:"600",cursor:"pointer",transition:"all 0.2s"}},p("Tenant")))),a.createElement("div",{style:{marginBottom:"8px"}},a.createElement(n.CardLabel,{style:{fontSize:"14px",fontWeight:"600",color:"#667085",marginBottom:"12px"}},p("PID_Number")," ",a.createElement("span",{style:{fontStyle:"italic",fontWeight:"400",color:"#98A2B3"}},p("Optional"))),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement(n.TextInput,{value:_,onChange:e=>N(e.target.value),placeholder:p("Enter_PID_Number"),textInputStyle:{paddingLeft:"44px",borderRadius:"12px",border:"1px solid #D0D5DD",height:"56px"}}),a.createElement("div",{style:{position:"absolute",left:"16px",top:"50%",transform:"translateY(-50%)",color:"#3D51B0",fontSize:"20px",fontWeight:"600"}},"#")))),a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"}},a.createElement(B,null),a.createElement("span",{style:{fontSize:"20px",fontWeight:"700",color:"#101828"}},p("Building_Info"))),a.createElement(n.Card,{style:{padding:"20px",borderRadius:"16px",border:"1px solid #EAECF0",marginBottom:"24px"}},[{label:"Type_of_Connection",state:T,setState:D,options:(null==y||null===(e=y["ws-services-calculation"])||void 0===e||null===(o=e.propertyTypeV2)||void 0===o?void 0:o.map(e=>({label:p(e.code),value:e.code})))||[]},{label:"Connection_Category",state:A,setState:R,options:(null==f||null===(i=f["ws-services-calculation"])||void 0===i||null===(s=i.connectionTypeV2)||void 0===s?void 0:s.map(e=>({label:p(e.code),value:e.code})))||[]},{label:"User_Type",state:I,setState:F,options:(null==h||null===(c=h["ws-services-calculation"])||void 0===c||null===(d=c.userTypeV2)||void 0===d?void 0:d.map(e=>({label:p(e.code),value:e.code})))||[]},{label:"No_of_Floor",state:Y,setState:k,options:(null==b||null===(m=b["ws-services-calculation"])||void 0===m||null===(E=m.floorCount)||void 0===E?void 0:E.map(e=>({label:p(e.code),value:e.code})))||[]}].map((e,t)=>a.createElement("div",{key:t,style:{marginBottom:"20px"}},a.createElement(n.CardLabel,{style:{fontSize:"14px",fontWeight:"600",color:"#344054",marginBottom:"8px"}},p(e.label)),a.createElement(n.Dropdown,{selected:e.state,select:e.setState,option:e.options||[{label:"Select "+e.label,value:""}],optionKey:"label",t:p,style:{borderRadius:"12px",border:"1px solid #D0D5DD",height:"48px"}}))),a.createElement("div",{style:{display:"flex",gap:"24px",alignItems:"stretch",flexWrap:"wrap"}},a.createElement("div",{style:{flex:1,minWidth:"300px",display:"flex",flexDirection:"column"}},a.createElement(n.CardLabel,{style:{fontSize:"14px",fontWeight:"600",color:"#344054",marginBottom:"8px"}},p("Upload_Property_Document")),a.createElement("div",{style:{flex:1,backgroundColor:"#EBF5FF",border:"1px solid #B2DDFF",borderRadius:"16px",padding:"32px 24px",textAlign:"center",cursor:"pointer",display:"flex",flexDirection:"column",justifyContent:"center"},onClick:()=>P.current.click()},a.createElement("input",{type:"file",ref:P,style:{display:"none"},accept:".pdf"}),a.createElement("div",{style:{color:"#1570EF",fontWeight:"600",fontSize:"16px",marginBottom:"20px",lineHeight:"1.5"}},p("Upload_your_property_document_in_PDF_Only")),a.createElement("div",{style:{display:"flex",justifyContent:"center"}},a.createElement("div",{style:{backgroundColor:"#FFFFFF",padding:"12px",borderRadius:"12px",boxShadow:"0px 1px 2px rgba(16, 24, 40, 0.05)"}},a.createElement(V,null))))),a.createElement("div",{style:{flex:1,minWidth:"300px",display:"flex",flexDirection:"column"}},a.createElement(n.CardLabel,{style:{fontSize:"14px",fontWeight:"600",color:"#344054",marginBottom:"8px"}},p("Capture_Building_Image")),a.createElement("div",{style:{flex:1,border:"1px solid #D0D5DD",borderRadius:"16px",padding:"40px 24px",textAlign:"center",cursor:"pointer",backgroundColor:"#FFFFFF",display:"flex",flexDirection:"column",justifyContent:"center"},onClick:()=>M.current.click()},a.createElement("input",{type:"file",ref:M,style:{display:"none"},accept:"image/*",capture:"environment"}),a.createElement("div",{style:{backgroundColor:"#EEF4FF",width:"56px",height:"56px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 16px"}},a.createElement(z,null)),a.createElement("div",{style:{fontWeight:"600",color:"#101828",fontSize:"16px",marginBottom:"4px"}},p("Tap_to_Capture")),a.createElement("div",{style:{color:"#667085",fontSize:"14px"}},p("Building_Photo"))))),a.createElement("div",{style:{marginTop:"24px",backgroundColor:"#EFF8FF",padding:"16px",borderRadius:"12px",display:"flex",gap:"12px",border:"1px solid #B2DDFF"}},a.createElement("div",{style:{color:"#1570EF"}},a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM11 15H9V9H11V15ZM11 7H9V5H11V7Z",fill:"currentColor"}))),a.createElement("div",{style:{color:"#175CD3",fontSize:"14px",fontWeight:"500",lineHeight:"1.4"}},p("This_section_is_enabled_only_if_user_is_not_the_owner."))),a.createElement("div",{style:{display:"flex",justifyContent:"flex-start",marginTop:"24px"}},a.createElement(n.SubmitBar,{label:p("Save_&_Continue"),onSubmit:()=>{u.push("/digit-ui/employee/ekyc/review",{...C.state,propertyDetails:{ownerType:S,pidNumber:_,connectionType:A,connectionCategory:T,userType:I,noOfFloors:Y,propertyDocument:O,buildingPhoto:L}})},style:{borderRadius:"8px",height:"48px",margin:0}}))))))},_=()=>{var e,t;const{t:o}=r.useTranslation(),i=l.useHistory(),s=l.useLocation(),{kNumber:c="NA",aadhaarDetails:d={},addressDetails:m={},propertyDetails:E={}}=s.state||{};return a.createElement("div",{className:"inbox-container"},a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},a.createElement("div",{className:"icon-container",style:{color:"#0068faff",marginRight:"12px"}},a.createElement(n.HomeIcon,{style:{width:"24px",height:"24px"}})),a.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},o("EKYC_PROCESS"))),a.createElement("div",{style:{backgroundColor:"#FFFFFF",padding:"16px",borderRadius:"8px",border:"1px solid #EAECF0",boxShadow:"0 2px 4px rgba(0,0,0,0.02)"}},a.createElement(n.ConnectingCheckPoints,null,a.createElement(n.CheckPoint,{label:o("EKYC_STEP_AADHAAR")||"Aadhaar",isCompleted:!0}),a.createElement(n.CheckPoint,{label:o("EKYC_STEP_ADDRESS")||"Address",isCompleted:!0}),a.createElement(n.CheckPoint,{label:o("EKYC_STEP_PROPERTY")||"Property",isCompleted:!0}),a.createElement(n.CheckPoint,{label:o("EKYC_STEP_REVIEW")||"Review",isCompleted:!1})))),a.createElement("div",{style:{flex:1,marginLeft:"16px"}},a.createElement(n.Card,null,a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"}},a.createElement(n.Header,null,o("EKYC_REVIEW_DETAILS")||"Review Details"),a.createElement("div",{style:{fontSize:"14px",fontWeight:"700",color:"#505A5F"}},o("EKYC_K_NUMBER"),": ",a.createElement("span",{style:{color:"#0B0C0C"}},c))),a.createElement(n.Card,{style:{padding:"24px",marginBottom:"24px",borderRadius:"12px",border:"1px solid #EAECF0"}},a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"}},a.createElement(n.CardHeader,{style:{margin:0,fontSize:"18px",color:"#0B0C0C"}},o("EKYC_AADHAAR_VERIFICATION_HEADER")||"Aadhaar Details"),a.createElement("span",{onClick:()=>{i.push("/digit-ui/employee/ekyc/aadhaar-verification",s.state)},style:{color:"#F47738",fontWeight:"600",cursor:"pointer",fontSize:"14px"}},o("CS_COMMON_EDIT"))),a.createElement(n.StatusTable,null,a.createElement(n.Row,{label:o("EKYC_NAME"),text:d.userName||"Rajesh Kumar Singh"}),a.createElement(n.Row,{label:o("EKYC_AADHAAR"),text:d.aadhaarLastFour?"XXXX XXXX "+d.aadhaarLastFour:o("CS_NA")}),a.createElement(n.Row,{label:o("EKYC_MOBILE_NO"),text:d.mobileNumber||o("CS_NA")}),a.createElement(n.Row,{label:o("EKYC_EMAIL_ADDRESS"),text:d.email||o("CS_NA")}))),a.createElement(n.Card,{style:{padding:"24px",marginBottom:"24px",borderRadius:"12px",border:"1px solid #EAECF0"}},a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"}},a.createElement(n.CardHeader,{style:{margin:0,fontSize:"18px",color:"#0B0C0C"}},o("EKYC_ADDRESS_DETAILS_HEADER")||"Address Details"),a.createElement("span",{onClick:()=>{i.push("/digit-ui/employee/ekyc/address-details",s.state)},style:{color:"#F47738",fontWeight:"600",cursor:"pointer",fontSize:"14px"}},o("CS_COMMON_EDIT"))),a.createElement(n.StatusTable,null,a.createElement(n.Row,{label:o("EKYC_FULL_ADDRESS"),text:m.fullAddress||"H.No. 123, Sector 15, Rohini"}),a.createElement(n.Row,{label:o("EKYC_PINCODE"),text:m.pincode||"110085"}))),a.createElement(n.Card,{style:{padding:"24px",marginBottom:"24px",borderRadius:"12px",border:"1px solid #EAECF0"}},a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"}},a.createElement(n.CardHeader,{style:{margin:0,fontSize:"18px",color:"#0B0C0C"}},o("EKYC_PROPERTY_INFO")||"Property Information"),a.createElement("span",{onClick:()=>{i.push("/digit-ui/employee/ekyc/property-info",s.state)},style:{color:"#F47738",fontWeight:"600",cursor:"pointer",fontSize:"14px"}},o("CS_COMMON_EDIT"))),a.createElement(n.StatusTable,null,a.createElement(n.Row,{label:o("Property_Owner"),text:E.ownerType||"OWNER"}),a.createElement(n.Row,{label:o("PID_Number"),text:E.pidNumber||o("CS_NA")}),a.createElement(n.Row,{label:o("Type_of_Connection"),text:(null===(e=E.connectionType)||void 0===e?void 0:e.label)||o("CS_NA")}),a.createElement(n.Row,{label:o("Connection_Category"),text:(null===(t=E.connectionCategory)||void 0===t?void 0:t.label)||o("CS_NA")}))),a.createElement(n.ActionBar,null,a.createElement(n.SubmitBar,{label:o("ES_COMMON_SUBMIT")||"Submit",onSubmit:()=>{i.push("/digit-ui/employee/ekyc/dashboard")}})))))},N=e=>{let{path:t}=e;const{t:o}=r.useTranslation(),i=l.useLocation();sessionStorage.removeItem("revalidateddone");const s=[{icon:n.HomeIcon,path:"/digit-ui/employee"},{label:o((()=>{const e=i.pathname;return e.includes("/dashboard")?"ES_COMMON_INBOX":e.includes("/create-kyc")?"EKYC_CREATE_KYC":e.includes("/k-details")?"EKYC_K_DETAILS":e.includes("/aadhaar-verification")?"EKYC_AADHAAR_VERIFICATION":e.includes("/address-details")?"EKYC_ADDRESS_DETAILS":e.includes("/property-info")?"EKYC_PROPERTY_INFO":e.includes("/review")?"EKYC_REVIEW":"ES_COMMON_INBOX"})())}];return a.createElement(n.AppContainer,null,a.createElement("div",{className:"ground-container employee-app-container"},a.createElement(n.ModuleHeader,{leftContent:a.createElement(a.Fragment,null,a.createElement(n.ArrowLeft,{className:"icon"}),"Back"),onLeftClick:()=>window.history.back(),breadcrumbs:s}),a.createElement(l.Switch,null,a.createElement(n.PrivateRoute,{path:t+"/dashboard",component:()=>a.createElement(E,{parentRoute:t,businessService:"EKYC",moduleCode:"EKYC",isInbox:!0})}),a.createElement(n.PrivateRoute,{path:t+"/create-kyc",component:()=>a.createElement(u,null)}),a.createElement(n.PrivateRoute,{path:t+"/aadhaar-verification",component:()=>a.createElement(S,null)}),a.createElement(n.PrivateRoute,{path:t+"/address-details",component:()=>a.createElement(C,null)}),a.createElement(n.PrivateRoute,{path:t+"/property-info",component:()=>a.createElement(v,null)}),a.createElement(n.PrivateRoute,{path:t+"/review",component:()=>a.createElement(_,null)}),a.createElement(n.PrivateRoute,{path:t+"/",component:()=>a.createElement(E,{parentRoute:t,businessService:"EKYC",moduleCode:"EKYC",isInbox:!0})}))))},A=e=>{let{stateCode:t,userType:n,tenants:r}=e;const{path:o,url:i}=l.useRouteMatch(),s=Digit.StoreData.getCurrentLanguage(),{isLoading:c}=Digit.Services.useStore({stateCode:t,moduleCode:"EKYC",language:s});return Digit.SessionStorage.set("EKYC_TENANTS",r),c?null:"employee"===n?a.createElement(N,{path:o,url:i,userType:n,tenants:r}):null},R={EKYCModule:A,EKYCCard:()=>{const{t:e}=r.useTranslation(),t={Icon:a.createElement(n.PersonIcon,null),moduleName:e("ACTION_TEST_EKYC"),kpis:[{count:"-",label:e("TOTAL_EKYC"),link:"/digit-ui/employee/ekyc/dashboard"}],links:[{label:e("EKYC_DASHBOARD"),link:"/digit-ui/employee/ekyc/dashboard"},{label:e("EKYC_CREATE_KYC"),link:"/digit-ui/employee/ekyc/create-kyc"}]};return a.createElement(n.EmployeeModuleCard,t)},EKYCInbox:E,EKYCDesktopInbox:i,EKYCMobileInbox:c,EKYC_INBOX_FILTER:e=>a.createElement(d,e)};exports.EkycModule=A,exports.default=A,exports.initEkycComponents=()=>{Object.entries(R).forEach(e=>{let[t,a]=e;Digit.ComponentRegistryService.setComponent(t,a)})};