@djb25/digit-ui-module-ekyc 1.0.5 → 1.0.6
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +217 -89
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DesktopInbox.js +2 -2
- package/src/components/Filter.js +5 -4
- package/src/pages/employee/AadhaarVerification.js +54 -5
- package/src/pages/employee/AddressDetails.js +28 -28
- package/src/pages/employee/Inbox.js +3 -4
- package/src/pages/employee/PropertyInfo.js +31 -14
- package/src/pages/employee/Review.js +103 -5
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: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)})};
|
|
1
|
+
var e,t=require("react"),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,l=require("react-router-dom"),a=require("@djb25/digit-ui-react-components"),r=require("react-i18next");const o=e=>{let{countData:t}=e;const{t:l}=r.useTranslation();return n.createElement("div",{className:"ekyc-status-container"},n.createElement("div",{className:"ekyc-status-card"},n.createElement("div",{className:"count"},(null==t?void 0:t.total)||0),n.createElement("div",{className:"label"},l("EKYC_TOTAL"))),n.createElement("div",{className:"ekyc-status-card"},n.createElement("div",{className:"count pending"},(null==t?void 0:t.pending)||0),n.createElement("div",{className:"label"},l("EKYC_PENDING"))),n.createElement("div",{className:"ekyc-status-card"},n.createElement("div",{className:"count completed"},(null==t?void 0:t.completed)||0),n.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,_]=n.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:a}=e;const r=(null===(t=a.original)||void 0===t?void 0:t.applicationNumber)||"NA";return n.createElement(l.Link,{to:`${C}/application-details/${r}`},n.createElement("span",{className:"ekyc-application-link"},r))}},{Header:b("EKYC_CITIZEN_NAME"),accessor:"citizenName",Cell:e=>{var t;let{row:l}=e;return n.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 a=(null===(t=l.original)||void 0===t?void 0:t.status)||"DEFAULT";return n.createElement("span",{className:"ekyc-status-tag "+a},b(""+a))}}],[b,C]),T=t.useMemo(()=>(null==c?void 0:c.items)||[],[c]);return n.createElement("div",{className:"inbox-container",style:{paddingBottom:"16px"}},n.createElement("div",{className:"filters-container"},n.createElement(a.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},n.createElement("div",{className:"icon-container",style:{color:"#3A8DCC",marginRight:"12px"}},n.createElement(a.HomeIcon,{style:{width:"24px",height:"24px"}})),n.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},b("ACTION_TEST_EKYC"))),n.createElement("div",null,S&&n.createElement(S,{defaultSearchParams:s.defaultSearchParams,onFilterChange:s.onSearch,searchParams:f,type:"desktop",moduleCode:"EKYC"}))),n.createElement("div",{style:{flex:1,marginLeft:"16px"}},n.createElement(a.Card,{className:"ekyc-metrics-card",style:{marginBottom:"16px",padding:"16px"}},n.createElement(o,{countData:h})),n.createElement("div",{className:"result",style:{flex:1}},n.createElement(a.Card,{className:"ekyc-table-card",style:{padding:0}},n.createElement(a.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(n=>({...n,[e]:t}))},u=e=>{e&&e.preventDefault&&e.preventDefault(),l(m)};return n.createElement("div",{className:"inbox-container"},n.createElement("div",{className:"filters-container"},n.createElement(a.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},n.createElement("div",{className:"icon-container",style:{color:"#3A8DCC",marginRight:"12px"}},n.createElement(a.HomeIcon,{style:{width:"24px",height:"24px"}})),n.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},d("ACTION_CREATE_EKYC"))),n.createElement("div",null,i&&n.createElement(i,{defaultSearchParams:c.defaultSearchParams,onFilterChange:c.onSearch,searchParams:o,type:"desktop",moduleCode:"EKYC"}))),n.createElement("div",{style:{flex:1,marginLeft:"16px"}},n.createElement(a.Card,{className:"ekyc-search-card",style:{padding:"24px",marginBottom:"24px",borderRadius:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.05)"}},n.createElement(a.Header,{style:{fontSize:"24px",marginBottom:"20px",fontWeight:"700",color:"#0B0C0C"}},d("EKYC_SEARCH_CONSUMER_HEADER")),n.createElement("form",{onSubmit:u},n.createElement("div",{style:{display:"flex",gap:"24px",alignItems:"flex-end",flexWrap:"wrap"}},n.createElement("div",{style:{flex:"1",minWidth:"250px"}},n.createElement("div",{className:"filter-label",style:{fontWeight:"600",marginBottom:"8px",fontSize:"14px",color:"#505A5F"}},d("EKYC_K_NUMBER")),n.createElement("div",{style:{position:"relative"}},n.createElement(a.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"}}))),n.createElement("div",{style:{flex:"1",minWidth:"250px"}},n.createElement("div",{className:"filter-label",style:{fontWeight:"600",marginBottom:"8px",fontSize:"14px",color:"#505A5F"}},d("EKYC_K_NAME")),n.createElement("div",{style:{position:"relative"}},n.createElement(a.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"}})))),n.createElement("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"20px"}},n.createElement("div",{style:{display:"flex",gap:"12px",alignItems:"center"}},n.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")),n.createElement(a.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")]:n.createElement("span",{className:"ekyc-status-tag "+e.status},u("EKYC_STATUS_"+e.status))})))||[];return n.createElement("div",{className:"inbox-wrapper"},n.createElement("div",{className:"ekyc-header-container module-header"},n.createElement(a.Header,{className:"title"},u("EKYC_INBOX_HEADER")),n.createElement(l.Link,{to:p+"/create-kyc"},n.createElement(a.SubmitBar,{label:u("EKYC_CREATE_KYC")}))),n.createElement("div",{className:"ekyc-metrics-section"},n.createElement(o,{countData:E})),n.createElement(s,{onSearch:d,searchParams:m}),n.createElement("div",{className:"mobile-data-container"},c?n.createElement(a.Loader,null):(null==g?void 0:g.length)>0?n.createElement(a.DetailsCard,{data:g,t:u,serviceRequestIdKey:u("EKYC_APPLICATION_NO"),linkPrefix:p+"/application-details/"}):n.createElement(a.Card,null,u("ES_COMMON_NO_DATA").split("\\n").map((e,t)=>n.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 n.createElement(a.FilterForm,{onSubmit:()=>{o(d)},handleSubmit:e=>t=>{t&&t.preventDefault(),e()},onResetFilterForm:()=>{m({...i}),o({...i})},id:"ekyc-filter-form",onMobileExclusiveFilterPopupFormClose:s.onClose},n.createElement(a.FilterFormField,null,n.createElement("div",{className:"filter-label",style:{fontWeight:"normal"}},c("EKYC_STATUS"),":"),n.createElement(a.Dropdown,{option:[{label:c("EKYC_STATUS_ALL"),value:""},{label:c("EKYC_STATUS_ACTIVE"),value:"ACTIVE"},{label:c("EKYC_STATUS_PENDING"),value:"PENDING START"}],optionKey:"label",select:e=>{const t={...d,status:e};m(t),o(t)},selected:(null==d?void 0:d.status)||{label:c("EKYC_STATUS_ALL"),value:""}})))},m=e=>{var l,a;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===(a=S.dashboardInfo)||void 0===a?void 0:a.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)},[]),I=t.useMemo(()=>[{label:p("EKYC_STATUS"),name:"status",type:"dropdown",options:[{label:p("EKYC_STATUS_ALL"),value:""},{label:p("EKYC_STATUS_ACTIVE"),value:"ACTIVE"},{label:p("EKYC_STATUS_PENDING"),value:"PENDING START"}],optionsKey:"label"}],[p]);return n.createElement("div",{className:"ekyc-employee-container"},n.createElement("div",{className:"inbox-main-container"},Digit.Utils.browser.isMobile()?n.createElement(c,{data:{items:A,totalCount:N},isLoading:b||_,onSearch:R,searchFields:I,searchParams:y,parentRoute:o,countData:T}):n.createElement(i,{businessService:s,data:{items:A,totalCount:N},isLoading:b||_,searchFields:I,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?n.createElement(a.Loader,null):s?n.createElement(n.Fragment,null,n.createElement(a.Card,{className:"ekyc-create-card",style:{padding:"24px"}},n.createElement(a.CardHeader,null,d("EKYC_K_NUMBER_DETAILS")),n.createElement(a.StatusTable,null,n.createElement(a.Row,{label:d("EKYC_K_NUMBER"),text:o||d("CS_NA")}),n.createElement(a.Row,{label:d("EKYC_K_NAME"),text:i||d("CS_NA")})),n.createElement(a.CardHeader,{style:{marginTop:"24px"}},d("EKYC_CONNECTION_DETAILS")),null!=s&&s.connectionDetails?n.createElement(a.StatusTable,null,n.createElement(a.Row,{label:d("EKYC_CONSUMER_NAME"),text:s.connectionDetails.consumerName||d("CS_NA")}),n.createElement(a.Row,{label:d("EKYC_ADDRESS"),text:s.connectionDetails.address||d("CS_NA")}),n.createElement(a.Row,{label:d("EKYC_CONNECTION_TYPE"),text:s.connectionDetails.connectionType||d("CS_NA")}),n.createElement(a.Row,{label:d("EKYC_METER_NO"),text:s.connectionDetails.meterNumber||d("CS_NA")}),n.createElement(a.Row,{label:d("EKYC_PHONE_NO"),text:s.connectionDetails.phoneNumber||d("CS_NA")}),n.createElement(a.Row,{label:d("EKYC_EMAIL"),text:s.connectionDetails.email||d("CS_NA")}),n.createElement(a.Row,{label:d("EKYC_STATUS"),text:s.connectionDetails.statusflag||d("CS_NA")})):n.createElement(a.CardLabel,null,d("EKYC_NO_CONNECTION_DETAILS_FOUND")),n.createElement("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"16px"}},n.createElement(a.SubmitBar,{label:d("EKYC_START_VERIFICATION"),onSubmit:()=>{u(!0)},style:{borderRadius:"12px",margin:0}}))),E&&n.createElement(a.Modal,{headerBarMain:d("EKYC_SELECT_VERIFICATION_TYPE"),headerBarEnd:n.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"}},n.createElement("div",{style:{padding:"24px"}},n.createElement(a.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 n,l,a,r;m({error:!0,label:(null==t||null===(n=t.response)||void 0===n||null===(l=n.data)||void 0===l||null===(a=l.Errors)||void 0===a||null===(r=a[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 n.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&&n.createElement(p,{kNumber:l.kNumber,kName:l.kName,connectionDetails:g,isLoading:u}),!i&&!u&&n.createElement(a.Card,{style:{textAlign:"center",padding:"40px"}},n.createElement("div",{style:{color:"#667085"}},e("EKYC_SEARCH_TO_VIEW_DETAILS"))),d&&n.createElement(a.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 n=arguments[t];for(var l in n)({}).hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e}).apply(null,arguments)}function g(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function x(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,n)}"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));const C=e=>{let{size:t=28}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},n.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"}))},f=e=>{let{size:t=20}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},n.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"}))},v=e=>{let{size:t=18}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},n.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"}))},y=e=>{let{size:t=16}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"#D92D20",strokeWidth:"2",strokeLinecap:"round"},n.createElement("polyline",{points:"3 6 5 6 21 6"}),n.createElement("path",{d:"M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"}),n.createElement("path",{d:"M10 11v6M14 11v6"}),n.createElement("path",{d:"M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"}))},h=e=>{let{size:t=11,color:l="#fff"}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:l,strokeWidth:"3",strokeLinecap:"round"},n.createElement("polyline",{points:"20 6 9 17 4 12"}))},b=e=>{let{icon:t,topAligned:l=!1,inputStyle:r={},...o}=e;return n.createElement("div",{style:{position:"relative",width:"100%"}},n.createElement("div",{style:{position:"absolute",left:"10px",...l?{top:"14px"}:{top:"50%",transform:"translateY(-50%)"},zIndex:1,opacity:.45,display:"flex",pointerEvents:"none"}},t),n.createElement(a.TextInput,u({textInputStyle:{paddingLeft:"36px",paddingRight:"12px",...r}},o)))},S=e=>{let{icon:t,label:l}=e;return n.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"16px",marginTop:"4px"}},n.createElement("div",{style:{opacity:.5,display:"flex"}},t),n.createElement("span",{style:{fontSize:"15px",fontWeight:"600",color:"#0B0C0C",whiteSpace:"nowrap"}},l),n.createElement("div",{style:{flex:1,height:"1px",background:"#EAECF0"}}))},_=e=>{var o,i,s,c,d;let{isSection:m=!1,onComplete:p,parentState:E}=e;const{t:u}=r.useTranslation(),_=l.useHistory(),A=l.useLocation(),T=E||A.state||{kNumber:"EKYC-1234567890",selectedOption:{code:"SELF",name:"EKYC_SELF"},connectionDetails:null},N=(null===(o=T.connectionDetails)||void 0===o?void 0:o.addressDetails)||{},[R,D]=t.useState({code:"AADHAAR",name:"EKYC_AADHAAR_ADDRESS"}),[I,Y]=t.useState({code:"NO",name:"CORE_COMMON_NO"}),[k,O]=t.useState(N.fullAddress||""),[K,F]=t.useState(N.flatHouseNumber||""),[B,P]=t.useState(N.buildingTower||""),[L,w]=t.useState(N.landmark||""),[M,z]=t.useState(N.pinCode||""),[H,W]=t.useState(null),[V,U]=t.useState(!1),j=t.useRef(null),X=Digit.ULBService.getCurrentTenantId(),{data:G,isLoading:Z}=Digit.Hooks.useCommonMDMS(X,"egov-location",["TenantBoundary"]),$=(null==G?void 0:G.MdmsRes)||G,q=(null==$||null===(i=$["egov-location"])||void 0===i||null===(s=i.TenantBoundary)||void 0===s?void 0:s.find(e=>"ADMIN"===e.hierarchyType.code))||(null==$||null===(c=$["egov-location"])||void 0===c||null===(d=c.TenantBoundary)||void 0===d?void 0:d[0]),J=null==q?void 0:q.boundary,Q=e=>{if(!e)return[];let t=[];for(const l of e){var n;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!==(n=l.children)&&void 0!==n&&n.length&&t.push(...Q(l.children))}return t},ee=e=>{if(!e)return[];let t=[];for(const l of e){var n;"block"===(l.label||l.name||"").toLowerCase().replace(/_/g," ")&&t.push({code:l.code,name:l.name}),null!==(n=l.children)&&void 0!==n&&n.length&&t.push(...ee(l.children))}return t},te=Q(Array.isArray(J)?J:J?[J]:[]),[ne,le]=t.useState(N.assembly?{name:N.assembly}:null),[ae,re]=t.useState(N.ward?{name:N.ward}:null);t.useEffect(()=>{if($&&N.assembly&&(null==ne||!ne.code)){const e=te.find(e=>e.name===N.assembly||e.code===N.assembly);e&&le(e)}},[$,te]);const oe=ne?ee(ne.children):[];t.useEffect(()=>{ne&&ae&&!oe.find(e=>e.name===ae.name)&&re(null)},[ne]);const ie=[{code:"AADHAAR",name:"EKYC_AADHAAR_ADDRESS"},{code:"OLD",name:"EKYC_OLD_ADDRESS"}],se=[{code:"YES",name:"CORE_COMMON_YES"},{code:"NO",name:"CORE_COMMON_NO"}],ce=()=>{const e={addressType:R,fullAddress:k,flatNo:K,building:B,landmark:L,pincode:M,doorPhoto:H,assembly:null==ne?void 0:ne.name,ward:null==ae?void 0:ae.name};if(p)p(e);else{const{kNumber:t,selectedOption:n,connectionDetails:l}=T;_.push("/digit-ui/employee/ekyc/property-info",{kNumber:t,selectedOption:n,connectionDetails:l,addressDetails:e})}},de=e=>{const t=e.target.files[0];if(!t)return;const n=new FileReader;n.onloadend=()=>W(n.result),n.readAsDataURL(t)},me=()=>{"geolocation"in navigator?(U(!0),navigator.geolocation.getCurrentPosition(function(e){let{coords:{latitude:t,longitude:n}}=e;try{return Promise.resolve(x(function(){return g(function(){return Promise.resolve(fetch(`https://nominatim.openstreetmap.org/reverse?format=json&lat=${t}&lon=${n}&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;O([t.amenity,t.road,t.neighbourhood,t.suburb,t.city,t.state,t.postcode].filter(Boolean).join(", ")),z(t.postcode||""),w(t.suburb||t.neighbourhood||""),F(t.amenity||"")}})})},function(e){console.error("Reverse geocode error:",e)})},function(e,t){if(U(!1),e)throw t;return t}))}catch(e){return Promise.reject(e)}},e=>{console.error("Geolocation error:",e),U(!1),alert(u("LOCATION_FETCH_FAILED"))},{enableHighAccuracy:!0,timeout:1e4,maximumAge:0})):alert(u("GEOLOCATION_NOT_SUPPORTED"))},pe=()=>n.createElement("div",{style:{animation:"fadeSlideIn 0.3s ease"}},n.createElement(S,{icon:n.createElement(a.LocationIcon,{className:"icon",styles:{fill:"#0B0C0C",width:"16px",height:"16px"}}),label:u("EKYC_ADDRESS_DETAILS_HEADER")}),n.createElement("div",{style:{marginBottom:"20px"}},n.createElement(a.RadioButtons,{options:ie,optionsKey:"name",selectedOption:R,onSelect:D,t:u,innerStyles:{display:"flex",alignItems:"center"},style:{display:"flex",gap:"40px"}})),"AADHAAR"===R.code&&n.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"}},n.createElement("div",{style:{backgroundColor:"#9FE1CB",padding:"6px",borderRadius:"6px",display:"flex",flexShrink:0}},n.createElement(a.LocationIcon,{className:"icon",styles:{fill:"#085041",width:"16px",height:"16px"}})),n.createElement("div",{style:{fontSize:"14px",lineHeight:"1.6",color:"#04342C",fontWeight:"500"}},N.fullAddress)),"OLD"===R.code&&n.createElement("div",{style:{animation:"fadeSlideIn 0.3s ease"}},n.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"14px"}},n.createElement(a.CardLabel,{style:{fontWeight:"500",marginBottom:0,fontSize:"13px",color:"#505A5F"}},u("EKYC_ADDRESS_CORRECTION_PROMPT")),n.createElement(a.RadioButtons,{options:se,optionsKey:"name",selectedOption:I,onSelect:Y,t:u,innerStyles:{display:"flex",gap:"20px"},style:{marginBottom:0}})),n.createElement("div",{onClick:V?void 0:me,style:{border:"0.5px solid #D0D5DD",borderRadius:"8px",padding:"12px 16px",display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"20px",cursor:V?"not-allowed":"pointer",backgroundColor:V?"#F9FAFB":"#fff",transition:"background 0.15s",opacity:V?.7:1},onMouseOver:e=>{V||(e.currentTarget.style.background="#F9FAFB")},onMouseOut:e=>{V||(e.currentTarget.style.background="#fff")}},n.createElement("div",{style:{display:"flex",alignItems:"center",gap:"12px"}},n.createElement("div",{style:{backgroundColor:"#E6F1FB",padding:"7px",borderRadius:"7px",display:"flex"}},V?n.createElement("div",{style:{width:"18px",height:"18px",border:"2px solid #185FA5",borderTopColor:"transparent",borderRadius:"50%",animation:"spin 1s linear infinite"}}):n.createElement(f,{size:18})),n.createElement("span",{style:{fontWeight:"500",fontSize:"14px",color:"#344054"}},u(V?"EKYC_FETCHING_LOCATION":"EKYC_USE_CURRENT_LOCATION"))),!V&&n.createElement("span",{style:{fontSize:"18px",color:"#98A2B3",lineHeight:1}},"›")),n.createElement("div",{style:{marginBottom:"14px"}},n.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},u("EKYC_FULL_ADDRESS")),n.createElement(b,{icon:n.createElement(a.PropertyHouse,{styles:{fill:"#0068fa",width:"15px",height:"15px"}}),topAligned:!0,value:k,onChange:e=>O(e.target.value),placeholder:u("EKYC_ENTER_FULL_ADDRESS"),inputStyle:{minHeight:"72px"}})),n.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"14px",marginBottom:"14px"}},n.createElement("div",null,n.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},u("EKYC_FLAT_HOUSE_NUMBER")),n.createElement(b,{icon:n.createElement(a.PropertyHouse,{styles:{fill:"#0068fa",width:"15px",height:"15px"}}),value:K,onChange:e=>F(e.target.value),placeholder:u("EKYC_ENTER_FLAT_NO")})),n.createElement("div",null,n.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},u("EKYC_BUILDING_TOWER")),n.createElement(b,{icon:n.createElement(a.PropertyHouse,{styles:{fill:"#0068fa",width:"15px",height:"15px"}}),value:B,onChange:e=>P(e.target.value),placeholder:u("EKYC_ENTER_BUILDING")}))),n.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"14px",marginBottom:"4px"}},n.createElement("div",null,n.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},u("EKYC_LANDMARK")),n.createElement(b,{icon:n.createElement(a.LocationIcon,{className:"icon",styles:{fill:"#0068fa",width:"15px",height:"15px"}}),value:L,onChange:e=>w(e.target.value),placeholder:u("EKYC_ENTER_LANDMARK")})),n.createElement("div",null,n.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},u("EKYC_PINCODE")),n.createElement(b,{icon:n.createElement(v,{size:15}),value:M,onChange:e=>{/^\d*$/.test(e.target.value)&&z(e.target.value)},placeholder:u("EKYC_ENTER_PINCODE"),maxLength:6})))),n.createElement("hr",{style:{margin:"24px 0",border:0,borderTop:"1px solid #EAECF0"}}),n.createElement(S,{icon:n.createElement(a.PropertyHouse,{styles:{fill:"#0B0C0C",width:"16px",height:"16px"}}),label:u("EKYC_ADMINISTRATIVE_DIVISION")}),Z?n.createElement(a.Loader,null):n.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"14px",marginBottom:"24px"}},n.createElement("div",null,n.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},u("EKYC_ASSEMBLY")),n.createElement(a.Dropdown,{option:te,optionKey:"name",selected:ne,select:e=>{le(e),re(null)},t:u})),n.createElement("div",null,n.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},u("EKYC_WARD")||"Block"),n.createElement(a.Dropdown,{option:oe,optionKey:"name",selected:ae,select:re,disabled:!ne,t:u}))),n.createElement("hr",{style:{margin:"24px 0",border:0,borderTop:"1px solid #EAECF0"}}),n.createElement(S,{icon:n.createElement(C,{size:16}),label:u("EKYC_DOOR_PHOTO_HEADER")}),n.createElement("div",{style:{fontSize:"12px",color:"#667085",marginBottom:"12px"}},u("EKYC_REQUIRED_FOR_VERIFICATION")),n.createElement("div",{style:{backgroundColor:"#FFFAEB",border:"0.5px solid #FEDF89",borderRadius:"8px",padding:"12px 14px",display:"flex",alignItems:"flex-start",gap:"10px",marginBottom:"16px"}},n.createElement("div",{style:{flexShrink:0,marginTop:"1px"}},n.createElement(a.InfoBannerIcon,{fill:"#B54708"})),n.createElement("div",null,n.createElement("div",{style:{fontWeight:"600",color:"#B54708",fontSize:"13px",marginBottom:"2px"}},u("EKYC_IMPORTANT")),n.createElement("div",{style:{fontSize:"12px",color:"#92400E"}},u("EKYC_CAPTURE_LIVE_CAMERA")))),n.createElement("input",{type:"file",ref:j,onChange:de,accept:"image/*",style:{display:"none"}}),n.createElement("div",{onClick:H?void 0:()=>j.current.click(),onMouseOver:e=>{H||(e.currentTarget.style.borderColor="#185FA5")},onMouseOut:e=>{H||(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:H?"default":"pointer",overflow:"hidden",transition:"border-color 0.15s",position:"relative",padding:H?"0":"32px 24px"}},H?n.createElement(t.Fragment,null,n.createElement("img",{src:H,alt:"Door",style:{width:"100%",maxHeight:"280px",objectFit:"cover",display:"block"}}),n.createElement("button",{onClick:e=>{e.stopPropagation(),W(null),j.current&&(j.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"}},n.createElement(y,{size:13})," ",u("EKYC_REMOVE"))):n.createElement(t.Fragment,null,n.createElement("div",{style:{width:"52px",height:"52px",borderRadius:"50%",background:"#E6F1FB",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"12px"}},n.createElement(C,{size:26})),n.createElement("div",{style:{fontWeight:"600",fontSize:"14px",color:"#101828",marginBottom:"4px"}},u("EKYC_TAP_TO_CAPTURE")||"Tap to capture"),n.createElement("div",{style:{fontSize:"12px",color:"#667085"}},u("EKYC_CAPTURE_DOOR_IMAGE")))),m?n.createElement("div",{style:{marginTop:"24px"}},n.createElement(a.SubmitBar,{label:u("EKYC_COMPLETE_VERIFICATION_AND_PROCEED"),onSubmit:ce})):n.createElement(a.ActionBar,null,n.createElement(a.SubmitBar,{label:u("EKYC_COMPLETE_VERIFICATION"),onSubmit:ce})),n.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px",marginTop:"16px",fontSize:"11px",color:"#98A2B3"}},n.createElement("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},n.createElement("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),n.createElement("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})),u("EKYC_SECURE_DATA_NOTICE")));return m?n.createElement(t.Fragment,null,n.createElement("hr",{style:{margin:"32px 0",border:0,borderTop:"2px solid #EAECF0"}}),pe()):n.createElement("div",{className:"inbox-container"},n.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 "),n.createElement("div",{className:"filters-container"},n.createElement(a.Card,{style:{display:"flex",alignItems:"center",padding:"12px 16px",marginBottom:"12px",borderRadius:"8px"}},n.createElement("div",{style:{color:"#185FA5",marginRight:"10px",display:"flex"}},n.createElement(a.HomeIcon,{style:{width:"20px",height:"20px"}})),n.createElement("div",{style:{fontWeight:"600",fontSize:"15px",color:"#0B0C0C"}},u("EKYC_PROCESS")||"eKYC Process")),n.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)=>n.createElement("div",{key:t,style:{display:"flex",gap:"10px",alignItems:"flex-start",position:"relative",paddingBottom:t<3?"18px":0}},t<3&&n.createElement("div",{style:{position:"absolute",left:"10px",top:"22px",width:"1px",height:"calc(100% - 10px)",background:"#EAECF0"}}),n.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?n.createElement(h,{size:11,color:"#fff"}):t+1),n.createElement("div",{style:{fontSize:"12px",paddingTop:"2px",color:e.done?"#0F6E56":e.active?"#0B0C0C":"#667085",fontWeight:e.done||e.active?"600":"400"}},e.label))))),n.createElement("div",{style:{flex:1,marginLeft:"16px"}},n.createElement(a.Card,null,n.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"}},n.createElement(a.CardHeader,{style:{margin:0,fontSize:"18px"}},u("EKYC_ADDRESS_DETAILS_HEADER")||"Address Details"),n.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",":"," ",n.createElement("span",{style:{color:"#0B0C0C",fontWeight:"600"}},null==T?void 0:T.kNumber))),pe())))},A=e=>{let{size:t=16}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"},n.createElement("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),n.createElement("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"}))},T=e=>{let{size:t=16,color:l="currentColor"}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:l,strokeWidth:"1.8",strokeLinecap:"round"},n.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),n.createElement("circle",{cx:"12",cy:"7",r:"4"}))},N=e=>{let{size:t=16,color:l="currentColor"}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:l,strokeWidth:"1.8",strokeLinecap:"round"},n.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"}))},R=e=>{let{size:t=16}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},n.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"}),n.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"}))},D=e=>{let{size:t=16,color:l="currentColor"}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:l,strokeWidth:"1.8",strokeLinecap:"round"},n.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"}),n.createElement("path",{d:"M22 6l-10 7L2 6"}))},I=e=>{let{size:t=16,color:l="currentColor"}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:l,strokeWidth:"1.8",strokeLinecap:"round"},n.createElement("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),n.createElement("circle",{cx:"9",cy:"7",r:"4"}),n.createElement("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75"}))},Y=e=>{let{size:t=15,color:l="#1D9E75"}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:l,strokeWidth:"2.8",strokeLinecap:"round"},n.createElement("polyline",{points:"20 6 9 17 4 12"}))},k=e=>{let{icon:t,rightIcon:l,inputStyle:r={},...o}=e;return n.createElement("div",{style:{position:"relative",width:"100%"}},n.createElement("div",{style:{position:"absolute",left:"10px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.45,display:"flex",pointerEvents:"none"}},t),n.createElement(a.TextInput,u({textInputStyle:{paddingLeft:"36px",paddingRight:l?"36px":"12px",...r}},o)),l&&n.createElement("div",{style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",display:"flex"}},l))},O=e=>{let{icon:t,label:l}=e;return n.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"16px",marginTop:"4px"}},n.createElement("div",{style:{opacity:.5,display:"flex"}},t),n.createElement("span",{style:{fontSize:"15px",fontWeight:"600",color:"#0B0C0C",whiteSpace:"nowrap"}},l),n.createElement("div",{style:{flex:1,height:"1px",background:"#EAECF0"}}))},K=e=>{let{label:t,selected:l,onSelect:r,t:o,options:i}=e;return n.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"}},n.createElement(a.CardLabel,{style:{fontWeight:"500",marginBottom:0,fontSize:"13px",color:"#505A5F"}},t),n.createElement(a.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}}))},F=()=>{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(!1),[b,S]=t.useState(""),[F,B]=t.useState(!1),[P,L]=t.useState({code:"NO",name:"CORE_COMMON_NO"}),[w,M]=t.useState(E.consumerName||""),[z,H]=t.useState({code:"NO",name:"CORE_COMMON_NO"}),[W,V]=t.useState(E.phoneNumber||""),[U,j]=t.useState(E.phoneNumber||""),[X,G]=t.useState(E.email||""),[Z,$]=t.useState((null==p||null===(e=p.addressDetails)||void 0===e?void 0:e.noOfPerson)||""),[q,J]=t.useState(!1),[Q,ee]=t.useState(null),te=[{code:"YES",name:"CORE_COMMON_YES"},{code:"NO",name:"CORE_COMMON_NO"}],ne={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 n.createElement("div",{className:"inbox-container"},n.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 "),n.createElement("div",{className:"filters-container"},n.createElement(a.Card,{style:{display:"flex",alignItems:"center",padding:"12px 16px",marginBottom:"12px",borderRadius:"8px"}},n.createElement("div",{style:{color:"#185FA5",marginRight:"10px",display:"flex"}},n.createElement(a.HomeIcon,{style:{width:"20px",height:"20px"}})),n.createElement("div",{style:{fontWeight:"600",fontSize:"15px",color:"#0B0C0C"}},o("EKYC_PROCESS")||"eKYC Process")),n.createElement("div",{style:{background:"#fff",padding:"16px 14px",borderRadius:"8px",border:"1px solid #EAECF0"}},[{label:o("EKYC_STEP_AADHAAR")||"Aadhaar",done:q,active:!q},{label:o("EKYC_STEP_ADDRESS")||"Address",done:null!==Q,active:q&&null===Q},{label:o("EKYC_STEP_PROPERTY")||"Property",done:!1,active:!1},{label:o("EKYC_STEP_REVIEW")||"Review",done:!1,active:!1}].map((e,t)=>n.createElement("div",{className:"ekyc-sidebar-step",key:t},n.createElement("div",{className:"ekyc-step-dot"+(e.done?" done":e.active?" active":"")},e.done?n.createElement(Y,{size:11,color:"#fff"}):t+1),t<3&&n.createElement("div",{className:"ekyc-step-line"}),n.createElement("div",{className:"ekyc-step-label"+(e.done?" done":e.active?" active":"")},e.label))))),n.createElement("div",{style:{flex:1,marginLeft:"16px"}},n.createElement(a.Card,null,n.createElement("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:"20px"}},n.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",":"," ",n.createElement("span",{style:{color:"#0B0C0C",fontWeight:"600"}},d))),n.createElement(O,{icon:n.createElement(A,{size:16}),label:o("EKYC_AADHAAR_NUMBER_HEADER")||"Aadhaar Number"}),n.createElement("div",{className:"ekyc-field-label"},o("EKYC_LAST_4_DIGIT_AADHAAR")||"Enter 12 digits of Aadhaar"),n.createElement(a.LabelFieldPair,null,n.createElement("div",{className:"field"},n.createElement(k,{icon:n.createElement(A,{size:15}),rightIcon:x?n.createElement(Y,{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?ne.verifiedInput:{}}))),!x&&!y&&n.createElement(a.SubmitBar,{label:f?o("EKYC_VERIFYING")||"Verifying...":o("EKYC_VERIFY_AADHAAR_BTN")||"Verify Aadhaar",onSubmit:()=>{12!==u.length||f||(v(!0),setTimeout(()=>{v(!1),h(!0)},1200))},disabled:12!==u.length||f,style:{marginTop:"12px"}}),!x&&y&&n.createElement(t.Fragment,null,n.createElement("div",{className:"ekyc-field-label",style:{marginTop:"16px"}},o("EKYC_ENTER_OTP")||"Enter OTP"),n.createElement(a.LabelFieldPair,null,n.createElement("div",{className:"field"},n.createElement(k,{icon:n.createElement(A,{size:15}),value:b,onChange:e=>{const t=e.target.value;/^\d*$/.test(t)&&(S(t),F&&B(!1))},placeholder:o("EKYC_ENTER_OTP_PLACEHOLDER")||"Enter 123456",maxLength:6}))),F&&n.createElement("div",{style:{color:"#D4351C",fontSize:"12px",marginTop:"4px"}},o("EKYC_INVALID_OTP")||"Invalid OTP. Please enter 123456."),n.createElement(a.SubmitBar,{label:o("EKYC_VERIFY_OTP_BTN")||"Verify OTP",onSubmit:()=>{"123456"===b?(C(!0),h(!1),B(!1),J(!0),setTimeout(()=>{var e;null===(e=c.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"})},100)):B(!0)},disabled:6!==b.length,style:{marginTop:"12px"}})),x&&n.createElement("div",{style:ne.verifiedCard},n.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"14px"}},n.createElement("div",{style:{width:"24px",height:"24px",borderRadius:"50%",background:"#9FE1CB",display:"flex",alignItems:"center",justifyContent:"center",animation:"pulseGreen 2s ease infinite",flexShrink:0}},n.createElement(Y,{size:13,color:"#085041"})),n.createElement("span",{style:{fontWeight:"600",color:"#085041",fontSize:"14px"}},o("EKYC_AADHAAR_VERIFIED_SUCCESS")||"Aadhaar Verified Successfully")),n.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px"}},n.createElement("div",null,n.createElement("div",{style:ne.infoLabel},o("EKYC_NAME")||"Name"),n.createElement("div",{style:ne.infoValue},E.consumerName)),n.createElement("div",null,n.createElement("div",{style:ne.infoLabel},o("EKYC_AADHAAR")||"Aadhaar"),n.createElement("div",{style:ne.infoValue},u)),n.createElement("div",{style:{gridColumn:"span 2"}},n.createElement("div",{style:ne.infoLabel},o("EKYC_ADDRESS")||"Address"),n.createElement("div",{style:{...ne.infoValue,fontSize:"13px"}},E.address)))),n.createElement("hr",{style:{margin:"24px 0",border:0,borderTop:"1px solid #EAECF0"}}),n.createElement(O,{icon:n.createElement(T,{size:16}),label:o("EKYC_CONTACT_DETAILS_HEADER")||"Contact Details"}),n.createElement(K,{label:`${o("EKYC_USER_NAME")} (${o("EKYC_NAME_CORRECT_HINT")})`,selected:P,onSelect:L,options:te,sty:!0,t:o}),n.createElement(a.LabelFieldPair,null,n.createElement("div",{className:"field"},n.createElement(k,{icon:n.createElement(T,{size:15,color:"YES"===P.code?"#64748b":"#94a3b8"}),style:{marginBottom:"12px"},value:w,onChange:e=>M(e.target.value),placeholder:o("EKYC_ENTER_NAME_PLACEHOLDER")||"Enter full name",disabled:"YES"!==P.code}))),n.createElement(K,{label:`${o("EKYC_USER_MOBILE_NUMBER")} (${o("EKYC_UPDATE_MOBILE_HINT")})`,selected:z,onSelect:H,options:te,t:o}),n.createElement(a.LabelFieldPair,null,n.createElement("div",{className:"field"},n.createElement(k,{icon:n.createElement(N,{size:15,color:"YES"===z.code?"#64748b":"#94a3b8"}),style:{marginBottom:"12px"},value:W,onChange:e=>V(e.target.value),placeholder:"+91 XXXXX XXXXX",disabled:"YES"!==z.code}))),n.createElement("div",{style:ne.twoCol},n.createElement("div",null,n.createElement("div",{className:"ekyc-field-label"},o("EKYC_WHATSAPP_NUMBER")||"WhatsApp Number"),n.createElement(k,{icon:n.createElement(R,{size:15}),value:U,onChange:e=>j(e.target.value),placeholder:"+91 XXXXX XXXXX"})),n.createElement("div",null,n.createElement("div",{className:"ekyc-field-label"},o("EKYC_EMAIL_ADDRESS")||"Email Address",n.createElement("span",{style:ne.optionalTag},o("EKYC_OPTIONAL")||"Optional")),n.createElement(k,{icon:n.createElement(D,{size:15}),value:X,onChange:e=>G(e.target.value),placeholder:o("EKYC_EMAIL_ADDRESS_PLACEHOLDER")||"example@email.com"}))),n.createElement("hr",{style:{margin:"24px 0",border:0,borderTop:"1px solid #EAECF0"}}),n.createElement(O,{icon:n.createElement(I,{size:16}),label:o("EKYC_FAMILY_DETAILS_HEADER")||"Family Details"}),n.createElement("div",{className:"ekyc-field-label"},o("EKYC_NO_OF_PERSONS")||"Number of Family Members"),n.createElement(a.LabelFieldPair,null,n.createElement("div",{className:"field"},n.createElement(k,{icon:n.createElement(I,{size:15}),value:Z,onChange:e=>{/^\d*$/.test(e.target.value)&&$(e.target.value)},placeholder:o("EKYC_ENTER_NO_OF_PERSONS")||"Enter total number of persons"}))),!q&&n.createElement("div",{style:{marginTop:"24px"}},n.createElement(a.SubmitBar,{label:o("ES_COMMON_SAVE_CONTINUE")||"Save & Continue",onSubmit:()=>{J(!0),setTimeout(()=>{var e;null===(e=c.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"})},100)}})),q&&n.createElement("div",{ref:c},n.createElement(_,{isSection:!0,onComplete:e=>{ee(e),s.push("/digit-ui/employee/ekyc/property-info",{kNumber:d,selectedOption:m,connectionDetails:p,aadhaarDetails:{aadhaarLastFour:u,isAadhaarVerified:x,userName:w,mobileNumber:W,whatsappNumber:U,email:X,noOfPersons:Z},addressDetails:e})},parentState:{kNumber:d,selectedOption:m,connectionDetails:p}})),n.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px",marginTop:"20px",fontSize:"11px",color:"#98A2B3"}},n.createElement(A,{size:11}),o("EKYC_SECURE_DATA_NOTICE")||"Your data is encrypted and secure"))))},B=e=>{let{size:t=11,color:l="#fff"}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:l,strokeWidth:"3",strokeLinecap:"round"},n.createElement("polyline",{points:"20 6 9 17 4 12"}))},P=e=>{let{size:t=16}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor"},n.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"}))},L=e=>{let{size:t=16}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor"},n.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"}))},w=e=>{let{size:t=16}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor"},n.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"}))},M=e=>{let{size:t=24}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor"},n.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"}))},z=e=>{let{size:t=14}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"#D92D20",strokeWidth:"2",strokeLinecap:"round"},n.createElement("polyline",{points:"3 6 5 6 21 6"}),n.createElement("path",{d:"M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"}),n.createElement("path",{d:"M10 11v6M14 11v6"}),n.createElement("path",{d:"M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"}))},H=e=>{let{size:t=16}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},n.createElement("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),n.createElement("path",{d:"M7 8h5M7 12h8M7 16h4"}))},W=e=>{let{icon:t,label:l}=e;return n.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"16px",marginTop:"4px"}},n.createElement("div",{style:{opacity:.5,display:"flex"}},t),n.createElement("span",{style:{fontSize:"15px",fontWeight:"600",color:"#0B0C0C",whiteSpace:"nowrap"}},l),n.createElement("div",{style:{flex:1,height:"1px",background:"#EAECF0"}}))},V=e=>{let{icon:t,...l}=e;return n.createElement("div",{style:{position:"relative",width:"100%"}},n.createElement("div",{style:{position:"absolute",left:"10px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.45,display:"flex",pointerEvents:"none"}},t),n.createElement(a.TextInput,u({textInputStyle:{paddingLeft:"36px",paddingRight:"12px"}},l)))},U=()=>{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),[I,Y]=t.useState(null),[k,O]=t.useState(null),[K,F]=t.useState(null),[U,j]=t.useState(null),X=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 n.createElement("div",{className:"inbox-container"},n.createElement("style",null,"\n @keyframes fadeSlideIn {\n from { opacity: 0; transform: translateY(8px); }\n to { opacity: 1; transform: translateY(0); }\n }\n "),n.createElement("div",{className:"filters-container"},n.createElement(a.Card,{style:{display:"flex",alignItems:"center",padding:"12px 16px",marginBottom:"12px",borderRadius:"8px"}},n.createElement("div",{style:{color:"#185FA5",marginRight:"10px",display:"flex"}},n.createElement(a.HomeIcon,{style:{width:"20px",height:"20px"}})),n.createElement("div",{style:{fontWeight:"600",fontSize:"15px",color:"#0B0C0C"}},E("EKYC_PROCESS")||"eKYC Process")),n.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)=>n.createElement("div",{key:t,style:{display:"flex",gap:"10px",alignItems:"flex-start",position:"relative",paddingBottom:t<3?"18px":0}},t<3&&n.createElement("div",{style:{position:"absolute",left:"10px",top:"22px",width:"1px",height:"calc(100% - 10px)",background:"#EAECF0"}}),n.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?n.createElement(B,{size:11,color:"#fff"}):t+1),n.createElement("div",{style:{fontSize:"12px",paddingTop:"2px",color:e.done?"#0F6E56":e.active?"#0B0C0C":"#667085",fontWeight:e.done||e.active?"600":"400"}},e.label))))),n.createElement("div",{style:{flex:1,marginLeft:"16px"}},n.createElement(a.Card,null,n.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"}},n.createElement(a.CardHeader,{style:{margin:0,fontSize:"18px"}},E("EKYC_PROPERTY_DETAILS_HEADER")||"Property Details"),n.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",":"," ",n.createElement("span",{style:{color:"#0B0C0C",fontWeight:"600"}},x))),n.createElement("div",{style:{animation:"fadeSlideIn 0.3s ease"}},n.createElement(W,{icon:n.createElement(L,{size:16}),label:E("EKYC_PROPERTY_DETAILS")||"Property details"}),n.createElement("div",{style:{marginBottom:"20px"}},n.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"8px"}},E("EKYC_PROPERTY_OWNER")||"Property owner"),n.createElement("div",{style:{display:"flex",backgroundColor:"#F2F4F7",padding:"4px",borderRadius:"10px",gap:"4px"}},["OWNER","TENANT"].map(e=>n.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"))))),n.createElement("div",{style:{marginBottom:"20px"}},n.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},E("EKYC_PID_NUMBER")||"PID number"," ",n.createElement("span",{style:{fontStyle:"italic",fontWeight:"400",textTransform:"none",color:"#98A2B3"}},"— ",E("EKYC_OPTIONAL")||"optional")),n.createElement(V,{icon:n.createElement(H,{size:15}),value:_,onChange:e=>A(e.target.value),placeholder:E("EKYC_ENTER_PID_NUMBER")||"Enter PID number"})),n.createElement("hr",{style:{margin:"24px 0",border:0,borderTop:"1px solid #EAECF0"}}),n.createElement(W,{icon:n.createElement(P,{size:16}),label:E("EKYC_BUILDING_INFO")||"Building info"}),n.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"14px",marginBottom:"14px"}},n.createElement("div",null,n.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},E("EKYC_TYPE_OF_CONNECTION")||"Type of connection"),n.createElement(a.Dropdown,{selected:T,select:N,option:Z,optionKey:"label",t:E,placeholder:E("EKYC_SELECT")||"Select"})),n.createElement("div",null,n.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},E("EKYC_CONNECTION_CATEGORY")||"Connection category"),n.createElement(a.Dropdown,{selected:R,select:D,option:$,optionKey:"label",t:E,placeholder:E("EKYC_SELECT")||"Select"}))),n.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"14px",marginBottom:"24px"}},n.createElement("div",null,n.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},E("EKYC_USER_TYPE")||"User type"),n.createElement(a.Dropdown,{selected:I,select:Y,option:q,optionKey:"label",t:E,placeholder:E("EKYC_SELECT")||"Select"})),n.createElement("div",null,n.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"6px"}},E("EKYC_NO_OF_FLOORS")||"No. of floors"),n.createElement(a.Dropdown,{selected:k,select:O,option:J,optionKey:"label",t:E,placeholder:E("EKYC_SELECT")||"Select"}))),n.createElement("hr",{style:{margin:"24px 0",border:0,borderTop:"1px solid #EAECF0"}}),n.createElement(W,{icon:n.createElement(w,{size:16}),label:E("EKYC_DOCUMENTS_PHOTO")||"Documents & photo"}),n.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"14px",marginBottom:"20px"}},n.createElement("div",null,n.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"8px"}},E("EKYC_UPLOAD_PROPERTY_DOC")||"Upload property document"),n.createElement("input",{type:"file",ref:X,accept:".pdf",style:{display:"none"},onChange:e=>{const t=e.target.files[0];t&&F(t)}}),n.createElement("div",{onClick:()=>_&&X.current.click(),onMouseOver:e=>{_&&(e.currentTarget.style.borderColor="#185FA5")},onMouseOut:e=>{_&&(e.currentTarget.style.borderColor="#B5D4F4")},style:{border:_?"1.5px dashed #B5D4F4":"1.5px dashed #D0D5DD",borderRadius:"10px",padding:"28px 20px",textAlign:"center",cursor:_?"pointer":"not-allowed",backgroundColor:_?"#E6F1FB":"#F9FAFB",minHeight:"160px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10px",transition:"all 0.15s",opacity:_?1:.6}},n.createElement("div",{style:{background:_?"#fff":"#EAECF0",padding:"10px",borderRadius:"10px",display:"flex",filter:_?"none":"grayscale(100%)"}},n.createElement("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:_?"#185FA5":"#98A2B3"},n.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"}),n.createElement("path",{d:"M12 18v-4M12 14l-2 2M12 14l2 2",stroke:"#fff",strokeWidth:"1.5",strokeLinecap:"round"}))),K?n.createElement("div",{style:{fontSize:"13px",fontWeight:"600",color:"#0F6E56"}},"✓ ",K.name):n.createElement(t.Fragment,null,n.createElement("div",{style:{fontSize:"13px",fontWeight:"600",color:_?"#185FA5":"#98A2B3"}},_?E("EKYC_UPLOAD_PROPERTY_DOC_CTA")||"Tap to upload":E("EKYC_ENTER_PID_FIRST_CTA")||"Enter PID to upload"),n.createElement("div",{style:{fontSize:"12px",color:_?"#378ADD":"#98A2B3"}},_?"PDF | Max 5MB":"Requires PID")))),n.createElement("div",null,n.createElement("div",{style:{fontSize:"11px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:"8px"}},E("EKYC_CAPTURE_BUILDING_IMAGE")||"Capture building image"),n.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 n=new FileReader;n.onloadend=()=>j(n.result),n.readAsDataURL(t)}}),n.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?n.createElement(t.Fragment,null,n.createElement("img",{src:U,alt:"Building",style:{width:"100%",maxHeight:"200px",objectFit:"cover",display:"block"}}),n.createElement("button",{onClick:e=>{e.stopPropagation(),j(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"}},n.createElement(z,{size:13})," ",E("EKYC_REMOVE")||"Remove")):n.createElement(t.Fragment,null,n.createElement("div",{style:{background:"#E6F1FB",width:"52px",height:"52px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"10px"}},n.createElement(M,{size:26})),n.createElement("div",{style:{fontSize:"13px",fontWeight:"600",color:"#101828"}},E("EKYC_TAP_TO_CAPTURE")||"Tap to capture"),n.createElement("div",{style:{fontSize:"12px",color:"#667085",marginTop:"2px"}},E("EKYC_BUILDING_PHOTO")||"Building photo with GPS"),n.createElement("div",{style:{fontSize:"11px",color:"#98A2B3",marginTop:"2px"}},"JPG, PNG | Max 2MB"))))),n.createElement("div",{style:{backgroundColor:"#E6F1FB",border:"0.5px solid #B5D4F4",borderRadius:"8px",padding:"12px 14px",display:"flex",alignItems:"flex-start",gap:"10px",marginBottom:"4px"}},n.createElement("div",{style:{flexShrink:0,marginTop:"1px"}},n.createElement(a.InfoBannerIcon,{fill:"#185FA5"})),n.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."))),n.createElement("div",{style:{marginTop:"24px"}},n.createElement(a.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:I,noOfFloors:k,propertyDocument:K,buildingPhoto:U}})}})),n.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px",marginTop:"16px",fontSize:"11px",color:"#98A2B3"}},n.createElement("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},n.createElement("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),n.createElement("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})),E("EKYC_SECURE_DATA_NOTICE")||"Your data is encrypted and secure"))))},j=e=>{let{size:t=11,color:l="#fff"}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:l,strokeWidth:"3",strokeLinecap:"round"},n.createElement("polyline",{points:"20 6 9 17 4 12"}))},X=e=>{let{size:t=16}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor"},n.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"}))},G=e=>{let{size:t=16}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor"},n.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"}))},Z=e=>{let{size:t=16}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor"},n.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"}))},$=e=>{let{size:t=14}=e;return n.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},n.createElement("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),n.createElement("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"}))},q=e=>{let{icon:t,label:l}=e;return n.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"16px",marginTop:"4px"}},n.createElement("div",{style:{opacity:.5,display:"flex"}},t),n.createElement("span",{style:{fontSize:"15px",fontWeight:"600",color:"#0B0C0C",whiteSpace:"nowrap"}},l),n.createElement("div",{style:{flex:1,height:"1px",background:"#EAECF0"}}))},J=e=>{let{icon:t,title:l,onEdit:a,editLabel:r,rows:o}=e;return n.createElement("div",{style:{border:"0.5px solid #EAECF0",borderRadius:"10px",overflow:"hidden",marginBottom:"16px",animation:"fadeSlideIn 0.3s ease"}},n.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"14px 16px",background:"#F9FAFB",borderBottom:"0.5px solid #EAECF0"}},n.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},n.createElement("div",{style:{opacity:.5,display:"flex"}},t),n.createElement("span",{style:{fontSize:"14px",fontWeight:"600",color:"#0B0C0C"}},l)),n.createElement("button",{onClick:a,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"}},n.createElement($,{size:12}),r)),n.createElement("div",{style:{padding:"4px 0"}},o.map((e,t)=>e.value?n.createElement("div",{key:t,style:{display:"flex",alignItems:"flex-start",padding:"10px 16px",borderBottom:t<o.length-1?"0.5px solid #F2F4F7":"none"}},n.createElement("div",{style:{flex:"0 0 180px",fontSize:"12px",fontWeight:"600",color:"#667085",textTransform:"uppercase",letterSpacing:"0.04em",paddingTop:"1px"}},e.label),n.createElement("div",{style:{flex:1,fontSize:"14px",color:"#101828",fontWeight:"500",wordBreak:"break-word"}},e.value)):null)))},Q=()=>{var e,o,i,s;const{t:c}=r.useTranslation(),d=l.useHistory(),m=l.useLocation(),{kNumber:p="EKYC-1234567890",aadhaarDetails:E={},addressDetails:u={},propertyDetails:C={}}=m.state||{},[f,v]=t.useState(!1),[y,h]=t.useState(null),b=function(e,t){try{return e?Promise.resolve(Digit.UploadServices.Filestorage("EKYC",e,t)).then(function(e){var t,n,l;return(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n||null===(l=n[0])||void 0===l?void 0:l.fileStoreId)||null}):Promise.resolve(null)}catch(e){return Promise.reject(e)}};return n.createElement(t.Fragment,null,n.createElement("div",{className:"inbox-container"},n.createElement("style",null,"\n @keyframes fadeSlideIn {\n from { opacity: 0; transform: translateY(8px); }\n to { opacity: 1; transform: translateY(0); }\n }\n "),n.createElement("div",{className:"filters-container"},n.createElement(a.Card,{style:{display:"flex",alignItems:"center",padding:"12px 16px",marginBottom:"12px",borderRadius:"8px"}},n.createElement("div",{style:{color:"#185FA5",marginRight:"10px",display:"flex"}},n.createElement(a.HomeIcon,{style:{width:"20px",height:"20px"}})),n.createElement("div",{style:{fontWeight:"600",fontSize:"15px",color:"#0B0C0C"}},c("EKYC_PROCESS")||"eKYC Process")),n.createElement("div",{style:{background:"#fff",padding:"16px 14px",borderRadius:"8px",border:"1px solid #EAECF0"}},[{label:c("EKYC_STEP_AADHAAR")||"Aadhaar",done:!0,active:!1},{label:c("EKYC_STEP_ADDRESS")||"Address",done:!0,active:!1},{label:c("EKYC_STEP_PROPERTY")||"Property",done:!0,active:!1},{label:c("EKYC_STEP_REVIEW")||"Review",done:!1,active:!0}].map((e,t)=>n.createElement("div",{key:t,style:{display:"flex",gap:"10px",alignItems:"flex-start",position:"relative",paddingBottom:t<3?"18px":0}},t<3&&n.createElement("div",{style:{position:"absolute",left:"10px",top:"22px",width:"1px",height:"calc(100% - 10px)",background:"#EAECF0"}}),n.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?n.createElement(j,{size:11,color:"#fff"}):t+1),n.createElement("div",{style:{fontSize:"12px",paddingTop:"2px",color:e.done?"#0F6E56":e.active?"#0B0C0C":"#667085",fontWeight:e.done||e.active?"600":"400"}},e.label))))),n.createElement("div",{style:{flex:1,marginLeft:"16px"}},n.createElement(a.Card,null,n.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"}},n.createElement(a.CardHeader,{style:{margin:0,fontSize:"18px"}},c("EKYC_REVIEW_DETAILS")||"Review Details"),n.createElement("div",{style:{background:"#F9FAFB",border:"0.5px solid #EAECF0",borderRadius:"20px",padding:"4px 14px",fontSize:"12px",color:"#667085"}},c("EKYC_K_NUMBER")||"K Number",":"," ",n.createElement("span",{style:{color:"#0B0C0C",fontWeight:"600"}},p))),n.createElement("div",{style:{backgroundColor:"#E1F5EE",border:"0.5px solid #5DCAA5",borderRadius:"8px",padding:"12px 16px",display:"flex",alignItems:"center",gap:"10px",marginBottom:"24px"}},n.createElement("div",{style:{backgroundColor:"#9FE1CB",padding:"5px",borderRadius:"6px",display:"flex",flexShrink:0}},n.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#085041",strokeWidth:"3",strokeLinecap:"round"},n.createElement("polyline",{points:"20 6 9 17 4 12"}))),n.createElement("div",{style:{fontSize:"13px",color:"#04342C",fontWeight:"500"}},c("EKYC_REVIEW_NOTICE")||"Please review all details carefully before submitting. You can edit any section by clicking Edit.")),n.createElement("div",{style:{animation:"fadeSlideIn 0.3s ease"}},n.createElement(q,{icon:n.createElement(X,{size:16}),label:c("EKYC_AADHAAR_VERIFICATION_HEADER")||"Aadhaar details"}),n.createElement(J,{icon:n.createElement(X,{size:16}),title:c("EKYC_AADHAAR_VERIFICATION_HEADER")||"Aadhaar details",onEdit:()=>{d.push("/digit-ui/employee/ekyc/aadhaar-verification",m.state)},editLabel:c("CS_COMMON_EDIT")||"Edit",rows:[{label:c("EKYC_NAME")||"Name",value:E.userName||"Rajesh Kumar Singh"},{label:c("EKYC_AADHAAR")||"Aadhaar no.",value:E.aadhaarLastFour?""+E.aadhaarLastFour:"XXXX XXXX 1234"},{label:c("EKYC_MOBILE_NO")||"Mobile no.",value:E.mobileNumber||"XXXXXXXXXX"},{label:c("EKYC_EMAIL_ADDRESS")||"Email",value:E.email||null}]}),n.createElement("hr",{style:{margin:"20px 0",border:0,borderTop:"1px solid #EAECF0"}}),n.createElement(q,{icon:n.createElement(G,{size:16}),label:c("EKYC_ADDRESS_DETAILS_HEADER")||"Address details"}),n.createElement(J,{icon:n.createElement(G,{size:16}),title:c("EKYC_ADDRESS_DETAILS_HEADER")||"Address details",onEdit:()=>{d.push("/digit-ui/employee/ekyc/address-details",m.state)},editLabel:c("CS_COMMON_EDIT")||"Edit",rows:[{label:c("EKYC_FULL_ADDRESS")||"Full address",value:u.fullAddress||"H.No. 123, Sector 15, Rohini, Delhi – 110085"},{label:c("EKYC_FLAT_HOUSE_NUMBER")||"Flat / House no.",value:u.flatNo||null},{label:c("EKYC_BUILDING_TOWER")||"Building",value:u.building||null},{label:c("EKYC_LANDMARK")||"Landmark",value:u.landmark||null},{label:c("EKYC_PINCODE")||"Pincode",value:u.pincode||"110085"},{label:c("EKYC_ASSEMBLY")||"Assembly",value:u.assembly||"AC-12 Chandni Chowk"},{label:c("EKYC_WARD")||"Ward",value:u.ward||"WARD-45 Civil Lines"}]}),n.createElement("hr",{style:{margin:"20px 0",border:0,borderTop:"1px solid #EAECF0"}}),n.createElement(q,{icon:n.createElement(Z,{size:16}),label:c("EKYC_PROPERTY_INFO")||"Property details"}),n.createElement(J,{icon:n.createElement(Z,{size:16}),title:c("EKYC_PROPERTY_INFO")||"Property details",onEdit:()=>{d.push("/digit-ui/employee/ekyc/property-info",m.state)},editLabel:c("CS_COMMON_EDIT")||"Edit",rows:[{label:c("EKYC_PROPERTY_OWNER")||"Property owner",value:C.ownerType||"Owner"},{label:c("EKYC_PID_NUMBER")||"PID number",value:C.pidNumber||null},{label:c("EKYC_TYPE_OF_CONNECTION")||"Type of connection",value:(null===(e=C.connectionCategory)||void 0===e?void 0:e.label)||null},{label:c("EKYC_CONNECTION_CATEGORY")||"Connection category",value:(null===(o=C.connectionType)||void 0===o?void 0:o.label)||null},{label:c("EKYC_USER_TYPE")||"User type",value:(null===(i=C.userType)||void 0===i?void 0:i.label)||null},{label:c("EKYC_NO_OF_FLOORS")||"No. of floors",value:(null===(s=C.noOfFloors)||void 0===s?void 0:s.label)||null}]})),n.createElement("div",{style:{marginTop:"24px"}},n.createElement(a.SubmitBar,{label:f?c("EKYC_SUBMITTING")||"Submitting...":c("ES_COMMON_SUBMIT")||"Submit",onSubmit:function(){try{v(!0),h(null);const e=x(function(){return g(function(){var e;const t=Digit.ULBService.getCurrentTenantId()||"dl.djb",n=(null===(e=Digit.UserService.getUser())||void 0===e?void 0:e.info)||{};return Promise.resolve(b(C.propertyDocument||null,t)).then(function(e){function l(){var l,r,o,i,s;const m={RequestInfo:{apiId:"Rainmaker",ver:"1.0",msgId:`${Date.now()}|${navigator.language||"en_IN"}`,tenantId:t,authToken:n.access_token||(null===(l=Digit.UserService.getUser())||void 0===l?void 0:l.access_token)||""},updateType:"PROPERTY",kno:p,pidNumber:C.pidNumber||null,propertyDocumentFileStoreId:e,buildingImageFileStoreId:a,userType:(null===(r=C.userType)||void 0===r?void 0:r.value)||null,noOfFloor:null!==(o=C.noOfFloors)&&void 0!==o&&o.value?parseInt(C.noOfFloors.value,10):null,typeOfConnection:(null===(i=C.connectionCategory)||void 0===i?void 0:i.value)||null,connectionCategory:(null===(s=C.connectionType)||void 0===s?void 0:s.value)||null,modifiedBy:n.name||n.userName||null};return Promise.resolve(Digit.CustomService.getResponse({url:"/ekyc-service/user/application/_update",params:{tenantId:t},body:m,useCache:!1,method:"POST"})).then(function(){h({type:"success",message:c("EKYC_SUBMIT_SUCCESS")||"Application submitted successfully!"}),setTimeout(()=>{d.push("/digit-ui/employee/ekyc/dashboard")},1800)})}let a=null;const r=function(){if(C.buildingPhoto){const e=((e,t)=>{const n=e.split(","),l=n[0].match(/:(.*?);/)[1],a=atob(n[1]);let r=a.length;const o=new Uint8Array(r);for(;r--;)o[r]=a.charCodeAt(r);return new File([o],"building_photo.jpg",{type:l})})(C.buildingPhoto);return Promise.resolve(b(e,t)).then(function(e){a=e})}}();return r&&r.then?r.then(l):l()})},function(e){var t,n,l,a;console.error("eKYC Submit Error:",e),h({type:"error",message:(null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n||null===(l=n.Errors)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.message)||c("EKYC_SUBMIT_ERROR")||"Submission failed. Please try again."})})},function(e,t){if(v(!1),e)throw t;return t});return Promise.resolve(e&&e.then?e.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},disabled:f})),n.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px",marginTop:"16px",fontSize:"11px",color:"#98A2B3"}},n.createElement("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},n.createElement("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),n.createElement("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})),c("EKYC_SECURE_DATA_NOTICE")||"Your data is encrypted and secure")))),y&&n.createElement(a.Toast,{label:y.message,error:"error"===y.type,success:"success"===y.type,onClose:()=>h(null)}))},ee=e=>{let{path:t}=e;const{t:o}=r.useTranslation(),i=l.useLocation();sessionStorage.removeItem("revalidateddone");const s=[{icon:a.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 n.createElement(a.AppContainer,null,n.createElement("div",{className:"ground-container employee-app-container"},n.createElement(a.ModuleHeader,{leftContent:n.createElement(n.Fragment,null,n.createElement(a.ArrowLeft,{className:"icon"}),"Back"),onLeftClick:()=>window.history.back(),breadcrumbs:s}),n.createElement(l.Switch,null,n.createElement(a.PrivateRoute,{path:t+"/dashboard",component:()=>n.createElement(m,{parentRoute:t,businessService:"EKYC",moduleCode:"EKYC",isInbox:!0})}),n.createElement(a.PrivateRoute,{path:t+"/create-kyc",component:()=>n.createElement(E,null)}),n.createElement(a.PrivateRoute,{path:t+"/aadhaar-verification",component:()=>n.createElement(F,null)}),n.createElement(a.PrivateRoute,{path:t+"/address-details",component:()=>n.createElement(_,null)}),n.createElement(a.PrivateRoute,{path:t+"/property-info",component:()=>n.createElement(U,null)}),n.createElement(a.PrivateRoute,{path:t+"/review",component:()=>n.createElement(Q,null)}),n.createElement(a.PrivateRoute,{path:t+"/",component:()=>n.createElement(m,{parentRoute:t,businessService:"EKYC",moduleCode:"EKYC",isInbox:!0})}))))},te=e=>{let{stateCode:t,userType:a,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"===a?n.createElement(ee,{path:o,url:i,userType:a,tenants:r}):null},ne={EKYCModule:te,EKYCCard:()=>{const{t:e}=r.useTranslation(),t={Icon:n.createElement(a.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 n.createElement(a.EmployeeModuleCard,t)},EKYCInbox:m,EKYCDesktopInbox:i,EKYCMobileInbox:c,EKYC_INBOX_FILTER:e=>n.createElement(d,e)};exports.EkycModule=te,exports.default=te,exports.initEkycComponents=()=>{Object.entries(ne).forEach(e=>{let[t,n]=e;Digit.ComponentRegistryService.setComponent(t,n)})};
|