@djb25/digit-ui-module-ekyc 1.0.3 → 1.0.5

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");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:"#3A8DCC",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:"#3A8DCC",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:"#2E9E8F"})),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:"#2E9E8F",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:"#2E9E8F",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:"#2E9E8F"})))),!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:"#2E9E8F"})),a.createElement("span",{style:{fontWeight:"700",color:"#2E9E8F",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:"#3A8DCC",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:"#3A8DCC",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:"#3A8DCC",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)})};
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:p,onPrevPage:E,currentPage:u,pageSizeLimit:g,onPageSizeChange:x,parentRoute:C,searchParams:f,sortParams:v,totalRecords:y,countData:h}=s,{t:b}=r.useTranslation(),[S,_]=a.useState(()=>{var e;return null===(e=Digit.ComponentRegistryService)||void 0===e?void 0:e.getComponent(i)}),A=t.useMemo(()=>[{Header:b("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:`${C}/application-details/${r}`},a.createElement("span",{className:"ekyc-application-link"},r))}},{Header:b("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:b("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},b("EKYC_STATUS_"+n))}}],[b,C]),T=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:"#3A8DCC",marginRight:"12px"}},a.createElement(n.HomeIcon,{style:{width:"24px",height:"24px"}})),a.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},b("ACTION_TEST_EKYC"))),a.createElement("div",null,S&&a.createElement(S,{defaultSearchParams:s.defaultSearchParams,onFilterChange:s.onSearch,searchParams:f,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:h})),a.createElement("div",{className:"result",style:{flex:1}},a.createElement(n.Card,{className:"ekyc-table-card",style:{padding:0}},a.createElement(n.Table,{t:b,data:T,columns:A,isLoading:d,onSort:m,sortParams:v,totalRecords:y,onNextPage:p,onPrevPage:E,currentPage:u,pageSizeLimit:g,onPageSizeChange:x,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,p]=t.useState(()=>({...o})),E=(e,t)=>{p(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:"#3A8DCC",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=>E("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=>E("kName",e.target.value),placeholder:d("EKYC_K_NAME_PLACEHOLDER"),style:{borderRadius:"8px",paddingLeft:"12px",height:"44px"}})))),a.createElement("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"20px"}},a.createElement("div",{style:{display:"flex",gap:"12px",alignItems:"center"}},a.createElement("button",{type:"button",onClick:()=>{const e={kNumber:"",kName:""};p(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"}}))))),s))},c=e=>{var t;let{data:i,isLoading:c,onSearch:d,searchParams:m,parentRoute:p,countData:E}=e;const{t:u}=r.useTranslation(),g=(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:p+"/create-kyc"},a.createElement(n.SubmitBar,{label:u("EKYC_CREATE_KYC")}))),a.createElement("div",{className:"ekyc-metrics-section"},a.createElement(o,{countData:E})),a.createElement(s,{onSearch:d,searchParams:m}),a.createElement("div",{className:"mobile-data-container"},c?a.createElement(n.Loader,null):(null==g?void 0:g.length)>0?a.createElement(n.DetailsCard,{data:g,t:u,serviceRequestIdKey:u("EKYC_APPLICATION_NO"),linkPrefix:p+"/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=e=>{var l,n;let{parentRoute:o,businessService:s="EKYC",initialStates:d={}}=e;const m=Digit.ULBService.getCurrentTenantId(),{t:p}=r.useTranslation(),[E,u]=t.useState(d.pageOffset||0),[g,x]=t.useState(d.pageSize||10),[C,f]=t.useState(d.sortParams||[{id:"createdTime",desc:!0}]),v=t.useMemo(()=>({label:p("EKYC_STATUS_ALL"),value:""}),[p]),[y,h]=t.useState(d.searchParams||{status:v}),{isLoading:b,data:S,isFetching:_}=Digit.Hooks.ekyc.useEkycSurveyorDashboard({},{tenantId:m,offset:E,limit:g,status:(null===(l=y.status)||void 0===l?void 0:l.value)||""},{enabled:!!m}),A=t.useMemo(()=>{var e;return((null==S||null===(e=S.dashboardInfo)||void 0===e?void 0:e.consumerList)||[]).map(e=>({...e,applicationNumber:e.kno||e.applicationNumber,citizenName:e.consumerName||e.citizenName}))},[S]),T=t.useMemo(()=>{const e=(null==S?void 0:S.dashboardInfo)||{};return{total:e.total||0,completed:e.completed||0,pending:e.pending||0,rejected:e.rejected||0}},[S]),N=(null==S||null===(n=S.dashboardInfo)||void 0===n?void 0:n.totalRecords)||(null==S?void 0:S.totalCount)||0,R=t.useCallback(e=>{h(t=>({...t,...e})),u(0)},[]),D=t.useCallback(e=>{e.length>0&&f(e)},[]),k=t.useMemo(()=>[{label:p("EKYC_STATUS"),name:"status",type:"dropdown",options:[{label:p("CHOOSE_STATUS"),value:""},{label:p("EKYC_STATUS_COMPLETED"),value:"COMPLETED"},{label:p("EKYC_STATUS_PENDING"),value:"PENDING"},{label:p("EKYC_STATUS_REJECTED"),value:"REJECTED"}],optionsKey:"label"}],[p]);return a.createElement("div",{className:"ekyc-employee-container"},a.createElement("div",{className:"inbox-main-container"},Digit.Utils.browser.isMobile()?a.createElement(c,{data:{items:A,totalCount:N},isLoading:b||_,onSearch:R,searchFields:k,searchParams:y,parentRoute:o,countData:T}):a.createElement(i,{businessService:s,data:{items:A,totalCount:N},isLoading:b||_,searchFields:k,onSearch:R,onSort:D,onNextPage:()=>u(e=>e+g),onPrevPage:()=>u(e=>Math.max(e-g,0)),currentPage:Math.floor(E/g),pageSizeLimit:g,onPageSizeChange:e=>{const t=Number(e.target.value);x(t),u(0)},parentRoute:o,searchParams:y,sortParams:C,totalRecords:N,countData:T,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:p}=l.useRouteMatch(),[E,u]=t.useState(!1),[g,x]=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.connectionDetails?a.createElement(n.StatusTable,null,a.createElement(n.Row,{label:d("EKYC_CONSUMER_NAME"),text:s.connectionDetails.consumerName||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_ADDRESS"),text:s.connectionDetails.address||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_CONNECTION_TYPE"),text:s.connectionDetails.connectionType||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_METER_NO"),text:s.connectionDetails.meterNumber||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_PHONE_NO"),text:s.connectionDetails.phoneNumber||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_EMAIL"),text:s.connectionDetails.email||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_STATUS"),text:s.connectionDetails.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}}))),E&&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=p.includes("/create-kyc")?p.replace("/create-kyc",""):p.replace("/k-details","");m.push(e+"/aadhaar-verification",{kNumber:o,selectedOption:g,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:g,onSelect:x,style:{display:"flex",flexDirection:"column",gap:"12px",buttonStyle:{borderRadius:"5px"}},t:d})))):null},E=()=>{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:g}=Digit.Hooks.ekyc.useSearchConnection({tenantId:E,details:{kno:l.kNumber,name:l.kName}},{enabled:i&&!!l.kNumber&&!!l.kName,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_SEARCH_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")):m({error:!0,label:e("EKYC_FILL_ALL_FIELDS")})},searchParams:l},i&&a.createElement(p,{kNumber:l.kNumber,kName:l.kName,connectionDetails:g,isLoading:u}),!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}))};function u(){return(u=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)}"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));const g=e=>{let{size:t=28}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},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:"#185FA5"}))},x=e=>{let{size:t=20}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},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:"#185FA5"}))},C=e=>{let{size:t=18}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},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:"currentColor"}))},f=e=>{let{size:t=16}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"#D92D20",strokeWidth:"2",strokeLinecap:"round"},a.createElement("polyline",{points:"3 6 5 6 21 6"}),a.createElement("path",{d:"M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"}),a.createElement("path",{d:"M10 11v6M14 11v6"}),a.createElement("path",{d:"M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"}))},v=e=>{let{size:t=11,color:l="#fff"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:l,strokeWidth:"3",strokeLinecap:"round"},a.createElement("polyline",{points:"20 6 9 17 4 12"}))},y=e=>{let{icon:t,topAligned:l=!1,inputStyle:r={},...o}=e;return a.createElement("div",{style:{position:"relative",width:"100%"}},a.createElement("div",{style:{position:"absolute",left:"10px",...l?{top:"14px"}:{top:"50%",transform:"translateY(-50%)"},zIndex:1,opacity:.45,display:"flex",pointerEvents:"none"}},t),a.createElement(n.TextInput,u({textInputStyle:{paddingLeft:"36px",paddingRight:"12px",...r}},o)))},h=e=>{let{icon:t,label:l}=e;return a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"16px",marginTop:"4px"}},a.createElement("div",{style:{opacity:.5,display:"flex"}},t),a.createElement("span",{style:{fontSize:"15px",fontWeight:"600",color:"#0B0C0C",whiteSpace:"nowrap"}},l),a.createElement("div",{style:{flex:1,height:"1px",background:"#EAECF0"}}))},b=e=>{var o,i,s,c,d;let{isSection:m=!1,onComplete:p,parentState:E}=e;const{t:u}=r.useTranslation(),b=l.useHistory(),S=l.useLocation(),_=E||S.state||{kNumber:"EKYC-1234567890",selectedOption:{code:"SELF",name:"EKYC_SELF"},connectionDetails:null},A=(null===(o=_.connectionDetails)||void 0===o?void 0:o.addressDetails)||{},[T,N]=t.useState({code:"AADHAAR",name:"EKYC_AADHAAR_ADDRESS"}),[R,D]=t.useState({code:"NO",name:"CORE_COMMON_NO"}),[k,I]=t.useState(A.fullAddress||""),[Y,O]=t.useState(A.flatHouseNumber||""),[K,F]=t.useState(A.buildingTower||""),[B,L]=t.useState(A.landmark||""),[P,w]=t.useState(A.pinCode||""),[M,z]=t.useState(null),[H,W]=t.useState(!1),V=t.useRef(null),U=Digit.ULBService.getCurrentTenantId(),{data:X,isLoading:j}=Digit.Hooks.useCommonMDMS(U,"egov-location",["TenantBoundary"]),G=(null==X?void 0:X.MdmsRes)||X,Z=(null==G||null===(i=G["egov-location"])||void 0===i||null===(s=i.TenantBoundary)||void 0===s?void 0:s.find(e=>"ADMIN"===e.hierarchyType.code))||(null==G||null===(c=G["egov-location"])||void 0===c||null===(d=c.TenantBoundary)||void 0===d?void 0:d[0]),$=null==Z?void 0:Z.boundary,q=e=>{if(!e)return[];let t=[];for(const l of e){var a;const e=(l.label||l.name||"").toLowerCase().replace(/_/g," ");"assembly constituency"!==e&&"assemblyconstituency"!==e||t.push({code:l.code,name:l.name,children:l.children}),null!==(a=l.children)&&void 0!==a&&a.length&&t.push(...q(l.children))}return t},J=e=>{if(!e)return[];let t=[];for(const l of e){var a;"block"===(l.label||l.name||"").toLowerCase().replace(/_/g," ")&&t.push({code:l.code,name:l.name}),null!==(a=l.children)&&void 0!==a&&a.length&&t.push(...J(l.children))}return t},Q=q(Array.isArray($)?$:$?[$]:[]),[ee,te]=t.useState(A.assembly?{name:A.assembly}:null),[ae,le]=t.useState(A.ward?{name:A.ward}:null);t.useEffect(()=>{if(G&&A.assembly&&(null==ee||!ee.code)){const e=Q.find(e=>e.name===A.assembly||e.code===A.assembly);e&&te(e)}},[G,Q]);const ne=ee?J(ee.children):[];t.useEffect(()=>{ee&&ae&&!ne.find(e=>e.name===ae.name)&&le(null)},[ee]);const re=[{code:"AADHAAR",name:"EKYC_AADHAAR_ADDRESS"},{code:"OLD",name:"EKYC_OLD_ADDRESS"}],oe=[{code:"YES",name:"CORE_COMMON_YES"},{code:"NO",name:"CORE_COMMON_NO"}],ie=()=>{const e={addressType:T,fullAddress:k,flatNo:Y,building:K,landmark:B,pincode:P,doorPhoto:M,assembly:null==ee?void 0:ee.name,ward:null==ae?void 0:ae.name};if(p)p(e);else{const{kNumber:t,selectedOption:a,connectionDetails:l}=_;b.push("/digit-ui/employee/ekyc/property-info",{kNumber:t,selectedOption:a,connectionDetails:l,addressDetails:e})}},se=e=>{const t=e.target.files[0];if(!t)return;const a=new FileReader;a.onloadend=()=>z(a.result),a.readAsDataURL(t)},ce=()=>{"geolocation"in navigator?(W(!0),navigator.geolocation.getCurrentPosition(function(e){let{coords:{latitude:t,longitude:a}}=e;try{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("Geocode failed");return Promise.resolve(e.json()).then(function(e){if(null!=e&&e.address){const t=e.address;I([t.amenity,t.road,t.neighbourhood,t.suburb,t.city,t.state,t.postcode].filter(Boolean).join(", ")),w(t.postcode||""),L(t.suburb||t.neighbourhood||""),O(t.amenity||"")}})})}catch(e){return l(e)}return n&&n.then?n.then(void 0,l):n}(0,function(e){console.error("Reverse geocode error:",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(W(!1),e)throw t;return t}))}catch(e){return Promise.reject(e)}},e=>{console.error("Geolocation error:",e),W(!1),alert(u("LOCATION_FETCH_FAILED")||"Failed to fetch location. Please grant location permissions.")},{enableHighAccuracy:!0,timeout:1e4,maximumAge:0})):alert(u("GEOLOCATION_NOT_SUPPORTED")||"Geolocation is not supported by your browser")},de=()=>a.createElement("div",{style:{animation:"fadeSlideIn 0.3s ease"}},a.createElement(h,{icon:a.createElement(n.LocationIcon,{className:"icon",styles:{fill:"#0B0C0C",width:"16px",height:"16px"}}),label:u("EKYC_ADDRESS_DETAILS_HEADER")||"Address Details"}),a.createElement("div",{style:{marginBottom:"20px"}},a.createElement(n.RadioButtons,{options:re,optionsKey:"name",selectedOption:T,onSelect:N,t:u,innerStyles:{display:"flex",alignItems:"center"},style:{display:"flex",gap:"40px"}})),"AADHAAR"===T.code&&a.createElement("div",{style:{backgroundColor:"#E1F5EE",border:"0.5px solid #5DCAA5",borderRadius:"8px",padding:"14px 16px",display:"flex",alignItems:"flex-start",gap:"12px",marginBottom:"20px",animation:"fadeSlideIn 0.3s ease"}},a.createElement("div",{style:{backgroundColor:"#9FE1CB",padding:"6px",borderRadius:"6px",display:"flex",flexShrink:0}},a.createElement(n.LocationIcon,{className:"icon",styles:{fill:"#085041",width:"16px",height:"16px"}})),a.createElement("div",{style:{fontSize:"14px",lineHeight:"1.6",color:"#04342C",fontWeight:"500"}},A.fullAddress||"H.No. 123, Sector 15, Rohini, Delhi – 110085")),"OLD"===T.code&&a.createElement("div",{style:{animation:"fadeSlideIn 0.3s ease"}},a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"14px"}},a.createElement(n.CardLabel,{style:{fontWeight:"500",marginBottom:0,fontSize:"13px",color:"#505A5F"}},u("EKYC_ADDRESS_CORRECTION_PROMPT")||"Correct the address?"),a.createElement(n.RadioButtons,{options:oe,optionsKey:"name",selectedOption:R,onSelect:D,t:u,innerStyles:{display:"flex",gap:"20px"},style:{marginBottom:0}})),a.createElement("div",{onClick:H?void 0:ce,style:{border:"0.5px solid #D0D5DD",borderRadius:"8px",padding:"12px 16px",display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"20px",cursor:H?"not-allowed":"pointer",backgroundColor:H?"#F9FAFB":"#fff",transition:"background 0.15s",opacity:H?.7:1},onMouseOver:e=>{H||(e.currentTarget.style.background="#F9FAFB")},onMouseOut:e=>{H||(e.currentTarget.style.background="#fff")}},a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"12px"}},a.createElement("div",{style:{backgroundColor:"#E6F1FB",padding:"7px",borderRadius:"7px",display:"flex"}},H?a.createElement("div",{style:{width:"18px",height:"18px",border:"2px solid #185FA5",borderTopColor:"transparent",borderRadius:"50%",animation:"spin 1s linear infinite"}}):a.createElement(x,{size:18})),a.createElement("span",{style:{fontWeight:"500",fontSize:"14px",color:"#344054"}},H?u("EKYC_FETCHING_LOCATION")||"Fetching location...":u("EKYC_USE_CURRENT_LOCATION")||"Use current location")),!H&&a.createElement("span",{style:{fontSize:"18px",color:"#98A2B3",lineHeight:1}},"›")),a.createElement("div",{style:{marginBottom:"14px"}},a.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},u("EKYC_FULL_ADDRESS")||"Full address"),a.createElement(y,{icon:a.createElement(n.PropertyHouse,{styles:{fill:"#0068fa",width:"15px",height:"15px"}}),topAligned:!0,value:k,onChange:e=>I(e.target.value),placeholder:u("EKYC_ENTER_FULL_ADDRESS")||"Enter full address",inputStyle:{minHeight:"72px"}})),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"14px",marginBottom:"14px"}},a.createElement("div",null,a.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},u("EKYC_FLAT_HOUSE_NUMBER")||"Flat / House no."),a.createElement(y,{icon:a.createElement(n.PropertyHouse,{styles:{fill:"#0068fa",width:"15px",height:"15px"}}),value:Y,onChange:e=>O(e.target.value),placeholder:u("EKYC_ENTER_FLAT_NO")||"e.g. 45-B"})),a.createElement("div",null,a.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},u("EKYC_BUILDING_TOWER")||"Building / Tower"),a.createElement(y,{icon:a.createElement(n.PropertyHouse,{styles:{fill:"#0068fa",width:"15px",height:"15px"}}),value:K,onChange:e=>F(e.target.value),placeholder:u("EKYC_ENTER_BUILDING")||"e.g. Tower 4"}))),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"14px",marginBottom:"4px"}},a.createElement("div",null,a.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},u("EKYC_LANDMARK")||"Landmark"),a.createElement(y,{icon:a.createElement(n.LocationIcon,{className:"icon",styles:{fill:"#0068fa",width:"15px",height:"15px"}}),value:B,onChange:e=>L(e.target.value),placeholder:u("EKYC_ENTER_LANDMARK")||"Near Central Park"})),a.createElement("div",null,a.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},u("EKYC_PINCODE")||"Pincode"),a.createElement(y,{icon:a.createElement(C,{size:15}),value:P,onChange:e=>{/^\d*$/.test(e.target.value)&&w(e.target.value)},placeholder:u("EKYC_ENTER_PINCODE")||"6-digit pincode",maxLength:6})))),a.createElement("hr",{style:{margin:"24px 0",border:0,borderTop:"1px solid #EAECF0"}}),a.createElement(h,{icon:a.createElement(n.PropertyHouse,{styles:{fill:"#0B0C0C",width:"16px",height:"16px"}}),label:u("EKYC_ADMINISTRATIVE_DIVISION")||"Administrative Division"}),j?a.createElement(n.Loader,null):a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"14px",marginBottom:"24px"}},a.createElement("div",null,a.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},u("EKYC_ASSEMBLY")||"Assembly Constituency"),a.createElement(n.Dropdown,{option:Q,optionKey:"name",selected:ee,select:e=>{te(e),le(null)},t:u})),a.createElement("div",null,a.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},u("EKYC_WARD")||"Block"),a.createElement(n.Dropdown,{option:ne,optionKey:"name",selected:ae,select:le,disabled:!ee,t:u}))),a.createElement("hr",{style:{margin:"24px 0",border:0,borderTop:"1px solid #EAECF0"}}),a.createElement(h,{icon:a.createElement(g,{size:16}),label:u("EKYC_DOOR_PHOTO_HEADER")||"Door photo with GPS stamp"}),a.createElement("div",{style:{fontSize:"12px",color:"#667085",marginBottom:"12px"}},u("EKYC_REQUIRED_FOR_VERIFICATION")||"Required for verification"),a.createElement("div",{style:{backgroundColor:"#FFFAEB",border:"0.5px solid #FEDF89",borderRadius:"8px",padding:"12px 14px",display:"flex",alignItems:"flex-start",gap:"10px",marginBottom:"16px"}},a.createElement("div",{style:{flexShrink:0,marginTop:"1px"}},a.createElement(n.InfoBannerIcon,{fill:"#B54708"})),a.createElement("div",null,a.createElement("div",{style:{fontWeight:"600",color:"#B54708",fontSize:"13px",marginBottom:"2px"}},u("EKYC_IMPORTANT")||"Important"),a.createElement("div",{style:{fontSize:"12px",color:"#92400E"}},u("EKYC_CAPTURE_LIVE_CAMERA")||"Capture with live camera for GPS metadata"))),a.createElement("input",{type:"file",ref:V,onChange:se,accept:"image/*",style:{display:"none"}}),a.createElement("div",{onClick:M?void 0:()=>V.current.click(),onMouseOver:e=>{M||(e.currentTarget.style.borderColor="#185FA5")},onMouseOut:e=>{M||(e.currentTarget.style.borderColor="#D0D5DD")},style:{border:"1.5px dashed #D0D5DD",borderRadius:"10px",minHeight:"160px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"#F9FAFB",cursor:M?"default":"pointer",overflow:"hidden",transition:"border-color 0.15s",position:"relative",padding:M?"0":"32px 24px"}},M?a.createElement(t.Fragment,null,a.createElement("img",{src:M,alt:"Door",style:{width:"100%",maxHeight:"280px",objectFit:"cover",display:"block"}}),a.createElement("button",{onClick:e=>{e.stopPropagation(),z(null),V.current&&(V.current.value="")},style:{position:"absolute",top:"10px",right:"10px",background:"#fff",border:"0.5px solid #EAECF0",borderRadius:"7px",padding:"6px 10px",display:"flex",alignItems:"center",gap:"5px",cursor:"pointer",fontSize:"12px",color:"#D92D20",fontWeight:"500"}},a.createElement(f,{size:13})," ",u("EKYC_REMOVE")||"Remove")):a.createElement(t.Fragment,null,a.createElement("div",{style:{width:"52px",height:"52px",borderRadius:"50%",background:"#E6F1FB",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"12px"}},a.createElement(g,{size:26})),a.createElement("div",{style:{fontWeight:"600",fontSize:"14px",color:"#101828",marginBottom:"4px"}},u("EKYC_TAP_TO_CAPTURE")||"Tap to capture"),a.createElement("div",{style:{fontSize:"12px",color:"#667085"}},u("EKYC_CAPTURE_DOOR_IMAGE")||"Capture door image"))),m?a.createElement("div",{style:{marginTop:"24px"}},a.createElement(n.SubmitBar,{label:u("EKYC_COMPLETE_VERIFICATION_AND_PROCEED")||"Complete & Proceed",onSubmit:ie})):a.createElement(n.ActionBar,null,a.createElement(n.SubmitBar,{label:u("EKYC_COMPLETE_VERIFICATION")||"Complete Verification",onSubmit:ie})),a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px",marginTop:"16px",fontSize:"11px",color:"#98A2B3"}},a.createElement("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},a.createElement("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),a.createElement("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})),u("EKYC_SECURE_DATA_NOTICE")||"Your data is encrypted and secure"));return m?a.createElement(t.Fragment,null,a.createElement("hr",{style:{margin:"32px 0",border:0,borderTop:"2px solid #EAECF0"}}),de()):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(8px); } to { opacity:1; transform:translateY(0); } }\n "),a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{style:{display:"flex",alignItems:"center",padding:"12px 16px",marginBottom:"12px",borderRadius:"8px"}},a.createElement("div",{style:{color:"#185FA5",marginRight:"10px",display:"flex"}},a.createElement(n.HomeIcon,{style:{width:"20px",height:"20px"}})),a.createElement("div",{style:{fontWeight:"600",fontSize:"15px",color:"#0B0C0C"}},u("EKYC_PROCESS")||"eKYC Process")),a.createElement("div",{style:{background:"#fff",padding:"16px 14px",borderRadius:"8px",border:"1px solid #EAECF0"}},[{label:u("EKYC_STEP_AADHAAR")||"Aadhaar",done:!0,active:!1},{label:u("EKYC_STEP_ADDRESS")||"Address",done:!1,active:!0},{label:u("EKYC_STEP_PROPERTY")||"Property",done:!1,active:!1},{label:u("EKYC_STEP_REVIEW")||"Review",done:!1,active:!1}].map((e,t)=>a.createElement("div",{key:t,style:{display:"flex",gap:"10px",alignItems:"flex-start",position:"relative",paddingBottom:t<3?"18px":0}},t<3&&a.createElement("div",{style:{position:"absolute",left:"10px",top:"22px",width:"1px",height:"calc(100% - 10px)",background:"#EAECF0"}}),a.createElement("div",{style:{width:"20px",height:"20px",borderRadius:"50%",flexShrink:0,marginTop:"1px",border:e.done?"none":e.active?"1.5px solid #185FA5":"1.5px solid #D0D5DD",background:e.done?"#0F6E56":e.active?"#E6F1FB":"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px",fontWeight:"500",color:e.done?"#fff":e.active?"#185FA5":"#98A2B3"}},e.done?a.createElement(v,{size:11,color:"#fff"}):t+1),a.createElement("div",{style:{fontSize:"12px",paddingTop:"2px",color:e.done?"#0F6E56":e.active?"#0B0C0C":"#667085",fontWeight:e.done||e.active?"600":"400"}},e.label))))),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:"20px"}},a.createElement(n.CardHeader,{style:{margin:0,fontSize:"18px"}},u("EKYC_ADDRESS_DETAILS_HEADER")||"Address Details"),a.createElement("div",{style:{background:"#F9FAFB",border:"0.5px solid #EAECF0",borderRadius:"20px",padding:"4px 14px",fontSize:"12px",color:"#667085"}},u("EKYC_K_NUMBER")||"K Number",":"," ",a.createElement("span",{style:{color:"#0B0C0C",fontWeight:"600"}},null==_?void 0:_.kNumber))),de())))},S=e=>{let{size:t=16}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"},a.createElement("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),a.createElement("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"}))},_=e=>{let{size:t=16,color:l="currentColor"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:l,strokeWidth:"1.8",strokeLinecap:"round"},a.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),a.createElement("circle",{cx:"12",cy:"7",r:"4"}))},A=e=>{let{size:t=16,color:l="currentColor"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:l,strokeWidth:"1.8",strokeLinecap:"round"},a.createElement("path",{d:"M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07 19.5 19.5 0 01-5.37-5.37 19.79 19.79 0 01-3.07-8.63A2 2 0 014.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"}))},T=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.413z",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:"1.8",strokeLinecap:"round"}))},N=e=>{let{size:t=16,color:l="currentColor"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:l,strokeWidth:"1.8",strokeLinecap:"round"},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"}),a.createElement("path",{d:"M22 6l-10 7L2 6"}))},R=e=>{let{size:t=16,color:l="currentColor"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:l,strokeWidth:"1.8",strokeLinecap:"round"},a.createElement("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),a.createElement("circle",{cx:"9",cy:"7",r:"4"}),a.createElement("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75"}))},D=e=>{let{size:t=15,color:l="#1D9E75"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:l,strokeWidth:"2.8",strokeLinecap:"round"},a.createElement("polyline",{points:"20 6 9 17 4 12"}))},k=e=>{let{icon:t,rightIcon:l,inputStyle:r={},...o}=e;return a.createElement("div",{style:{position:"relative",width:"100%"}},a.createElement("div",{style:{position:"absolute",left:"10px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.45,display:"flex",pointerEvents:"none"}},t),a.createElement(n.TextInput,u({textInputStyle:{paddingLeft:"36px",paddingRight:l?"36px":"12px",...r}},o)),l&&a.createElement("div",{style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",display:"flex"}},l))},I=e=>{let{icon:t,label:l}=e;return a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"16px",marginTop:"4px"}},a.createElement("div",{style:{opacity:.5,display:"flex"}},t),a.createElement("span",{style:{fontSize:"15px",fontWeight:"600",color:"#0B0C0C",whiteSpace:"nowrap"}},l),a.createElement("div",{style:{flex:1,height:"1px",background:"#EAECF0"}}))},Y=e=>{let{label:t,selected:l,onSelect:r,t:o,options:i}=e;return a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"}},a.createElement(n.CardLabel,{style:{fontWeight:"500",marginBottom:0,fontSize:"13px",color:"#505A5F"}},t),a.createElement(n.RadioButtons,{options:i,optionsKey:"name",selectedOption:l,onSelect:r,t:o,innerStyles:{display:"flex",gap:"20px",alignItems:"center"},style:{display:"flex",gap:"20px",marginBottom:0}}))},O=()=>{var e;const{t:o}=r.useTranslation(),i=l.useLocation(),s=l.useHistory(),c=t.useRef(null),{kNumber:d,selectedOption:m,connectionDetails:p}=i.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"}}},E=(null==p?void 0:p.connectionDetails)||(null==p?void 0:p.connectionDetailsInfo)||{},[u,g]=t.useState(""),[x,C]=t.useState(!1),[f,v]=t.useState(!1),[y,h]=t.useState({code:"NO",name:"CORE_COMMON_NO"}),[O,K]=t.useState(E.consumerName||""),[F,B]=t.useState({code:"NO",name:"CORE_COMMON_NO"}),[L,P]=t.useState(E.phoneNumber||""),[w,M]=t.useState(E.phoneNumber||""),[z,H]=t.useState(E.email||""),[W,V]=t.useState((null==p||null===(e=p.addressDetails)||void 0===e?void 0:e.noOfPerson)||""),[U,X]=t.useState(!1),[j,G]=t.useState(null),Z=[{code:"YES",name:"CORE_COMMON_YES"},{code:"NO",name:"CORE_COMMON_NO"}],$={verifiedInput:{borderColor:"#1D9E75",backgroundColor:"#E1F5EE"},verifiedCard:{backgroundColor:"#E1F5EE",border:"0.5px solid #5DCAA5",borderRadius:"8px",padding:"16px",marginTop:"14px",marginBottom:"4px",animation:"fadeSlideIn 0.35s ease"},infoLabel:{fontSize:"11px",fontWeight:"600",color:"#1D9E75",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:"3px"},infoValue:{fontSize:"14px",fontWeight:"500",color:"#04342C"},twoCol:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"14px",marginBottom:"20px"},optionalTag:{display:"inline-block",fontSize:"10px",background:"#F1EFE8",color:"#5F5E5A",border:"0.5px solid #D3D1C7",borderRadius:"10px",padding:"1px 7px",marginLeft:"6px",fontWeight:"400"}};return a.createElement("div",{className:"inbox-container"},a.createElement("style",null,"\n @keyframes fadeSlideIn {\n from { opacity: 0; transform: translateY(6px); }\n to { opacity: 1; transform: translateY(0); }\n }\n @keyframes pulseGreen {\n 0%, 100% { box-shadow: 0 0 0 0 rgba(29,158,117,0.35); }\n 50% { box-shadow: 0 0 0 6px rgba(29,158,117,0); }\n }\n .ekyc-sidebar-step { display: flex; gap: 10px; align-items: flex-start; position: relative; padding-bottom: 18px; }\n .ekyc-sidebar-step:last-child { padding-bottom: 0; }\n .ekyc-step-line { position: absolute; left: 10px; top: 22px; width: 1px; height: calc(100% - 10px); background: #EAECF0; }\n .ekyc-step-dot { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #D0D5DD; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 500; color: #98A2B3; background: #fff; flex-shrink: 0; margin-top: 1px; }\n .ekyc-step-dot.active { border-color: #185FA5; color: #185FA5; background: #E6F1FB; }\n .ekyc-step-dot.done { border-color: #0F6E56; background: #0F6E56; color: #fff; }\n .ekyc-step-label { font-size: 12px; color: #667085; padding-top: 2px; }\n .ekyc-step-label.active { color: #0B0C0C; font-weight: 600; }\n .ekyc-step-label.done { color: #0F6E56; }\n .ekyc-field-label { font-size: 11px; font-weight: 600; color: #667085; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }\n "),a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{style:{display:"flex",alignItems:"center",padding:"12px 16px",marginBottom:"12px",borderRadius:"8px"}},a.createElement("div",{style:{color:"#185FA5",marginRight:"10px",display:"flex"}},a.createElement(n.HomeIcon,{style:{width:"20px",height:"20px"}})),a.createElement("div",{style:{fontWeight:"600",fontSize:"15px",color:"#0B0C0C"}},o("EKYC_PROCESS")||"eKYC Process")),a.createElement("div",{style:{background:"#fff",padding:"16px 14px",borderRadius:"8px",border:"1px solid #EAECF0"}},[{label:o("EKYC_STEP_AADHAAR")||"Aadhaar",done:U,active:!U},{label:o("EKYC_STEP_ADDRESS")||"Address",done:null!==j,active:U&&null===j},{label:o("EKYC_STEP_PROPERTY")||"Property",done:!1,active:!1},{label:o("EKYC_STEP_REVIEW")||"Review",done:!1,active:!1}].map((e,t)=>a.createElement("div",{className:"ekyc-sidebar-step",key:t},a.createElement("div",{className:"ekyc-step-dot"+(e.done?" done":e.active?" active":"")},e.done?a.createElement(D,{size:11,color:"#fff"}):t+1),t<3&&a.createElement("div",{className:"ekyc-step-line"}),a.createElement("div",{className:"ekyc-step-label"+(e.done?" done":e.active?" active":"")},e.label))))),a.createElement("div",{style:{flex:1,marginLeft:"16px"}},a.createElement(n.Card,null,a.createElement("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:"20px"}},a.createElement("div",{style:{background:"#F9FAFB",border:"0.5px solid #EAECF0",borderRadius:"20px",padding:"4px 14px",fontSize:"12px",color:"#667085"}},o("EKYC_K_NUMBER")||"K Number",":"," ",a.createElement("span",{style:{color:"#0B0C0C",fontWeight:"600"}},d))),a.createElement(I,{icon:a.createElement(S,{size:16}),label:o("EKYC_AADHAAR_NUMBER_HEADER")||"Aadhaar Number"}),a.createElement("div",{className:"ekyc-field-label"},o("EKYC_LAST_4_DIGIT_AADHAAR")||"Enter 12 digits of Aadhaar"),a.createElement(n.LabelFieldPair,null,a.createElement("div",{className:"field"},a.createElement(k,{icon:a.createElement(S,{size:15}),rightIcon:x?a.createElement(D,{size:15}):null,value:u,onChange:e=>{const t=e.target.value;t.length<=12&&/^\d*$/.test(t)&&g(t)},placeholder:o("EKYC_ENTER_LAST_4_DIGIT")||"Enter 12 digits",maxLength:12,disabled:x,inputStyle:x?$.verifiedInput:{}}))),!x&&a.createElement(n.SubmitBar,{label:f?o("EKYC_VERIFYING")||"Verifying...":o("EKYC_VERIFY_AADHAAR_BTN")||"Verify Aadhaar",onSubmit:()=>{4!==u.length||f||(v(!0),setTimeout(()=>{v(!1),C(!0),X(!0),setTimeout(()=>{var e;null===(e=c.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"})},100)},1200))},disabled:4!==u.length||f,style:{marginTop:"12px"}}),x&&a.createElement("div",{style:$.verifiedCard},a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"14px"}},a.createElement("div",{style:{width:"24px",height:"24px",borderRadius:"50%",background:"#9FE1CB",display:"flex",alignItems:"center",justifyContent:"center",animation:"pulseGreen 2s ease infinite",flexShrink:0}},a.createElement(D,{size:13,color:"#085041"})),a.createElement("span",{style:{fontWeight:"600",color:"#085041",fontSize:"14px"}},o("EKYC_AADHAAR_VERIFIED_SUCCESS")||"Aadhaar Verified Successfully")),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px"}},a.createElement("div",null,a.createElement("div",{style:$.infoLabel},o("EKYC_NAME")||"Name"),a.createElement("div",{style:$.infoValue},E.consumerName)),a.createElement("div",null,a.createElement("div",{style:$.infoLabel},o("EKYC_AADHAAR")||"Aadhaar"),a.createElement("div",{style:$.infoValue},"XXXX XXXX ",u)),a.createElement("div",{style:{gridColumn:"span 2"}},a.createElement("div",{style:$.infoLabel},o("EKYC_ADDRESS")||"Address"),a.createElement("div",{style:{...$.infoValue,fontSize:"13px"}},E.address)))),a.createElement("hr",{style:{margin:"24px 0",border:0,borderTop:"1px solid #EAECF0"}}),a.createElement(I,{icon:a.createElement(_,{size:16}),label:o("EKYC_CONTACT_DETAILS_HEADER")||"Contact Details"}),a.createElement(Y,{label:`${o("EKYC_USER_NAME")} (${o("EKYC_NAME_CORRECT_HINT")})`,selected:y,onSelect:h,options:Z,sty:!0,t:o}),a.createElement(n.LabelFieldPair,null,a.createElement("div",{className:"field"},a.createElement(k,{icon:a.createElement(_,{size:15,color:"YES"===y.code?"#64748b":"#94a3b8"}),style:{marginBottom:"12px"},value:O,onChange:e=>K(e.target.value),placeholder:o("EKYC_ENTER_NAME_PLACEHOLDER")||"Enter full name",disabled:"YES"!==y.code}))),a.createElement(Y,{label:`${o("EKYC_USER_MOBILE_NUMBER")} (${o("EKYC_UPDATE_MOBILE_HINT")})`,selected:F,onSelect:B,options:Z,t:o}),a.createElement(n.LabelFieldPair,null,a.createElement("div",{className:"field"},a.createElement(k,{icon:a.createElement(A,{size:15,color:"YES"===F.code?"#64748b":"#94a3b8"}),style:{marginBottom:"12px"},value:L,onChange:e=>P(e.target.value),placeholder:"+91 XXXXX XXXXX",disabled:"YES"!==F.code}))),a.createElement("div",{style:$.twoCol},a.createElement("div",null,a.createElement("div",{className:"ekyc-field-label"},o("EKYC_WHATSAPP_NUMBER")||"WhatsApp Number"),a.createElement(k,{icon:a.createElement(T,{size:15}),value:w,onChange:e=>M(e.target.value),placeholder:"+91 XXXXX XXXXX"})),a.createElement("div",null,a.createElement("div",{className:"ekyc-field-label"},o("EKYC_EMAIL_ADDRESS")||"Email Address",a.createElement("span",{style:$.optionalTag},o("EKYC_OPTIONAL")||"Optional")),a.createElement(k,{icon:a.createElement(N,{size:15}),value:z,onChange:e=>H(e.target.value),placeholder:o("EKYC_EMAIL_ADDRESS_PLACEHOLDER")||"example@email.com"}))),a.createElement("hr",{style:{margin:"24px 0",border:0,borderTop:"1px solid #EAECF0"}}),a.createElement(I,{icon:a.createElement(R,{size:16}),label:o("EKYC_FAMILY_DETAILS_HEADER")||"Family Details"}),a.createElement("div",{className:"ekyc-field-label"},o("EKYC_NO_OF_PERSONS")||"Number of Family Members"),a.createElement(n.LabelFieldPair,null,a.createElement("div",{className:"field"},a.createElement(k,{icon:a.createElement(R,{size:15}),value:W,onChange:e=>{/^\d*$/.test(e.target.value)&&V(e.target.value)},placeholder:o("EKYC_ENTER_NO_OF_PERSONS")||"Enter total number of persons"}))),!U&&a.createElement("div",{style:{marginTop:"24px"}},a.createElement(n.SubmitBar,{label:o("ES_COMMON_SAVE_CONTINUE")||"Save & Continue",onSubmit:()=>{X(!0),setTimeout(()=>{var e;null===(e=c.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"})},100)}})),U&&a.createElement("div",{ref:c},a.createElement(b,{isSection:!0,onComplete:e=>{G(e),s.push("/digit-ui/employee/ekyc/property-info",{kNumber:d,selectedOption:m,connectionDetails:p,aadhaarDetails:{aadhaarLastFour:u,isAadhaarVerified:x,userName:O,mobileNumber:L,whatsappNumber:w,email:z,noOfPersons:W},addressDetails:e})},parentState:{kNumber:d,selectedOption:m,connectionDetails:p}})),a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px",marginTop:"20px",fontSize:"11px",color:"#98A2B3"}},a.createElement(S,{size:11}),o("EKYC_SECURE_DATA_NOTICE")||"Your data is encrypted and secure"))))},K=e=>{let{size:t=11,color:l="#fff"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:l,strokeWidth:"3",strokeLinecap:"round"},a.createElement("polyline",{points:"20 6 9 17 4 12"}))},F=e=>{let{size:t=16}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor"},a.createElement("path",{d:"M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8V9h8v10zm-2-8h-4v2h4v-2zm0 4h-4v2h4v-2z"}))},B=e=>{let{size:t=16}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor"},a.createElement("path",{d:"M20 6H16V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-2 .89-2 2v13c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-6-2v2h-4V4h4z"}))},L=e=>{let{size:t=16}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor"},a.createElement("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 7V3.5L18.5 9H13z"}))},P=e=>{let{size:t=24}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor"},a.createElement("path",{d:"M9 2L7.17 4H4C2.9 4 2 4.9 2 6v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L13 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}))},w=e=>{let{size:t=14}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"#D92D20",strokeWidth:"2",strokeLinecap:"round"},a.createElement("polyline",{points:"3 6 5 6 21 6"}),a.createElement("path",{d:"M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"}),a.createElement("path",{d:"M10 11v6M14 11v6"}),a.createElement("path",{d:"M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"}))},M=e=>{let{size:t=16}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},a.createElement("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),a.createElement("path",{d:"M7 8h5M7 12h8M7 16h4"}))},z=e=>{let{icon:t,label:l}=e;return a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"16px",marginTop:"4px"}},a.createElement("div",{style:{opacity:.5,display:"flex"}},t),a.createElement("span",{style:{fontSize:"15px",fontWeight:"600",color:"#0B0C0C",whiteSpace:"nowrap"}},l),a.createElement("div",{style:{flex:1,height:"1px",background:"#EAECF0"}}))},H=e=>{let{icon:t,...l}=e;return a.createElement("div",{style:{position:"relative",width:"100%"}},a.createElement("div",{style:{position:"absolute",left:"10px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.45,display:"flex",pointerEvents:"none"}},t),a.createElement(n.TextInput,u({textInputStyle:{paddingLeft:"36px",paddingRight:"12px"}},l)))},W=()=>{var e,o,i,s,c,d,m,p;const{t:E}=r.useTranslation(),u=l.useHistory(),g=l.useLocation().state||{kNumber:"EKYC-1234567890"},{kNumber:x}=g,C=Digit.ULBService.getCurrentTenantId(),{data:f}=Digit.Hooks.ekyc.useGetPropertyType(C),{data:v}=Digit.Hooks.ekyc.useGetConnectionTypeV2(C),{data:y}=Digit.Hooks.ekyc.useGetUserType(C),{data:h}=Digit.Hooks.ekyc.useGetFloorCount(C),[b,S]=t.useState("OWNER"),[_,A]=t.useState(""),[T,N]=t.useState(null),[R,D]=t.useState(null),[k,I]=t.useState(null),[Y,O]=t.useState(null),[W,V]=t.useState(null),[U,X]=t.useState(null),j=t.useRef(null),G=t.useRef(null),Z=(null==f||null===(e=f["ws-services-calculation"])||void 0===e||null===(o=e.propertyTypeV2)||void 0===o?void 0:o.map(e=>({label:E(e.code),value:e.code})))||[],$=(null==v||null===(i=v["ws-services-calculation"])||void 0===i||null===(s=i.connectionTypeV2)||void 0===s?void 0:s.map(e=>({label:E(e.code),value:e.code})))||[],q=(null==y||null===(c=y["ws-services-calculation"])||void 0===c||null===(d=c.userTypeV2)||void 0===d?void 0:d.map(e=>({label:E(e.code),value:e.code})))||[],J=(null==h||null===(m=h["ws-services-calculation"])||void 0===m||null===(p=m.floorCount)||void 0===p?void 0:p.map(e=>({label:E(e.code),value:e.code})))||[];return a.createElement("div",{className:"inbox-container"},a.createElement("style",null,"\n @keyframes fadeSlideIn {\n from { opacity: 0; transform: translateY(8px); }\n to { opacity: 1; transform: translateY(0); }\n }\n "),a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{style:{display:"flex",alignItems:"center",padding:"12px 16px",marginBottom:"12px",borderRadius:"8px"}},a.createElement("div",{style:{color:"#185FA5",marginRight:"10px",display:"flex"}},a.createElement(n.HomeIcon,{style:{width:"20px",height:"20px"}})),a.createElement("div",{style:{fontWeight:"600",fontSize:"15px",color:"#0B0C0C"}},E("EKYC_PROCESS")||"eKYC Process")),a.createElement("div",{style:{background:"#fff",padding:"16px 14px",borderRadius:"8px",border:"1px solid #EAECF0"}},[{label:E("EKYC_STEP_AADHAAR")||"Aadhaar",done:!0,active:!1},{label:E("EKYC_STEP_ADDRESS")||"Address",done:!0,active:!1},{label:E("EKYC_STEP_PROPERTY")||"Property",done:!1,active:!0},{label:E("EKYC_STEP_REVIEW")||"Review",done:!1,active:!1}].map((e,t)=>a.createElement("div",{key:t,style:{display:"flex",gap:"10px",alignItems:"flex-start",position:"relative",paddingBottom:t<3?"18px":0}},t<3&&a.createElement("div",{style:{position:"absolute",left:"10px",top:"22px",width:"1px",height:"calc(100% - 10px)",background:"#EAECF0"}}),a.createElement("div",{style:{width:"20px",height:"20px",borderRadius:"50%",flexShrink:0,marginTop:"1px",border:e.done?"none":e.active?"1.5px solid #185FA5":"1.5px solid #D0D5DD",background:e.done?"#0F6E56":e.active?"#E6F1FB":"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px",fontWeight:"500",color:e.done?"#fff":e.active?"#185FA5":"#98A2B3"}},e.done?a.createElement(K,{size:11,color:"#fff"}):t+1),a.createElement("div",{style:{fontSize:"12px",paddingTop:"2px",color:e.done?"#0F6E56":e.active?"#0B0C0C":"#667085",fontWeight:e.done||e.active?"600":"400"}},e.label))))),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:"20px"}},a.createElement(n.CardHeader,{style:{margin:0,fontSize:"18px"}},E("EKYC_PROPERTY_DETAILS_HEADER")||"Property Details"),a.createElement("div",{style:{background:"#F9FAFB",border:"0.5px solid #EAECF0",borderRadius:"20px",padding:"4px 14px",fontSize:"12px",color:"#667085"}},E("EKYC_K_NUMBER")||"K Number",":"," ",a.createElement("span",{style:{color:"#0B0C0C",fontWeight:"600"}},x))),a.createElement("div",{style:{animation:"fadeSlideIn 0.3s ease"}},a.createElement(z,{icon:a.createElement(B,{size:16}),label:E("EKYC_PROPERTY_DETAILS")||"Property details"}),a.createElement("div",{style:{marginBottom:"20px"}},a.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"8px"}},E("EKYC_PROPERTY_OWNER")||"Property owner"),a.createElement("div",{style:{display:"flex",backgroundColor:"#F2F4F7",padding:"4px",borderRadius:"10px",gap:"4px"}},["OWNER","TENANT"].map(e=>a.createElement("button",{key:e,onClick:()=>S(e),style:{flex:1,padding:"9px 12px",borderRadius:"7px",border:"none",cursor:"pointer",fontSize:"13px",fontWeight:"600",transition:"all 0.15s",background:b===e?"#185FA5":"transparent",color:b===e?"#fff":"#667085"}},E("EKYC_"+e)||("OWNER"===e?"Owner":"Tenant"))))),a.createElement("div",{style:{marginBottom:"20px"}},a.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},E("EKYC_PID_NUMBER")||"PID number"," ",a.createElement("span",{style:{fontStyle:"italic",fontWeight:"400",textTransform:"none",color:"#98A2B3"}},"— ",E("EKYC_OPTIONAL")||"optional")),a.createElement(H,{icon:a.createElement(M,{size:15}),value:_,onChange:e=>A(e.target.value),placeholder:E("EKYC_ENTER_PID_NUMBER")||"Enter PID number"})),a.createElement("hr",{style:{margin:"24px 0",border:0,borderTop:"1px solid #EAECF0"}}),a.createElement(z,{icon:a.createElement(F,{size:16}),label:E("EKYC_BUILDING_INFO")||"Building info"}),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"14px",marginBottom:"14px"}},a.createElement("div",null,a.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},E("EKYC_TYPE_OF_CONNECTION")||"Type of connection"),a.createElement(n.Dropdown,{selected:T,select:N,option:Z,optionKey:"label",t:E,placeholder:E("EKYC_SELECT")||"Select"})),a.createElement("div",null,a.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},E("EKYC_CONNECTION_CATEGORY")||"Connection category"),a.createElement(n.Dropdown,{selected:R,select:D,option:$,optionKey:"label",t:E,placeholder:E("EKYC_SELECT")||"Select"}))),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"14px",marginBottom:"24px"}},a.createElement("div",null,a.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},E("EKYC_USER_TYPE")||"User type"),a.createElement(n.Dropdown,{selected:k,select:I,option:q,optionKey:"label",t:E,placeholder:E("EKYC_SELECT")||"Select"})),a.createElement("div",null,a.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},E("EKYC_NO_OF_FLOORS")||"No. of floors"),a.createElement(n.Dropdown,{selected:Y,select:O,option:J,optionKey:"label",t:E,placeholder:E("EKYC_SELECT")||"Select"}))),a.createElement("hr",{style:{margin:"24px 0",border:0,borderTop:"1px solid #EAECF0"}}),a.createElement(z,{icon:a.createElement(L,{size:16}),label:E("EKYC_DOCUMENTS_PHOTO")||"Documents & photo"}),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"14px",marginBottom:"20px"}},a.createElement("div",null,a.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"8px"}},E("EKYC_UPLOAD_PROPERTY_DOC")||"Upload property document"),a.createElement("input",{type:"file",ref:j,accept:".pdf",style:{display:"none"},onChange:e=>{const t=e.target.files[0];t&&V(t)}}),a.createElement("div",{onClick:()=>j.current.click(),onMouseOver:e=>e.currentTarget.style.borderColor="#185FA5",onMouseOut:e=>e.currentTarget.style.borderColor="#B5D4F4",style:{border:"1.5px dashed #B5D4F4",borderRadius:"10px",padding:"28px 20px",textAlign:"center",cursor:"pointer",backgroundColor:"#E6F1FB",minHeight:"160px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10px",transition:"border-color 0.15s"}},a.createElement("div",{style:{background:"#fff",padding:"10px",borderRadius:"10px",display:"flex"}},a.createElement("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"#185FA5"},a.createElement("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 7V3.5L18.5 9H13z"}),a.createElement("path",{d:"M12 18v-4M12 14l-2 2M12 14l2 2",stroke:"#fff",strokeWidth:"1.5",strokeLinecap:"round"}))),W?a.createElement("div",{style:{fontSize:"13px",fontWeight:"600",color:"#0F6E56"}},"✓ ",W.name):a.createElement(t.Fragment,null,a.createElement("div",{style:{fontSize:"13px",fontWeight:"600",color:"#185FA5"}},E("EKYC_UPLOAD_PROPERTY_DOC_CTA")||"Tap to upload"),a.createElement("div",{style:{fontSize:"12px",color:"#378ADD"}},"PDF only")))),a.createElement("div",null,a.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"8px"}},E("EKYC_CAPTURE_BUILDING_IMAGE")||"Capture building image"),a.createElement("input",{type:"file",ref:G,accept:"image/*",capture:"environment",style:{display:"none"},onChange:e=>{const t=e.target.files[0];if(!t)return;const a=new FileReader;a.onloadend=()=>X(a.result),a.readAsDataURL(t)}}),a.createElement("div",{onClick:U?void 0:()=>G.current.click(),onMouseOver:e=>{U||(e.currentTarget.style.borderColor="#185FA5")},onMouseOut:e=>{U||(e.currentTarget.style.borderColor="#D0D5DD")},style:{border:"1.5px dashed #D0D5DD",borderRadius:"10px",minHeight:"160px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"#F9FAFB",cursor:U?"default":"pointer",overflow:"hidden",transition:"border-color 0.15s",position:"relative",padding:U?"0":"28px 20px"}},U?a.createElement(t.Fragment,null,a.createElement("img",{src:U,alt:"Building",style:{width:"100%",maxHeight:"200px",objectFit:"cover",display:"block"}}),a.createElement("button",{onClick:e=>{e.stopPropagation(),X(null),G.current&&(G.current.value="")},style:{position:"absolute",top:"8px",right:"8px",background:"#fff",border:"0.5px solid #EAECF0",borderRadius:"7px",padding:"5px 10px",display:"flex",alignItems:"center",gap:"5px",cursor:"pointer",fontSize:"12px",color:"#D92D20",fontWeight:"500"}},a.createElement(w,{size:13})," ",E("EKYC_REMOVE")||"Remove")):a.createElement(t.Fragment,null,a.createElement("div",{style:{background:"#E6F1FB",width:"52px",height:"52px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"10px"}},a.createElement(P,{size:26})),a.createElement("div",{style:{fontSize:"13px",fontWeight:"600",color:"#101828"}},E("EKYC_TAP_TO_CAPTURE")||"Tap to capture"),a.createElement("div",{style:{fontSize:"12px",color:"#667085",marginTop:"2px"}},E("EKYC_BUILDING_PHOTO")||"Building photo with GPS"))))),a.createElement("div",{style:{backgroundColor:"#E6F1FB",border:"0.5px solid #B5D4F4",borderRadius:"8px",padding:"12px 14px",display:"flex",alignItems:"flex-start",gap:"10px",marginBottom:"4px"}},a.createElement("div",{style:{flexShrink:0,marginTop:"1px"}},a.createElement(n.InfoBannerIcon,{fill:"#185FA5"})),a.createElement("div",{style:{fontSize:"13px",color:"#185FA5",lineHeight:"1.5"}},E("EKYC_TENANT_INFO_NOTICE")||"This section is enabled only if the user is not the owner. Tenant details will be required if tenant is selected."))),a.createElement("div",{style:{marginTop:"24px"}},a.createElement(n.SubmitBar,{label:E("EKYC_SAVE_AND_CONTINUE")||"Save & Continue",onSubmit:()=>{u.push("/digit-ui/employee/ekyc/review",{...g,propertyDetails:{ownerType:b,pidNumber:_,connectionType:R,connectionCategory:T,userType:k,noOfFloors:Y,propertyDocument:W,buildingPhoto:U}})}})),a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px",marginTop:"16px",fontSize:"11px",color:"#98A2B3"}},a.createElement("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},a.createElement("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),a.createElement("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})),E("EKYC_SECURE_DATA_NOTICE")||"Your data is encrypted and secure"))))},V=e=>{let{size:t=11,color:l="#fff"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:l,strokeWidth:"3",strokeLinecap:"round"},a.createElement("polyline",{points:"20 6 9 17 4 12"}))},U=e=>{let{size:t=16}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor"},a.createElement("path",{d:"M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z"}))},X=e=>{let{size:t=16}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor"},a.createElement("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"}))},j=e=>{let{size:t=16}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor"},a.createElement("path",{d:"M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8V9h8v10zm-2-8h-4v2h4v-2zm0 4h-4v2h4v-2z"}))},G=e=>{let{size:t=14}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},a.createElement("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),a.createElement("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"}))},Z=e=>{let{icon:t,label:l}=e;return a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"16px",marginTop:"4px"}},a.createElement("div",{style:{opacity:.5,display:"flex"}},t),a.createElement("span",{style:{fontSize:"15px",fontWeight:"600",color:"#0B0C0C",whiteSpace:"nowrap"}},l),a.createElement("div",{style:{flex:1,height:"1px",background:"#EAECF0"}}))},$=e=>{let{icon:t,title:l,onEdit:n,editLabel:r,rows:o}=e;return a.createElement("div",{style:{border:"0.5px solid #EAECF0",borderRadius:"10px",overflow:"hidden",marginBottom:"16px",animation:"fadeSlideIn 0.3s ease"}},a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"14px 16px",background:"#F9FAFB",borderBottom:"0.5px solid #EAECF0"}},a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},a.createElement("div",{style:{opacity:.5,display:"flex"}},t),a.createElement("span",{style:{fontSize:"14px",fontWeight:"600",color:"#0B0C0C"}},l)),a.createElement("button",{onClick:n,style:{display:"flex",alignItems:"center",gap:"5px",background:"none",border:"0.5px solid #D0D5DD",borderRadius:"6px",padding:"5px 12px",fontSize:"12px",fontWeight:"600",color:"#185FA5",cursor:"pointer"}},a.createElement(G,{size:12}),r)),a.createElement("div",{style:{padding:"4px 0"}},o.map((e,t)=>e.value?a.createElement("div",{key:t,style:{display:"flex",alignItems:"flex-start",padding:"10px 16px",borderBottom:t<o.length-1?"0.5px solid #F2F4F7":"none"}},a.createElement("div",{style:{flex:"0 0 180px",fontSize:"12px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",paddingTop:"1px"}},e.label),a.createElement("div",{style:{flex:1,fontSize:"14px",color:"#101828",fontWeight:"500",wordBreak:"break-word"}},e.value)):null)))},q=()=>{var e,t,o,i;const{t:s}=r.useTranslation(),c=l.useHistory(),d=l.useLocation(),{kNumber:m="EKYC-1234567890",aadhaarDetails:p={},addressDetails:E={},propertyDetails:u={}}=d.state||{};return a.createElement("div",{className:"inbox-container"},a.createElement("style",null,"\n @keyframes fadeSlideIn {\n from { opacity: 0; transform: translateY(8px); }\n to { opacity: 1; transform: translateY(0); }\n }\n "),a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{style:{display:"flex",alignItems:"center",padding:"12px 16px",marginBottom:"12px",borderRadius:"8px"}},a.createElement("div",{style:{color:"#185FA5",marginRight:"10px",display:"flex"}},a.createElement(n.HomeIcon,{style:{width:"20px",height:"20px"}})),a.createElement("div",{style:{fontWeight:"600",fontSize:"15px",color:"#0B0C0C"}},s("EKYC_PROCESS")||"eKYC Process")),a.createElement("div",{style:{background:"#fff",padding:"16px 14px",borderRadius:"8px",border:"1px solid #EAECF0"}},[{label:s("EKYC_STEP_AADHAAR")||"Aadhaar",done:!0,active:!1},{label:s("EKYC_STEP_ADDRESS")||"Address",done:!0,active:!1},{label:s("EKYC_STEP_PROPERTY")||"Property",done:!0,active:!1},{label:s("EKYC_STEP_REVIEW")||"Review",done:!1,active:!0}].map((e,t)=>a.createElement("div",{key:t,style:{display:"flex",gap:"10px",alignItems:"flex-start",position:"relative",paddingBottom:t<3?"18px":0}},t<3&&a.createElement("div",{style:{position:"absolute",left:"10px",top:"22px",width:"1px",height:"calc(100% - 10px)",background:"#EAECF0"}}),a.createElement("div",{style:{width:"20px",height:"20px",borderRadius:"50%",flexShrink:0,marginTop:"1px",border:e.done?"none":e.active?"1.5px solid #185FA5":"1.5px solid #D0D5DD",background:e.done?"#0F6E56":e.active?"#E6F1FB":"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px",fontWeight:"500",color:e.done?"#fff":e.active?"#185FA5":"#98A2B3"}},e.done?a.createElement(V,{size:11,color:"#fff"}):t+1),a.createElement("div",{style:{fontSize:"12px",paddingTop:"2px",color:e.done?"#0F6E56":e.active?"#0B0C0C":"#667085",fontWeight:e.done||e.active?"600":"400"}},e.label))))),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:"20px"}},a.createElement(n.CardHeader,{style:{margin:0,fontSize:"18px"}},s("EKYC_REVIEW_DETAILS")||"Review Details"),a.createElement("div",{style:{background:"#F9FAFB",border:"0.5px solid #EAECF0",borderRadius:"20px",padding:"4px 14px",fontSize:"12px",color:"#667085"}},s("EKYC_K_NUMBER")||"K Number",":"," ",a.createElement("span",{style:{color:"#0B0C0C",fontWeight:"600"}},m))),a.createElement("div",{style:{backgroundColor:"#E1F5EE",border:"0.5px solid #5DCAA5",borderRadius:"8px",padding:"12px 16px",display:"flex",alignItems:"center",gap:"10px",marginBottom:"24px"}},a.createElement("div",{style:{backgroundColor:"#9FE1CB",padding:"5px",borderRadius:"6px",display:"flex",flexShrink:0}},a.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#085041",strokeWidth:"3",strokeLinecap:"round"},a.createElement("polyline",{points:"20 6 9 17 4 12"}))),a.createElement("div",{style:{fontSize:"13px",color:"#04342C",fontWeight:"500"}},s("EKYC_REVIEW_NOTICE")||"Please review all details carefully before submitting. You can edit any section by clicking Edit.")),a.createElement("div",{style:{animation:"fadeSlideIn 0.3s ease"}},a.createElement(Z,{icon:a.createElement(U,{size:16}),label:s("EKYC_AADHAAR_VERIFICATION_HEADER")||"Aadhaar details"}),a.createElement($,{icon:a.createElement(U,{size:16}),title:s("EKYC_AADHAAR_VERIFICATION_HEADER")||"Aadhaar details",onEdit:()=>{c.push("/digit-ui/employee/ekyc/aadhaar-verification",d.state)},editLabel:s("CS_COMMON_EDIT")||"Edit",rows:[{label:s("EKYC_NAME")||"Name",value:p.userName||"Rajesh Kumar Singh"},{label:s("EKYC_AADHAAR")||"Aadhaar no.",value:p.aadhaarLastFour?"XXXX XXXX "+p.aadhaarLastFour:"XXXX XXXX 1234"},{label:s("EKYC_MOBILE_NO")||"Mobile no.",value:p.mobileNumber||"XXXXXXXXXX"},{label:s("EKYC_EMAIL_ADDRESS")||"Email",value:p.email||null}]}),a.createElement("hr",{style:{margin:"20px 0",border:0,borderTop:"1px solid #EAECF0"}}),a.createElement(Z,{icon:a.createElement(X,{size:16}),label:s("EKYC_ADDRESS_DETAILS_HEADER")||"Address details"}),a.createElement($,{icon:a.createElement(X,{size:16}),title:s("EKYC_ADDRESS_DETAILS_HEADER")||"Address details",onEdit:()=>{c.push("/digit-ui/employee/ekyc/address-details",d.state)},editLabel:s("CS_COMMON_EDIT")||"Edit",rows:[{label:s("EKYC_FULL_ADDRESS")||"Full address",value:E.fullAddress||"H.No. 123, Sector 15, Rohini, Delhi – 110085"},{label:s("EKYC_FLAT_HOUSE_NUMBER")||"Flat / House no.",value:E.flatNo||null},{label:s("EKYC_BUILDING_TOWER")||"Building",value:E.building||null},{label:s("EKYC_LANDMARK")||"Landmark",value:E.landmark||null},{label:s("EKYC_PINCODE")||"Pincode",value:E.pincode||"110085"},{label:s("EKYC_ASSEMBLY")||"Assembly",value:E.assembly||"AC-12 Chandni Chowk"},{label:s("EKYC_WARD")||"Ward",value:E.ward||"WARD-45 Civil Lines"}]}),a.createElement("hr",{style:{margin:"20px 0",border:0,borderTop:"1px solid #EAECF0"}}),a.createElement(Z,{icon:a.createElement(j,{size:16}),label:s("EKYC_PROPERTY_INFO")||"Property details"}),a.createElement($,{icon:a.createElement(j,{size:16}),title:s("EKYC_PROPERTY_INFO")||"Property details",onEdit:()=>{c.push("/digit-ui/employee/ekyc/property-info",d.state)},editLabel:s("CS_COMMON_EDIT")||"Edit",rows:[{label:s("EKYC_PROPERTY_OWNER")||"Property owner",value:u.ownerType||"Owner"},{label:s("EKYC_PID_NUMBER")||"PID number",value:u.pidNumber||null},{label:s("EKYC_TYPE_OF_CONNECTION")||"Type of connection",value:(null===(e=u.connectionCategory)||void 0===e?void 0:e.label)||null},{label:s("EKYC_CONNECTION_CATEGORY")||"Connection category",value:(null===(t=u.connectionType)||void 0===t?void 0:t.label)||null},{label:s("EKYC_USER_TYPE")||"User type",value:(null===(o=u.userType)||void 0===o?void 0:o.label)||null},{label:s("EKYC_NO_OF_FLOORS")||"No. of floors",value:(null===(i=u.noOfFloors)||void 0===i?void 0:i.label)||null}]})),a.createElement("div",{style:{marginTop:"24px"}},a.createElement(n.SubmitBar,{label:s("ES_COMMON_SUBMIT")||"Submit",onSubmit:()=>{c.push("/digit-ui/employee/ekyc/dashboard")}})),a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px",marginTop:"16px",fontSize:"11px",color:"#98A2B3"}},a.createElement("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},a.createElement("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),a.createElement("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})),s("EKYC_SECURE_DATA_NOTICE")||"Your data is encrypted and secure"))))},J=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(m,{parentRoute:t,businessService:"EKYC",moduleCode:"EKYC",isInbox:!0})}),a.createElement(n.PrivateRoute,{path:t+"/create-kyc",component:()=>a.createElement(E,null)}),a.createElement(n.PrivateRoute,{path:t+"/aadhaar-verification",component:()=>a.createElement(O,null)}),a.createElement(n.PrivateRoute,{path:t+"/address-details",component:()=>a.createElement(b,null)}),a.createElement(n.PrivateRoute,{path:t+"/property-info",component:()=>a.createElement(W,null)}),a.createElement(n.PrivateRoute,{path:t+"/review",component:()=>a.createElement(q,null)}),a.createElement(n.PrivateRoute,{path:t+"/",component:()=>a.createElement(m,{parentRoute:t,businessService:"EKYC",moduleCode:"EKYC",isInbox:!0})}))))},Q=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(J,{path:o,url:i,userType:n,tenants:r}):null},ee={EKYCModule:Q,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:m,EKYCDesktopInbox:i,EKYCMobileInbox:c,EKYC_INBOX_FILTER:e=>a.createElement(d,e)};exports.EkycModule=Q,exports.default=Q,exports.initEkycComponents=()=>{Object.entries(ee).forEach(e=>{let[t,a]=e;Digit.ComponentRegistryService.setComponent(t,a)})};