@djb25/digit-ui-module-ekyc 1.0.0 → 1.0.1
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 -0
- package/dist/index.modern.js +2965 -0
- package/dist/index.modern.js.map +1 -0
- package/package.json +1 -1
- package/src/Module.js +7 -23
- package/src/components/ConnectionDetailsView.js +130 -0
- package/src/components/DesktopInbox.js +84 -84
- package/src/components/Filter.js +59 -0
- package/src/components/MobileInbox.js +73 -0
- package/src/components/SearchConsumer.js +122 -0
- package/src/components/StatusCards.js +13 -22
- package/src/pages/employee/AadhaarVerification.js +356 -0
- package/src/pages/employee/AddressDetails.js +451 -0
- package/src/pages/employee/Create.js +94 -0
- package/src/pages/employee/Inbox.js +37 -20
- package/src/pages/employee/PropertyInfo.js +353 -0
- package/src/pages/employee/index.js +97 -0
- package/src/components/Search.js +0 -77
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,t=require("react"),r=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,n=require("react-router-dom"),i=require("@djb25/digit-ui-react-components"),s=require("react-i18next");function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}const a=function(){function e(){}return e.prototype.then=function(t,r){const n=new e,i=this.s;if(i){const e=1&i?t:r;if(e){try{u(n,1,e(this.v))}catch(e){u(n,2,e)}return n}return this}return this.o=function(e){try{const i=e.v;1&e.s?u(n,1,t?t(i):i):r?u(n,1,r(i)):u(n,2,i)}catch(e){u(n,2,e)}},n},e}();function u(e,t,r){if(!e.s){if(r instanceof a){if(!r.s)return void(r.o=u.bind(null,e,t));1&t&&(t=r.s),r=r.v}if(r&&r.then)return void r.then(u.bind(null,e,t),u.bind(null,e,2));e.s=t,e.v=r;const n=e.o;n&&n(e)}}function c(e){return e instanceof a&&1&e.s}const l="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function f(e,t,r){if("function"==typeof e[l]){var n,i,s,o=e[l]();if(function e(l){try{for(;!((n=o.next()).done||r&&r());)if((l=t(n.value))&&l.then){if(!c(l))return void l.then(e,s||(s=u.bind(null,i=new a,2)));l=l.v}i?u(i,1,l):i=l}catch(e){u(i||(i=new a),2,e)}}(),o.return){var f=function(e){try{n.done||o.return()}catch(e){}return e};if(i&&i.then)return i.then(f,function(e){throw f(e)});f()}return i}if(!("length"in e))throw new TypeError("Object is not iterable");for(var d=[],m=0;m<e.length;m++)d.push(e[m]);return function(e,t,r){var n,i,s=-1;return function o(l){try{for(;++s<e.length&&(!r||!r());)if((l=t(s))&&l.then){if(!c(l))return void l.then(o,i||(i=u.bind(null,n=new a,2)));l=l.v}n?u(n,1,l):n=l}catch(e){u(n||(n=new a),2,e)}}(),n}(d,function(e){return t(d[e])},r)}"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var d=e=>e instanceof HTMLElement;const m={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"};var p=e=>null==e;const g=e=>"object"==typeof e;var h=e=>!p(e)&&!Array.isArray(e)&&g(e)&&!(e instanceof Date),b=e=>/^\w*$/.test(e),v=e=>e.filter(Boolean),y=e=>v(e.replace(/["|']/g,"").replace(/\[/g,".").replace(/\]/g,"").split("."));function E(e,t,r){let n=-1;const i=b(t)?[t]:y(t),s=i.length,o=s-1;for(;++n<s;){const t=i[n];let s=r;if(n!==o){const r=e[t];s=h(r)||Array.isArray(r)?r:isNaN(+i[n+1])?{}:[]}e[t]=s,e=e[t]}return e}var C=function(e,t){void 0===t&&(t={});for(const r in e)b(r)?t[r]=e[r]:E(t,r,e[r]);return t},O=e=>void 0===e,S=function(e,t,r){void 0===e&&(e={});const n=v(t.split(/[,[\].]+?/)).reduce((e,t)=>p(e)?e:e[t],e);return O(n)||n===e?O(e[t])?r:e[t]:n},A=(e,t)=>{d(e)&&e.removeEventListener&&(e.removeEventListener("input",t),e.removeEventListener("change",t),e.removeEventListener("blur",t))};const N={isValid:!1,value:null};var j=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.ref.checked?{isValid:!0,value:t.ref.value}:e,N):N,P=e=>"radio"===e.type,R=e=>"file"===e.type,D=e=>"checkbox"===e.type,x=e=>"select-multiple"===e.type;const V={value:!1,isValid:!1},T={value:!0,isValid:!0};var k=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.ref.checked).map(e=>{let{ref:{value:t}}=e;return t});return{value:t,isValid:!!t.length}}const{checked:t,value:r,attributes:n}=e[0].ref;return t?n&&!O(n.value)?O(r)||""===r?T:{value:r,isValid:!0}:T:V}return V};function F(e,t,r,n,i){const s=e.current[t];if(s){const{ref:{value:e,disabled:t},ref:r,valueAsNumber:a,valueAsDate:u,setValueAs:c}=s;if(t&&n)return;return R(r)?r.files:P(r)?j(s.options).value:x(r)?(o=r.options,[...o].filter(e=>{let{selected:t}=e;return t}).map(e=>{let{value:t}=e;return t})):D(r)?k(s.options).value:i?e:a?""===e?NaN:+e:u?r.valueAsDate:c?c(e):e}var o;if(r)return S(r.current,t)}function w(e){return!e||e instanceof HTMLElement&&e.nodeType!==Node.DOCUMENT_NODE&&w(e.parentNode)}var L=e=>h(e)&&!Object.keys(e).length,_=e=>"boolean"==typeof e;function K(e,t){const r=b(t)?[t]:y(t),n=1==r.length?e:function(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=O(e)?n++:e[t[n++]];return e}(e,r);let i;n&&delete n[r[r.length-1]];for(let t=0;t<r.slice(0,-1).length;t++){let n,s=-1;const o=r.slice(0,-(t+1)),a=o.length-1;for(t>0&&(i=e);++s<o.length;){const t=o[s];n=n?n[t]:e[t],a===s&&(h(n)&&L(n)||Array.isArray(n)&&!n.filter(e=>h(e)&&!L(e)||_(e)).length)&&(i?delete i[t]:delete e[t]),i=n}}return e}const Y=(e,t)=>e&&e.ref===t;var M=e=>p(e)||!g(e);function B(e,t){if(M(e)||M(t))return t;for(const r in t){const n=e[r],i=t[r];try{e[r]=h(n)&&h(i)||Array.isArray(n)&&Array.isArray(i)?B(n,i):i}catch(e){}}return e}function I(e,r,n){if(M(e)||M(r)||e instanceof Date||r instanceof Date)return e===r;if(!t.isValidElement(e)){const t=Object.keys(e),i=Object.keys(r);if(t.length!==i.length)return!1;for(const i of t){const t=e[i];if(!n||"ref"!==i){const e=r[i];if((h(t)||Array.isArray(t))&&(h(e)||Array.isArray(e))?!I(t,e,n):t!==e)return!1}}}return!0}function z(e,t,r,n,i){let s=-1;for(;++s<e.length;){for(const n in e[s])Array.isArray(e[s][n])?(!r[s]&&(r[s]={}),r[s][n]=[],z(e[s][n],S(t[s]||{},n,[]),r[s][n],r[s],n)):I(S(t[s]||{},n),e[s][n])?E(r[s]||{},n):r[s]=Object.assign(Object.assign({},r[s]),{[n]:!0});n&&!r.length&&delete n[i]}return r}var W=e=>"string"==typeof e,U=(e,t,r,n,i)=>{const s={};for(const t in e.current)(O(i)||(W(i)?t.startsWith(i):Array.isArray(i)&&i.find(e=>t.startsWith(e))))&&(s[t]=F(e,t,void 0,n));return r?C(s):B(t,C(s))},H=e=>e instanceof RegExp,G=e=>h(e)&&!H(e)?e:{value:e,message:""},q=e=>"function"==typeof e,J=e=>W(e)||t.isValidElement(e);function $(e,t,r){if(void 0===r&&(r="validate"),J(e)||_(e)&&!e)return{type:r,message:J(e)?e:"",ref:t}}var X=(e,t,r,n,i)=>t?Object.assign(Object.assign({},r[e]),{types:Object.assign(Object.assign({},r[e]&&r[e].types?r[e].types:{}),{[n]:i||!0})}):{},Z=function(e,t,r,n){let{ref:i,ref:{value:s},options:o,required:a,maxLength:u,minLength:c,min:l,max:d,pattern:m,validate:g}=r;try{let r=!1;const b=i.name,v={},y=P(i),E=D(i),C=y||E,O=""===s,S=X.bind(null,b,t,v),A=function(e,t,r,n,s){void 0===n&&(n="maxLength"),void 0===s&&(s="minLength");const o=e?t:r;v[b]=Object.assign({type:e?n:s,message:o,ref:i},S(e?n:s,o))};if(a&&(!y&&!E&&(O||p(s))||_(s)&&!s||E&&!k(o).isValid||y&&!j(o).isValid)){const{value:r,message:n}=J(a)?{value:!!a,message:a}:G(a);if(r&&(v[b]=Object.assign({type:"required",message:n,ref:C?((e.current[b].options||[])[0]||{}).ref:i},S("required",n)),!t))return Promise.resolve(v)}if(!(p(l)&&p(d)||""===s)){let e,r;const n=G(d),o=G(l);if(isNaN(s)){const t=i.valueAsDate||new Date(s);W(n.value)&&(e=t>new Date(n.value)),W(o.value)&&(r=t<new Date(o.value))}else{const t=i.valueAsNumber||parseFloat(s);p(n.value)||(e=t>n.value),p(o.value)||(r=t<o.value)}if((e||r)&&(A(!!e,n.message,o.message,"max","min"),!t))return Promise.resolve(v)}if(W(s)&&!O&&(u||c)){const e=G(u),r=G(c),n=!p(e.value)&&s.length>e.value,i=!p(r.value)&&s.length<r.value;if((n||i)&&(A(n,e.message,r.message),!t))return Promise.resolve(v)}if(W(s)&&m&&!O){const{value:e,message:r}=G(m);if(H(e)&&!e.test(s)&&(v[b]=Object.assign({type:"pattern",message:r,ref:i},S("pattern",r)),!t))return Promise.resolve(v)}const N=function(){if(g){const s=F(e,b,n,!1,!0),a=C&&o?o[0].ref:i;return q(g)?Promise.resolve(g(s)).then(function(e){const n=$(e,a);if(n&&(v[b]=Object.assign(Object.assign({},n),S("validate",n.message)),!t))return r=!0,v}):function(){if(h(g)){let n=!1;function e(){if(!L(i)&&(v[b]=Object.assign({ref:a},i),!t))return r=!0,v}let i={};const o=f(Object.entries(g),function(e){let[r,o]=e;if(L(i)||t)return Promise.resolve(o(s)).then(function(e){const n=$(e,a,r);n&&(i=Object.assign(Object.assign({},n),S(r,n.message)),t&&(v[b]=i))});n=!0},function(){return n});return o&&o.then?o.then(e):e()}}()}}();return Promise.resolve(N&&N.then?N.then(function(e){return r?e:v}):r?N:v)}catch(e){return Promise.reject(e)}};const Q=function(e,t,r){void 0===r&&(r=[]);for(const n in t){const i=e+(h(t)?"."+n:"["+n+"]");M(t[n])?r.push(i):Q(i,t[n],r)}return r};var ee=(e,t,r,n,i)=>{let s=void 0;return r.add(t),L(e)||(s=S(e,t),(h(s)||Array.isArray(s))&&Q(t,s).forEach(e=>r.add(e))),O(s)?i?n:S(n,t):s},te=e=>{let{isOnBlur:t,isOnChange:r,isOnTouch:n,isTouched:i,isReValidateOnBlur:s,isReValidateOnChange:o,isBlurEvent:a,isSubmitted:u,isOnAll:c}=e;return!c&&(!u&&n?!(i||a):(u?s:t)?!a:!(u?o:r)||a)},re=e=>e.substring(0,e.indexOf("[")),ne=(e,t)=>[...e].some(e=>((e,t)=>RegExp(("^"+t+"([|.)\\d+").replace(/\[/g,"\\[").replace(/\]/g,"\\]")).test(e))(t,e)),ie="undefined"!=typeof window&&"undefined"!=typeof document;function se(e){var t;let r;if(M(e)||ie&&(e instanceof File||d(e)))return e;if(!["Set","Map","Object","Date","Array"].includes(null===(t=e.constructor)||void 0===t?void 0:t.name))return e;if(e instanceof Date)return r=new Date(e.getTime()),r;if(e instanceof Set){r=new Set;for(const t of e)r.add(t);return r}if(e instanceof Map){r=new Map;for(const t of e.keys())r.set(t,se(e.get(t)));return r}r=Array.isArray(e)?[]:{};for(const t in e)r[t]=se(e[t]);return r}var oe=e=>({isOnSubmit:!e||e===m.onSubmit,isOnBlur:e===m.onBlur,isOnChange:e===m.onChange,isOnAll:e===m.all,isOnTouch:e===m.onTouched}),ae=e=>P(e)||D(e);const ue="undefined"==typeof window,ce=ie?"Proxy"in window:"undefined"!=typeof Proxy,le=t.createContext(null);le.displayName="RHFContext";const fe=e=>{const{as:r,render:n}=e,i=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["rules","as","render","defaultValue","control","onFocus"]),{field:s,meta:o}=function(e){let{name:r,rules:n,defaultValue:i,control:s,onFocus:o}=e;const a=t.useContext(le);if("production"!==process.env.NODE_ENV&&!s&&!a)throw new Error("📋 Controller is missing `control` prop. https://react-hook-form.com/api#Controller");const{defaultValuesRef:u,setValue:c,register:l,unregister:f,trigger:d,mode:m,reValidateMode:{isReValidateOnBlur:p,isReValidateOnChange:g},formState:b,formStateRef:{current:{isSubmitted:v,touched:y,errors:C}},updateFormState:A,readFormStateRef:N,fieldsRef:j,fieldArrayNamesRef:P,shallowFieldsStateRef:R}=s||a.control,D=!ne(P.current,r),x=()=>!O(S(R.current,r))&&D?S(R.current,r):O(i)?S(u.current,r):i,[V,T]=t.useState(x()),k=t.useRef(V),F=t.useRef({focus:()=>null}),w=t.useRef(o||(()=>{q(F.current.focus)&&F.current.focus(),"production"!==process.env.NODE_ENV&&(q(F.current.focus)||console.warn("📋 'ref' from Controller render prop must be attached to a React component or a DOM Element whose ref provides a 'focus()' method"))})),L=t.useCallback(e=>!te(Object.assign({isBlurEvent:e,isReValidateOnBlur:p,isReValidateOnChange:g,isSubmitted:v,isTouched:!!S(y,r)},m)),[p,g,v,y,r,m]),_=t.useCallback(e=>{let[t]=e;const r=(e=>M(e)||!h(e.target)||h(e.target)&&!e.type?e:O(e.target.value)?e.target.checked:e.target.value)(t);return T(r),k.current=r,r},[]),K=t.useCallback(e=>{if("production"!==process.env.NODE_ENV&&!r)return console.warn("📋 Field is missing `name` prop. https://react-hook-form.com/api#Controller");j.current[r]?j.current[r]=Object.assign({ref:j.current[r].ref},n):(l(Object.defineProperties({name:r,focus:w.current},{value:{set(e){T(e),k.current=e},get:()=>k.current}}),n),e=O(S(u.current,r))),e&&D&&T(x())},[n,r,l]);t.useEffect(()=>()=>f(r),[r]),t.useEffect(()=>{"production"!==process.env.NODE_ENV&&(O(V)&&console.warn("📋 "+r+" is missing in the 'defaultValue' prop of either its Controller (https://react-hook-form.com/api#Controller) or useForm (https://react-hook-form.com/api#useForm)"),!D&&O(i)&&console.warn("📋 Controller is missing `defaultValue` prop when using `useFieldArray`. https://react-hook-form.com/api#Controller")),K()},[K]),t.useEffect(()=>{!j.current[r]&&K(!0)});const Y=t.useCallback(()=>{N.current.touched&&!S(y,r)&&(E(y,r,!0),A({touched:y})),L(!0)&&d(r)},[r,A,L,d,N]);return{field:{onChange:t.useCallback(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c(r,_(t),{shouldValidate:L(),shouldDirty:!0})},[c,r,L]),onBlur:Y,name:r,value:V,ref:F},meta:Object.defineProperties({invalid:!!S(C,r)},{isDirty:{get:()=>!!S(b.dirtyFields,r)},isTouched:{get:()=>!!S(b.touched,r)}})}}(e),a=Object.assign(Object.assign({},i),s);return r?t.isValidElement(r)?t.cloneElement(r,a):t.createElement(r,a):n?n(s,o):null},de=e=>{let{onSearch:n,searchFields:a,searchParams:u}=e;const{t:c}=s.useTranslation(),{register:l,handleSubmit:g,watch:y,control:N}=function(e){let{mode:r=m.onSubmit,reValidateMode:n=m.onChange,resolver:i,context:s,defaultValues:o={},shouldFocusError:a=!0,shouldUnregister:u=!0,criteriaMode:c}=void 0===e?{}:e;const l=t.useRef({}),g=t.useRef({}),y=t.useRef({}),N=t.useRef(new Set),j=t.useRef({}),V=t.useRef({}),T=t.useRef({}),k=t.useRef({}),_=t.useRef(o),H=t.useRef(!1),G=t.useRef(!1),J=t.useRef(),$=t.useRef({}),X=t.useRef({}),le=t.useRef(s),fe=t.useRef(i),de=t.useRef(new Set),me=t.useRef(oe(r)),{isOnSubmit:pe,isOnTouch:ge}=me.current,he=c===m.all,[be,ve]=t.useState({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touched:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!pe,errors:{}}),ye=t.useRef({isDirty:!ce,dirtyFields:!ce,touched:!ce||ge,isValidating:!ce,isSubmitting:!ce,isValid:!ce}),Ee=t.useRef(be),Ce=t.useRef(),{isOnBlur:Oe,isOnChange:Se}=t.useRef(oe(n)).current;le.current=s,fe.current=i,Ee.current=be,$.current=u?{}:L($.current)?se(o):$.current;const Ae=t.useCallback(function(e){void 0===e&&(e={}),H.current||(Ee.current=Object.assign(Object.assign({},Ee.current),e),ve(Ee.current))},[]),Ne=()=>ye.current.isValidating&&Ae({isValidating:!0}),je=t.useCallback(function(e,t,r,n,i){void 0===r&&(r=!1),void 0===n&&(n={});let s=r||(e=>{let{errors:t,name:r,error:n,validFields:i,fieldsWithValidation:s}=e;const o=O(n),a=S(t,r);return o&&!!a||!o&&!I(a,n,!0)||o&&S(s,r)&&!S(i,r)})({errors:Ee.current.errors,error:t,name:e,validFields:k.current,fieldsWithValidation:T.current});const o=S(Ee.current.errors,e);t?(K(k.current,e),s=s||!o||!I(o,t,!0),E(Ee.current.errors,e,t)):((S(T.current,e)||fe.current)&&(E(k.current,e,!0),s=s||o),K(Ee.current.errors,e)),(s&&!p(r)||!L(n)||ye.current.isValidating)&&Ae(Object.assign(Object.assign(Object.assign({},n),fe.current?{isValid:!!i}:{}),{isValidating:!1}))},[]),Pe=t.useCallback((e,t)=>{const{ref:r,options:n}=l.current[e],i=ie&&d(r)&&p(t)?"":t;P(r)?(n||[]).forEach(e=>{let{ref:t}=e;return t.checked=t.value===i}):R(r)&&!W(i)?r.files=i:x(r)?[...r.options].forEach(e=>e.selected=i.includes(e.value)):D(r)&&n?n.length>1?n.forEach(e=>{let{ref:t}=e;return t.checked=Array.isArray(i)?!!i.find(e=>e===t.value):i===t.value}):n[0].ref.checked=!!i:r.value=i},[]),Re=t.useCallback((e,t)=>{if(ye.current.isDirty){const r=Ke();return e&&t&&E(r,e,t),!I(r,_.current)}return!1},[]),De=t.useCallback(function(e,t){if(void 0===t&&(t=!0),ye.current.isDirty||ye.current.dirtyFields){const r=!I(S(_.current,e),F(l,e,$)),n=S(Ee.current.dirtyFields,e),i=Ee.current.isDirty;r?E(Ee.current.dirtyFields,e,!0):K(Ee.current.dirtyFields,e);const s={isDirty:Re(),dirtyFields:Ee.current.dirtyFields},o=ye.current.isDirty&&i!==s.isDirty||ye.current.dirtyFields&&n!==S(Ee.current.dirtyFields,e);return o&&t&&Ae(s),o?s:{}}return{}},[]),xe=t.useCallback(function(e,t){try{return"production"===process.env.NODE_ENV||l.current[e]?Promise.resolve(Z(l,he,l.current[e],$)).then(function(r){const n=r[e];return je(e,n,t),O(n)}):(console.warn("📋 Field is missing with `name` attribute: ",e),Promise.resolve(!1))}catch(e){return Promise.reject(e)}},[je,he]),Ve=t.useCallback(function(e){try{return Promise.resolve(fe.current(Ke(),le.current,he)).then(function(t){let{errors:r}=t;const n=Ee.current.isValid;if(Array.isArray(e)){const t=e.map(e=>{const t=S(r,e);return t?E(Ee.current.errors,e,t):K(Ee.current.errors,e),!t}).every(Boolean);return Ae({isValid:L(r),isValidating:!1}),t}{const t=S(r,e);return je(e,t,n!==L(r),{},L(r)),!t}})}catch(e){return Promise.reject(e)}},[je,he]),Te=t.useCallback(function(e){try{let r=!1;function t(e){return r?e:Promise.resolve(xe(n))}const n=e||Object.keys(l.current);if(Ne(),fe.current)return Promise.resolve(Ve(n));const i=function(){if(Array.isArray(n))return!e&&(Ee.current.errors={}),Promise.resolve(Promise.all(n.map(function(e){try{return Promise.resolve(xe(e,null))}catch(e){return Promise.reject(e)}}))).then(function(e){Ae({isValidating:!1});const t=e.every(Boolean);return r=!0,t})}();return Promise.resolve(i&&i.then?i.then(t):t(i))}catch(e){return Promise.reject(e)}},[Ve,xe]),ke=t.useCallback((e,t,r)=>{let{shouldDirty:n,shouldValidate:i}=r;const s={};E(s,e,t);for(const r of Q(e,t))l.current[r]&&(Pe(r,S(s,r)),n&&De(r),i&&Te(r))},[Te,Pe,De]),Fe=t.useCallback((e,t,r)=>{if(!u&&!M(t)&&E($.current,e,Array.isArray(t)?[...t]:Object.assign({},t)),l.current[e])Pe(e,t),r.shouldDirty&&De(e),r.shouldValidate&&Te(e);else if(!M(t)&&(ke(e,t,r),de.current.has(e))){const n=re(e)||e;E(g.current,e,t),X.current[n]({[n]:S(g.current,n)}),(ye.current.isDirty||ye.current.dirtyFields)&&r.shouldDirty&&(E(Ee.current.dirtyFields,e,((e,t,r)=>B(z(e,t,r.slice(0,e.length)),z(t,e,r.slice(0,e.length))))(t,S(_.current,e,[]),S(Ee.current.dirtyFields,e,[]))),Ae({isDirty:!I(Object.assign(Object.assign({},Ke()),{[e]:t}),_.current)}))}!u&&E($.current,e,t)},[De,Pe,ke]),we=e=>G.current||N.current.has(e)||N.current.has((e.match(/\w+/)||[])[0]),Le=e=>{let t=!0;if(!L(j.current))for(const r in j.current)e&&j.current[r].size&&!j.current[r].has(e)&&!j.current[r].has(re(e))||(V.current[r](),t=!1);return t};function _e(e){if(!u){let t=se(e);for(const e of de.current)b(e)&&!t[e]&&(t=Object.assign(Object.assign({},t),{[e]:[]}));return t}return e}function Ke(e){if(W(e))return F(l,e,$);if(Array.isArray(e)){const t={};for(const r of e)E(t,r,F(l,r,$));return t}return _e(U(l,se($.current),u))}J.current=J.current?J.current:function(e){let{type:t,target:r}=e;try{let e=r.name;const n=l.current[e];let i,s;return Promise.resolve(function(){if(n){function o(){!a&&Le(e),je(e,i,d,f,s)}const a="blur"===t,c=te(Object.assign({isBlurEvent:a,isReValidateOnChange:Se,isReValidateOnBlur:Oe,isTouched:!!S(Ee.current.touched,e),isSubmitted:Ee.current.isSubmitted},me.current));let f=De(e,!1),d=!L(f)||!a&&we(e);if(a&&!S(Ee.current.touched,e)&&ye.current.touched&&(E(Ee.current.touched,e,!0),f=Object.assign(Object.assign({},f),{touched:Ee.current.touched})),!u&&D(r)&&E($.current,e,F(l,e)),c)return!a&&Le(e),(!L(f)||d&&L(f))&&Ae(f);Ne();const m=fe.current?Promise.resolve(fe.current(Ke(),le.current,he)).then(function(t){let{errors:n}=t;const o=Ee.current.isValid;if(i=S(n,e),D(r)&&!i&&fe.current){const t=re(e),r=S(n,t,{});r.type&&r.message&&(i=r),t&&(r||S(Ee.current.errors,t))&&(e=t)}s=L(n),o!==s&&(d=!0)}):Promise.resolve(Z(l,he,n,$)).then(function(t){i=t[e]});return m&&m.then?m.then(o):o()}}())}catch(e){return Promise.reject(e)}};const Ye=t.useCallback(function(e){void 0===e&&(e={});try{const t=L(l.current)?_.current:{};return Promise.resolve(fe.current(Object.assign(Object.assign(Object.assign({},t),Ke()),e),le.current,he)).then(function(e){let{errors:t}=e;const r=L(t);Ee.current.isValid!==r&&Ae({isValid:r})})}catch(e){return Promise.reject(e)}},[he]),Me=t.useCallback((e,t)=>{!function(e,t,r,n,i,s){const{ref:o,ref:{name:a}}=r,u=e.current[a];if(!i){const t=F(e,a,n);!O(t)&&E(n.current,a,t)}o.type&&u?P(o)||D(o)?Array.isArray(u.options)&&u.options.length?(v(u.options).forEach(function(e,r){void 0===e&&(e={}),(w(e.ref)&&Y(e,e.ref)||s)&&(A(e.ref,t),K(u.options,"["+r+"]"))}),u.options&&!v(u.options).length&&delete e.current[a]):delete e.current[a]:(w(o)&&Y(u,o)||s)&&(A(o,t),delete e.current[a]):delete e.current[a]}(l,J.current,e,$,u,t),u&&(K(k.current,e.ref.name),K(T.current,e.ref.name))},[u]),Be=t.useCallback(e=>{if(G.current)Ae();else{for(const t of N.current)if(t.startsWith(e)){Ae();break}Le(e)}},[]),Ie=t.useCallback((e,t)=>{e&&(Me(e,t),u&&!v(e.options||[]).length&&(K(Ee.current.errors,e.ref.name),E(Ee.current.dirtyFields,e.ref.name,!0),Ae({isDirty:Re()}),ye.current.isValid&&fe.current&&Ye(),Be(e.ref.name)))},[Ye,Me]),ze=t.useCallback((e,t,r)=>{const n=r?j.current[r]:N.current;let i=U(l,se($.current),u,!1,e);if(W(e)){const r=re(e)||e;return de.current.has(r)&&(i=Object.assign(Object.assign({},y.current),i)),ee(i,e,n,O(S(_.current,e))?t:S(_.current,e),!0)}const s=O(t)?_.current:t;return Array.isArray(e)?e.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:ee(i,t,n,s)}),{}):(G.current=O(r),C(!L(i)&&i||s))},[]);function We(e,t){if(void 0===t&&(t={}),"production"!==process.env.NODE_ENV){if(!e.name)return console.warn("📋 Field is missing `name` attribute",e,"https://react-hook-form.com/api#useForm");if(de.current.has(e.name.split(/\[\d+\]$/)[0])&&!RegExp(("^"+e.name.split(/\[\d+\]$/)[0]+"[\\d+].\\w+").replace(/\[/g,"\\[").replace(/\]/g,"\\]")).test(e.name))return console.warn('📋 `name` prop should be in object shape: name="test[index].name"',e,"https://react-hook-form.com/api#useFieldArray")}const{name:r,type:n,value:i}=e,s=Object.assign({ref:e},t),o=l.current,a=ae(e),c=ne(de.current,r),f=t=>ie&&(!d(e)||t===e);let m,p=o[r],g=!0;if(p&&(a?Array.isArray(p.options)&&v(p.options).find(e=>i===e.ref.value&&f(e.ref)):f(p.ref)))return void(o[r]=Object.assign(Object.assign({},p),t));p=n?a?Object.assign({options:[...v(p&&p.options||[]),{ref:e}],ref:{type:n,name:r}},t):Object.assign({},s):s,o[r]=p;const h=O(S($.current,r));L(_.current)&&h||(m=S(h?_.current:$.current,r),g=O(m),g||c||Pe(r,m)),L(t)||(E(T.current,r,!0),!pe&&ye.current.isValid&&Z(l,he,p,$).then(e=>{const t=Ee.current.isValid;L(e)?E(k.current,r,!0):K(k.current,r),t!==L(e)&&Ae()})),!u||c&&g||!c&&K(Ee.current.dirtyFields,r),n&&function(e,t,r){let{ref:n}=e;d(n)&&r&&(n.addEventListener(t?"change":"input",r),n.addEventListener("blur",r))}(a&&p.options?p.options[p.options.length-1]:p,a||"select-one"===e.type,J.current)}const Ue=t.useCallback((e,t)=>function(r){try{r&&r.preventDefault&&(r.preventDefault(),r.persist());let n={},i=_e(U(l,se($.current),u,!0));return ye.current.isSubmitting&&Ae({isSubmitting:!0}),Promise.resolve(function(s,o){try{var u=function(){function s(){const s=function(){if(L(n)&&Object.keys(Ee.current.errors).every(e=>e in l.current))return Ae({errors:{},isSubmitting:!0}),Promise.resolve(e(i,r)).then(function(){});{function s(e){a&&((e,t)=>{for(const r in e)if(S(t,r)){const t=e[r];if(t){if(t.ref.focus&&O(t.ref.focus()))break;if(t.options){t.options[0].ref.focus();break}}}})(l.current,Ee.current.errors)}return Ee.current.errors=Object.assign(Object.assign({},Ee.current.errors),n),t?Promise.resolve(t(Ee.current.errors,r)).then(s):s()}}();if(s&&s.then)return s.then(function(){})}const o=fe.current?Promise.resolve(fe.current(i,le.current,he)).then(function(e){let{errors:t,values:r}=e;Ee.current.errors=n=t,i=r}):f(Object.values(l.current),function(e){const t=function(){if(e){const{name:t}=e.ref;return Promise.resolve(Z(l,he,e,$)).then(function(e){e[t]?(E(n,t,e[t]),K(k.current,t)):S(T.current,t)&&(K(Ee.current.errors,t),E(k.current,t,!0))})}}();if(t&&t.then)return t.then(function(){})});return o&&o.then?o.then(s):s()}()}catch(e){return o(!0,e)}return u&&u.then?u.then(o.bind(null,!1),o.bind(null,!0)):o(!1,u)}(0,function(e,t){if(Ee.current.isSubmitting=!1,Ae({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:L(Ee.current.errors),submitCount:Ee.current.submitCount+1}),e)throw t;return t}))}catch(r){return Promise.reject(r)}},[a,he]);t.useEffect(()=>{i&&ye.current.isValid&&Ye(),Ce.current=Ce.current||!ie?Ce.current:function(e,t){const r=new MutationObserver(()=>{for(const r of Object.values(e.current))if(r&&r.options)for(const e of r.options)e&&e.ref&&w(e.ref)&&t(r);else r&&w(r.ref)&&t(r)});return r.observe(window.document,{childList:!0,subtree:!0}),r}(l,Ie)},[Ie,_.current]),t.useEffect(()=>()=>{Ce.current&&Ce.current.disconnect(),H.current=!0,"production"===process.env.NODE_ENV&&Object.values(l.current).forEach(e=>Ie(e,!0))},[]),!i&&ye.current.isValid&&(be.isValid=I(k.current,T.current)&&L(Ee.current.errors));const He={trigger:Te,setValue:t.useCallback(function(e,t,r){Fe(e,t,r||{}),we(e)&&Ae(),Le(e)},[Fe,Te]),getValues:t.useCallback(Ke,[]),register:t.useCallback(function(e,t){if(!ue)if(W(e))We({name:e},t);else{if(!h(e)||!("name"in e))return t=>t&&We(t,e);We(e,t)}},[_.current]),unregister:t.useCallback(function(e){for(const t of Array.isArray(e)?e:[e])Ie(l.current[t],!0)},[]),formState:ce?new Proxy(be,{get:(e,t)=>{if("production"!==process.env.NODE_ENV&&"isValid"===t&&pe&&console.warn("📋 `formState.isValid` is applicable with `onTouched`, `onChange` or `onBlur` mode. https://react-hook-form.com/api#formState"),t in e)return ye.current[t]=!0,e[t]}}):be},Ge=t.useMemo(()=>Object.assign({isFormDirty:Re,updateWatchedValue:Be,shouldUnregister:u,updateFormState:Ae,removeFieldEventListener:Me,watchInternal:ze,mode:me.current,reValidateMode:{isReValidateOnBlur:Oe,isReValidateOnChange:Se},validateResolver:i?Ye:void 0,fieldsRef:l,resetFieldArrayFunctionRef:X,useWatchFieldsRef:j,useWatchRenderFunctionsRef:V,fieldArrayDefaultValuesRef:g,validFieldsRef:k,fieldsWithValidationRef:T,fieldArrayNamesRef:de,readFormStateRef:ye,formStateRef:Ee,defaultValuesRef:_,shallowFieldsStateRef:$,fieldArrayValuesRef:y},He),[_.current,Be,u,Me,ze]);return Object.assign({watch:function(e,t){return ze(e,t)},control:Ge,handleSubmit:Ue,reset:t.useCallback(function(e,t){if(void 0===t&&(t={}),ie)for(const e of Object.values(l.current))if(e){const{ref:t,options:r}=e,n=ae(t)&&Array.isArray(r)?r[0].ref:t;if(d(n))try{n.closest("form").reset();break}catch(e){}}l.current={},_.current=Object.assign({},e||_.current),e&&Le(""),Object.values(X.current).forEach(e=>q(e)&&e()),$.current=u?{}:se(e||_.current),(e=>{let{errors:t,isDirty:r,isSubmitted:n,touched:i,isValid:s,submitCount:o,dirtyFields:a}=e;s||(k.current={},T.current={}),g.current={},N.current=new Set,G.current=!1,Ae({submitCount:o?Ee.current.submitCount:0,isDirty:!!r&&Ee.current.isDirty,isSubmitted:!!n&&Ee.current.isSubmitted,isValid:!!s&&Ee.current.isValid,dirtyFields:a?Ee.current.dirtyFields:{},touched:i?Ee.current.touched:{},errors:t?Ee.current.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})})(t)},[]),clearErrors:t.useCallback(function(e){e&&(Array.isArray(e)?e:[e]).forEach(e=>l.current[e]&&b(e)?delete Ee.current.errors[e]:K(Ee.current.errors,e)),Ae({errors:e?Ee.current.errors:{}})},[]),setError:t.useCallback(function(e,t){const r=(l.current[e]||{}).ref;E(Ee.current.errors,e,Object.assign(Object.assign({},t),{ref:r})),Ae({isValid:!1}),t.shouldFocus&&r&&r.focus&&r.focus()},[]),errors:be.errors},He)}({defaultValues:u}),j=y(),V=t.useRef(j);return t.useEffect(()=>{if(JSON.stringify(V.current)!==JSON.stringify(j)){V.current=j;const e=setTimeout(()=>{n(j)},300);return()=>clearTimeout(e)}},[j,n]),r.createElement("form",{onSubmit:g(e=>{n(e)}),style:{flex:1}},r.createElement("div",{className:"search-container",style:{backgroundColor:"#ffffffff",padding:"24px"}},r.createElement("div",{className:"complaint-input-container",style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(700px, 1fr))",gap:"20px",alignItems:"end"}},null==a?void 0:a.map(e=>r.createElement("div",{key:e.name,className:"input-fields"},r.createElement(i.Label,null,e.label),"dropdown"===e.type?r.createElement(fe,{control:N,name:e.name,render:t=>r.createElement(i.Dropdown,{selected:t.value,select:e=>{t.onChange(e)},onBlur:t.onBlur,option:e.options,optionKey:e.optionsKey,t:c})}):r.createElement(i.TextInput,o({},e,{inputRef:l,watch:y})))))))},me=e=>{let{countData:t}=e;const{t:n}=s.useTranslation(),o={flex:1,textAlign:"center",padding:"24px",borderRadius:"12px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)",border:"1px solid #EAECF0"};return r.createElement("div",{className:"status-container",style:{display:"flex",gap:"24px",marginBottom:"32px"}},r.createElement(i.Card,{style:o},r.createElement("div",{style:{fontSize:"32px",fontWeight:"700",color:"#101828"}},(null==t?void 0:t.total)||0),r.createElement("div",{style:{color:"#667085",marginTop:"8px",fontSize:"14px",fontWeight:"500"}},n("EKYC_TOTAL"))),r.createElement(i.Card,{style:o},r.createElement("div",{style:{fontSize:"32px",fontWeight:"700",color:"#B54708"}},(null==t?void 0:t.pending)||0),r.createElement("div",{style:{color:"#667085",marginTop:"8px",fontSize:"14px",fontWeight:"500"}},n("EKYC_PENDING"))),r.createElement(i.Card,{style:o},r.createElement("div",{style:{fontSize:"32px",fontWeight:"700",color:"#027A48"}},(null==t?void 0:t.completed)||0),r.createElement("div",{style:{color:"#667085",marginTop:"8px",fontSize:"14px",fontWeight:"500"}},n("EKYC_COMPLETED"))))},pe=e=>{let{data:o,isLoading:a,onSort:u,onNextPage:c,onPrevPage:l,currentPage:f,pageSizeLimit:d,onPageSizeChange:m,parentRoute:p,searchParams:g,sortParams:h,totalRecords:b,countData:v,onSearch:y,searchFields:E}=e;const{t:C}=s.useTranslation(),O=t.useMemo(()=>[{Header:C("EKYC_APPLICATION_NO"),accessor:"applicationNumber",Cell:e=>{var t;let{row:i}=e;const s=(null===(t=i.original)||void 0===t?void 0:t.applicationNumber)||"NA";return r.createElement(n.Link,{to:p+"/application-details/"+s},r.createElement("span",{className:"link",style:{color:"#F47738",fontWeight:"600"}},s))}},{Header:C("EKYC_CITIZEN_NAME"),accessor:"citizenName",Cell:e=>{var t;let{row:n}=e;return r.createElement("span",null,(null===(t=n.original)||void 0===t?void 0:t.citizenName)||"NA")}},{Header:C("EKYC_MOBILE_NO"),accessor:"mobileNumber",Cell:e=>{var t;let{row:n}=e;return r.createElement("span",null,(null===(t=n.original)||void 0===t?void 0:t.mobileNumber)||"NA")}},{Header:C("EKYC_STATUS"),accessor:"status",Cell:e=>{var t;let{row:n}=e;const i=(null===(t=n.original)||void 0===t?void 0:t.status)||"DEFAULT",s=(e=>{const t={ALL:{bg:"#F4F4F4",text:"#505A5F"},COMPLETED:{bg:"#E7F4E9",text:"#0B6623"},PENDING:{bg:"#FFF5E6",text:"#945700"},REJECTED:{bg:"#FBEAE9",text:"#AF1E11"},DEFAULT:{bg:"#F4F4F4",text:"#505A5F"}};return t[e]||t.DEFAULT})(i);return r.createElement("span",{style:{padding:"6px 12px",borderRadius:"20px",fontSize:"12px",fontWeight:"600",backgroundColor:s.bg,color:s.text,textTransform:"uppercase"}},C("EKYC_STATUS_"+i))}}],[C,p]),S=t.useMemo(()=>(null==o?void 0:o.items)||[],[o]);return r.createElement("div",{className:"inbox-wrapper",style:{padding:"24px",backgroundColor:"#f4f7f9",minWidth:"170vh"}},r.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"}},r.createElement(i.Header,{style:{margin:0}},C("EKYC_INBOX_HEADER")),r.createElement(n.Link,{to:p+"/create-kyc",style:{textDecoration:"none"}},r.createElement(i.SubmitBar,{label:C("EKYC_CREATE_KYC")}))),r.createElement("div",{style:{marginBottom:"24px"}},r.createElement(me,{countData:v})),r.createElement(i.Card,{style:{marginBottom:"24px",padding:"20px"}},r.createElement(de,{onSearch:y,searchFields:E,searchParams:g})),r.createElement(i.Card,{style:{padding:"0px",overflow:"hidden"}},r.createElement(i.Table,{t:C,data:S,columns:O,isLoading:a,onSort:u,sortParams:h,totalRecords:b,onNextPage:c,onPrevPage:l,currentPage:f,pageSizeLimit:d,onPageSizeChange:m,getCellProps:e=>({style:{padding:"20px 18px",fontSize:"16px"}})})))},ge=[{applicationNumber:"EKYC-2024-001",citizenName:"Rahul Sharma",mobileNumber:"9876543210",status:"COMPLETED"},{applicationNumber:"EKYC-2024-002",citizenName:"Anjali Devi",mobileNumber:"9123456789",status:"PENDING"},{applicationNumber:"EKYC-2024-003",citizenName:"Amit Kumar",mobileNumber:"8888888888",status:"REJECTED"},{applicationNumber:"EKYC-2024-004",citizenName:"Priya Singh",mobileNumber:"7777777777",status:"COMPLETED"},{applicationNumber:"EKYC-2024-005",citizenName:"Suresh Gupta",mobileNumber:"6666666666",status:"PENDING"}],he=e=>{let{parentRoute:n,businessService:i="EKYC",initialStates:a={}}=e;Digit.ULBService.getCurrentTenantId();const{t:u}=s.useTranslation(),[c,l]=t.useState(a.pageOffset||0),[f,d]=t.useState(a.pageSize||10),[m,p]=t.useState(a.sortParams||[{id:"createdTime",desc:!0}]),g=t.useMemo(()=>({label:u("EKYC_STATUS_ALL"),value:""}),[u]),[h,b]=t.useState(a.searchParams||{status:g}),v=t.useMemo(()=>ge.filter(e=>{var t;let r=!0;const n=void 0!==(null===(t=h.status)||void 0===t?void 0:t.value)?h.status.value:h.status;return n&&e.status!==n&&(r=!1),r}),[h]),y=t.useMemo(()=>({total:ge.length,completed:ge.filter(e=>"COMPLETED"===e.status).length,pending:ge.filter(e=>"PENDING"===e.status).length,rejected:ge.filter(e=>"REJECTED"===e.status).length}),[]),E=t.useCallback(e=>{b(t=>o({},t,e)),l(0)},[]),C=t.useCallback(e=>{e.length>0&&p(e)},[]),O=t.useMemo(()=>[{label:u("EKYC_STATUS"),name:"status",type:"dropdown",options:[{label:u("EKYC_STATUS_ALL"),value:""},{label:u("EKYC_STATUS_COMPLETED"),value:"COMPLETED"},{label:u("EKYC_STATUS_PENDING"),value:"PENDING"},{label:u("EKYC_STATUS_REJECTED"),value:"REJECTED"}],optionsKey:"label"}],[u]);return r.createElement("div",{className:"inbox-main-container"},r.createElement(pe,{businessService:i,data:{items:v,totalCount:v.length},isLoading:!1,searchFields:O,onSearch:E,onSort:C,onNextPage:()=>l(e=>e+f),onPrevPage:()=>l(e=>Math.max(e-f,0)),currentPage:Math.floor(c/f),pageSizeLimit:f,onPageSizeChange:e=>{const t=Number(e.target.value);d(t),l(0)},parentRoute:n,searchParams:h,sortParams:m,totalRecords:v.length,countData:y}))},be=e=>{let{path:t}=e;return r.createElement(n.Switch,null,r.createElement(n.Route,{path:t+"/dashboard"},r.createElement(he,null)),r.createElement(n.Route,{path:t+"/create-kyc"},r.createElement("div",null,"Create KYC Page Placeholder")),r.createElement(n.Route,{path:""+t},r.createElement(he,null)))},ve=e=>{let{stateCode:t,userType:i,tenants:s}=e;const{path:o,url:a}=n.useRouteMatch(),u=Digit.StoreData.getCurrentLanguage(),{isLoading:c}=Digit.Services.useStore({stateCode:t,moduleCode:"EKYC",language:u});return Digit.SessionStorage.set("EKYC_TENANTS",s),c?null:"employee"===i?r.createElement(be,{path:o,url:a,userType:i,tenants:s}):null},ye={EKYCModule:ve,EKYCCard:()=>{const{t:e}=s.useTranslation(),t={Icon:r.createElement(i.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 r.createElement(i.EmployeeModuleCard,t)},EKYCInbox:he,EKYCDesktopInbox:pe};exports.EkycModule=ve,exports.default=ve,exports.initEkycComponents=()=>{Object.entries(ye).forEach(e=>{let[t,r]=e;Digit.ComponentRegistryService.setComponent(t,r)})};
|
|
1
|
+
var e,t=require("react"),a=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,l=require("react-router-dom"),n=require("@djb25/digit-ui-react-components"),r=require("react-i18next");function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e}).apply(null,arguments)}function i(e,t){if(null==e)return{};var a={};for(var l in e)if({}.hasOwnProperty.call(e,l)){if(-1!==t.indexOf(l))continue;a[l]=e[l]}return a}const s=e=>{let{countData:t}=e;const{t:l}=r.useTranslation();return a.createElement("div",{className:"ekyc-status-container"},a.createElement("div",{className:"ekyc-status-card"},a.createElement("div",{className:"count"},(null==t?void 0:t.total)||0),a.createElement("div",{className:"label"},l("EKYC_TOTAL"))),a.createElement("div",{className:"ekyc-status-card"},a.createElement("div",{className:"count pending"},(null==t?void 0:t.pending)||0),a.createElement("div",{className:"label"},l("EKYC_PENDING"))),a.createElement("div",{className:"ekyc-status-card"},a.createElement("div",{className:"count completed"},(null==t?void 0:t.completed)||0),a.createElement("div",{className:"label"},l("EKYC_COMPLETED"))))},c=["tableConfig","filterComponent"],d=e=>{let{filterComponent:o}=e,d=i(e,c);const{data:m,isLoading:E,onSort:p,onNextPage:u,onPrevPage:C,currentPage:g,pageSizeLimit:x,onPageSizeChange:f,parentRoute:y,searchParams:h,sortParams:v,totalRecords:b,countData:S}=d,{t:_}=r.useTranslation(),[N,A]=a.useState(()=>{var e;return null===(e=Digit.ComponentRegistryService)||void 0===e?void 0:e.getComponent(o)}),R=t.useMemo(()=>[{Header:_("EKYC_APPLICATION_NO"),accessor:"applicationNumber",Cell:e=>{var t;let{row:n}=e;const r=(null===(t=n.original)||void 0===t?void 0:t.applicationNumber)||"NA";return a.createElement(l.Link,{to:y+"/application-details/"+r},a.createElement("span",{className:"ekyc-application-link"},r))}},{Header:_("EKYC_CITIZEN_NAME"),accessor:"citizenName",Cell:e=>{var t;let{row:l}=e;return a.createElement("span",null,(null===(t=l.original)||void 0===t?void 0:t.citizenName)||"NA")}},{Header:_("EKYC_MOBILE_NO"),accessor:"mobileNumber",Cell:e=>{var t;let{row:l}=e;return a.createElement("span",null,(null===(t=l.original)||void 0===t?void 0:t.mobileNumber)||"NA")}},{Header:_("EKYC_STATUS"),accessor:"status",Cell:e=>{var t;let{row:l}=e;const n=(null===(t=l.original)||void 0===t?void 0:t.status)||"DEFAULT";return a.createElement("span",{className:"ekyc-status-tag "+n},_("EKYC_STATUS_"+n))}}],[_,y]),T=t.useMemo(()=>(null==m?void 0:m.items)||[],[m]);return a.createElement("div",{className:"inbox-container"},a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},a.createElement("div",{className:"icon-container",style:{color:"#F47738",marginRight:"12px"}},a.createElement(n.HomeIcon,{style:{width:"24px",height:"24px"}})),a.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},_("ACTION_TEST_EKYC"))),a.createElement("div",null,N&&a.createElement(N,{defaultSearchParams:d.defaultSearchParams,onFilterChange:d.onSearch,searchParams:h,type:"desktop",moduleCode:"EKYC"}))),a.createElement("div",{style:{flex:1,marginLeft:"16px"}},a.createElement(n.Card,{className:"ekyc-metrics-card",style:{marginBottom:"16px",padding:"16px"}},a.createElement(s,{countData:S})),a.createElement("div",{className:"result",style:{flex:1}},a.createElement(n.Card,{className:"ekyc-table-card",style:{padding:0}},a.createElement(n.Table,{t:_,data:T,columns:R,isLoading:E,onSort:p,sortParams:v,totalRecords:b,onNextPage:u,onPrevPage:C,currentPage:g,pageSizeLimit:x,onPageSizeChange:f,getCellProps:e=>({className:"ekyc-table-cell"})})))))},m=["onSearch","searchParams","FilterComponent","children"],E=e=>{let{onSearch:l,searchParams:s,FilterComponent:c,children:d}=e,E=i(e,m);const{t:p}=r.useTranslation(),[u,C]=t.useState(()=>o({},s)),g=(e,t)=>{C(a=>o({},a,{[e]:t}))},x=e=>{e&&e.preventDefault&&e.preventDefault(),l(u)};return a.createElement("div",{className:"inbox-container"},a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},a.createElement("div",{className:"icon-container",style:{color:"#F47738",marginRight:"12px"}},a.createElement(n.HomeIcon,{style:{width:"24px",height:"24px"}})),a.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},p("ACTION_CREATE_EKYC"))),a.createElement("div",null,c&&a.createElement(c,{defaultSearchParams:E.defaultSearchParams,onFilterChange:E.onSearch,searchParams:s,type:"desktop",moduleCode:"EKYC"}))),a.createElement("div",{style:{flex:1,marginLeft:"16px"}},a.createElement(n.Card,{className:"ekyc-search-card",style:{padding:"24px",marginBottom:"24px",borderRadius:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.05)"}},a.createElement(n.Header,{style:{fontSize:"24px",marginBottom:"20px",fontWeight:"700",color:"#0B0C0C"}},p("EKYC_SEARCH_CONSUMER_HEADER")),a.createElement("form",{onSubmit:x},a.createElement("div",{style:{display:"flex",gap:"24px",alignItems:"flex-end",flexWrap:"wrap"}},a.createElement("div",{style:{flex:"1",minWidth:"250px"}},a.createElement("div",{className:"filter-label",style:{fontWeight:"600",marginBottom:"8px",fontSize:"14px",color:"#505A5F"}},p("EKYC_K_NUMBER")),a.createElement("div",{style:{position:"relative"}},a.createElement(n.TextInput,{value:null==u?void 0:u.kNumber,onChange:e=>g("kNumber",e.target.value),placeholder:p("EKYC_K_NUMBER_PLACEHOLDER"),style:{borderRadius:"8px",paddingLeft:"12px",height:"44px"}}))),a.createElement("div",{style:{flex:"1",minWidth:"250px"}},a.createElement("div",{className:"filter-label",style:{fontWeight:"600",marginBottom:"8px",fontSize:"14px",color:"#505A5F"}},p("EKYC_K_NAME")),a.createElement("div",{style:{position:"relative"}},a.createElement(n.TextInput,{value:null==u?void 0:u.kName,onChange:e=>g("kName",e.target.value),placeholder:p("EKYC_K_NAME_PLACEHOLDER"),style:{borderRadius:"8px",paddingLeft:"12px",height:"44px"}}))),a.createElement("div",{style:{display:"flex",gap:"12px",alignItems:"center"}},a.createElement("button",{type:"button",onClick:()=>{const e={kNumber:"",kName:""};C(e),l(e)},style:{background:"none",border:"none",color:"#0076f3ff",fontWeight:"600",cursor:"pointer",fontSize:"14px",padding:"10px"}},p("ES_COMMON_CLEAR")),a.createElement(n.SubmitBar,{label:p("ES_COMMON_SEARCH"),onSubmit:x,style:{margin:0,borderRadius:"8px",height:"44px",padding:"0 32px",marginTop:"-55px"}}))))),d))},p=e=>{var t;let{data:o,isLoading:i,onSearch:c,searchParams:d,parentRoute:m,countData:p}=e;const{t:u}=r.useTranslation(),C=(null==o||null===(t=o.items)||void 0===t?void 0:t.map(e=>({[u("EKYC_APPLICATION_NO")]:e.applicationNumber,[u("EKYC_CITIZEN_NAME")]:e.citizenName,[u("EKYC_MOBILE_NO")]:e.mobileNumber,[u("EKYC_STATUS")]:a.createElement("span",{className:"ekyc-status-tag "+e.status},u("EKYC_STATUS_"+e.status))})))||[];return a.createElement("div",{className:"inbox-wrapper"},a.createElement("div",{className:"ekyc-header-container module-header"},a.createElement(n.Header,{className:"title"},u("EKYC_INBOX_HEADER")),a.createElement(l.Link,{to:m+"/create-kyc"},a.createElement(n.SubmitBar,{label:u("EKYC_CREATE_KYC")}))),a.createElement("div",{className:"ekyc-metrics-section"},a.createElement(s,{countData:p})),a.createElement(E,{onSearch:c,searchParams:d}),a.createElement("div",{className:"mobile-data-container"},i?a.createElement(n.Loader,null):(null==C?void 0:C.length)>0?a.createElement(n.DetailsCard,{data:C,t:u,serviceRequestIdKey:u("EKYC_APPLICATION_NO"),linkPrefix:m+"/application-details/"}):a.createElement(n.Card,null,u("ES_COMMON_NO_DATA").split("\\n").map((e,t)=>a.createElement("p",{key:t,style:{textAlign:"center"}},e)))))},u=["searchParams","onFilterChange","defaultSearchParams","statusMap","moduleCode"],C=e=>{let{searchParams:l,onFilterChange:s,defaultSearchParams:c}=e,d=i(e,u);const{t:m}=r.useTranslation(),[E,p]=t.useState(()=>o({},l));return a.createElement(n.FilterForm,{onSubmit:()=>{s(E)},handleSubmit:e=>t=>{t&&t.preventDefault(),e()},onResetFilterForm:()=>{p(o({},c)),s(o({},c))},id:"ekyc-filter-form",onMobileExclusiveFilterPopupFormClose:d.onClose},a.createElement(n.FilterFormField,null,a.createElement("div",{className:"filter-label",style:{fontWeight:"normal"}},m("EKYC_STATUS"),":"),a.createElement(n.Dropdown,{option:[{label:m("EKYC_STATUS_ALL"),value:""},{label:m("EKYC_STATUS_COMPLETED"),value:"COMPLETED"},{label:m("EKYC_STATUS_PENDING"),value:"PENDING"},{label:m("EKYC_STATUS_REJECTED"),value:"REJECTED"}],optionKey:"label",select:e=>{(e=>{let t=e.delete,a=o({},E,e);t&&t.forEach(e=>delete a[e]),delete e.delete,p(o({},a))})({status:e})},selected:(null==E?void 0:E.status)||{label:m("EKYC_STATUS_ALL"),value:""}})))},g=[{applicationNumber:"EKYC-2024-001",citizenName:"Rahul Sharma",mobileNumber:"9876543210",status:"COMPLETED"},{applicationNumber:"EKYC-2024-002",citizenName:"Anjali Devi",mobileNumber:"9123456789",status:"PENDING"},{applicationNumber:"EKYC-2024-003",citizenName:"Amit Kumar",mobileNumber:"8888888888",status:"REJECTED"},{applicationNumber:"EKYC-2024-004",citizenName:"Priya Singh",mobileNumber:"7777777777",status:"COMPLETED"},{applicationNumber:"EKYC-2024-005",citizenName:"Suresh Gupta",mobileNumber:"6666666666",status:"PENDING"}],x=e=>{let{parentRoute:l,businessService:n="EKYC",initialStates:i={}}=e;Digit.ULBService.getCurrentTenantId();const{t:s}=r.useTranslation(),[c,m]=t.useState(i.pageOffset||0),[E,u]=t.useState(i.pageSize||10),[C,x]=t.useState(i.sortParams||[{id:"createdTime",desc:!0}]),f=t.useMemo(()=>({label:s("EKYC_STATUS_ALL"),value:""}),[s]),[y,h]=t.useState(i.searchParams||{status:f}),v=t.useMemo(()=>g.filter(e=>{var t;let a=!0;const l=void 0!==(null===(t=y.status)||void 0===t?void 0:t.value)?y.status.value:y.status;return l&&e.status!==l&&(a=!1),a}),[y]),b=t.useMemo(()=>({total:g.length,completed:g.filter(e=>"COMPLETED"===e.status).length,pending:g.filter(e=>"PENDING"===e.status).length,rejected:g.filter(e=>"REJECTED"===e.status).length}),[]),S=t.useCallback(e=>{h(t=>o({},t,e)),m(0)},[]),_=t.useCallback(e=>{e.length>0&&x(e)},[]),N=t.useMemo(()=>[{label:s("EKYC_STATUS"),name:"status",type:"dropdown",options:[{label:s("CHOOSE_STATUS"),value:""},{label:s("EKYC_STATUS_COMPLETED"),value:"COMPLETED"},{label:s("EKYC_STATUS_PENDING"),value:"PENDING"},{label:s("EKYC_STATUS_REJECTED"),value:"REJECTED"}],optionsKey:"label"}],[s]);return a.createElement("div",{className:"ekyc-employee-container"},a.createElement("div",{className:"inbox-main-container"},Digit.Utils.browser.isMobile()?a.createElement(p,{data:{items:v,totalCount:v.length},isLoading:!1,onSearch:S,searchFields:N,searchParams:y,parentRoute:l,countData:b}):a.createElement(d,{businessService:n,data:{items:v,totalCount:v.length},isLoading:!1,searchFields:N,onSearch:S,onSort:_,onNextPage:()=>m(e=>e+E),onPrevPage:()=>m(e=>Math.max(e-E,0)),currentPage:Math.floor(c/E),pageSizeLimit:E,onPageSizeChange:e=>{const t=Number(e.target.value);u(t),m(0)},parentRoute:l,searchParams:y,sortParams:C,totalRecords:v.length,countData:b,filterComponent:"EKYC_INBOX_FILTER"})))},f=e=>{let{kNumber:o,kName:i,connectionDetails:s,isLoading:c}=e;const{t:d}=r.useTranslation(),m=l.useHistory(),{path:E}=l.useRouteMatch(),[p,u]=t.useState(!1),[C,g]=t.useState({code:"SELF",name:"EKYC_SELF"}),x=()=>{u(!0)};return c?a.createElement(n.Loader,null):s?a.createElement(a.Fragment,null,a.createElement(n.Card,{className:"ekyc-create-card",style:{padding:"24px"}},a.createElement(n.CardHeader,null,d("EKYC_K_NUMBER_DETAILS")),a.createElement(n.StatusTable,null,a.createElement(n.Row,{label:d("EKYC_K_NUMBER"),text:o||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_K_NAME"),text:i||d("CS_NA")})),a.createElement(n.CardHeader,{style:{marginTop:"24px"}},d("EKYC_CONNECTION_DETAILS")),null!=s&&s.connectionDetailsInfo?a.createElement(n.StatusTable,null,a.createElement(n.Row,{label:d("EKYC_CONSUMER_NAME"),text:s.connectionDetailsInfo.consumerName||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_ADDRESS"),text:s.connectionDetailsInfo.address||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_CONNECTION_TYPE"),text:s.connectionDetailsInfo.connectionType||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_METER_NO"),text:s.connectionDetailsInfo.meterNumber||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_PHONE_NO"),text:s.connectionDetailsInfo.phoneNumber||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_EMAIL"),text:s.connectionDetailsInfo.email||d("CS_NA")}),a.createElement(n.Row,{label:d("EKYC_STATUS"),text:s.connectionDetailsInfo.statusflag||d("CS_NA")})):a.createElement(n.CardLabel,null,d("EKYC_NO_CONNECTION_DETAILS_FOUND")),a.createElement("button",{type:"button",onClick:x,style:{background:"none",border:"none",color:"#0076f3ff",fontWeight:"600",cursor:"pointer",fontSize:"14px",padding:"10px"}},d("")),a.createElement(n.SubmitBar,{label:d("EKYC_START_VERIFICATION"),onSubmit:x,style:{borderRadius:"12px",marginLeft:"1100px"}})),p&&a.createElement(n.Modal,{headerBarMain:d("EKYC_SELECT_VERIFICATION_TYPE"),headerBarEnd:a.createElement("span",{onClick:()=>u(!1),style:{cursor:"pointer",padding:"8px"}},"X"),actionSaveLabel:d("ES_COMMON_CONFIRM"),actionSaveOnSubmit:()=>{const e=E.includes("/create-kyc")?E.replace("/create-kyc",""):E.replace("/k-details","");m.push(e+"/aadhaar-verification",{kNumber:o,selectedOption:C,connectionDetails:s}),u(!1)},actionCancelLabel:d("ES_COMMON_CANCEL"),actionCancelOnSubmit:()=>u(!1),style:{borderRadius:"12px"}},a.createElement("div",{style:{padding:"24px"}},a.createElement(n.RadioButtons,{options:[{code:"SELF",name:"EKYC_SELF"},{code:"OTHER",name:"EKYC_OTHER"}],optionsKey:"name",selectedOption:C,onSelect:g,style:{display:"flex",flexDirection:"column",gap:"12px",buttonStyle:{borderRadius:"5px"}},t:d})))):null},y=()=>{const{t:e}=r.useTranslation(),[l,o]=t.useState(()=>{const e=sessionStorage.getItem("EKYC_CREATE_SEARCH_PARAMS");return e?JSON.parse(e):{kNumber:"",kName:""}}),[i,s]=t.useState(()=>"true"===sessionStorage.getItem("EKYC_CREATE_SEARCH_PERFORMED")),[c,d]=t.useState(null),m=Digit.ULBService.getCurrentTenantId(),{isLoading:p,data:u}=Digit.Hooks.ekyc.useGetConnection({tenantId:m,details:{kno:l.kNumber}},{enabled:i&&!!l.kNumber}),{mutate:C,isLoading:g}=Digit.Hooks.ekyc.useValidateUser(m,{onSuccess:t=>{var a;"successful"===(null==t||null===(a=t.responseInfo)||void 0===a?void 0:a.status)||(d({error:!0,label:(null==t?void 0:t.message)||e("EKYC_VALIDATION_FAILED")}),s(!1),sessionStorage.removeItem("EKYC_CREATE_SEARCH_PERFORMED"))},onError:t=>{var a,l,n,r;d({error:!0,label:(null==t||null===(a=t.response)||void 0===a||null===(l=a.data)||void 0===l||null===(n=l.Errors)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.message)||e("EKYC_VALIDATION_ERROR_PLEASE_ENTER_THE_CORRECT_CREDENTIALS")}),s(!1),sessionStorage.removeItem("EKYC_CREATE_SEARCH_PERFORMED")}});return a.createElement(E,{onSearch:t=>{if(!t.kNumber&&!t.kName)return o({kNumber:"",kName:""}),s(!1),sessionStorage.removeItem("EKYC_CREATE_SEARCH_PARAMS"),void sessionStorage.removeItem("EKYC_CREATE_SEARCH_PERFORMED");t.kNumber&&t.kName?(o(t),s(!0),sessionStorage.setItem("EKYC_CREATE_SEARCH_PARAMS",JSON.stringify(t)),sessionStorage.setItem("EKYC_CREATE_SEARCH_PERFORMED","true"),C({kno:t.kNumber,name:t.kName})):d({error:!0,label:e("EKYC_FILL_ALL_FIELDS")})},searchParams:l},i&&a.createElement(f,{kNumber:l.kNumber,kName:l.kName,connectionDetails:u,isLoading:p||g}),!i&&!p&&a.createElement(n.Card,{style:{textAlign:"center",padding:"40px"}},a.createElement("div",{style:{color:"#667085"}},e("EKYC_SEARCH_TO_VIEW_DETAILS"))),c&&a.createElement(n.Toast,{error:c.error,label:c.label,onClose:()=>{d(null)},isDsc:!0}))};"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));const h=e=>{let{isSection:o=!1,onComplete:i,parentState:s}=e;const{t:c}=r.useTranslation(),d=l.useHistory(),m=l.useLocation(),E=s||m.state||{kNumber:"EKYC-1234567890",selectedOption:{code:"SELF",name:"EKYC_SELF"},connectionDetails:null},[p,u]=t.useState({code:"AADHAAR",name:"EKYC_AADHAAR_ADDRESS"}),[C,g]=t.useState({code:"NO",name:"CORE_COMMON_NO"}),[x,f]=t.useState(""),[y,h]=t.useState(""),[v,b]=t.useState(""),[S,_]=t.useState(""),[N,A]=t.useState(""),[R,T]=t.useState(null),[D,I]=t.useState(!1),L=t.useRef(null),F=[{code:"AADHAAR",name:"EKYC_AADHAAR_ADDRESS"},{code:"OLD",name:"EKYC_OLD_ADDRESS"}],O=[{code:"YES",name:"CORE_COMMON_YES"},{code:"NO",name:"CORE_COMMON_NO"}],H=()=>{if(i)i({addressType:p,fullAddress:x,flatNo:y,building:v,landmark:S,pincode:N,doorPhoto:R});else{const{kNumber:e,selectedOption:t,connectionDetails:a}=E;d.push("/digit-ui/employee/ekyc/property-info",{kNumber:e,selectedOption:t,connectionDetails:a,addressDetails:{addressType:p,fullAddress:x,flatNo:y,building:v,landmark:S,pincode:N,doorPhoto:R}})}},Y=e=>{const t=e.target.files[0];if(t){const e=new FileReader;e.onloadend=()=>{T(e.result)},e.readAsDataURL(t)}},k=()=>{L.current.click()},K=()=>{"geolocation"in navigator?(I(!0),navigator.geolocation.getCurrentPosition(function(e){try{const{latitude:t,longitude:a}=e.coords;return Promise.resolve(function(e,l){try{var n=function(e,l){try{var n=Promise.resolve(fetch("https://nominatim.openstreetmap.org/reverse?format=json&lat="+t+"&lon="+a+"&zoom=18&addressdetails=1")).then(function(e){if(!e.ok)throw new Error("Failed to fetch address");return Promise.resolve(e.json()).then(function(e){if(e&&e.address){var t,a,l,n,r,o,i,s,c,d,m;const E=[null===(t=e.address)||void 0===t?void 0:t.amenity,null===(a=e.address)||void 0===a?void 0:a.road,null===(l=e.address)||void 0===l?void 0:l.neighbourhood,null===(n=e.address)||void 0===n?void 0:n.suburb,null===(r=e.address)||void 0===r?void 0:r.city,null===(o=e.address)||void 0===o?void 0:o.state,null===(i=e.address)||void 0===i?void 0:i.postcode].filter(Boolean).join(", ");f(E||""),A((null===(s=e.address)||void 0===s?void 0:s.postcode)||""),_((null===(c=e.address)||void 0===c?void 0:c.suburb)||(null===(d=e.address)||void 0===d?void 0:d.neighbourhood)||""),h((null===(m=e.address)||void 0===m?void 0:m.amenity)||"")}})})}catch(e){return l(e)}return n&&n.then?n.then(void 0,l):n}(0,function(e){console.error("Error reverse geocoding:",e)})}catch(e){return l(!0,e)}return n&&n.then?n.then(l.bind(null,!1),l.bind(null,!0)):l(!1,n)}(0,function(e,t){if(I(!1),e)throw t;return t}))}catch(e){return Promise.reject(e)}},e=>{console.error("Error getting location:",e),I(!1),alert(c("LOCATION_FETCH_FAILED")||"Failed to fetch your current location. Please ensure location permissions are granted.")},{enableHighAccuracy:!0,timeout:1e4,maximumAge:0})):alert(c("GEOLOCATION_NOT_SUPPORTED")||"Geolocation is not supported by your browser")},M=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M14.4 6L13.6 4H5V21H7V14H12.6L13.4 16H20V6H14.4Z",fill:"#00703C"})),P=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M2 7V17C2 18.1 2.9 19 4 19H20C21.1 19 22 18.1 22 17V7C22 5.9 21.1 5 20 5H4C2.9 5 2 5.9 2 7ZM12 11H14V13H12V11ZM12 7H14V9H12V7ZM16 11H20V13H16V11ZM16 7H20V9H16V7ZM4 7H10V15H4V7ZM20 17H4V16H20V17Z",fill:"#3D51B0"})),w=()=>a.createElement("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M9 2L7.17 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6C22 4.9 21.1 4 20 4H16.83L15 2H9ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17ZM12 9C10.34 9 9 10.34 9 12C9 13.66 10.34 15 12 15C13.66 15 15 13.66 15 12C15 10.34 13.66 9 12 9Z",fill:"#0068faff"})),B=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M12 8C9.79 8 8 9.79 8 12C8 14.21 9.79 16 12 16C14.21 16 16 14.21 16 12C16 9.79 14.21 8 12 8ZM20.94 11C20.48 6.83 17.17 3.52 13 3.06V1H11V3.06C6.83 3.52 3.52 6.83 3.06 11H1V13H3.06C3.52 17.17 6.83 20.48 11 20.94V23H13V20.94C17.17 20.48 20.48 17.17 20.94 13H23V11H20.94ZM12 19C8.13 19 5 15.87 5 12C5 8.13 8.13 5 12 5C15.87 5 19 8.13 19 12C19 15.87 15.87 19 12 19Z",fill:"#0068faff"})),V=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M13 13V11H15V13H13ZM13 9V7H15V9H13ZM17 13V11H19V13H17ZM17 9V7H19V9H17ZM11 13V11H9V13H11ZM11 9V7H9V9H11ZM7 13V11H5V13H7ZM7 9V7H5V9H7ZM21 3H3C1.9 3 1 3.9 1 5V19C1 20.1 1.9 21 3 21H21C22.1 21 23 20.1 23 19V5C23 3.9 22.1 3 21 3ZM21 19H3V5H21V19Z",fill:"#0068faff"})),z=()=>a.createElement("div",{style:{animation:"fadeSlideIn 0.3s ease"}},o&&a.createElement("hr",{style:{margin:"40px 0",border:"0",borderTop:"2px solid #EAECF0"}}),a.createElement(n.Header,{style:{marginBottom:"24px"}},c("EKYC_ADDRESS_DETAILS_HEADER")||"Address Details"),a.createElement("div",{style:{marginBottom:"32px"}},a.createElement(n.RadioButtons,{options:F,optionsKey:"name",selectedOption:p,onSelect:u,t:c,innerStyles:{display:"flex",alignItems:"center"},style:{display:"flex",gap:"50px",justifyContent:"flex-start"}})),"AADHAAR"===p.code&&a.createElement("div",{style:{backgroundColor:"#F9FAFB",padding:"16px",borderRadius:"12px",marginBottom:"24px",border:"1px solid #EAECF0",display:"flex",alignItems:"flex-start",gap:"12px",animation:"fadeSlideIn 0.3s ease"}},a.createElement("div",{style:{backgroundColor:"#E7F4EE",padding:"8px",borderRadius:"8px"}},a.createElement(n.LocationIcon,{className:"icon",styles:{fill:"#00703C",width:"20px",height:"20px"}})),a.createElement("div",{style:{fontSize:"16px",lineHeight:"1.6",color:"#344054",fontWeight:"500"}},"H.No. 123, Sector 15, Rohini",a.createElement("br",null),"Delhi - 110085")),"OLD"===p.code&&a.createElement("div",{style:{animation:"fadeSlideIn 0.3s ease"}},a.createElement("div",{style:{marginBottom:"24px"}},a.createElement(n.CardLabel,{style:{marginBottom:"12px",fontWeight:"600",color:"#344054"}},c("EKYC_ADDRESS_CORRECTION_PROMPT")||"Do you want to correct the address?"),a.createElement(n.RadioButtons,{options:O,optionsKey:"name",selectedOption:C,onSelect:g,t:c,innerStyles:{display:"flex",alignItems:"center"},style:{display:"flex",gap:"50px",justifyContent:"flex-start"}})),a.createElement("div",{style:{border:"1px solid #D0D5DD",borderRadius:"12px",padding:"14px 16px",display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"24px",cursor:D?"not-allowed":"pointer",backgroundColor:D?"#F2F4F7":"#FFFFFF",transition:"all 0.2s ease",opacity:D?.7:1,boxShadow:"0px 1px 2px rgba(16, 24, 40, 0.05)"},onClick:D?void 0:K,onMouseOver:e=>D?null:e.currentTarget.style.backgroundColor="#F9FAFB",onMouseOut:e=>D?null:e.currentTarget.style.backgroundColor="#FFFFFF"},a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"12px"}},a.createElement("div",{style:{backgroundColor:"#EEF4FF",padding:"8px",borderRadius:"8px"}},D?a.createElement("div",{className:"location-loader",style:{width:"20px",height:"20px",border:"2px solid #0068faff",borderTopColor:"transparent",borderRadius:"50%",animation:"spin 1s linear infinite"}}):a.createElement(B,null)),a.createElement("span",{style:{fontWeight:"600",color:"#344054"}},D?c("EKYC_FETCHING_LOCATION")||"Fetching Location...":c("EKYC_USE_CURRENT_LOCATION")||"Use Current Location")),!D&&a.createElement("span",{style:{fontSize:"20px",color:"#98A2B3"}},"›")),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_FULL_ADDRESS")||"Full Address"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"16px",zIndex:1,opacity:.6}},a.createElement(n.PropertyHouse,{styles:{fill:"#0068faff",width:"20px",height:"20px"}})),a.createElement(n.TextInput,{value:x,onChange:e=>f(e.target.value),placeholder:c("EKYC_ENTER_FULL_ADDRESS")||"Enter Full Address",textInputStyle:{paddingLeft:"40px",minHeight:"80px"}}))),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"24px"}},a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_FLAT_HOUSE_NUMBER")||"Flat/House Number"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(n.PropertyHouse,{styles:{fill:"#0068faff",width:"20px",height:"20px"}})),a.createElement(n.TextInput,{value:y,onChange:e=>h(e.target.value),placeholder:c("EKYC_ENTER_FLAT_NO")||"e.g. 45-B",textInputStyle:{paddingLeft:"40px"}}))),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_BUILDING_TOWER")||"Building/Tower"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(n.PropertyHouse,{styles:{fill:"#0068faff",width:"20px",height:"20px"}})),a.createElement(n.TextInput,{value:v,onChange:e=>b(e.target.value),placeholder:c("EKYC_ENTER_BUILDING")||"e.g. Tower 4",textInputStyle:{paddingLeft:"40px"}})))),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_LANDMARK")||"Landmark"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(n.LocationIcon,{className:"icon",styles:{fill:"#0068faff",width:"20px",height:"20px"}})),a.createElement(n.TextInput,{value:S,onChange:e=>_(e.target.value),placeholder:c("EKYC_ENTER_LANDMARK")||"Near Central Park",textInputStyle:{paddingLeft:"40px"}}))),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_PINCODE")||"Pincode"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(V,null)),a.createElement(n.TextInput,{value:N,onChange:e=>A(e.target.value),placeholder:c("EKYC_ENTER_PINCODE")||"6-digit pincode",textInputStyle:{paddingLeft:"40px"},maxLength:6})))),a.createElement("hr",{style:{margin:"32px 0",border:"0",borderTop:"1px solid #EAECF0"}}),a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px",marginBottom:"20px"}},a.createElement("div",{style:{backgroundColor:"#EEF4FF",padding:"8px",borderRadius:"8px"}},a.createElement(n.PropertyHouse,{styles:{fill:"#0068faff",width:"24px",height:"24px"}})),a.createElement(n.CardHeader,{style:{margin:0,fontSize:"20px"}},c("EKYC_ADMINISTRATIVE_DIVISION")||"Administrative Division")),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"24px",marginBottom:"32px"}},a.createElement("div",{style:{backgroundColor:"#F9FAFB",padding:"16px",borderRadius:"12px",display:"flex",alignItems:"center",gap:"16px",border:"1px solid #EAECF0"}},a.createElement("div",{style:{backgroundColor:"#E7F4EE",padding:"10px",borderRadius:"10px",display:"flex"}},a.createElement(M,null)),a.createElement("div",null,a.createElement("div",{style:{color:"#00703C",fontSize:"12px",fontWeight:"700",textTransform:"uppercase",letterSpacing:"0.5px"}},c("EKYC_ASSEMBLY")||"ASSEMBLY"),a.createElement("div",{style:{fontSize:"15px",fontWeight:"700",color:"#101828",marginTop:"2px"}},"AC-12 Chandni Chowk"))),a.createElement("div",{style:{backgroundColor:"#F9FAFB",padding:"16px",borderRadius:"12px",display:"flex",alignItems:"center",gap:"16px",border:"1px solid #EAECF0"}},a.createElement("div",{style:{backgroundColor:"#EEF4FF",padding:"10px",borderRadius:"10px",display:"flex"}},a.createElement(P,null)),a.createElement("div",null,a.createElement("div",{style:{color:"#0068faff",fontSize:"12px",fontWeight:"700",textTransform:"uppercase",letterSpacing:"0.5px"}},c("EKYC_WARD")||"WARD"),a.createElement("div",{style:{fontSize:"15px",fontWeight:"700",color:"#101828",marginTop:"2px"}},"WARD-45 Civil Lines")))),a.createElement(n.CardHeader,{style:{fontSize:"18px",color:"#101828",marginBottom:"4px"}},c("EKYC_DOOR_PHOTO_HEADER")||"Door Photo with GPS Stamp"),a.createElement("div",{style:{color:"#667085",fontSize:"14px",marginBottom:"16px"}},c("EKYC_REQUIRED_FOR_VERIFICATION")||"Required for verification"),a.createElement("div",{style:{backgroundColor:"#FFFAEB",padding:"14px",borderRadius:"12px",display:"flex",alignItems:"center",gap:"12px",marginBottom:"20px",border:"1px solid #FEDF89"}},a.createElement(n.InfoBannerIcon,{fill:"#B54708"}),a.createElement("div",null,a.createElement("div",{style:{fontWeight:"700",color:"#B54708",fontSize:"14px"}},c("EKYC_IMPORTANT")||"Important"),a.createElement("div",{style:{fontSize:"13px",color:"#B54708",marginTop:"2px"}},c("EKYC_CAPTURE_LIVE_CAMERA")||"Capture with live camera for GPS metadata"))),a.createElement("div",{style:{border:"2px dashed #D0D5DD",borderRadius:"16px",padding:R?"12px":"40px 24px",textAlign:"center",cursor:"pointer",position:"relative",overflow:"hidden",minHeight:"180px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"#F9FAFB",transition:"all 0.2s ease",boxShadow:"inset 0px 2px 4px rgba(0, 0, 0, 0.02)"},onClick:R?void 0:k,onMouseOver:e=>R?null:e.currentTarget.style.borderColor="#0068faff",onMouseOut:e=>R?null:e.currentTarget.style.borderColor="#D0D5DD"},a.createElement("input",{type:"file",ref:L,onChange:Y,accept:"image/*",style:{display:"none"}}),R?a.createElement("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",justifyContent:"center"}},a.createElement("img",{src:R,alt:"Door",style:{width:"100%",maxHeight:"300px",objectFit:"cover",borderRadius:"12px",display:"block"}}),a.createElement("div",{style:{position:"absolute",top:"12px",right:"12px"}},a.createElement("button",{onClick:e=>{e.stopPropagation(),T(null),L.current&&(L.current.value="")},style:{background:"#FFFFFF",border:"1px solid #EAECF0",borderRadius:"8px",padding:"8px",display:"flex",boxShadow:"0px 1px 2px rgba(16, 24, 40, 0.05)",cursor:"pointer"}},a.createElement(n.RemoveableTag,{text:"",onClick:()=>{},extraStyles:{tagStyles:{margin:0,padding:0}}})))):a.createElement(t.Fragment,null,a.createElement("div",{style:{backgroundColor:"#FFFFFF",width:"64px",height:"64px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 16px",boxShadow:"0px 1px 3px rgba(16, 24, 40, 0.1)"}},a.createElement(w,null)),a.createElement("div",{style:{fontWeight:"700",fontSize:"16px",marginBottom:"4px",color:"#101828"}},c("EKYC_TAP_TO_CAPTURE")||"Tap to Capture"),a.createElement("div",{style:{color:"#667085",fontSize:"14px"}},c("EKYC_CAPTURE_DOOR_IMAGE")||"Capture Door Image"))),a.createElement(n.ActionBar,null,a.createElement(n.SubmitBar,{label:o?c("EKYC_COMPLETE_VERIFICATION_AND_PROCEED")||"Complete & Proceed":c("EKYC_COMPLETE_VERIFICATION")||"Complete Verification",onSubmit:H})));return o?z():a.createElement("div",{className:"inbox-container"},a.createElement("style",null,"\n @keyframes spin { to { transform: rotate(360deg); } }\n @keyframes fadeSlideIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }\n "),a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},a.createElement("div",{className:"icon-container",style:{color:"#0068faff",marginRight:"12px"}},a.createElement(n.HomeIcon,{style:{width:"24px",height:"24px"}})),a.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},c("EKYC_PROCESS"))),a.createElement("div",{style:{padding:"8px 16px"}},a.createElement(n.ConnectingCheckPoints,null,a.createElement(n.CheckPoint,{label:c("EKYC_STEP_AADHAAR")||"Aadhaar",isCompleted:!0}),a.createElement(n.CheckPoint,{label:c("EKYC_STEP_ADDRESS")||"Address",isCompleted:!0}),a.createElement(n.CheckPoint,{label:c("EKYC_STEP_REVIEW")||"Review"})))),a.createElement("div",{style:{flex:1,marginLeft:"16px"}},a.createElement(n.Card,null,a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"}},a.createElement(n.Header,null,c("EKYC_ADDRESS_DETAILS_HEADER")||"Address Details"),a.createElement("div",{style:{fontSize:"14px",fontWeight:"700",color:"#505A5F"}},c("EKYC_K_NUMBER"),": ",a.createElement("span",{style:{color:"#0B0C0C"}},null==E?void 0:E.kNumber))),z())))},v=e=>{let{size:t=22,color:l="#6366f1"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12.01 3c-1.98 0-3.86.47-5.57 1.41-.24.13-.54.04-.67-.2-.13-.24-.04-.55.2-.68C7.82 2.52 9.86 2 12.01 2c2.13 0 3.96.46 5.57 1.41.24.13.33.43.2.67-.09.13-.24.39-.39.39zM12 21c-.28 0-.5-.22-.5-.5v-4.42c-2.33-.21-4.44-1.35-5.94-3.21-1.5-1.86-2.22-4.18-2.02-6.52.05-.59.55-1.03 1.14-.98s1.03.55.98 1.14c-.15 1.76.39 3.51 1.52 4.91 1.12 1.4 2.7 2.26 4.45 2.42.21.02.37.19.37.4v6.26c0 .28-.22.5-.5.5z",fill:l}),a.createElement("path",{d:"M12 11c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z",fill:l}))},b=e=>{let{size:t=16,color:l="#64748b"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2",stroke:l,strokeWidth:"2",strokeLinecap:"round"}),a.createElement("circle",{cx:"12",cy:"7",r:"4",stroke:l,strokeWidth:"2"}))},S=e=>{let{size:t=16,color:l="#64748b"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07A19.5 19.5 0 013.07 10.6 19.79 19.79 0 0 0 3 1.82C3 .72 3.72 0 4.82 0h3a2 2 0 012 1.72c.127.96.361 1.903.7 2.81a2 2 0 01-.45 2.11L8.91 7.91a16 16 0 006.16 6.16l1.27-1.27a2 2 0 012.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0122 16.92z",stroke:l,strokeWidth:"2",strokeLinecap:"round"}))},_=e=>{let{size:t=16}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347z",fill:"#25D366"}),a.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12c0 1.89.525 3.66 1.438 5.168L2 22l4.832-1.438A9.96 9.96 0 0012 22c5.523 0 10-4.477 10-10S17.523 2 12 2z",stroke:"#25D366",strokeWidth:"2",strokeLinecap:"round"}))},N=e=>{let{size:t=16,color:l="#64748b"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z",stroke:l,strokeWidth:"2",strokeLinecap:"round"}),a.createElement("path",{d:"M22 6l-10 7L2 6",stroke:l,strokeWidth:"2",strokeLinecap:"round"}))},A=e=>{let{size:t=16,color:l="#64748b"}=e;return a.createElement("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none"},a.createElement("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2",stroke:l,strokeWidth:"2",strokeLinecap:"round"}),a.createElement("circle",{cx:"9",cy:"7",r:"4",stroke:l,strokeWidth:"2"}),a.createElement("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87",stroke:l,strokeWidth:"2",strokeLinecap:"round"}),a.createElement("path",{d:"M16 3.13a4 4 0 0 1 0 7.75",stroke:l,strokeWidth:"2",strokeLinecap:"round"}))},R=()=>{var e,o,i,s;const{t:c}=r.useTranslation(),d=l.useLocation(),m=l.useHistory(),E=t.useRef(null),{kNumber:p,selectedOption:u,connectionDetails:C}=d.state||{kNumber:"EKYC-1234567890",selectedOption:{code:"SELF",name:"EKYC_SELF"},connectionDetails:{connectionDetailsInfo:{consumerName:"Rajesh Kumar Singh",address:"House No. 45, Sector 12, New Delhi - 110001",phoneNumber:"9876543210",email:"rajesh.singh@example.com"}}},[g,x]=t.useState(""),[f,y]=t.useState(!1),[R,T]=t.useState(!1),[D,I]=t.useState({code:"NO",name:"CORE_COMMON_NO"}),[L,F]=t.useState((null==C||null===(e=C.connectionDetailsInfo)||void 0===e?void 0:e.consumerName)||""),[O,H]=t.useState({code:"NO",name:"CORE_COMMON_NO"}),[Y,k]=t.useState((null==C||null===(o=C.connectionDetailsInfo)||void 0===o?void 0:o.phoneNumber)||""),[K,M]=t.useState((null==C||null===(i=C.connectionDetailsInfo)||void 0===i?void 0:i.phoneNumber)||""),[P,w]=t.useState((null==C||null===(s=C.connectionDetailsInfo)||void 0===s?void 0:s.email)||""),[B,V]=t.useState(""),[z,W]=t.useState(!1),[U,Z]=t.useState(null),X=[{code:"YES",name:"CORE_COMMON_YES"},{code:"NO",name:"CORE_COMMON_NO"}];return a.createElement("div",{className:"inbox-container"},a.createElement("style",null,"\n @keyframes spin { to { transform: rotate(360deg); } }\n @keyframes fadeSlideIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }\n @keyframes pulseGreen { 0%,100% { box-shadow:0 0 0 0 rgba(22,163,74,0.4); } 50% { box-shadow:0 0 0 8px rgba(22,163,74,0); } }\n "),a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},a.createElement("div",{className:"icon-container",style:{color:"#0068faff",marginRight:"12px"}},a.createElement(n.HomeIcon,{style:{width:"24px",height:"24px"}})),a.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},c("EKYC_PROCESS"))),a.createElement("div",{style:{padding:"8px 16px"}},a.createElement(n.ConnectingCheckPoints,null,a.createElement(n.CheckPoint,{label:c("EKYC_STEP_AADHAAR")||"Aadhaar",isCompleted:z}),a.createElement(n.CheckPoint,{label:c("EKYC_STEP_ADDRESS")||"Address",isCompleted:null!==U}),a.createElement(n.CheckPoint,{label:c("EKYC_STEP_REVIEW")||"Review"})))),a.createElement("div",{style:{flex:1,marginLeft:"16px"}},a.createElement(n.Card,null,a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"}},a.createElement(n.Header,null,c("EKYC_AADHAAR_VERIFICATION_HEADER")||"Aadhaar Verification"),a.createElement("div",{style:{fontSize:"14px",fontWeight:"700",color:"#505A5F"}},c("EKYC_K_NUMBER"),": ",a.createElement("span",{style:{color:"#0B0C0C"}},p))),a.createElement(n.CardHeader,{style:{fontSize:"20px",marginBottom:"16px"}},c("EKYC_AADHAAR_NUMBER_HEADER")||"Aadhaar Number"),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_LAST_4_DIGIT_AADHAAR")||"Last 4-digit Aadhaar Number"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(v,{size:20})),a.createElement(n.TextInput,{value:g,onChange:e=>{const t=e.target.value;t.length<=4&&/^\d*$/.test(t)&&x(t)},placeholder:c("EKYC_ENTER_LAST_4_DIGIT")||"Enter last 4 digits",textInputStyle:{paddingLeft:"40px"},maxLength:4}),f&&a.createElement("div",{style:{position:"absolute",right:"12px",top:"50%",transform:"translateY(-50%)"}},a.createElement(n.TickMark,{fillColor:"#00703C"})))),!f&&a.createElement(n.SubmitBar,{label:R?c("EKYC_VERIFYING")||"Verifying...":c("EKYC_VERIFY_AADHAAR_BTN")||"Verify Aadhaar",onSubmit:()=>{4===g.length&&(T(!0),setTimeout(()=>{T(!1),y(!0)},1200))},disabled:4!==g.length||R,style:{marginTop:"16px",opacity:4!==g.length?.6:1}}),f&&a.createElement("div",{style:{backgroundColor:"#E7F4EE",padding:"20px",borderRadius:"8px",marginTop:"24px",marginBottom:"24px",border:"1px solid #D1E9DB",animation:"fadeSlideIn 0.4s ease"}},a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px",marginBottom:"16px"}},a.createElement("div",{style:{backgroundColor:"#D1E9DB",padding:"4px",borderRadius:"50%",display:"flex",animation:"pulseGreen 2s ease infinite"}},a.createElement(n.TickMark,{fillColor:"#00703C"})),a.createElement("span",{style:{fontWeight:"700",color:"#00703C",fontSize:"18px"}},c("EKYC_AADHAAR_VERIFIED_SUCCESS")||"Aadhaar Verified Successfully")),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"16px"}},a.createElement("div",{style:{display:"flex",flexDirection:"column"}},a.createElement("span",{style:{color:"#667085",fontSize:"12px",fontWeight:"700",textTransform:"uppercase"}},c("EKYC_NAME")),a.createElement("span",{style:{fontWeight:"700",fontSize:"16px",color:"#101828"}},"Rajesh Kumar Singh")),a.createElement("div",{style:{display:"flex",flexDirection:"column"}},a.createElement("span",{style:{color:"#667085",fontSize:"12px",fontWeight:"700",textTransform:"uppercase"}},c("EKYC_AADHAAR")),a.createElement("span",{style:{fontWeight:"700",fontSize:"16px",color:"#101828"}},"XXXX XXXX ",g)),a.createElement("div",{style:{display:"flex",flexDirection:"column",gridColumn:"span 2"}},a.createElement("span",{style:{color:"#667085",fontSize:"12px",fontWeight:"700",textTransform:"uppercase"}},c("EKYC_ADDRESS")),a.createElement("span",{style:{fontWeight:"500",fontSize:"15px",color:"#344054"}},"House No. 45, Sector 12, New Delhi - 110001")))),a.createElement("hr",{style:{margin:"32px 0",border:"0",borderTop:"1px solid #EAECF0"}}),a.createElement(n.CardHeader,{style:{fontSize:"20px",marginBottom:"16px"}},c("EKYC_CONTACT_DETAILS_HEADER")||"Contact Details"),a.createElement(n.LabelFieldPair,{style:{animation:"fadeSlideIn 0.3s ease"}},a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"20px"}},a.createElement(n.CardLabel,{style:{fontWeight:"600",marginBottom:"0"}},c("EKYC_USER_NAME")||"Corrected Name"),a.createElement(n.RadioButtons,{options:X,optionsKey:"name",selectedOption:D,onSelect:I,t:c,innerStyles:{display:"flex",gap:"24px"},style:{display:"flex",gap:"50px",marginBottom:"0"}})),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:"YES"===D.code?.6:.3}},a.createElement(b,{size:18,color:"YES"===D.code?"#64748b":"#94a3b8"})),a.createElement(n.TextInput,{value:L,onChange:e=>F(e.target.value),placeholder:c("EKYC_ENTER_NAME_PLACEHOLDER")||"Enter full name",textInputStyle:{paddingLeft:"40px"},disabled:"YES"!==D.code}))),a.createElement(n.LabelFieldPair,null,a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"20px",padding:"10px"}},a.createElement(n.CardLabel,{style:{fontWeight:"600",marginBottom:"0"}},c("EKYC_USER_MOBILE_NUMBER")||"User Mobile Number"),a.createElement(n.RadioButtons,{options:X,optionsKey:"name",selectedOption:O,onSelect:H,t:c,innerStyles:{display:"flex",gap:"24px"},style:{display:"flex",gap:"50px",marginBottom:"0"}})),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:"YES"===O.code?.6:.3}},a.createElement(S,{size:18,color:"YES"===O.code?"#64748b":"#94a3b8"})),a.createElement(n.TextInput,{value:Y,onChange:e=>k(e.target.value),placeholder:"+91 XXXXX XXXXX",textInputStyle:{paddingLeft:"40px"},disabled:"YES"!==O.code}))),a.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"24px",marginTop:"24px"}},a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_WHATSAPP_NUMBER")||"WhatsApp Number"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(_,{size:18})),a.createElement(n.TextInput,{value:K,onChange:e=>M(e.target.value),placeholder:"+91 XXXXX XXXXX",textInputStyle:{paddingLeft:"40px"}}))),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_EMAIL_ADDRESS")||"Email Address"," ",a.createElement("span",{style:{fontWeight:"400",color:"#667085"}},"(",c("EKYC_OPTIONAL")||"Optional",")")),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(N,{size:18})),a.createElement(n.TextInput,{value:P,onChange:e=>w(e.target.value),placeholder:c("EKYC_EMAIL_ADDRESS_PLACEHOLDER")||"example@email.com",textInputStyle:{paddingLeft:"40px"}})))),a.createElement("hr",{style:{margin:"32px 0",border:"0",borderTop:"1px solid #EAECF0"}}),a.createElement(n.CardHeader,{style:{fontSize:"20px",marginBottom:"16px"}},c("EKYC_FAMILY_DETAILS_HEADER")||"Family Details"),a.createElement(n.LabelFieldPair,null,a.createElement(n.CardLabel,{style:{fontWeight:"600"}},c("EKYC_NO_OF_PERSONS")||"Number of Family Members"),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",zIndex:1,opacity:.6}},a.createElement(A,{size:18})),a.createElement(n.TextInput,{value:B,onChange:e=>{/^\d*$/.test(e.target.value)&&V(e.target.value)},placeholder:c("EKYC_ENTER_NO_OF_PERSONS")||"Enter total number of persons",textInputStyle:{paddingLeft:"40px"}}))),!z&&a.createElement(n.ActionBar,null,a.createElement(n.SubmitBar,{label:c("ES_COMMON_SAVE_CONTINUE")||"Save & Continue",onSubmit:()=>{W(!0),setTimeout(()=>{var e;null===(e=E.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"})},100)}})),z&&a.createElement("div",{ref:E},a.createElement(h,{isSection:!0,onComplete:e=>{Z(e),m.push("/digit-ui/employee/ekyc/property-info",{kNumber:p,selectedOption:u,connectionDetails:C,aadhaarDetails:{aadhaarLastFour:g,isAadhaarVerified:f,userName:L,mobileNumber:Y,whatsappNumber:K,email:P,noOfPersons:B},addressDetails:e})},parentState:{kNumber:p,selectedOption:u,connectionDetails:C}})),a.createElement("div",{style:{textAlign:"center",marginTop:"24px"}},a.createElement("p",{style:{fontSize:"12px",color:"#667085",display:"flex",alignItems:"center",justifyContent:"center",gap:"4px"}},a.createElement("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"}),a.createElement("path",{d:"M12 11V17M12 7H12.01",strokeLinecap:"round"})),c("EKYC_SECURE_DATA_NOTICE")||"Your data is encrypted and secure")))))},T=()=>{const{t:e}=r.useTranslation(),o=l.useHistory(),i=l.useLocation(),{kNumber:s}=i.state||{kNumber:"EKYC-1234567890"},[c,d]=t.useState("OWNER"),[m,E]=t.useState(""),[p,u]=t.useState(null),[C,g]=t.useState(null),[x,f]=t.useState(null),[y,h]=t.useState(null),[v,b]=t.useState(null),[S,_]=t.useState(null),N=t.useRef(null),A=t.useRef(null),R=()=>a.createElement("div",{style:{backgroundColor:"#E8EAF6",padding:"8px",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center"}},a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M20 6H16V4C16 2.89 15.11 2 14 2H10C8.89 2 8 2.89 8 4V6H4C2.89 6 2 6.89 2 8V19C2 20.11 2.89 21 4 21H20C21.11 21 22 20.11 22 19V8C22 6.89 21.11 6 20 6ZM10 4H14V6H10V4ZM20 19H4V8H20V19ZM13 13V10H11V13H8L12 17L16 13H13Z",fill:"#3D51B0"}))),T=()=>a.createElement("div",{style:{backgroundColor:"#E8EAF6",padding:"8px",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center"}},a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M12 7V3H2V21H22V7H12ZM6 19H4V17H6V19ZM6 15H4V13H6V15ZM6 11H4V9H6V11ZM6 7H4V5H6V7ZM10 19H8V17H10V19ZM10 15H8V13H10V15ZM10 11H8V9H10V11ZM10 7H8V5H10V7ZM20 19H12V9H20V19ZM18 11H14V13H18V11ZM18 15H14V17H18V15Z",fill:"#3D51B0"}))),D=()=>a.createElement("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M14 2H6C4.9 2 4 2.9 4 4V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V8L14 2ZM13 9V3.5L18.5 9H13Z",fill:"#1976D2"}),a.createElement("path",{d:"M11 14H13V18H11V14ZM11 12H13V13H11V12Z",fill:"white"}),a.createElement("path",{d:"M8 16H9V17H8V16Z",fill:"white"}),a.createElement("path",{d:"M15 16H16V17H15V16Z",fill:"white"}),a.createElement("path",{d:"M12 15.5L14 13.5H10L12 15.5Z",fill:"white"}),a.createElement("path",{d:"M12 18V14M12 14L10 16M12 14L14 16",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),I=()=>a.createElement("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M9 2L7.17 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6C22 4.9 21.1 4 20 4H16.83L15 2H9ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17ZM12 9C10.34 9 9 10.34 9 12C9 13.66 10.34 15 12 15C13.66 15 15 13.66 15 12C15 10.34 13.66 9 12 9Z",fill:"#3D51B0"}));return a.createElement("div",{className:"inbox-container"},a.createElement("div",{className:"filters-container"},a.createElement(n.Card,{className:"sidebar-title-card",style:{display:"flex",alignItems:"center",padding:"16px",marginBottom:"16px",borderRadius:"4px"}},a.createElement("div",{className:"icon-container",style:{color:"#0068faff",marginRight:"12px"}},a.createElement(n.HomeIcon,{style:{width:"24px",height:"24px"}})),a.createElement("div",{style:{fontWeight:"700",fontSize:"18px",color:"#0B0C0C"}},e("EKYC_PROCESS"))),a.createElement("div",{style:{padding:"8px 16px"}},a.createElement(n.ConnectingCheckPoints,null,a.createElement(n.CheckPoint,{label:e("EKYC_STEP_AADHAAR")||"Aadhaar",isCompleted:!0}),a.createElement(n.CheckPoint,{label:e("EKYC_STEP_ADDRESS")||"Address",isCompleted:!0}),a.createElement(n.CheckPoint,{label:e("EKYC_STEP_PROPERTY")||"Property",isCompleted:!1}),a.createElement(n.CheckPoint,{label:e("EKYC_STEP_REVIEW")||"Review"})))),a.createElement("div",{style:{flex:1,marginLeft:"16px"}},a.createElement(n.Card,null,a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"}},a.createElement(n.Header,null,e("Property Details")),a.createElement("div",{style:{fontSize:"14px",fontWeight:"700",color:"#505A5F"}},e("EKYC_K_NUMBER"),": ",a.createElement("span",{style:{color:"#0B0C0C"}},s))),a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"}},a.createElement(R,null),a.createElement("span",{style:{fontSize:"20px",fontWeight:"700",color:"#101828"}},e("Property Details"))),a.createElement(n.Card,{style:{padding:"20px",borderRadius:"16px",border:"1px solid #EAECF0",marginBottom:"24px"}},a.createElement("div",{style:{marginBottom:"24px"}},a.createElement(n.CardLabel,{style:{fontSize:"14px",fontWeight:"600",color:"#667085",marginBottom:"12px"}},e("Property_Owner")),a.createElement("div",{style:{display:"flex",backgroundColor:"#F2F4F7",padding:"4px",borderRadius:"12px"}},a.createElement("button",{onClick:()=>d("OWNER"),style:{flex:1,padding:"10px",borderRadius:"10px",border:"none",backgroundColor:"OWNER"===c?"#3D51B0":"transparent",color:"OWNER"===c?"#FFFFFF":"#667085",fontWeight:"600",cursor:"pointer",transition:"all 0.2s"}},e("Owner")),a.createElement("button",{onClick:()=>d("TENANT"),style:{flex:1,padding:"10px",borderRadius:"10px",border:"none",backgroundColor:"TENANT"===c?"#3D51B0":"transparent",color:"TENANT"===c?"#FFFFFF":"#667085",fontWeight:"600",cursor:"pointer",transition:"all 0.2s"}},e("Tenant")))),a.createElement("div",{style:{marginBottom:"8px"}},a.createElement(n.CardLabel,{style:{fontSize:"14px",fontWeight:"600",color:"#667085",marginBottom:"12px"}},e("PID_Number")," ",a.createElement("span",{style:{fontStyle:"italic",fontWeight:"400",color:"#98A2B3"}},e("Optional"))),a.createElement("div",{className:"field",style:{position:"relative"}},a.createElement(n.TextInput,{value:m,onChange:e=>E(e.target.value),placeholder:e("Enter_PID_Number"),textInputStyle:{paddingLeft:"44px",borderRadius:"12px",border:"1px solid #D0D5DD",height:"56px"}}),a.createElement("div",{style:{position:"absolute",left:"16px",top:"50%",transform:"translateY(-50%)",color:"#3D51B0",fontSize:"20px",fontWeight:"600"}},"#")))),a.createElement("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"}},a.createElement(T,null),a.createElement("span",{style:{fontSize:"20px",fontWeight:"700",color:"#101828"}},e("Building_Info"))),a.createElement(n.Card,{style:{padding:"20px",borderRadius:"16px",border:"1px solid #EAECF0",marginBottom:"24px"}},[{label:"Type_of_Connection",state:p,setState:u},{label:"Connection_Category",state:C,setState:g},{label:"User_Type",state:x,setState:f},{label:"No_of_Floor",state:y,setState:h}].map((t,l)=>a.createElement("div",{key:l,style:{marginBottom:"20px"}},a.createElement(n.CardLabel,{style:{fontSize:"14px",fontWeight:"600",color:"#344054",marginBottom:"8px"}},e(t.label)),a.createElement(n.Dropdown,{selected:t.state,select:t.setState,option:[{label:"Select "+t.label,value:""}],optionKey:"label",t:e,style:{borderRadius:"12px",border:"1px solid #D0D5DD",height:"48px"}}))),a.createElement("div",{style:{display:"flex",gap:"24px",alignItems:"stretch",flexWrap:"wrap"}},a.createElement("div",{style:{flex:1,minWidth:"300px",display:"flex",flexDirection:"column"}},a.createElement(n.CardLabel,{style:{fontSize:"14px",fontWeight:"600",color:"#344054",marginBottom:"8px"}},e("Upload_Property_Document")),a.createElement("div",{style:{flex:1,backgroundColor:"#EBF5FF",border:"1px solid #B2DDFF",borderRadius:"16px",padding:"32px 24px",textAlign:"center",cursor:"pointer",display:"flex",flexDirection:"column",justifyContent:"center"},onClick:()=>N.current.click()},a.createElement("input",{type:"file",ref:N,style:{display:"none"},accept:".pdf"}),a.createElement("div",{style:{color:"#1570EF",fontWeight:"600",fontSize:"16px",marginBottom:"20px",lineHeight:"1.5"}},e("Upload_your_property_document_in_PDF_Only")),a.createElement("div",{style:{display:"flex",justifyContent:"center"}},a.createElement("div",{style:{backgroundColor:"#FFFFFF",padding:"12px",borderRadius:"12px",boxShadow:"0px 1px 2px rgba(16, 24, 40, 0.05)"}},a.createElement(D,null))))),a.createElement("div",{style:{flex:1,minWidth:"300px",display:"flex",flexDirection:"column"}},a.createElement(n.CardLabel,{style:{fontSize:"14px",fontWeight:"600",color:"#344054",marginBottom:"8px"}},e("Capture_Building_Image")),a.createElement("div",{style:{flex:1,border:"1px solid #D0D5DD",borderRadius:"16px",padding:"40px 24px",textAlign:"center",cursor:"pointer",backgroundColor:"#FFFFFF",display:"flex",flexDirection:"column",justifyContent:"center"},onClick:()=>A.current.click()},a.createElement("input",{type:"file",ref:A,style:{display:"none"},accept:"image/*",capture:"environment"}),a.createElement("div",{style:{backgroundColor:"#EEF4FF",width:"56px",height:"56px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 16px"}},a.createElement(I,null)),a.createElement("div",{style:{fontWeight:"600",color:"#101828",fontSize:"16px",marginBottom:"4px"}},e("Tap_to_Capture")),a.createElement("div",{style:{color:"#667085",fontSize:"14px"}},e("Building_Photo"))))),a.createElement("div",{style:{marginTop:"24px",backgroundColor:"#EFF8FF",padding:"16px",borderRadius:"12px",display:"flex",gap:"12px",border:"1px solid #B2DDFF"}},a.createElement("div",{style:{color:"#1570EF"}},a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM11 15H9V9H11V15ZM11 7H9V5H11V7Z",fill:"currentColor"}))),a.createElement("div",{style:{color:"#175CD3",fontSize:"14px",fontWeight:"500",lineHeight:"1.4"}},e("This_section_is_enabled_only_if_user_is_not_the_owner."))),a.createElement(n.SubmitBar,{label:e("Save_&_Continue"),onSubmit:()=>{o.push("/digit-ui/employee/ekyc/dashboard")},style:{borderRadius:"8px",height:"48px",marginTop:"24px",marginRight:"1100px"}})))))},D=e=>{let{path:t}=e;const{t:o}=r.useTranslation(),i=l.useLocation();sessionStorage.removeItem("revalidateddone");const s=[{icon:n.HomeIcon,path:"/digit-ui/employee"},{label:o((()=>{const e=i.pathname;return e.includes("/dashboard")?"ES_COMMON_INBOX":e.includes("/create-kyc")?"EKYC_CREATE_KYC":e.includes("/k-details")?"EKYC_K_DETAILS":e.includes("/aadhaar-verification")?"EKYC_AADHAAR_VERIFICATION":e.includes("/address-details")?"EKYC_ADDRESS_DETAILS":e.includes("/property-info")?"EKYC_PROPERTY_INFO":"ES_COMMON_INBOX"})())}];return a.createElement(n.AppContainer,null,a.createElement("div",{className:"ground-container employee-app-container"},a.createElement(n.ModuleHeader,{leftContent:a.createElement(a.Fragment,null,a.createElement(n.ArrowLeft,{className:"icon"}),"Back"),onLeftClick:()=>window.history.back(),breadcrumbs:s}),a.createElement(l.Switch,null,a.createElement(n.PrivateRoute,{path:t+"/dashboard",component:()=>a.createElement(x,{parentRoute:t,businessService:"EKYC",moduleCode:"EKYC",isInbox:!0})}),a.createElement(n.PrivateRoute,{path:t+"/create-kyc",component:()=>a.createElement(y,null)}),a.createElement(n.PrivateRoute,{path:t+"/aadhaar-verification",component:()=>a.createElement(R,null)}),a.createElement(n.PrivateRoute,{path:t+"/address-details",component:()=>a.createElement(h,null)}),a.createElement(n.PrivateRoute,{path:t+"/property-info",component:()=>a.createElement(T,null)}),a.createElement(n.PrivateRoute,{path:t+"/",component:()=>a.createElement(x,{parentRoute:t,businessService:"EKYC",moduleCode:"EKYC",isInbox:!0})}))))},I=e=>{let{stateCode:t,userType:n,tenants:r}=e;const{path:o,url:i}=l.useRouteMatch(),s=Digit.StoreData.getCurrentLanguage(),{isLoading:c}=Digit.Services.useStore({stateCode:t,moduleCode:"EKYC",language:s});return Digit.SessionStorage.set("EKYC_TENANTS",r),c?null:"employee"===n?a.createElement(D,{path:o,url:i,userType:n,tenants:r}):null},L={EKYCModule:I,EKYCCard:()=>{const{t:e}=r.useTranslation(),t={Icon:a.createElement(n.PersonIcon,null),moduleName:e("ACTION_TEST_EKYC"),kpis:[{count:"-",label:e("TOTAL_EKYC"),link:"/digit-ui/employee/ekyc/dashboard"}],links:[{label:e("EKYC_DASHBOARD"),link:"/digit-ui/employee/ekyc/dashboard"},{label:e("EKYC_CREATE_KYC"),link:"/digit-ui/employee/ekyc/create-kyc"}]};return a.createElement(n.EmployeeModuleCard,t)},EKYCInbox:x,EKYCDesktopInbox:d,EKYCMobileInbox:p,EKYC_INBOX_FILTER:e=>a.createElement(C,e)};exports.EkycModule=I,exports.default=I,exports.initEkycComponents=()=>{Object.entries(L).forEach(e=>{let[t,a]=e;Digit.ComponentRegistryService.setComponent(t,a)})};
|