From e9f8c6bbcca6acd823ed0e7c5e38b28a0c602e2b Mon Sep 17 00:00:00 2001 From: Brice Zele Date: Wed, 9 Feb 2022 18:43:48 +0100 Subject: [PATCH] correction bugs ok --- App.js | 2 + .../app/src/main/assets/index.android.bundle | 41 +- .../app/src/main/res/raw/utils_i18n_fr.json | 2 +- redux/insurance/insurance.actions.js | 13 +- screens/optionMenu/OptionsMenu.js | 2 +- .../agent/ExecuterPrescriptionScreen.js | 57 ++- .../ModifierExecutionPrescriptionScreen.js | 54 ++- .../wallet/agent/ModifierFeuilleSoinScreen.js | 54 ++- .../wallet/agent/SaisirFeuilleSoinScreen.js | 93 +++- .../user/ActivateBuySubscriptionScreen.js | 34 +- screens/wallet/user/AddBeneficiaryScreen.js | 66 ++- .../wallet/user/DeleteBeneficiaryScreen.js | 32 +- .../user/DemandeAutorisationSoinScreen.js | 56 ++- .../user/HistoriqueNanoSanteUserScreen.js | 20 +- .../user/InsuranceSubscriptionScreen.js | 96 +++- screens/wallet/user/RenewAssuranceScreen.js | 410 ++++++++++++++++++ screens/wallet/user/StopSubscriptionScreen.js | 66 ++- .../user/ValidateConsultationDetailScreen.js | 18 +- .../wallet/user/ValidateConsultationScreen.js | 32 +- utils/UtilsFunction.js | 2 +- 20 files changed, 1015 insertions(+), 135 deletions(-) create mode 100644 screens/wallet/user/RenewAssuranceScreen.js diff --git a/App.js b/App.js index f42ffdbc..d6e4a516 100755 --- a/App.js +++ b/App.js @@ -96,6 +96,7 @@ import HistoriqueNanoSanteUserScreen from "./screens/wallet/user/HistoriqueNanoS import DemandeAutorisationSoinScreen from "./screens/wallet/user/DemandeAutorisationSoinScreen"; import DeleteBeneficiaryScreen from "./screens/wallet/user/DeleteBeneficiaryScreen"; import StopSubscriptionScreen from "./screens/wallet/user/StopSubscriptionScreen"; +import RenewAssuranceScreen from "./screens/wallet/user/RenewAssuranceScreen"; const instructions = Platform.select({ @@ -150,6 +151,7 @@ const AppStack = createDrawerNavigator({ validateConsultationDetailScreen: ValidateConsultationDetailScreen, activateBuySubscriptionScreen: ActivateBuySubscriptionScreen, stopSubscriptionScreen: StopSubscriptionScreen, + renewAssuranceScreen: RenewAssuranceScreen, historiqueNanoSanteUserScreen: HistoriqueNanoSanteUserScreen, deleteBeneficiaryScreen: DeleteBeneficiaryScreen, retraitWalletVersCashUser: RetraitWalletVersCashUser, diff --git a/android/app/src/main/assets/index.android.bundle b/android/app/src/main/assets/index.android.bundle index af8c37d9..d807939c 100644 --- a/android/app/src/main/assets/index.android.bundle +++ b/android/app/src/main/assets/index.android.bundle @@ -3,7 +3,7 @@ var __BUNDLE_START_TIME__=this.nativePerformanceNow?nativePerformanceNow():Date. !(function(n){var e=(function(){function n(n,e){return n}function e(n){var e={};return n.forEach(function(n,r){e[n]=!0}),e}function r(n,r,u){if(n.formatValueCalls++,n.formatValueCalls>200)return"[TOO BIG formatValueCalls "+n.formatValueCalls+" exceeded limit of 200]";var f=t(n,r);if(f)return f;var c=Object.keys(r),s=e(c);if(d(r)&&(c.indexOf('message')>=0||c.indexOf('description')>=0))return o(r);if(0===c.length){if(v(r)){var p=r.name?': '+r.name:'';return n.stylize('[Function'+p+']','special')}if(g(r))return n.stylize(RegExp.prototype.toString.call(r),'regexp');if(y(r))return n.stylize(Date.prototype.toString.call(r),'date');if(d(r))return o(r)}var h,b,m='',j=!1,O=['{','}'];(h=r,Array.isArray(h)&&(j=!0,O=['[',']']),v(r))&&(m=' [Function'+(r.name?': '+r.name:'')+']');return g(r)&&(m=' '+RegExp.prototype.toString.call(r)),y(r)&&(m=' '+Date.prototype.toUTCString.call(r)),d(r)&&(m=' '+o(r)),0!==c.length||j&&0!=r.length?u<0?g(r)?n.stylize(RegExp.prototype.toString.call(r),'regexp'):n.stylize('[Object]','special'):(n.seen.push(r),b=j?i(n,r,u,s,c):c.map(function(e){return a(n,r,u,s,e,j)}),n.seen.pop(),l(b,m,O)):O[0]+m+O[1]}function t(n,e){if(s(e))return n.stylize('undefined','undefined');if('string'==typeof e){var r="'"+JSON.stringify(e).replace(/^"|"$/g,'').replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return n.stylize(r,'string')}return c(e)?n.stylize(''+e,'number'):u(e)?n.stylize(''+e,'boolean'):f(e)?n.stylize('null','null'):void 0}function o(n){return'['+Error.prototype.toString.call(n)+']'}function i(n,e,r,t,o){for(var i=[],l=0,u=e.length;l-1&&(u=a?u.split('\n').map(function(n){return' '+n}).join('\n').substr(2):'\n'+u.split('\n').map(function(n){return' '+n}).join('\n')):u=n.stylize('[Circular]','special')),s(l)){if(a&&i.match(/^\d+$/))return u;(l=JSON.stringify(''+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(l=l.substr(1,l.length-2),l=n.stylize(l,'name')):(l=l.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),l=n.stylize(l,'string'))}return l+': '+u}function l(n,e,r){return n.reduce(function(n,e){return 0,e.indexOf('\n')>=0&&0,n+e.replace(/\u001b\[\d\d?m/g,'').length+1},0)>60?r[0]+(''===e?'':e+'\n ')+' '+n.join(',\n ')+' '+r[1]:r[0]+e+' '+n.join(', ')+' '+r[1]}function u(n){return'boolean'==typeof n}function f(n){return null===n}function c(n){return'number'==typeof n}function s(n){return void 0===n}function g(n){return p(n)&&'[object RegExp]'===h(n)}function p(n){return'object'==typeof n&&null!==n}function y(n){return p(n)&&'[object Date]'===h(n)}function d(n){return p(n)&&('[object Error]'===h(n)||n instanceof Error)}function v(n){return'function'==typeof n}function h(n){return Object.prototype.toString.call(n)}function b(n,e){return Object.prototype.hasOwnProperty.call(n,e)}return function(e,t){return r({seen:[],formatValueCalls:0,stylize:n},e,t.depth)}})(),r='(index)',t={trace:0,info:1,warn:2,error:3},o=[];o[t.trace]='debug',o[t.info]='log',o[t.warn]='warning',o[t.error]='error';var i=1;function a(r){return function(){var a;a=1===arguments.length&&'string'==typeof arguments[0]?arguments[0]:Array.prototype.map.call(arguments,function(n){return e(n,{depth:10})}).join(', ');var l=r;'Warning: '===a.slice(0,9)&&l>=t.error&&(l=t.warn),n.__inspectorLog&&n.__inspectorLog(o[l],a,[].slice.call(arguments),i),s.length&&(a=g('',a)),n.nativeLoggingHook(a,l)}}function l(n,e){return Array.apply(null,Array(e)).map(function(){return n})}var u="\u2502",f="\u2510",c="\u2518",s=[];function g(n,e){return s.join('')+n+' '+(e||'')}if(n.nativeLoggingHook){n.console;n.console={error:a(t.error),info:a(t.info),log:a(t.info),warn:a(t.warn),trace:a(t.trace),debug:a(t.trace),table:function(e){if(!Array.isArray(e)){var o=e;for(var i in e=[],o)if(o.hasOwnProperty(i)){var a=o[i];a[r]=i,e.push(a)}}if(0!==e.length){var u=Object.keys(e[0]).sort(),f=[],c=[];u.forEach(function(n,r){c[r]=n.length;for(var t=0;t';return function(){for(var r=arguments.length,u=new Array(r),e=0;e0:b,R=t.overshootRight,y=void 0===R?_>0:R,E=v.Animated.add(h,p.interpolate({inputRange:[0,s],outputRange:[0,1]})).interpolate({inputRange:[-_-(y?1:l),-_,f,f+(A?1:l)],outputRange:[-_-(y||l>1?1:0),-_,f,f+(A||l>1?1:0)]});o._transX=E,o._showLeftAction=f>0?E.interpolate({inputRange:[-1,0,f],outputRange:[0,0,1]}):new v.Animated.Value(0),o._leftActionTranslate=o._showLeftAction.interpolate({inputRange:[0,Number.MIN_VALUE],outputRange:[-1e4,0],extrapolate:'clamp'}),o._showRightAction=_>0?E.interpolate({inputRange:[-_,0,1],outputRange:[1,0,0]}):new v.Animated.Value(0),o._rightActionTranslate=o._showRightAction.interpolate({inputRange:[0,Number.MIN_VALUE],outputRange:[-1e4,0],extrapolate:'clamp'})},o._onTapHandlerStateChange=function(t){t.nativeEvent.oldState===w.State.ACTIVE&&o.close()},o._onHandlerStateChange=function(t){var n=t.nativeEvent;n.oldState===w.State.ACTIVE&&o._handleRelease(n)},o._handleRelease=function(t){var n=t.velocityX,s=t.translationX,l=o.state,p=l.leftWidth,h=void 0===p?0:p,u=l.rowWidth,f=void 0===u?0:u,c=l.rowState,v=o.state.rightOffset,w=f-(void 0===v?f:v),O=o.props,S=O.friction,b=O.leftThreshold,A=void 0===b?h/2:b,R=O.rightThreshold,y=void 0===R?w/2:R,E=o._currentOffset()+s/S,W=(s+_*n)/S,L=0;0===c?W>A?L=h:W<-y&&(L=-w):1===c?W>-A&&(L=h):W0&&o.props.onSwipeableLeftOpen?o.props.onSwipeableLeftOpen():n<0&&o.props.onSwipeableRightOpen&&o.props.onSwipeableRightOpen(),0===n?o.props.onSwipeableClose&&o.props.onSwipeableClose():o.props.onSwipeableOpen&&o.props.onSwipeableOpen())}),n>0&&o.props.onSwipeableLeftWillOpen?o.props.onSwipeableLeftWillOpen():n<0&&o.props.onSwipeableRightWillOpen&&o.props.onSwipeableRightWillOpen(),0===n?o.props.onSwipeableWillClose&&o.props.onSwipeableWillClose():o.props.onSwipeableWillOpen&&o.props.onSwipeableWillOpen()},o._onRowLayout=function(t){var n=t.nativeEvent;o.setState({rowWidth:n.layout.width})},o._currentOffset=function(){var t=o.state,n=t.leftWidth,s=void 0===n?0:n,l=t.rowWidth,p=void 0===l?0:l,h=t.rowState,u=o.state.rightOffset;return 1===h?s:-1===h?-(p-(void 0===u?p:u)):0},o.close=function(){o._animateRow(o._currentOffset(),0)},o.openLeft=function(){var t=o.state.leftWidth,n=void 0===t?0:t;o._animateRow(o._currentOffset(),n)},o.openRight=function(){var t=o.state.rowWidth,n=void 0===t?0:t,s=o.state.rightOffset,l=n-(void 0===s?n:s);o._animateRow(o._currentOffset(),-l)};var s=new v.Animated.Value(0);return o.state={dragX:s,rowTranslation:new v.Animated.Value(0),rowState:0,leftWidth:void 0,rightOffset:void 0,rowWidth:void 0},o._updateAnimatedEvent(t,o.state),o._onGestureEvent=v.Animated.event([{nativeEvent:{translationX:s}}],{useNativeDriver:t.useNativeAnimations}),o}return(0,f.default)(n,t),(0,p.default)(n,[{key:"UNSAFE_componentWillUpdate",value:function(t,n){this.props.friction===t.friction&&this.props.overshootLeft===t.overshootLeft&&this.props.overshootRight===t.overshootRight&&this.props.overshootFriction===t.overshootFriction&&this.state.leftWidth===n.leftWidth&&this.state.rightOffset===n.rightOffset&&this.state.rowWidth===n.rowWidth||this._updateAnimatedEvent(t,n)}},{key:"render",value:function(){var t=this,n=this.state.rowState,s=this.props,l=s.children,p=s.renderLeftActions,h=s.renderRightActions,u=p&&c.default.createElement(v.Animated.View,{style:[A.leftActions,{transform:[{translateX:this._leftActionTranslate}]}]},p(this._showLeftAction,this._transX),c.default.createElement(v.View,{onLayout:function(n){var o=n.nativeEvent;return t.setState({leftWidth:o.layout.x})}})),f=h&&c.default.createElement(v.Animated.View,{style:[A.rightActions,{transform:[{translateX:this._rightActionTranslate}]}]},h(this._showRightAction,this._transX),c.default.createElement(v.View,{onLayout:function(n){var o=n.nativeEvent;return t.setState({rightOffset:o.layout.x})}}));return c.default.createElement(w.PanGestureHandler,(0,o.default)({activeOffsetX:[-10,10]},this.props,{onGestureEvent:this._onGestureEvent,onHandlerStateChange:this._onHandlerStateChange}),c.default.createElement(v.Animated.View,{onLayout:this._onRowLayout,style:[A.container,this.props.containerStyle]},u,f,c.default.createElement(w.TapGestureHandler,{enabled:0!==n,onHandlerStateChange:this._onTapHandlerStateChange},c.default.createElement(v.Animated.View,{pointerEvents:0===n?'auto':'box-only',style:[{transform:[{translateX:this._transX}]},this.props.childrenContainerStyle]},l))))}}]),n})(c.Component);e.default=b,b.defaultProps={friction:1,overshootFriction:1,useNativeAnimations:!0};var A=v.StyleSheet.create({container:{overflow:'hidden'},leftActions:S({},v.StyleSheet.absoluteFillObject,{flexDirection:v.I18nManager.isRTL?'row-reverse':'row'}),rightActions:S({},v.StyleSheet.absoluteFillObject,{flexDirection:v.I18nManager.isRTL?'row':'row-reverse'})})},3,[4,1,6,7,8,9,10,12,13,15,18,380]); @@ -407,7 +407,7 @@ __d(function(g,r,i,a,m,e,d){var t=r(d[0]),s=r(d[1]);Object.defineProperty(e,"__e __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var f=t(r(d[1])),u=t(r(d[2])),l=t(r(d[3])),o=u.default.forwardRef(function(t,o){return u.default.createElement(l.default,(0,f.default)({ref:o},t))});o.defaultProps=l.default.defaultProps,o.propTypes=l.default.publicPropTypes;var p=o;e.default=p},401,[1,6,15,400]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),o=n(r(d[3])),u=n(r(d[4])),c=n(r(d[5])),p=n(r(d[6])),f=n(r(d[7])),s=n(r(d[8])),y=n(r(d[9])),O=r(d[10]),h=t(r(d[11])),v=t(r(d[12])),E=n(r(d[13]));function b(t,n){var l=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),l.push.apply(l,o)}return l}function T(t){for(var n=1;n2&&void 0!==arguments[2])||arguments[2];var o=l.refs.navigator;void 0!==o&&(console.log("APP HAS LOADED",g.appHasLoaded),g.appHasLoaded?o.dispatch({type:"Navigation/NAVIGATE",routeName:t,params:n}):o.dispatch({type:"Navigation/NAVIGATE",routeName:"first",params:{routeName:t,params:n}}))},l.handleDeepLink=function(t){var n=t.notification.payload.additionalData;switch(console.warn("HANDLE DEEP LINK",n),n.screen){case'historyItemDetails':console.log("History Item"),l.goToScreen(n.screen,{item:n.data});break;default:console.log("Not History Item"),l.goToScreen(n.screen,{id:n.data.id})}},l.onOpened=function(t){t.notification.payload.additionalData;l.handleDeepLink(t),console.log('Message: ',t.notification.payload.body),console.log('Data: ',t.notification.payload.additionalData),console.log('isActive: ',t.notification.isAppInFocus),console.log('openResult: ',t)},console.log("APP PROPS",l.props),g.appHasLoaded=!1,C.default.setLogLevel(6,0),Oe.IlinkEmitter.on("langueChange",l.updateLangue.bind((0,f.default)(l))),C.default.init("ab02121a-ecec-424f-910a-2709ef85698d",{kOSSettingsKeyAutoPrompt:!1,kOSSettingsKeyInAppLaunchURL:!1,kOSSettingsKeyInFocusDisplayOption:2}),C.default.inFocusDisplaying(2),C.default.promptForPushNotificationsWithUserResponse($e),C.default.addEventListener('received',l.onReceived),C.default.addEventListener('opened',l.onOpened),C.default.addEventListener('ids',l.onIds),l}return(0,s.default)(S,t),(0,l.default)(S,[{key:"updateLangue",value:function(){this.forceUpdate()}},{key:"componentWillUnmount",value:function(){C.default.removeEventListener('received',this.onReceived),C.default.removeEventListener('opened',this.onOpened),C.default.removeEventListener('ids',this.onIds)}},{key:"onReceived",value:function(t){console.log("Notification received: ",t)}},{key:"render",value:function(){return p.default.createElement(j.Provider,{store:K.store},p.default.createElement(q.PersistGate,{persistor:K.persistor},p.default.createElement(v.ActionSheetProvider,null,p.default.createElement(Xe,{ref:"navigator"}))))}}]),S})(p.default.Component);function $e(t){}e.default=Ze;h.StyleSheet.create({container:{flex:1,justifyContent:'center',alignItems:'center',backgroundColor:'#F5FCFF'},welcome:{fontSize:20,textAlign:'center',margin:10},instructions:{textAlign:'center',color:'#333333',marginBottom:5}})},404,[1,273,8,9,10,12,11,13,15,405,18,416,529,530,823,947,948,959,960,961,1011,1012,1018,1035,1036,1193,1306,1307,1308,1624,1649,1662,1664,1665,1013,719,1668,1688,1689,1107,1046,1690,1761,1762,1772,1775,1780,1782,1783,1786,1787,1792,1793,1794,1795,1796,1797,1798,1799,1802,1803,1804,1805,1806,1807,1808,1810,1811,1812,1813,1814,1815,1816,1818,1819,772,1820,1821,1822,2183,2184,2185,2197,2198,2200,2201,2202,2203,2204,2206,2207,813]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(r(d[1])),o=t(r(d[2])),l=t(r(d[3])),u=t(r(d[4])),c=t(r(d[5])),f=t(r(d[6])),s=t(r(d[7])),p=t(r(d[8])),v=r(d[9]),h=r(d[10]),S=r(d[11]),C=t(r(d[12])),A=t(r(d[13])),b=t(r(d[14])),y=t(r(d[15])),N=t(r(d[16])),E=t(r(d[17])),w=t(r(d[18])),D=t(r(d[19])),I=t(r(d[20])),O=t(r(d[21])),k=t(r(d[22])),T=t(r(d[23])),L=t(r(d[24])),M=t(r(d[25])),P=t(r(d[26])),R=t(r(d[27])),U=t(r(d[28])),B=t(r(d[29])),G=t(r(d[30])),_=t(r(d[31])),z=t(r(d[32])),V=t(r(d[33])),W=t(r(d[34])),F=t(r(d[35])),x=t(r(d[36])),H=t(r(d[37])),q=r(d[38]),K=r(d[39]),j=r(d[40]),Y=t(r(d[41])),J=t(r(d[42])),Q=t(r(d[43])),X=t(r(d[44])),Z=t(r(d[45])),$=t(r(d[46])),ee=t(r(d[47])),te=t(r(d[48])),ae=t(r(d[49])),ne=t(r(d[50])),oe=t(r(d[51])),re=t(r(d[52])),le=t(r(d[53])),ie=t(r(d[54])),de=t(r(d[55])),ue=t(r(d[56])),ce=t(r(d[57])),fe=t(r(d[58])),se=t(r(d[59])),pe=t(r(d[60])),ve=t(r(d[61])),ge=t(r(d[62])),he=t(r(d[63])),me=t(r(d[64])),Se=t(r(d[65])),Ce=t(r(d[66])),Ae=t(r(d[67])),be=t(r(d[68])),ye=t(r(d[69])),Ne=t(r(d[70])),Ee=t(r(d[71])),we=t(r(d[72])),De=t(r(d[73])),Ie=t(r(d[74])),Oe=r(d[75]),ke=t(r(d[76])),Te=t(r(d[77])),Le=t(r(d[78])),Me=t(r(d[79])),Pe=t(r(d[80])),Re=t(r(d[81])),Ue=t(r(d[82])),Be=t(r(d[83])),Ge=t(r(d[84])),_e=t(r(d[85])),ze=t(r(d[86])),Ve=t(r(d[87])),We=t(r(d[88])),Fe=t(r(d[89])),xe=t(r(d[90])),He=t(r(d[91])),qe=(h.Platform.select({ios:"Press Cmd+R to reload,\nCmd+D or shake for dev menu",android:"Double tap R on your keyboard to reload,\nShake or press menu button for dev menu"}),r(d[92])),Ke=(0,S.createStackNavigator)({login:A.default,helpMenu:y.default,help:N.default,forgottenpass:E.default,typeaccountcreate:w.default,simpleusercreate:I.default,step2:D.default,activateaccout:T.default},{headerMode:'none'}),je=(0,S.createDrawerNavigator)({sta:(0,S.createStackNavigator)({home:U.default,useraccount:{screen:k.default,navigationOptions:{}},walletSelect:H.default,createIdentificationUser:ee.default,modifyIdentificationUser:me.default,notificationview:L.default,configuration:P.default,about:M.default,walletDetailUser:X.default,walletOptionSelect:Z.default,operateurOptionSelect:te.default,paiementFacture:ae.default,envoieWalletToWalletUser:ne.default,envoieWalletToCashUser:oe.default,envoieWalletToCardUser:le.default,envoieWalletToBankUser:ie.default,addBeneficiaryScreen:Me.default,insuranceSubscriptionScreen:Le.default,validateConsultationScreen:Ue.default,demandeAutorisationSoinScreen:We.default,validateConsultationDetailScreen:Be.default,activateBuySubscriptionScreen:Pe.default,stopSubscriptionScreen:xe.default,renewAssuranceScreen:He.default,historiqueNanoSanteUserScreen:Ve.default,deleteBeneficiaryScreen:Fe.default,retraitWalletVersCashUser:de.default,retraitCarteVersCashUser:ue.default,retraitCarteVersWalletUser:ce.default,linkCard:re.default,reattachAccountUser:Te.default,epargnerArgentUser:De.default,createGroupNanoCredit:Se.default,groupNanoCredit:{screen:(0,S.createBottomTabNavigator)({demandeValidationGroupe:{screen:Ce.default,navigationOptions:{tabBarLabel:F.default.t('DEMAND_VALIDATION_GROUP_RECEIVE'),tabBarIcon:function(t){var n=t.focused,o=(t.horizontal,t.tintColor);return p.default.createElement(W.default,{size:20,name:"users-cog",color:n?o:"grey"})}}},myNanoCreditGroup:{screen:ye.default,navigationOptions:{tabBarLabel:F.default.t('MY_GROUP'),tabBarIcon:function(t){var n=t.focused,o=(t.horizontal,t.tintColor);return p.default.createElement(W.default,{size:20,name:"users",color:n?o:"grey"})}}}},{headerMode:"none",header:null,headerTitle:null,title:F.default.t('MANAGE_GROUP'),tabBarOptions:{labelStyle:{fontSize:13}}}),navigationOptions:function(){return{header:null,headerMode:'none',headerTitle:null,activeColor:'#f0edf6',inactiveColor:'#3e2465',barStyle:{backgroundColor:'#694fad'},drawerLabel:F.default.t('MANAGE_GROUP'),drawerIcon:function(t){t.tintColor;return p.default.createElement(W.default,{name:'account-multiple',size:24})}}}},demandeValidationGroupe:Ae.default,adhererGroupNanoCredit:be.default,askNanoCredit:Ne.default,refundNanoCreditUser:Ee.default,casserEpargneUser:Ie.default})},{contentComponent:R.default,headerMode:'none',contentOptions:{activeTintColor:qe.accent}}),Ye=(0,S.createDrawerNavigator)({sta:(0,S.createStackNavigator)({home:U.default,useraccount:k.default,walletSelect:H.default,createIdentification:Q.default,validateIdentification:$.default,Historique:{screen:(0,S.createBottomTabNavigator)({myDemand:V.default},{headerMode:"none",header:null,headerTitle:F.default.t('CREDIT_MANAGE'),tabBarOptions:{labelStyle:{fontSize:13,fontWeight:"bold"}}}),navigationOptions:function(){return{header:null,headerMode:'none',headerTitle:null,activeColor:'#f0edf6',inactiveColor:'#3e2465',barStyle:{backgroundColor:'#694fad'},drawerLabel:F.default.t('CREDIT_MANAGE'),drawerIcon:function(t){t.tintColor;return p.default.createElement(W.default,{name:'credit-card',size:24})}}}},historyItemDetails:B.default,creditrequest:_.default,saisirFeuilleSoinScreen:Re.default,executerPrescriptionScreen:Ge.default,modifierExecutionPrescriptionScreen:ze.default,modifierFeuilleSoinScreen:_e.default,addNetwork:z.default,updateinformation:O.default,notificationview:L.default,configuration:P.default,about:M.default,walletDetail:x.default,walletDepot:Y.default,walletRetrait:J.default,walletOptionSelect:Z.default,operateurOptionSelect:te.default,paiementFacture:ae.default,retraitEnCashAgent:fe.default,retraitCarteVersCashAgent:se.default,envoieCashVersWalletAgent:pe.default,envoieCashVersAutreWalletAgent:ve.default,envoieCashVersCarteAgent:ge.default,envoiCashVersCashAgent:he.default,envoieWalletToBankAgent:ke.default,createGroupNanoCredit:Se.default,cautionNanoCreditAgent:we.default})},{contentComponent:R.default,backBehavior:"none",lazy:!1,headerMode:'none',contentOptions:{activeTintColor:qe.accent}}),Je=(0,S.createDrawerNavigator)({sta:(0,S.createStackNavigator)({home:U.default,useraccount:k.default,walletSelect:H.default,Historique:{screen:(0,S.createBottomTabNavigator)({myDemand:V.default,OthersDemand:V.default},{headerMode:"none",header:null,headerTitle:null,title:F.default.t('CREDIT_MANAGE'),tabBarOptions:{labelStyle:{fontSize:13}}}),navigationOptions:function(){return{header:null,headerMode:'none',headerTitle:null,activeColor:'#f0edf6',inactiveColor:'#3e2465',barStyle:{backgroundColor:'#694fad'},drawerLabel:F.default.t('CREDIT_MANAGE'),drawerIcon:function(t){t.tintColor;return p.default.createElement(W.default,{name:'credit-card',size:24})}}}},creditrequest:_.default,historyItemDetails:B.default,superviseurgroup:G.default,notificationview:L.default,configuration:P.default,about:M.default,walletDetail:x.default,walletDepot:Y.default,walletRetrait:J.default})},{contentComponent:R.default,backBehavior:"none",headerMode:'none'}),Qe=(0,S.createDrawerNavigator)({sta:(0,S.createStackNavigator)({home:U.default,useraccount:k.default,walletSelect:H.default,Historique:{screen:(0,S.createBottomTabNavigator)({OthersDemand:V.default},{headerMode:"none",header:null,headerTitle:null,title:F.default.t('CREDIT_MANAGE'),tabBarOptions:{labelStyle:{fontSize:13,fontWeight:"bold"}}}),navigationOptions:function(){return{title:F.default.t('CREDIT_MANAGE'),headerMode:"none",header:null,headerTitle:null,drawerIcon:function(t){t.tintColor;return p.default.createElement(W.default,{name:'credit-card',size:24})}}}},creditrequest:_.default,historyItemDetails:B.default,superviseurgroup:G.default,notificationview:L.default,configuration:P.default,about:M.default,walletDetail:x.default,walletDepot:Y.default,walletRetrait:J.default})},{contentComponent:R.default,backBehavior:"none",headerMode:'none'}),Xe=(0,S.createSwitchNavigator)({first:{screen:b.default},App:je,AgentApp:Ye,adminApp:Je,supAdminApp:Qe,Auth:Ke},{initialRouteName:'first'}),Ze=(0,S.createAppContainer)(Xe),$e=(function(t){function S(t){var l;return(0,o.default)(this,S),(l=(0,u.default)(this,(0,c.default)(S).call(this,t)))._getOneSignalIds=function(){return new Promise(function(t,o){var l;return n.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,u.next=3,n.default.awrap(h.AsyncStorage.getItem('@config:onesignalIds'));case 3:l=u.sent,t(l),u.next=10;break;case 7:u.prev=7,u.t0=u.catch(0),o(u.t0);case 10:case"end":return u.stop()}},null,null,[[0,7]],Promise)})},l._saveOneSignalIds=function(t){return n.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,n.default.awrap(h.AsyncStorage.setItem('@config:onesignalIds',t));case 3:o.next=8;break;case 5:o.prev=5,o.t0=o.catch(0),console.warn(o.t0);case 8:case"end":return o.stop()}},null,null,[[0,5]],Promise)},l.goToScreen=function(t,n){!(arguments.length>2&&void 0!==arguments[2])||arguments[2];var o=l.refs.navigator;void 0!==o&&(console.log("APP HAS LOADED",g.appHasLoaded),g.appHasLoaded?o.dispatch({type:"Navigation/NAVIGATE",routeName:t,params:n}):o.dispatch({type:"Navigation/NAVIGATE",routeName:"first",params:{routeName:t,params:n}}))},l.handleDeepLink=function(t){var n=t.notification.payload.additionalData;switch(console.warn("HANDLE DEEP LINK",n),n.screen){case'historyItemDetails':console.log("History Item"),l.goToScreen(n.screen,{item:n.data});break;default:console.log("Not History Item"),l.goToScreen(n.screen,{id:n.data.id})}},l.onOpened=function(t){t.notification.payload.additionalData;l.handleDeepLink(t),console.log('Message: ',t.notification.payload.body),console.log('Data: ',t.notification.payload.additionalData),console.log('isActive: ',t.notification.isAppInFocus),console.log('openResult: ',t)},console.log("APP PROPS",l.props),g.appHasLoaded=!1,C.default.setLogLevel(6,0),Oe.IlinkEmitter.on("langueChange",l.updateLangue.bind((0,f.default)(l))),C.default.init("ab02121a-ecec-424f-910a-2709ef85698d",{kOSSettingsKeyAutoPrompt:!1,kOSSettingsKeyInAppLaunchURL:!1,kOSSettingsKeyInFocusDisplayOption:2}),C.default.inFocusDisplaying(2),C.default.promptForPushNotificationsWithUserResponse(et),C.default.addEventListener('received',l.onReceived),C.default.addEventListener('opened',l.onOpened),C.default.addEventListener('ids',l.onIds),l}return(0,s.default)(S,t),(0,l.default)(S,[{key:"updateLangue",value:function(){this.forceUpdate()}},{key:"componentWillUnmount",value:function(){C.default.removeEventListener('received',this.onReceived),C.default.removeEventListener('opened',this.onOpened),C.default.removeEventListener('ids',this.onIds)}},{key:"onReceived",value:function(t){console.log("Notification received: ",t)}},{key:"render",value:function(){return p.default.createElement(j.Provider,{store:K.store},p.default.createElement(q.PersistGate,{persistor:K.persistor},p.default.createElement(v.ActionSheetProvider,null,p.default.createElement(Ze,{ref:"navigator"}))))}}]),S})(p.default.Component);function et(t){}e.default=$e;h.StyleSheet.create({container:{flex:1,justifyContent:'center',alignItems:'center',backgroundColor:'#F5FCFF'},welcome:{fontSize:20,textAlign:'center',margin:10},instructions:{textAlign:'center',color:'#333333',marginBottom:5}})},404,[1,273,8,9,10,12,11,13,15,405,18,416,529,530,823,947,948,959,960,961,1011,1012,1018,1035,1036,1193,1306,1307,1308,1624,1649,1662,1664,1665,1013,719,1668,1688,1689,1107,1046,1690,1761,1762,1772,1775,1780,1782,1783,1786,1787,1792,1793,1794,1795,1796,1797,1798,1799,1802,1803,1804,1805,1806,1807,1808,1810,1811,1812,1813,1814,1815,1816,1818,1819,772,1820,1821,1822,2183,2184,2185,2197,2198,2200,2201,2202,2203,2204,2206,2207,2208,813]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0});var n={ActionSheetProvider:!0,connectActionSheet:!0,useActionSheet:!0};Object.defineProperty(e,"ActionSheetProvider",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"connectActionSheet",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"useActionSheet",{enumerable:!0,get:function(){return u.useActionSheet}});var o=t(r(d[1])),c=t(r(d[2])),u=r(d[3]),f=r(d[4]);Object.keys(f).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(n,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return f[t]}}))})},405,[1,406,411,410,415]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),u=n(r(d[3])),c=n(r(d[4])),l=n(r(d[5])),f=n(r(d[6])),h=t(r(d[7])),s=n(r(d[8])),_=r(d[9]),v="/home/bradley/Code/expo/react-native-action-sheet/src/ActionSheetProvider.tsx",p=(function(t){function n(t){var u;return(0,o.default)(this,n),(u=(0,c.default)(this,(0,l.default)(n).call(this,t))).getContext=function(){return{showActionSheetWithOptions:function(t,n){null!==u._actionSheetRef.current&&u._actionSheetRef.current.showActionSheetWithOptions(t,n)}}},u._actionSheetRef=h.createRef(),u}return(0,f.default)(n,t),(0,u.default)(n,[{key:"render",value:function(){return h.createElement(_.Provider,{value:this.getContext(),__source:{fileName:v,lineNumber:29}},h.createElement(s.default,{ref:this._actionSheetRef,__source:{fileName:v,lineNumber:30}},h.Children.only(this.props.children)))}}]),n})(h.Component);e.default=p},406,[4,1,8,9,10,12,13,15,407,410]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),s=n(r(d[3])),l=n(r(d[4])),u=n(r(d[5])),c=n(r(d[6])),h=n(r(d[7])),p=t(r(d[8])),v=r(d[9]),f=n(r(d[10])),y="/home/bradley/Code/expo/react-native-action-sheet/src/ActionSheet/index.tsx",_=225,S=195,N=v.Easing.bezier(.25,.46,.45,.94),b=v.Easing.out(N),x=(function(t){function n(){var t,s;(0,o.default)(this,n);for(var h=arguments.length,p=new Array(h),f=0;f270?270:(0,E.responsiveHeight)(30)),re=(function(t){function C(t){var c;return(0,o.default)(this,C),(c=(0,l.default)(this,(0,s.default)(C).call(this,t)))._draggedValue=new p.Animated.Value(0),c.renderIcon=function(t){return function(n){n.isActive;return h.default.createElement(D.default,{size:24,color:"white",name:t})}},c.openDrawer=function(){c.props.navigation.openDrawer()},c.onIds=function(t){return n.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:console.log('Device info: ',t),p.AsyncStorage.getAllKeys(function(o,l){p.AsyncStorage.multiGet(l,function(o,l){l.map(function(o,l,s){var u;return n.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:u=s[l][0],0===l&&(N.default.isEqual(u,'@config:onesignalIds')||(c._saveOneSignalIds(t.userId),console.log("FIRST LAUNCH",!0),c.onFirstLaunch()));case 2:case"end":return n.stop()}},null,null,null,Promise)})})});case 2:case"end":return o.stop()}},null,null,null,Promise)},c.onFirstLaunch=function(){console.warn("FIRST LAUNCH ON HOME"),(0,P.readUser)().then(function(t){return n.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:if(console.log("USER",t),!t){o.next=7;break}if(void 0===t){o.next=7;break}return o.next=5,n.default.awrap(c._getOneSignalIds());case 5:g.onesignalIds=o.sent,g.onesignalIds&&(console.log("ONESIGNAL",g.onesignalIds),void 0!==t&&(void 0!==t.category?c.saveOneSignal(!1,{code_membre:t.code_membre,player_id:g.onesignalIds,set_default:!1}):c.saveOneSignal(!0,{user_code:t.user_code,player_id:g.onesignalIds,set_default:!1})));case 7:case"end":return o.stop()}},null,null,null,Promise)})},c.saveOneSignal=function(t,n){(0,y.default)({url:t?q.saveOnesignalIds+"/saveUser":q.saveOnesignalIds+"/saveAgent",method:'POST',data:n,headers:{'X-Localization':I.default.currentLocale()}}).then(function(t){console.warn(t),201===t.data.status&&c.renderOneSignalResponse(t.data.error)}).catch(function(t){console.warn(t),t.response?c.renderOneSignalResponse(t.response):t.request?c.renderOneSignalResponse(t.request):c.renderOneSignalResponse(t.message)})},c._retrieveData=function(){var t,o,l;return n.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,s.next=3,n.default.awrap(p.AsyncStorage.getItem('position'));case 3:null!==(t=s.sent)&&((o=JSON.parse(t)).longitudeDelta=.04,o.latitudeDelta=.01,l=JSON.parse(t),c.setState({region:o,oldPosition:l})),s.next=10;break;case 7:s.prev=7,s.t0=s.catch(0),console.warn(s.t0);case 10:case"end":return s.stop()}},null,null,[[0,7]],Promise)},c._getOneSignalIds=function(){return new Promise(function(t,o){var l;return n.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,s.next=3,n.default.awrap(p.AsyncStorage.getItem('@config:onesignalIds'));case 3:l=s.sent,t(l),s.next=10;break;case 7:s.prev=7,s.t0=s.catch(0),o(s.t0);case 10:case"end":return s.stop()}},null,null,[[0,7]],Promise)})},c._storeData=function(t){return n.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,n.default.awrap(p.AsyncStorage.setItem('position',JSON.stringify(t)));case 3:o.next=8;break;case 5:o.prev=5,o.t0=o.catch(0),console.warn(o.t0);case 8:case"end":return o.stop()}},null,null,[[0,5]],Promise)},c.backPressed=function(){return p.Alert.alert(I.default.t('EXIT_TITLE'),I.default.t('EXIT_DESC'),[{text:I.default.t('NO'),onPress:function(){return console.log('Cancel Pressed')},style:'cancel'},{text:I.default.t("YES"),onPress:function(){return p.BackHandler.exitApp()}}],{cancelable:!1}),!0},c._getOneSignalIds=function(){return new Promise(function(t,o){var l;return n.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,s.next=3,n.default.awrap(p.AsyncStorage.getItem('@config:onesignalIds'));case 3:l=s.sent,t(l),s.next=10;break;case 7:s.prev=7,s.t0=s.catch(0),o(s.t0);case 10:case"end":return s.stop()}},null,null,[[0,7]],Promise)})},c._saveOneSignalIds=function(t){return n.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,n.default.awrap(p.AsyncStorage.setItem('@config:onesignalIds',t));case 3:o.next=8;break;case 5:o.prev=5,o.t0=o.catch(0),console.warn(o.t0);case 8:case"end":return o.stop()}},null,null,[[0,5]],Promise)},c.renderOneSignalResponse=function(t){p.Alert.alert(I.default.t('PHISIC_SECURITY'),t,[{text:I.default.t('REFUSED'),onPress:function(){p.BackHandler.exitApp()}},{text:I.default.t("SUBMIT_LABEL"),onPress:function(){(0,P.readUser)().then(function(t){t&&(void 0!==t.category?c.saveOneSignal(!1,{code_membre:t.code_membre,player_id:g.onesignalIds,set_default:!0}):c.saveOneSignal(!0,{user_code:t.user_code,player_id:g.onesignalIds,set_default:!0}))})}}],{cancelable:!1})},c.onMapReady=function(){console.log("MAP READY CALL"),(0,P.readUser)().then(function(t){if(t){c.setState({user:t}),c.setState({network:t.network,isSaveOneSignalOK:!0});var n={latitude:N.default.isNil(t.latitude)?0:parseFloat(t.latitude),longitude:N.default.isNil(t.longitude)?0:parseFloat(t.longitude)};c.setState({myPosition:n}),c.refocusMap(!1),t.category?(c.setState({loadingDialog:!1}),"geolocated"!==t.category?c.showMyMembers():n.latitude<=0&&n.longitude<=0&&c.props.navigation.push(ne.updateinfo)):'android'===p.Platform.OS?c.requestCameraPermission():(c.getPosition(),c.watchLocation())}}).catch(function(t){console.log("ERROR LOADING USER",t.message)})},c.renderRow=function(t){return h.default.createElement(p.TouchableOpacity,{key:t,onPress:function(){return c.onRowPress(t)}},h.default.createElement(p.View,{style:se.rowContainer},h.default.createElement(p.View,{style:se.iconContainer},h.default.createElement(D.default,{name:c.state.filternetworkTemp&&t.name===c.state.filternetworkTemp.name?'radio-button-checked':'radio-button-unchecked',color:c.state.filternetworkTemp&&t.name===c.state.filternetworkTemp.name?te.accent:c.props.colorAccent,size:24})),h.default.createElement(p.Text,{style:S.material.subheading},t.name)))},c.loadMoreIfHasNoPoint=function(){c.state.increasePas===c.filterOptions.length-1?(c.setState({increasePas:0,snack_visible:!0,snack_text_message:I.default.t('NO_NETWORK_MARKER'),isLoadingMap:!1}),setTimeout(function(){c.setState({snack_visible:!1})},5e3)):c.state.increasePas+1!==c.filterOptions.length&&c.setState({increasePas:c.state.increasePas+1,isLoadingMap:!0},function(){c.onLoadMore()})},c.state=c.geInitialState(),c.mounted=!1,c.configuration=new _.default,R.IlinkEmitter.on("firstlaunch",c.onFirstLaunch),c.filterOptions=[{value:5,label:"5 km"},{value:15,label:"15 km"},{value:20,label:"20 km"},{value:25,label:"25 km"}],D.default.getImageSource('md-car',24,'white').then(function(t){c.setState({caricon:t})}),c.makeMarkerInformation=c.makeMarkerInformation.bind((0,u.default)(c)),X.default.addEventListener('ids',c.onIds),g.appHasLoaded=!0,c.configuration._getPubData().then(function(t){console.log("PUBLICITE function: ",t),c.setState({publicite:t})}).catch(function(t){console.log("PUBLICITE Error: ",t)}),c}return(0,f.default)(C,t),(0,c.default)(C,[{key:"onLoadMore",value:function(){var t=this,o=this.state,l=o.user;o.prevRegion,o.boundarie;void 0!==l.category&&null!==l.category||(this.promiseRegion&&this.promiseRegion.done(),this.promiseRegion=new Promise(function(o,s){var u,c,f,h,p;return n.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return t.setState({isNeedLoadMore:!1,isLoadingMap:!0}),s.next=3,n.default.awrap(t.mapRef.getCamera());case 3:if(u=s.sent,u.zoom-10,c=[],void 0!==t.state.filternetworkTemp&&(f=t.state.filternetworkTemp.id,c=t.state.networks.filter(function(t){return t.id===f})),!(c.length>0)){s.next=23;break}return t.setState({isLoadingMap:!1}),c[0],h={longitude:l.longitude,latitude:l.latitude},s.prev=11,s.next=14,n.default.awrap(t.loadingMarkers(t.state.myPosition,t.state.filternetwork,t.filterOptions[t.state.increasePas].value));case 14:p=s.sent,t.treatNewData(h,p,!1),s.next=21;break;case 18:s.prev=18,s.t0=s.catch(11),t.setState({isNeedLoadMore:!1,isLoadingMap:!1});case 21:s.next=24;break;case 23:t.setState({isNeedLoadMore:!0,isLoadingMap:!1});case 24:t.map&&t.map.focusToUser(),o();case 26:case"end":return s.stop()}},null,null,[[11,18]],Promise)}))}},{key:"onslidingEvent",value:function(t){this.setState({maxHeightSliding:t.nativeEvent.layout.height})}},{key:"componentDidMount",value:function(){var t=this;(0,P.readUser)().then(function(o){return n.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:o&&void 0!==o&&void 0!==o.phone&&t.props.getAuthApiKey(o.phone);case 1:case"end":return n.stop()}},null,null,null,Promise)}),this.mounted=!0;var o=this.props.navigation;this.markerManager=new H.default,this.configuration.getCurrentPubValue().then(function(n){try{var o=parseInt(n);t.setState({isPubShow:o})}catch(t){}}),this.focusListener=o.addListener("didFocus",function(){t.configuration.getCurrentPasValue().then(function(n){try{t.setState({pas:parseInt(n)})}catch(t){}}),t.componentDidAppear()}),this.blurListener=o.addListener("didBlur",function(n){t.componentDidDisappear()}),this._retrieveData(),this.props.coordinate}},{key:"requestCameraPermission",value:function(){var t=this;return n.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,n.default.awrap(p.PermissionsAndroid.request(p.PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,{title:'Cool Photo App Camera Permission',message:"Cool Photo App needs access to your camera so you can take awesome pictures."}));case 3:o.sent===p.PermissionsAndroid.RESULTS.GRANTED&&(0,P.readUser)().then(function(n){if(n)if(void 0!==n.category&&null!==n.category){var o={latitude:parseFloat(n.latitude),longitude:parseFloat(n.longitude)},l={latitude:o.latitude,longitude:o.longitude,latitudeDelta:.03,longitudeDelta:.01};t.setState({myPosition:o}),t.mapRef.animateToCoordinate({latitude:o.latitude,longitude:o.longitude},1e3),t.mapRef.animateToRegion(l,1e3),t.setState({isLoading:!1,isLoadingMap:!1,loadingDialog:!1}),"geolocated"!==n.category?(console.log("THIS IS CALL"),t.showMyMembers()):o.latitude<=0&&o.longitude<=0&&t.props.navigation.push(ne.updateinfo)}else t.getPosition(),t.watchLocation()}),o.next=10;break;case 7:o.prev=7,o.t0=o.catch(0),console.log(o.t0);case 10:case"end":return o.stop()}},null,null,[[0,7]],Promise)}},{key:"watchLocation",value:function(){var t=this;this.watchID=B.default.watchPosition(function(n){var o=t.state.myPosition,l=n.coords;t.state.oldPosition;o&&l.longitude===o.longitude&&l.latitude===o.latitude||(0!==l.longitude&&0!==l.latitude&&t._storeData(l),((0,T.default)(t.state.region,{})||(0,T.default)(t.state.region,void 0)||(0,T.default)(t.state.region,null))&&(t.state.myPosition.longitude||t.state.myPosition.latitude||null!==t.mapRef&&void 0!==t.mapRef&&(t.mapRef.animateToRegion({latitude:l.latitude,longitude:l.longitude,latitudeDelta:.03,longitudeDelta:.01},1e3),t.mapRef.animateCamera({center:t.myPosition,pitch:0,heading:0,altitude:0,zoom:12},1e3))),t.setState({region:{latitude:l.latitude,longitude:l.longitude,latitudeDelta:.003,longitudeDelta:.004}}),t.setState({myPosition:l}),t.map&&t.map.focusToUser())},function(t){return console.log("wat s",t)},$)}},{key:"getNetworks",value:function(t){var n=this;if(t)(0,P.getCountryNetwork)(t).then(function(o){n.reseaux=[];var l=o;for(var s in l)n.reseaux.push(l[s]);n.setState({networks:n.reseaux});var u=n.reseaux.filter(function(t){return t.name.includes(n.state.network)});void 0!==n.state.user.category&&null!==n.state.user.category||(u.length>0&&t?(n.setState({filternetwork:u[0],myNetwork:u[0],filternetworkTemp:u[0]}),n.retrieveAllPoint(t)):n.state.user&&(n.state.user.category||p.Alert.alert(I.default.t("UNABLE_TO_CONNECT_TITLE"),I.default.t('TEXT_NETWORK_UNABLE'),[{text:I.default.t("NO"),onPress:function(){p.BackHandler.exitApp()}},{text:I.default.t("YES"),onPress:function(){null!==t&&void 0!==t?n.getNetworks(t):n.requestCameraPermission()}}],{cancelable:!1})))},function(o){p.Alert.alert(I.default.t("UNABLE_TO_CONNECT_TITLE"),I.default.t('TEXT_NETWORK_UNABLE'),[{text:I.default.t("NO"),onPress:function(){p.BackHandler.exitApp()}},{text:I.default.t("YES"),onPress:function(){null!==t&&void 0!==t?n.getNetworks(t):n.requestCameraPermission()}}],{cancelable:!1})});else{console.log("get network missing pays");p.Alert.alert(I.default.t("UNABLE_TO_CONNECT_TITLE"),I.default.t('TEXT_NETWORK_UNABLE'),[{text:I.default.t("NO"),onPress:function(){p.BackHandler.exitApp()}},{text:I.default.t("YES"),onPress:function(){n.requestCameraPermission()}}],{cancelable:!1})}}},{key:"getPosition",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;console.log("on get position"),B.default.getCurrentPosition(function(o){var l=t.state.myPosition,s=o.coords;t.state.oldPosition;if(!(0,T.default)(s,l)&&0!==s.longitude&&0!==s.latitude||l){t.map&&t.map.focusToUser(),(0,b.getPositionInformation)(s).then(function(o){if(o)if(void 0!==o.results){if(o.results.length>0){var l=o.results[0],s=l.address_components,u=l.formatted_address,c=l.place_id;t.setState({address:s,textadress:u,place:c});for(var f,h,y=o.results,w=0;w=k.length)break;b=k[S++]}else{if((S=k.next()).done)break;b=S.value}var P=b;P.code===f&&(t.setState({indicatif:P.dial_code}),t.getNetworks(P.dial_code))}}}else console.log("on else result null "),p.Alert.alert(I.default.t("UNABLE_TO_CONNECT_TITLE"),I.default.t('TEXT_NETWORK_UNABLE'),[{text:I.default.t("NO"),onPress:function(){p.BackHandler.exitApp()}},{text:I.default.t("YES"),onPress:function(){t.getPosition(n)}}],{cancelable:!1});else p.Alert.alert(I.default.t("UNABLE_TO_CONNECT_TITLE"),I.default.t('TEXT_NETWORK_UNABLE'),[{text:I.default.t("NO"),onPress:function(){p.BackHandler.exitApp()}},{text:I.default.t("YES"),onPress:function(){t.getPosition(n)}}],{cancelable:!1})});var u={latitude:s.latitude,longitude:s.longitude,latitudeDelta:.03,longitudeDelta:.01};t.setState({myPosition:s,region:u}),t.mapRef&&!t.state.myPositionIsAnimated&&(t.mapRef.animateCamera({center:s,pitch:0,heading:0,altitude:5,zoom:12},1e3),t.setState({myPositionIsAnimated:!0}))}else console.warn("errror")},function(n){switch(console.warn(n.message),n.code){case 3:t.state.oldPosition&&t.treatPosition(t.state.oldPosition);break;default:console.log("onjjj",n.message)}},$)}},{key:"componentDidDisappear",value:function(){p.BackHandler.removeEventListener('hardwareBackPress',this.backPressed)}},{key:"componentDidAppear",value:function(){var t=this;p.BackHandler.addEventListener('hardwareBackPress',this.backPressed),(0,P.readUser)().then(function(n){if(n&&n.category){t.setState({user:n}),t.setState({network:n.network});var o={latitude:parseFloat(n.latitude),longitude:parseFloat(n.longitude)};t.setState({myPosition:o}),t.refocusMap(!0)}})}},{key:"componentWillUnmount",value:function(){X.default.removeEventListener('ids',this.onIds),this.mounted=!1,this.blurListener.remove(),this.focusListener.remove(),this.watchID&&B.default.clearWatch(this.watchID)}}]),(0,c.default)(C,[{key:"makeCardSearch",value:function(){var t=this;return h.default.createElement(p.View,{style:se.topBar},h.default.createElement(F.Surface,{style:{elevation:4,borderRadius:10}},h.default.createElement(p.View,{style:{flexDirection:'row',alignSelf:'center',justifyContent:'center',flex:1,borderRadius:10,margin:10,alignItems:'center',height:48}},h.default.createElement(p.TouchableOpacity,{onPress:function(){return t.openDrawer()}},h.default.createElement(p.Text,{style:se.hambuger},"Menu")),h.default.createElement(p.View,{style:{flex:1}}),h.default.createElement(p.Text,{style:{backgroundColor:this.state.myNetwork.id===this.state.filternetwork.id?te.primary:te.accent,padding:5,color:"white",marginRight:10,fontSize:10,borderRadius:12}},this.state.filternetwork.name?this.state.filternetwork.name:this.state.network),this.renderSupplementInformation()),this.showLoadingMapView()))}},{key:"renderSupplementInformation",value:function(){var t=this;return this.state.user&&"geolocated"===this.state.user.category?h.default.createElement(p.View,null):h.default.createElement(p.View,{style:{flexDirection:"row"}},h.default.createElement(p.View,{style:{backgroundColor:"#FFFFFFA0",justifyContent:'center',alignItems:'center',alignSelf:'center'}},h.default.createElement(p.Text,null,this.state.markers.length+" "+(0===this.state.currentNetworkSize?"":"/"+this.state.currentNetworkSize)," ")),h.default.createElement(p.TouchableOpacity,{onPress:function(){t.setState({page:t.state.page+1}),t.onLoadMore()},style:{borderRadius:12,height:32,width:32,backgroundColor:"white",borderColor:"transparent"}},h.default.createElement(D.default,{name:this.state.markers.length>=this.state.currentNetworkSize?"close":"refresh",size:32,color:this.state.markers.length>=this.state.currentNetworkSize?"red":"grey"})))}},{key:"_renderMarker2",value:function(){var t=this,n=this.state,o=n.currentMarker,l=n.myPosition,s=o,u={latitude:parseFloat(o.latitude),longitude:parseFloat(o.longitude)},c=Z.getDistance(l,u),f=(c>900?c/1e3+" Km":c+"m")+I.default.t('TO_YOU'),y=null===s.lastname?s.adresse:s.lastname;return h.default.createElement(p.View,{style:{flex:1,backgroundColor:"white"}},h.default.createElement(p.View,{style:{flexDirection:"row",justifyContent:"flex-end",alignItems:'center',backgroundColor:"white"}},h.default.createElement(p.Text,{style:le.title},y),h.default.createElement(D.default.Button,{name:"close",size:24,color:"red",backgroundColor:"transparent",onPress:function(){t.toggleSlidingUp(!1)}})),h.default.createElement(p.Text,{style:le.subtitle2},s.adresse),h.default.createElement(p.View,{style:{flexDirection:"row",alignItems:"center"}},h.default.createElement(p.Text,{style:le.reseau},s.network),h.default.createElement(p.Text,{style:le.solde},I.default.t('SOLDE_UNVAIBLE'))),h.default.createElement(p.Text,{style:le.reseau},f),h.default.createElement(p.View,{style:{flexDirection:'row',marginTop:(0,E.responsiveHeight)(3),marginLeft:10}},this.state.needRoad?this.showBtnClose():this.showBtnItineraire(),h.default.createElement(x.default,{style:{backgroundColor:"white",width:(0,E.responsiveWidth)(30),height:36,marginLeft:5,borderRadius:100,borderColor:"#9e9e9e",justifyContent:'center'},onPress:function(){return t.callItem(s)}},h.default.createElement(p.View,{style:{flexDirection:'row'}},h.default.createElement(D.default,{name:"phone",size:16,color:te.primary,style:{alignSelf:'center'}}),h.default.createElement(p.Text,{style:{fontSize:15,color:'#9e9e9e',marginLeft:(0,E.responsiveWidth)(2)}},I.default.t("CALL"))))))}},{key:"_renderItemMarkerdetails",value:function(t){var n=this,o=t;if(void 0!==o&&null!==o){var l=this.state,s=l.currentMarker,u=l.myPosition,c={latitude:parseFloat(s.latitude),longitude:parseFloat(s.longitude)},f=Z.getDistance(u,c),y=(f>900?f/1e3+" Km":f+"m")+I.default.t('TO_YOU'),w=null===o.lastname?o.adresse:o.lastname;return h.default.createElement(k.CardView,{style:le.container,cardElevation:2,cardMaxElevation:2,cornerRadius:5},h.default.createElement(p.View,{style:{flexDirection:"row",justifyContent:"flex-end",alignItems:'center'}},h.default.createElement(p.Text,{style:le.title},w),h.default.createElement(D.default.Button,{name:"close",size:24,color:"red",backgroundColor:"transparent",onPress:function(){n.toggleSlidingUp(!1)}})),h.default.createElement(p.Text,{style:le.subtitle2},o.adresse),h.default.createElement(p.View,{style:{flexDirection:"row",alignItems:"center"}},h.default.createElement(p.Text,{style:le.reseau},o.network),h.default.createElement(p.Text,{style:le.solde},I.default.t('SOLDE_UNVAIBLE'))),h.default.createElement(p.Text,{style:le.reseau},y),h.default.createElement(p.View,{style:{flexDirection:'row',marginTop:(0,E.responsiveHeight)(3),marginLeft:10}},this.state.needRoad?this.showBtnClose():this.showBtnItineraire(),h.default.createElement(x.default,{style:{backgroundColor:"white",width:(0,E.responsiveWidth)(30),height:36,marginLeft:5,borderRadius:100,borderColor:"#9e9e9e",justifyContent:'center'},onPress:function(){return n.callItem(o)}},h.default.createElement(p.View,{style:{flexDirection:'row'}},h.default.createElement(D.default,{name:"phone",size:16,color:te.primary,style:{alignSelf:'center'}}),h.default.createElement(p.Text,{style:{fontSize:15,color:'#9e9e9e',marginLeft:(0,E.responsiveWidth)(2)}},I.default.t("CALL"))))))}}},{key:"renderCurrentMarker",value:function(t){var n=this;if(t)return h.default.createElement(p.View,null,h.default.createElement(p.View,{style:{flexDirection:"row",justifyContent:"flex-end",alignItems:'center'}},h.default.createElement(p.Text,{style:le.title},name),h.default.createElement(D.default.Button,{name:"close",size:24,color:"red",backgroundColor:"transparent",on:!0,dPress:function(){n.toggleSlidingUp(!1)}})),h.default.createElement(p.Text,{style:le.title},t.adresse),h.default.createElement(p.View,{style:{flexDirection:"row"}},h.default.createElement(p.Text,{style:le.reseau},t.network),h.default.createElement(p.Text,{style:le.solde},I.default.t('SOLDE_UNVAIBLE'))),h.default.createElement(p.Text,{style:le.reseau},distanceTxt),h.default.createElement(p.View,{style:{flexDirection:'row',marginTop:(0,E.responsiveHeight)(3),marginLeft:10}},this.state.needRoad?this.showBtnClose():this.showBtnItineraire(),h.default.createElement(x.default,{style:{backgroundColor:"white",width:(0,E.responsiveWidth)(30),height:36,marginLeft:5,borderRadius:100,borderColor:"#9e9e9e",justifyContent:'center'},onPress:function(){return n.callItem(t)}},h.default.createElement(p.View,{style:{flexDirection:'row'}},h.default.createElement(D.default,{name:"phone",size:16,color:te.primary,style:{alignSelf:'center'}}),h.default.createElement(p.Text,{style:{fontSize:15,color:'#9e9e9e',marginLeft:(0,E.responsiveWidth)(2)}},I.default.t("CALL"))))))}},{key:"callItem",value:function(t){var n={number:t.phone,prompt:!1};(0,M.default)(n).catch(function(t){return console.log(t)})}},{key:"makeMarkerInformation",value:function(){var t=this.state,n=t.currentMarker;t.myPosition;return void 0!==n&&null!==n?this._renderItemMarkerdetails(n):h.default.createElement(p.Text,null,"Impossible de'afficher l'element")}},{key:"makeActionButon",value:function(){var t=this.state.user;if(t)switch(t.category){case"super":return this.getSuperActionButton();case"geolocated":return this.geoLocatedAction();case"hyper":return this.getHypervisorActionButton();default:return this.getSimpleActionButton()}}},{key:"getSuperActionButton",value:function(){var t=this;return h.default.createElement(v.default,{buttonColor:te.accent},h.default.createElement(v.default.Item,{buttonColor:"#3498db",title:I.default.t("MY_GROUP"),onPress:function(){return t.showMyMembers()},size:48},h.default.createElement(D.default,{name:"group-work",style:se.actionButtonIcon})),h.default.createElement(v.default.Item,{buttonColor:"#3498db",title:I.default.t("REPOSITIONNING"),onPress:function(){return t.refocusMap(!1)},size:48},h.default.createElement(D.default,{name:"person-pin",style:se.actionButtonIcon})),h.default.createElement(v.default.Item,{buttonColor:te.primary,title:I.default.t("CHANGE_MAP"),onPress:function(){t.onMapTypeChange()},size:48},h.default.createElement(D.default,{name:"layers",style:se.actionButtonIcon})))}},{key:"getSimpleActionButton",value:function(){var t=this;return h.default.createElement(v.default,{ref:function(n){return t.actionButton=n}},h.default.createElement(v.default.Item,{buttonColor:"#3498db",title:I.default.t("FILTER"),onPress:function(){return t.showFilterDialog()},size:48},h.default.createElement(D.default,{name:"filter-list",style:se.actionButtonIcon})),h.default.createElement(v.default.Item,{buttonColor:"#3498db",title:I.default.t("REPOSITIONNING"),onPress:function(){return t.refocusMap(!1)},size:48},h.default.createElement(D.default,{name:"person-pin",style:se.actionButtonIcon})),h.default.createElement(v.default.Item,{buttonColor:"#9b59b6",title:I.default.t("CHANGE_MAP"),onPress:function(){t.onMapTypeChange()},size:48},h.default.createElement(D.default,{name:"layers",style:se.actionButtonIcon})),h.default.createElement(v.default.Item,{buttonColor:"#3498db",title:I.default.t("PRINT_MY_NETWORK"),size:48,onPress:function(){t.showMynetworkMap()}},h.default.createElement(D.default,{name:"group-work",style:se.actionButtonIcon})),h.default.createElement(v.default.Item,{buttonColor:"#3498db",title:I.default.t("CHANGE_NETWORK"),size:48,onPress:function(){t.showNewDialogNetwork()}},h.default.createElement(D.default,{name:"rss-feed",style:se.actionButtonIcon})))}},{key:"toggleSlidingUp",value:function(t){var n=this;t&&this.bottomSheetRef?(this.bottomSheetRef.snapTo(1),this.setState({showcurentMarker:t})):t||this.bottomSheetRef.snapTo(0);var o=t?oe:0,l=t?0:oe;this.setState({panelVisible:t}),!t&&this.state.needRoad&&this.setState({needRoad:!1}),this.state.animation.setValue(o),p.Animated.timing(this.state.animation,{toValue:l,duration:200}).start(function(o){!t&&n.map&&n.map.focusToUser()})}},{key:"makeSlidingUp",value:function(){var t=this;return h.default.createElement(U.default,{ref:function(n){t.bottomSheetRef=n},snapPoints:[0,"30%"],renderHeader:function(){return t.markerView()}})}},{key:"geInitialState",value:function(){return{isSaveOneSignalDisplay:!1,region:{latitude:0,longitude:0,latitudeDelta:.015,longitudeDelta:.0121},pas:100,prevRegion:{latitude:0,longitude:0},increasePas:0,isPubShow:!0,loadingDialog:!0,textreach:"",currentNetworkSize:0,markersearchfilter:[],animation:new p.Animated.Value(0),myPosition:null,currentMarker:null,filterNetworkOption:ee[1],needRoad:!1,initialAnim:!1,filternetwork:{},destinationPosition:{},panelVisible:!1,markers:[],isNeedLoadMore:!1,isLoadingMap:!1,value:5,page:0,valuePosition:0,markerfilter:null,allpoint:[],typeMap:'standard',indexTypeMap:0,user:null,snack_visible:!1,snack_text_message:"",networks:[],dialogSliderVisible:!1,showProgress:!1,myNetwork:{},dialogNetworkVisible:!1,myPositionMarkerText:I.default.t("YOUR_THERE"),isSaveOneSignalOK:!1,publicite:null}}},{key:"onMarkerPress",value:function(t){console.warn(t),this.setState({currentMarker:t}),this.toggleSlidingUp(!0)}},{key:"onMapTypeChange",value:function(){var t={index:this.state.indexTypeMap,text:this.state.typeMap};switch(t.index=t.index+1,t.index=t.index%3,t.index){default:t.text='standard';break;case 1:t.text='hybrid';break;case 2:t.text="terrain"}this.setState({indexTypeMap:t.index,typeMap:t.text})}},{key:"showInterticiel",value:function(){var t=this;return console.log("PUBLICITE",this.state.publicite),N.default.isNil(this.state.publicite)||N.default.isNil(this.state.user)?null:this.state.user.country_id===this.state.publicite.id_country?h.default.createElement(z.default,{closeIntersticiel:function(){return t.setState({isPubShow:!1})},navigation:this.props.navigation}):void 0}},{key:"renderBottomHome",value:function(){var t=this;return h.default.createElement(p.View,{style:{flex:1,backgroundColor:"lightblue"}},h.default.createElement(w.default,{ref:function(n){t.map=n,null!=n&&(t.mapRef=n.getMapRef())},typeMap:this.state.typeMap,onMarkerClick:function(n){return t.onMarkerPress(n)},network:this.state.filternetwork,initialRegion:this.state.region,markers:this.state.markers,selectedMarker:this.state.currentMarker,myNetwork:this.state.myNetwork,lang:this.state.lang,myPosition:this.state.myPosition,onMapReady:function(){(0,P.readUser)().then(function(n){n&&(t.setState({user:n}),t.setState({network:n.network}),n.category?(t.setState({loadingDialog:!1}),"geolocated"!==n.category?t.showMyMembers():myPosition.latitude<=0&&myPosition.longitude<=0&&t.props.navigation.push(ne.updateinfo)):'android'===p.Platform.OS?t.requestCameraPermission():t.watchLocation())})},needRoad:this.state.needRoad,onNeedRoadReady:function(n){t.setState({showProgress:!1})},onNeedRoadError:function(n){t.setState({showProgress:!1}),p.Alert.alert(I.default.t("PROBLEM_OCCUR"),I.default.t("PROBLEM_OCCUR_DIRECTION"),[{text:"Ok",onPress:function(){}}])}}),this.makeCardSearch(),h.default.createElement(U.default,{ref:function(n){t.bottomSheetRef=n},snapPoints:[60,"30%","100%"],renderHeader:function(){return t.renderHeader()}}))}},{key:"renderInner",value:function(){return h.default.createElement(p.View,{style:{flex:1,backgroundColor:"green"}},h.default.createElement(p.Text,null,"Freud junior"))}},{key:"markerView",value:function(){if(this.state.currentMarker)return this._renderMarker2()}},{key:"renderHeader",value:function(){var t=this;return h.default.createElement(h.default.Fragment,null,h.default.createElement(p.View,{style:{position:"absolute",width:32,height:this.state.currentMarker?200:100,bottom:80,right:0,justifyContent:'center'}},h.default.createElement(v.default,{size:32,style:{marginRight:15},buttonColor:"white"}),h.default.createElement(v.default,{size:42,renderIcon:function(){return h.default.createElement(D.default,{name:"group-work",style:se.actionButtonIcon})},style:{marginTop:40,marginRight:20},buttonColor:te.primary})),h.default.createElement(p.View,{style:{flex:1,backgroundColor:"white"}},this.markerView(),this.renderFilterMarker(),h.default.createElement(p.View,{style:{flexDirection:'row',height:60,justifyContent:'space-evenly',alignItems:'flex-end'}},h.default.createElement(p.View,{style:{flexDirection:'row',flex:1,marginBottom:10,justifyContent:'space-around',alignItems:'flex-end'}},h.default.createElement(F.FAB,{small:!0,icon:this.state.showFilterDistance?"close":"filter",color:te.primary,style:{backgroundColor:"white"},onPress:function(){t.state.showFilterDistance?(t.bottomSheetRef.snapTo(0),t.setState({showFilterDistance:!1})):(t.bottomSheetRef.snapTo(2),t.setState({showFilterDistance:!0}))}}),h.default.createElement(F.FAB,{small:!0,icon:"add",color:"white",style:{backgroundColor:te.primary},onPress:function(){t.bottomSheetRef.snapTo(2),t.setState({showdialogNetworkVisible:!0})}})),this.makeMarkerButton())))}},{key:"renderFilterMarker",value:function(){var t=this;if(this.state.showFilterDistance)return h.default.createElement(p.View,{style:{height:(0,E.responsiveHeight)(80),justifyContent:'center',backgroundColor:'white',margin:20}},h.default.createElement(p.View,{style:{height:(0,E.responsiveHeight)(30),justifyContent:'center'}},h.default.createElement(p.Text,null,I.default.t('TEXT_FILTER_DISTANCE')," "),h.default.createElement(L.default,{items:this.filterOptions,defaultItem:this.state.valuePosition,labelPosition:"bottom",onSlidingComplete:function(n){return t.slidingComplete(n)}}),h.default.createElement(p.Text,null,h.default.createElement(p.Text,{style:{fontWeight:"bold"}},void 0===this.state.value?0:this.state.value)," km ",I.default.t("DISTANCE_ARROUND"))),h.default.createElement(p.View,{style:{flexDirection:"row",flex:1}},h.default.createElement(x.default,{style:{flex:1}}),h.default.createElement(x.default,{style:{flex:1}})))}},{key:"makeMarkerButton",value:function(){var t=this;return this.state.currentMarker?h.default.createElement(p.View,{style:{flex:2,flexDirection:'row',justifyContent:'flex-end',marginEnd:20}},this.state.needRoad?this.showBtnClose():this.showBtnItineraire(),h.default.createElement(x.default,{style:{backgroundColor:"white",width:(0,E.responsiveWidth)(26),height:36,marginLeft:5,borderRadius:100,borderColor:"#9e9e9e",justifyContent:'center'},onPress:function(){return t.callItem(marker)}},h.default.createElement(p.View,{style:{flexDirection:'row'}},h.default.createElement(D.default,{name:"phone",size:16,color:te.primary,style:{alignSelf:'center'}}),h.default.createElement(p.Text,{style:{fontSize:15,color:'#9e9e9e',marginLeft:(0,E.responsiveWidth)(2)}},I.default.t("CALL"))))):h.default.createElement(p.View,{style:{flex:2,flexDirection:'row',justifyContent:'flex-end',marginEnd:20}})}},{key:"renderOldHome",value:function(){var t=this;return h.default.createElement(p.View,{style:se.container},h.default.createElement(p.StatusBar,{backgroundColor:"#00000030",barStyle:"light-content",translucent:!0}),this.state.loadingDialog||this.props.loading?h.default.createElement(p.View,{style:{position:"absolute",zIndex:1,backgroundColor:"#00000050",width:this.state.loadingDialog?(0,E.responsiveWidth)(100):0,height:this.state.loadingDialog?(0,E.responsiveHeight)(100):0,flex:1,justifyContent:'center',alignItems:'center'}},h.default.createElement(p.Text,{style:{fontSize:20,color:'white',fontWeight:'bold'}},I.default.t("LOADING_DOTS"))):null,h.default.createElement(w.default,{ref:function(n){t.map=n,null!=n&&(t.mapRef=n.getMapRef())},typeMap:this.state.typeMap,onMarkerClick:function(n){return t.onMarkerPress(n)},network:this.state.filternetwork,initialRegion:this.state.region,markers:this.state.markers,selectedMarker:this.state.currentMarker,myNetwork:this.state.myNetwork,lang:this.state.lang,myPosition:this.state.myPosition,onMapReady:'android'===p.Platform.OS?this.onMapReady:null,onLayout:'ios'===p.Platform.OS?this.onMapReady:null,needRoad:this.state.needRoad,onNeedRoadReady:function(n){t.setState({showProgress:!1})},onNeedRoadError:function(n){t.setState({showProgress:!1}),p.Alert.alert(I.default.t("PROBLEM_OCCUR"),I.default.t("PROBLEM_OCCUR_DIRECTION"),[{text:"Ok",onPress:function(){N.default.isNil(user.latitude)}}])}}),this.makeCardSearch(),this.showInterticiel(),this.makeSlidingUp(),this.makeDialogLoader(),this.makeDistanceDialog(),this.makeNetworkChangeDialog(),h.default.createElement(V.default,{visible:this.state.snack_visible,textMessage:this.state.snack_text_message,autoHidingTime:5e3}),this.makeActionButon())}},{key:"renderTutoOldHome",value:function(){return h.default.createElement(p.View,{style:{flex:1}},h.default.createElement(CopilotStep,{text:"This is a hello world example!",order:1,name:"hello"},this.makeCardSearch()))}},{key:"render",value:function(){return this.renderOldHome()}},{key:"renderCurrentMarker",value:function(){if(this.state.currentMarker)return h.default.createElement(p.View,{style:{height:200,backgroundColor:'#fff'}},this.makeMarkerInformation())}},{key:"makeDialogLoader",value:function(){return h.default.createElement(A.ProgressDialog,{visible:this.state.showProgress,title:I.default.t("LOADING_PROGRESS"),message:I.default.t("WAITING_LONG"),animationType:"slide",activityIndicatorSize:"large",activityIndicatorColor:"blue"})}},{key:"showMynetworkMap",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,o=null===n?this.state.user:n,l=this.state.myNetwork;return this.setState({filternetwork:l,page:0,increasePas:0,filternetworkTemp:l,loadingDialog:!0}),new Promise(function(){void 0!==l?t.loadingMarkers(t.state.myPosition,l,t.state.value).then(function(n){var l=n||[];if(t.setState({loadingDialog:!1}),void 0!==o.category&&null!==o.category){var s=l.filter(function(t){return t.code_parrain===o.code_membre});t.treatNewData(t.state.myPosition,s,!0)}else t.treatNewData(t.state.myPosition,l,!0)}).catch(function(n){t.setState({loadingDialog:!1}),console.log("error j"),console.log(n)}):(t.setState({loadingDialog:!1}),console.log("error no net"))})}},{key:"showMyMembers",value:function(){var t=this,n=this.state.user.code_membre;void 0!==n?(0,b.loadGroupeAgent)(n).then(function(n){if(1===n.success)return t.setState({markers:n.datas})}):console.log("error")}},{key:"slidingComplete",value:function(t){this.setState({value:this.filterOptions[t].value,valuePosition:t})}},{key:"makeDistanceDialog",value:function(){var t=this;return h.default.createElement(O.MaterialDialog,{visible:this.state.dialogSliderVisible,title:I.default.t('MENU_FILTER'),onOk:function(){t.setState({dialogSliderVisible:!1,showProgress:!0}),setTimeout(function(){return t.filterPoint()},300)},cancelLabel:I.default.t("QUIT_"),okLabel:I.default.t('FILTER'),onCancel:function(){t.setState({dialogSliderVisible:!1})},onTouchOutside:function(){return t.setState({dialogSliderVisible:!1})}},h.default.createElement(p.Text,null,I.default.t('TEXT_FILTER_DISTANCE')," "),h.default.createElement(L.default,{items:this.filterOptions,defaultItem:this.state.valuePosition,labelPosition:"bottom",onSlidingComplete:function(n){return t.slidingComplete(n)}}),h.default.createElement(p.Text,null,h.default.createElement(p.Text,{style:{fontWeight:"bold"}},void 0===this.state.value?0:this.state.value)," km ",I.default.t("DISTANCE_ARROUND")))}},{key:"showFilterDialog",value:function(){this.setState({dialogSliderVisible:!0})}},{key:"filterPoint",value:function(){var t,o,l,s,u,c=this;return n.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:t=this.state,o=t.value,l=t.myPosition,t.user,s=t.filternetwork,void 0!==o?(this.setState({page:0}),1e3*o,u=this.state.networks.filter(function(t){return t.id===s.id}),u[0],this.loadingMarkers(l,s,o,void 0,!0).then(function(t){c.treatNewData(c.state.prevRegion,t,!0)}).catch(function(t){c.setState({showProgress:!1}),p.Alert.alert(I.default.t("ERROR_FILTER"),I.default.t("ERROR_FILTER_TEXT"),[{text:I.default.t("CANCEL")},{text:I.default.t("RESTART"),onPress:function(){c.filterPoint()}}])})):(this.setState({showProgress:!1}),this.setState({snack_visible:!0,snack_text_message:"impossible de filtrer les \xe9lements"}),setTimeout(function(){c.setState({snack_visible:!1})},5e3));case 2:case"end":return n.stop()}},null,this,null,Promise)}},{key:"userChangeMarker",value:function(t){var n=this.state.markers[t];if(null!==this.mapRef&&void 0!==this.mapRef){var o={latitude:parseFloat(n.latitude),longitude:parseFloat(n.longitude),latitudeDelta:.03,longitudeDelta:.01};this.mapRef.animateToCoordinate({latitude:parseFloat(n.latitude),longitude:parseFloat(n.longitude)},1e3),this.mapRef.animateToRegion(o,1e3),console.log(n)}}},{key:"geoLocatedAction",value:function(){var t=this;return h.default.createElement(v.default,{buttonColor:te.accent},h.default.createElement(v.default.Item,{buttonColor:"#3498db",title:I.default.t("REPOSITIONNING"),onPress:function(){return t.refocusMap()},size:48},h.default.createElement(D.default,{name:"person-pin",style:se.actionButtonIcon})),h.default.createElement(v.default.Item,{buttonColor:te.primary,title:I.default.t("CHANGE_MAP"),onPress:function(){t.onMapTypeChange()},size:48},h.default.createElement(D.default,{name:"layers",style:se.actionButtonIcon})))}},{key:"makeNetworkChangeDialog",value:function(){var t=this;return h.default.createElement(O.MaterialDialog,{title:I.default.t("CHOICE_NETWORK"),visible:this.state.dialogNetworkVisible,subtitle:I.default.t("CHOICE_NETWORK_TEXT"),onCancel:function(){return t.setState({dialogNetworkVisible:!1})},onOk:function(n){t.setState({dialogNetworkVisible:!1,page:0}),t.setState({showProgress:!0,filternetwork:t.state.filternetworkTemp}),setTimeout(function(){return t.showFilterNetwork()},500)}},h.default.createElement(p.FlatList,{style:{height:(0,E.responsiveHeight)(40)},data:this.state.networks,renderItem:function(n){var o=n.item;return t.renderRow(o)}}))}},{key:"onRowPress",value:function(t){this.setState({filternetworkTemp:t})}},{key:"showNewDialogNetwork",value:function(){this.setState({dialogNetworkVisible:!0})}},{key:"showFilterNetwork",value:function(){var t,o,l,s=this;return n.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:t=this.state,o=t.myPosition,t.user,void 0!==(l=t.filternetwork)?(this.setState({showProgress:!0}),this.loadingMarkers(this.state.myPosition,l,this.state.value,0,!0).then(function(t){s.setState({showProgress:!1}),s.treatNewData(o,t,!0)}).catch(function(t){s.setState({snack_visible:!0,snack_text_message:"Probleme de connexion"}),console.log(t)})):console.log("error no net");case 2:case"end":return n.stop()}},null,this,null,Promise)}},{key:"showBtnItineraire",value:function(){var t=this;return h.default.createElement(x.default,{style:{backgroundColor:te.primary,width:(0,E.responsiveWidth)(30),height:36,borderRadius:100,marginLeft:5,borderColor:"transparent",justifyContent:'center'},onPress:function(){t.setState({needRoad:!0,showProgress:!0})}},h.default.createElement(p.View,{style:{flexDirection:'row'}},h.default.createElement(D.default,{name:"near-me",size:16,color:"white",style:{alignSelf:'center'}}),h.default.createElement(p.Text,{style:{fontSize:15,color:'white',marginLeft:(0,E.responsiveWidth)(2)}},I.default.t("WAY"))))}},{key:"showBtnClose",value:function(){var t=this;return h.default.createElement(x.default,{style:{backgroundColor:te.reddeconnect,height:36,width:(0,E.responsiveWidth)(30),borderRadius:100,borderColor:"transparent",justifyContent:'center'},onPress:function(){t.setState({needRoad:!1,showProgress:!1})}},h.default.createElement(p.View,{style:{flexDirection:'row'}},h.default.createElement(D.default,{name:"close",size:16,color:"white",style:{alignSelf:'center'}}),h.default.createElement(p.Text,{style:{fontSize:15,color:'white',marginLeft:(0,E.responsiveWidth)(2)}},I.default.t("CANCEL"))))}},{key:"getHypervisorActionButton",value:function(){var t=this;return h.default.createElement(v.default,{buttonColor:te.accent},h.default.createElement(v.default.Item,{buttonColor:"#3498db",title:I.default.t("REPOSITIONNING"),onPress:function(){return t.refocusMap(!1)},size:48},h.default.createElement(D.default,{name:"person-pin",style:se.actionButtonIcon})),h.default.createElement(v.default.Item,{buttonColor:te.primary,title:I.default.t("CHANGE_MAP"),onPress:function(){t.onMapTypeChange()},size:48},h.default.createElement(D.default,{name:"map",style:se.actionButtonIcon})))}},{key:"moveToMarker",value:function(t){this.mapRef.animateToCoordinate({latitude:parseFloat(t.latitude),longitude:parseFloat(t.longitude)},1e3),this.setState({textreach:t.lastname,texta:!0}),this.setState({markersearchfilter:[]}),this.onMarkerPress(t)}},{key:"refocusMap",value:function(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?this.mapRef&&void 0!==this.state.myPosition&&this.mapRef.animateCamera({center:{latitude:this.state.myPosition.latitude,longitude:this.state.myPosition.longitude},pitch:0,heading:0},1e3):this.mapRef&&void 0!==this.state.myPosition&&this.mapRef.animateCamera({center:{latitude:this.state.myPosition.latitude,longitude:this.state.myPosition.longitude},pitch:0,heading:0,altitude:5,zoom:12},1e3),this.map&&this.map.focusToUser()}},{key:"renderCardSeashItem",value:function(t){var n=this;return h.default.createElement(p.TouchableOpacity,{key:t.id,style:{margin:5},onPress:function(){n.moveToMarker(t)}},h.default.createElement(p.Text,{style:{flex:1,fontSize:14,color:"#000"}},null===t.firstname?t.adresse:t.firstname),h.default.createElement(p.Text,{style:{flex:1,fontSize:12}},t.lastname),h.default.createElement(p.Text,{style:{flex:1,fontSize:13,alignSelf:'flex-end',color:te.accent}},t.network))}},{key:"retrieveAllPoint",value:function(t){var n=this;(0,b.getMakersFrom)(t).then(function(o){new Promise(function(t,l){try{var s=o.datas;n.setState({allpoint:s,loadingDialog:!1}),t(s)}catch(t){console.warn(t.message),l(new Error(t.message))}}).then(function(t){n.onLoadMore()}).catch(function(o){n.setState({loadingDialog:!1}),console.log("on get marker"),p.Alert.alert(I.default.t("UNABLE_TO_CONNECT_TITLE"),I.default.t('TEXT_NETWORK_UNABLE'),[{text:I.default.t("NO"),onPress:function(){p.BackHandler.exitApp()}},{text:I.default.t("YES"),onPress:function(){n.setState({loadingDialog:!0}),null!==t&&void 0!==t?n.retrieveAllPoint(t):n.requestCameraPermission()}}],{cancelable:!1})})}).catch(function(o){console.log("on retreive>getmarkers",o.message),n.setState({loadingDialog:!1}),n.state.allpoint.length<=0&&(console.log("no point"),p.Alert.alert(I.default.t("UNABLE_TO_CONNECT_TITLE"),I.default.t('TEXT_NETWORK_UNABLE'),[{text:I.default.t("NO"),onPress:function(){p.BackHandler.exitApp()}},{text:I.default.t("YES"),onPress:function(){n.state.allpoint.length<=0&&(n.setState({loadingDialog:!0}),null!==t&&void 0!==t?n.retrieveAllPoint(t):n.requestCameraPermission())}}],{cancelable:!1}))})}},{key:"showLoadMoreView",value:function(){var t=this;if(this.state.isNeedLoadMore)return h.default.createElement(p.View,{style:{flex:1,flexDirection:'row',width:(0,E.responsiveWidth)(90)}},h.default.createElement(x.default,{onPress:function(){t.setState({page:t.state.page+1}),t.onLoadMore()},style:{borderRadius:48,height:48,width:48,backgroundColor:"white",borderColor:"transparent",alignItems:"center",justifyContent:"center"}},h.default.createElement(D.default,{name:"refresh",size:32})),h.default.createElement(p.View,{style:{backgroundColor:"#FFFFFFA0",width:(0,E.responsiveWidth)(20),height:30,borderRadius:12,justifyContent:'center',alignItems:'center',alignSelf:'center'}},h.default.createElement(p.Text,null,(this.state.markers.length,this.state.markers.length)," / ",this.state.currentNetworkSize," ")))}},{key:"showLoadingMapView",value:function(){if(this.state.isLoadingMap)return h.default.createElement(p.View,{style:{flexDirection:'row',margin:10,width:(0,E.responsiveWidth)(95),backgroundColor:'white',justifyContent:"center",alignSelf:"center"}},h.default.createElement(p.Text,{style:{fontSize:12,alignSelf:'center'}},I.default.t("LOADING_TEXT_MARKERS")+" "+this.filterOptions[this.state.valuePosition].value+" km "+I.default.t("DISTANCE_ARROUND")),h.default.createElement(p.ProgressBarAndroid,{style:{alignSelf:'center'}}))}},{key:"loadingMarkers",value:function(t,n,o){var l=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,u=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise(function(c,f){var h=l.state.allpoint;console.log("AllPoint",h),console.log("Home state",l.state);var p=void 0!==s?s:l.state.page,y=h.filter(function(l,s){var u={longitude:parseFloat(l.longitude),latitude:parseFloat(l.latitude)};return Z.getDistance(t,u)<=1e3*o&&l.network===n.name});console.log("Data before comparative",y),l.state.valuePosition>1&&(y=y.length2&&void 0!==arguments[2]&&arguments[2],s=n;if(console.log("Data received",n),n.length>0){var u=s;l&&this.setState({showProgress:!1}),u.length>0&&this.setState({markers:u,prevRegion:t}),s.length1&&void 0!==arguments[1]?arguments[1]:1.2;return t*(scaleValue>n?n:scaleValue)};e.isNormalInteger=function(t){return!/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(t)};e.uppercaseFirstLetter=function(t){return t.charAt(0).toUpperCase()+t.slice(1)};e.getErrorMsg=function(t){var n,o,c,l,p;return(null==(n=t.error)?void 0:n.hasOwnProperty('message'))?Array.isArray(null==(o=t.error)?void 0:o.message)?null==(c=t.error)?void 0:c.join('\n'):null==(l=t.error)?void 0:l.error:null==(p=t.error)?void 0:p.error};e.displayToast=function(t){o.default.show(t,{duration:o.default.durations.LONG,position:o.default.positions.BOTTOM,backgroundColor:c.Color.primaryColor,shadow:!0,animation:!0,hideOnPress:!0,delay:0,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){}})};e.isIlinkWorldWallet=function(t){return(0,n.default)(t,'ilink')};e.isEmptyObject=function(t){for(var n in t)if(t.hasOwnProperty(n))return!1;return JSON.stringify(t)===JSON.stringify({})};e.identityPieces=function(){return[{name:'IDENTITY_CARD'},{name:'PASSEPORT'},{name:'OTHER_IDENTITY_PIECE'}]};e.withdrawalMode=function(){return[{name:'WITHDRAWAL_IN_CASH'},{name:'TRANSFER_IN_ACCOUNT'}]};e.typeCaution=function(){return[{name:'GROUP'},{name:'INDIVIDUAL'}]};e.typeEpargne=function(){return[{name:'SIMPLE'},{name:'BLOCKED'}]};e.typeIdIDestinataire=function(){return[{name:'PHONE'},{name:'CODE_WALLET'}]};e.paysDestinationData=function(){return[{name:'Cameroun'},{name:'Gabon'},{name:'Congo'},{name:'S\xe9n\xe9gal'},{name:'C\xf4te d\'Ivoire'}]};e.walletActifData=function(){return[{name:'UBA'},{name:'SOGO'},{name:'Small World'},{name:'UBA fs iLink'},{name:'iLink World'}]};e.inputCardSource=function(){return[{name:'NUMERO_DE_SERIE',value:'serial-number'},{name:'CREDIT_CARD',value:'credit-card'}]};e.transactionHistoryLabel=function(){return[{icon:'inbox-arrow-up',label:'Source'},{icon:'cash',label:'AMOUNT_LABEL'},{icon:'account-arrow-right',label:'DESTINATAIRE'},{icon:'calendar-clock',label:'Date'}]};e.transactionHistoryIlinkLabel=function(){return[{icon:'cash',label:'AMOUNT_LABEL'},{icon:'account-arrow-right',label:'DESTINATAIRE'},{icon:'calendar-clock',label:'DATE'}]};e.nanoCreditHistoryLabel=function(){return[{icon:'inbox-arrow-up',label:'ETAT'},{icon:'cash',label:'AMOUNT_LABEL'},{icon:'calendar-clock',label:'DATE'}]};e.transactionHistoryNanoCreditLabel=function(){return[{icon:'cash',label:'Type'},{icon:'cash',label:'AMOUNT_LABEL'},{icon:'calendar-clock',label:'Date'}]};e.transactionHistoryUser=function(){return[{type:'depot',source:'wallet',montant:1e4,destinataire:'John Doe',date:'2020-05-15'},{type:'retrait',source:'wallet',montant:1e4,destinataire:'John Doe',date:'2020-05-15'}]};e.displayTransactionType=function(t){return(0,n.default)(t,'E')?'SAVING':'NANO_CREDIT'};var p={title:'DEPOSIT_TO_BANK',subTitle:'CHOOSE_OPERATOR',options:[]};e.optionWalletToBank=p;var s={type:'DEPOT',title:'ENVOIE_ARGENT',subTitle:'CHOOSE_OPTION',options:[{screen:l.envoieCashVersWalletAgent,icon:'wallet',title:'DEPOSIT_CASH_TO_WALLET'},{screen:l.envoieCashVersAutreWalletAgent,icon:'cash-refund',title:'DEPOSIT_CASH_TO_OTHER_WALLET'},{screen:l.envoieCashVersCarteAgent,icon:'credit-card',title:'DEPOSIT_CASH_TO_VISA'},{screen:l.envoiCashVersCashAgent,icon:'cash-multiple',title:'DEPOSIT_CASH_TO_CASH'},{screen:l.operateurOptionSelect,icon:'bank-transfer-in',title:'DEPOSIT_CASH_TO_BANK',subScreenOption:p,type:'WALLET_TO_BANK'}]};e.optionDepotScreen=s;var E={type:'RETRAIT',title:'RETRAIT_ARGENT',subTitle:'CHOOSE_OPTION',options:[{screen:l.retraitEnCashAgent,icon:'cash',title:'WITHDRAWAL_IN_CASH'},{screen:l.retraitCarteVersCashAgent,icon:'credit-card',title:'WITHDRAWAL_CARD_TO_CASH_AGENT'}]};e.optionRetraitScreen=E;var T={type:'RETRAIT_USER',title:'RETRAIT_ARGENT',subTitle:'CHOOSE_OPTION',options:[{screen:l.retraitWalletVersCashUser,icon:'wallet',title:'WITHDRAWAL_WALLET_TO_CASH'},{screen:l.retraitCarteVersCashUser,icon:'credit-card-refund',title:'WITHDRAWAL_CARD_TO_CASH'},{screen:l.retraitCarteVersWalletUser,icon:'credit-card',title:'WITHDRAWAL_CARD_TO_WALLET'},{screen:'',icon:'credit-card',title:'WITHDRAWAL_BANK_TO_WALLET'}]};e.optionRetraitUserScreen=T;var u={type:'DEPOT_USER',title:'ENVOIE_ARGENT',subTitle:'CHOOSE_OPTION',options:[{screen:l.envoieWalletToWalletUser,icon:'wallet',title:'DEPOSIT_WALLET_TO_WALLET'},{screen:l.envoieWalletToCashUser,icon:'cash-refund',title:'DEPOSIT_TO_CASH'},{screen:l.envoieWalletToCardUser,icon:'credit-card',title:'DEPOSIT_TO_CARD'},{type:'WALLET_TO_BANK',screen:l.operateurOptionSelect,icon:'bank-transfer-in',title:'DEPOSIT_TO_BANK',subScreenOption:p}]};e.optionDepotUserScreen=u;var A={type:'IDENTIFICATION',title:'IDENTIFICATION',subTitle:'CHOOSE_OPTION',options:[{screen:l.createIdentification,icon:'pencil-plus',title:'CREATION_IDENTIFICATION_DESCRIPTION_SUBSCREEN'},{screen:l.validateIdentification,icon:'check-circle',title:'VALIDATE_IDENTIFICATION_DESCRIPTION'}]};e.optionIdentificationScreen=A;var O={type:'IDENTIFICATION',title:'IDENTIFICATION',subTitle:'CHOOSE_OPTION',options:[{screen:l.createIdentificationUser,icon:'pencil-plus',title:'CREATE_MY_IDENTIFICATION'},{screen:l.modifyIdentificationUser,icon:'pencil',title:'MODIFY_IDENTIFICATION'}]};e.optionIdentificationUserScreen=O;var I={type:'LINK_CARD',title:'LINK_CARD_REATTACH',subTitle:'CHOOSE_OPTION',options:[{screen:l.linkCard,icon:'link',title:'LINK_CARD'},{screen:l.reattachAccountUser,icon:'card',title:'REATTACH_CARD'}]};e.optionLinkAccountUserScreen=I;e.optionNanoSanteUserScreen={type:'NANO_SANTE',title:'NANO_SANTE',subTitle:'CHOOSE_OPTION',options:[{title:'MANAGE_ASSURANCE',options:[{title:'SUBSCRIBE_ASSURANCE',screen:'insuranceSubscriptionScreen',icon:'cash'},{title:'ADD_SUBSCRIBE',screen:'addBeneficiaryScreen',icon:"cash-refund"},{title:'ACTIVATE_INSSURANCE',screen:'activateBuySubscriptionScreen',icon:"cash-refund"},{title:'RENEW_INSSURANCE',screen:'',icon:"cash-refund"},{screen:'deleteBeneficiaryScreen',icon:'cash-register',title:'DELETE_SUBSCRIBE'},{screen:'stopSubscriptionScreen',icon:'cash-multiple',title:'STOP_SUBSCRIBE'}]},{title:'MANAGE_HEALTH',options:[{icon:'account-multiple',title:'DEMAND_AUTORIZATION_HEALTH',screen:'demandeAutorisationSoinScreen'},{title:'HISTORIC_HEALTH',screen:'historiqueNanoSanteUserScreen',icon:'cash'},{title:'VALID_HEALTH',screen:'validateConsultationScreen',icon:'cash'}]}]};var _={type:'NANO_CREDIT',title:'NANO_CREDIT',subTitle:'CHOOSE_OPTION',options:[{icon:'account-multiple',title:'MANAGE_GROUP',screen:l.groupNanoCredit},{title:'DEMAND_NANO_CREDIT',screen:l.askNanoCredit,icon:'cash'},{title:'REFUND_NANO_CREDIT',screen:l.refundNanoCreditUser,icon:"cash-refund"},{screen:l.epargnerArgentUser,icon:'cash-register',title:'SAVE_MONEY'},{screen:l.casserEpargneUser,icon:'cash-multiple',title:'BREAK_EPARGNE'}]};e.optionNanoCreditScreen=_;var N={type:'NANO_CREDIT',title:'NANO_CREDIT',subTitle:'CHOOSE_OPTION',options:[{screen:l.cautionNanoCreditAgent,icon:'cash',title:'CAUTION_CREDIT'}]};e.optionNanoCreditAgentScreen=N;var C={type:'NANO_SANTE',title:'NANO_SANTE',subTitle:'CHOOSE_OPTION',options:[{screen:l.saisirFeuilleSoinScreen,icon:'user-plus',title:'SAISIR_FEUILLE_SOIN'},{screen:l.executerPrescriptionScreen,icon:'edit',title:'EXECUTER_PRESCRIPTION'},{screen:l.modifierFeuilleSoinScreen,icon:'edit',title:'MODIFY_CONSULTATION'},{screen:l.modifierExecutionPrescriptionScreen,icon:'edit',title:'MODIFY_EXECUTION'}]};e.optionNanoSanteAgentScreen=C;var S={title:'PAIEMENT_FACTURE',subTitle:'CHOOSE_OPERATOR',operatorType:'water',options:[{type:'PAIEMENT_EAU',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 1'},{type:'PAIEMENT_EAU',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 2'},{type:'PAIEMENT_EAU',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 3'},{type:'PAIEMENT_EAU',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 4'},{type:'PAIEMENT_EAU',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 5'},{type:'PAIEMENT_EAU',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 6'}]};e.optionPaiementEau=S;var k={title:'PAIEMENT_FACTURE',subTitle:'CHOOSE_OPERATOR',operatorType:'electricity',options:[{type:'PAIEMENT_EAU_ELECTRICITE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 1'},{type:'PAIEMENT_EAU_ELECTRICITE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 2'},{type:'PAIEMENT_EAU_ELECTRICITE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 3'},{type:'PAIEMENT_EAU_ELECTRICITE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 4'},{type:'PAIEMENT_EAU_ELECTRICITE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 5'},{type:'PAIEMENT_EAU_ELECTRICITE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 6'}]};e.optionPaiementElectricite=k;var b={title:'PAIEMENT_FACTURE',subTitle:'CHOOSE_OPERATOR',operatorType:'phone',options:[{type:'PAIEMENT_CREDIT_TELEPHONE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur t\xe9l\xe9phonique 1'},{type:'PAIEMENT_CREDIT_TELEPHONE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur t\xe9l\xe9phonique 2'},{type:'PAIEMENT_CREDIT_TELEPHONE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur t\xe9l\xe9phonique 3'},{type:'PAIEMENT_CREDIT_TELEPHONE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur t\xe9l\xe9phonique 4'},{type:'PAIEMENT_CREDIT_TELEPHONE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur t\xe9l\xe9phonique 5'},{type:'PAIEMENT_CREDIT_TELEPHONE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur t\xe9l\xe9phonique 6'}]};e.optionPaiementCreditTelephonique=b;var R={title:'PAIEMENT_FACTURE',subTitle:'CHOOSE_OPERATOR',operatorType:'tv',options:[{type:'PAIEMENT_ABONNEMENT_TV',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur abonnement TV 1'},{type:'PAIEMENT_ABONNEMENT_TV',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur abonnement TV 2'},{type:'PAIEMENT_ABONNEMENT_TV',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur abonnement TV 3'},{type:'PAIEMENT_ABONNEMENT_TV',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur abonnement TV 4'},{type:'PAIEMENT_ABONNEMENT_TV',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur abonnement TV 5'},{type:'PAIEMENT_ABONNEMENT_TV',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur abonnement TV 6'}]};e.optionPaiementAbonnementTV=R;var P={title:'PAIEMENT_FACTURE',subTitle:'CHOOSE_OPERATOR',operatorType:'school',options:[{type:'PAIEMENT_ECOLE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur \xe9cole 1'},{type:'PAIEMENT_ECOLE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur \xe9cole 2'},{type:'PAIEMENT_ECOLE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur \xe9cole 3'},{type:'PAIEMENT_ECOLE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur \xe9cole 4'},{type:'PAIEMENT_ECOLE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur \xe9cole 5'},{type:'PAIEMENT_ECOLE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur \xe9cole 6'}]};e.optionPaiementEcole=P;var y={type:'FACTURE',title:'PAIEMENT_FACTURE',subTitle:'CHOOSE_OPTION',options:[{type:'FACTURE_WATER_ELECTRICITY',icon:'water',title:'PAIEMENT_EAU',screen:l.operateurOptionSelect,subScreenOption:S},{type:'FACTURE_ELECTRICITY',icon:'water',title:'PAIEMENT_ELECTRICITY',screen:l.operateurOptionSelect,subScreenOption:k},{type:'FACTURE_SCHOOL',icon:'school',title:'PAIEMENT_ECOLE',screen:l.operateurOptionSelect,subScreenOption:P},{type:'FACTURE_PHONE',icon:'phone-classic',title:'PAIEMENT_CREDIT_TELEPHONIQUE',screen:l.operateurOptionSelect,subScreenOption:b},{type:'FACTURE_TV',icon:'television-classic',title:'PAIEMENT_ABONNEMENT_TV',screen:l.operateurOptionSelect,subScreenOption:R}]};e.optionPaiementFacture=y},1658,[1,688,1630,1031,1659,814]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.optionPaiementFacture=e.optionPaiementEcole=e.optionPaiementAbonnementTV=e.optionPaiementCreditTelephonique=e.optionPaiementElectricite=e.optionPaiementEau=e.optionNanoSanteAgentScreen=e.optionNanoCreditAgentScreen=e.optionNanoCreditScreen=e.optionNanoSanteUserScreen=e.optionLinkAccountUserScreen=e.optionIdentificationUserScreen=e.optionIdentificationScreen=e.optionDepotUserScreen=e.optionRetraitUserScreen=e.optionRetraitScreen=e.optionDepotScreen=e.optionWalletToBank=e.displayTransactionType=e.transactionHistoryUser=e.transactionHistoryNanoCreditLabel=e.nanoCreditHistoryLabel=e.transactionHistoryIlinkLabel=e.transactionHistoryLabel=e.inputCardSource=e.walletActifData=e.paysDestinationData=e.typeIdIDestinataire=e.typeEpargne=e.typeCaution=e.withdrawalMode=e.identityPieces=e.isEmptyObject=e.isIlinkWorldWallet=e.displayToast=e.getErrorMsg=e.uppercaseFirstLetter=e.isNormalInteger=e.scaleWithPixel=e.cutStringWithoutDot=e.cutString=e.thousandsSeparators=void 0;var n=t(r(d[1])),o=t(r(d[2])),c=r(d[3]),l=(r(d[4]),r(d[5]));e.thousandsSeparators=function(t){var n=t.toString().split(".");return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),n.join(".")};e.cutString=function(t,n){return null===t?' ':t.slice(0,n)+"..."};e.cutStringWithoutDot=function(t,n){return null===t?' ':""+t.slice(0,n)};e.scaleWithPixel=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1.2;return t*(scaleValue>n?n:scaleValue)};e.isNormalInteger=function(t){return!/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(t)};e.uppercaseFirstLetter=function(t){return t.charAt(0).toUpperCase()+t.slice(1)};e.getErrorMsg=function(t){var n,o,c,l,p;return(null==(n=t.error)?void 0:n.hasOwnProperty('message'))?Array.isArray(null==(o=t.error)?void 0:o.message)?null==(c=t.error)?void 0:c.join('\n'):null==(l=t.error)?void 0:l.error:null==(p=t.error)?void 0:p.error};e.displayToast=function(t){o.default.show(t,{duration:o.default.durations.LONG,position:o.default.positions.BOTTOM,backgroundColor:c.Color.primaryColor,shadow:!0,animation:!0,hideOnPress:!0,delay:0,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){}})};e.isIlinkWorldWallet=function(t){return(0,n.default)(t,'ilink')};e.isEmptyObject=function(t){for(var n in t)if(t.hasOwnProperty(n))return!1;return JSON.stringify(t)===JSON.stringify({})};e.identityPieces=function(){return[{name:'IDENTITY_CARD'},{name:'PASSEPORT'},{name:'OTHER_IDENTITY_PIECE'}]};e.withdrawalMode=function(){return[{name:'WITHDRAWAL_IN_CASH'},{name:'TRANSFER_IN_ACCOUNT'}]};e.typeCaution=function(){return[{name:'GROUP'},{name:'INDIVIDUAL'}]};e.typeEpargne=function(){return[{name:'SIMPLE'},{name:'BLOCKED'}]};e.typeIdIDestinataire=function(){return[{name:'PHONE'},{name:'CODE_WALLET'}]};e.paysDestinationData=function(){return[{name:'Cameroun'},{name:'Gabon'},{name:'Congo'},{name:'S\xe9n\xe9gal'},{name:'C\xf4te d\'Ivoire'}]};e.walletActifData=function(){return[{name:'UBA'},{name:'SOGO'},{name:'Small World'},{name:'UBA fs iLink'},{name:'iLink World'}]};e.inputCardSource=function(){return[{name:'NUMERO_DE_SERIE',value:'serial-number'},{name:'CREDIT_CARD',value:'credit-card'}]};e.transactionHistoryLabel=function(){return[{icon:'inbox-arrow-up',label:'Source'},{icon:'cash',label:'AMOUNT_LABEL'},{icon:'account-arrow-right',label:'DESTINATAIRE'},{icon:'calendar-clock',label:'Date'}]};e.transactionHistoryIlinkLabel=function(){return[{icon:'cash',label:'AMOUNT_LABEL'},{icon:'account-arrow-right',label:'DESTINATAIRE'},{icon:'calendar-clock',label:'DATE'}]};e.nanoCreditHistoryLabel=function(){return[{icon:'inbox-arrow-up',label:'ETAT'},{icon:'cash',label:'AMOUNT_LABEL'},{icon:'calendar-clock',label:'DATE'}]};e.transactionHistoryNanoCreditLabel=function(){return[{icon:'cash',label:'Type'},{icon:'cash',label:'AMOUNT_LABEL'},{icon:'calendar-clock',label:'Date'}]};e.transactionHistoryUser=function(){return[{type:'depot',source:'wallet',montant:1e4,destinataire:'John Doe',date:'2020-05-15'},{type:'retrait',source:'wallet',montant:1e4,destinataire:'John Doe',date:'2020-05-15'}]};e.displayTransactionType=function(t){return(0,n.default)(t,'E')?'SAVING':'NANO_CREDIT'};var p={title:'DEPOSIT_TO_BANK',subTitle:'CHOOSE_OPERATOR',options:[]};e.optionWalletToBank=p;var s={type:'DEPOT',title:'ENVOIE_ARGENT',subTitle:'CHOOSE_OPTION',options:[{screen:l.envoieCashVersWalletAgent,icon:'wallet',title:'DEPOSIT_CASH_TO_WALLET'},{screen:l.envoieCashVersAutreWalletAgent,icon:'cash-refund',title:'DEPOSIT_CASH_TO_OTHER_WALLET'},{screen:l.envoieCashVersCarteAgent,icon:'credit-card',title:'DEPOSIT_CASH_TO_VISA'},{screen:l.envoiCashVersCashAgent,icon:'cash-multiple',title:'DEPOSIT_CASH_TO_CASH'},{screen:l.operateurOptionSelect,icon:'bank-transfer-in',title:'DEPOSIT_CASH_TO_BANK',subScreenOption:p,type:'WALLET_TO_BANK'}]};e.optionDepotScreen=s;var E={type:'RETRAIT',title:'RETRAIT_ARGENT',subTitle:'CHOOSE_OPTION',options:[{screen:l.retraitEnCashAgent,icon:'cash',title:'WITHDRAWAL_IN_CASH'},{screen:l.retraitCarteVersCashAgent,icon:'credit-card',title:'WITHDRAWAL_CARD_TO_CASH_AGENT'}]};e.optionRetraitScreen=E;var T={type:'RETRAIT_USER',title:'RETRAIT_ARGENT',subTitle:'CHOOSE_OPTION',options:[{screen:l.retraitWalletVersCashUser,icon:'wallet',title:'WITHDRAWAL_WALLET_TO_CASH'},{screen:l.retraitCarteVersCashUser,icon:'credit-card-refund',title:'WITHDRAWAL_CARD_TO_CASH'},{screen:l.retraitCarteVersWalletUser,icon:'credit-card',title:'WITHDRAWAL_CARD_TO_WALLET'},{screen:'',icon:'credit-card',title:'WITHDRAWAL_BANK_TO_WALLET'}]};e.optionRetraitUserScreen=T;var u={type:'DEPOT_USER',title:'ENVOIE_ARGENT',subTitle:'CHOOSE_OPTION',options:[{screen:l.envoieWalletToWalletUser,icon:'wallet',title:'DEPOSIT_WALLET_TO_WALLET'},{screen:l.envoieWalletToCashUser,icon:'cash-refund',title:'DEPOSIT_TO_CASH'},{screen:l.envoieWalletToCardUser,icon:'credit-card',title:'DEPOSIT_TO_CARD'},{type:'WALLET_TO_BANK',screen:l.operateurOptionSelect,icon:'bank-transfer-in',title:'DEPOSIT_TO_BANK',subScreenOption:p}]};e.optionDepotUserScreen=u;var A={type:'IDENTIFICATION',title:'IDENTIFICATION',subTitle:'CHOOSE_OPTION',options:[{screen:l.createIdentification,icon:'pencil-plus',title:'CREATION_IDENTIFICATION_DESCRIPTION_SUBSCREEN'},{screen:l.validateIdentification,icon:'check-circle',title:'VALIDATE_IDENTIFICATION_DESCRIPTION'}]};e.optionIdentificationScreen=A;var O={type:'IDENTIFICATION',title:'IDENTIFICATION',subTitle:'CHOOSE_OPTION',options:[{screen:l.createIdentificationUser,icon:'pencil-plus',title:'CREATE_MY_IDENTIFICATION'},{screen:l.modifyIdentificationUser,icon:'pencil',title:'MODIFY_IDENTIFICATION'}]};e.optionIdentificationUserScreen=O;var I={type:'LINK_CARD',title:'LINK_CARD_REATTACH',subTitle:'CHOOSE_OPTION',options:[{screen:l.linkCard,icon:'link',title:'LINK_CARD'},{screen:l.reattachAccountUser,icon:'card',title:'REATTACH_CARD'}]};e.optionLinkAccountUserScreen=I;e.optionNanoSanteUserScreen={type:'NANO_SANTE',title:'NANO_SANTE',subTitle:'CHOOSE_OPTION',options:[{title:'MANAGE_ASSURANCE',options:[{title:'SUBSCRIBE_ASSURANCE',screen:'insuranceSubscriptionScreen',icon:'cash'},{title:'ADD_SUBSCRIBE',screen:'addBeneficiaryScreen',icon:"cash-refund"},{title:'ACTIVATE_INSSURANCE',screen:'activateBuySubscriptionScreen',icon:"cash-refund"},{title:'RENEW_INSSURANCE',screen:'renewAssuranceScreen',icon:"cash-refund"},{screen:'deleteBeneficiaryScreen',icon:'cash-register',title:'DELETE_SUBSCRIBE'},{screen:'stopSubscriptionScreen',icon:'cash-multiple',title:'STOP_SUBSCRIBE'}]},{title:'MANAGE_HEALTH',options:[{icon:'account-multiple',title:'DEMAND_AUTORIZATION_HEALTH',screen:'demandeAutorisationSoinScreen'},{title:'HISTORIC_HEALTH',screen:'historiqueNanoSanteUserScreen',icon:'cash'},{title:'VALID_HEALTH',screen:'validateConsultationScreen',icon:'cash'}]}]};var _={type:'NANO_CREDIT',title:'NANO_CREDIT',subTitle:'CHOOSE_OPTION',options:[{icon:'account-multiple',title:'MANAGE_GROUP',screen:l.groupNanoCredit},{title:'DEMAND_NANO_CREDIT',screen:l.askNanoCredit,icon:'cash'},{title:'REFUND_NANO_CREDIT',screen:l.refundNanoCreditUser,icon:"cash-refund"},{screen:l.epargnerArgentUser,icon:'cash-register',title:'SAVE_MONEY'},{screen:l.casserEpargneUser,icon:'cash-multiple',title:'BREAK_EPARGNE'}]};e.optionNanoCreditScreen=_;var N={type:'NANO_CREDIT',title:'NANO_CREDIT',subTitle:'CHOOSE_OPTION',options:[{screen:l.cautionNanoCreditAgent,icon:'cash',title:'CAUTION_CREDIT'}]};e.optionNanoCreditAgentScreen=N;var C={type:'NANO_SANTE',title:'NANO_SANTE',subTitle:'CHOOSE_OPTION',options:[{screen:l.saisirFeuilleSoinScreen,icon:'user-plus',title:'SAISIR_FEUILLE_SOIN'},{screen:l.executerPrescriptionScreen,icon:'edit',title:'EXECUTER_PRESCRIPTION'},{screen:l.modifierFeuilleSoinScreen,icon:'edit',title:'MODIFY_CONSULTATION'},{screen:l.modifierExecutionPrescriptionScreen,icon:'edit',title:'MODIFY_EXECUTION'}]};e.optionNanoSanteAgentScreen=C;var S={title:'PAIEMENT_FACTURE',subTitle:'CHOOSE_OPERATOR',operatorType:'water',options:[{type:'PAIEMENT_EAU',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 1'},{type:'PAIEMENT_EAU',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 2'},{type:'PAIEMENT_EAU',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 3'},{type:'PAIEMENT_EAU',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 4'},{type:'PAIEMENT_EAU',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 5'},{type:'PAIEMENT_EAU',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 6'}]};e.optionPaiementEau=S;var k={title:'PAIEMENT_FACTURE',subTitle:'CHOOSE_OPERATOR',operatorType:'electricity',options:[{type:'PAIEMENT_EAU_ELECTRICITE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 1'},{type:'PAIEMENT_EAU_ELECTRICITE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 2'},{type:'PAIEMENT_EAU_ELECTRICITE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 3'},{type:'PAIEMENT_EAU_ELECTRICITE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 4'},{type:'PAIEMENT_EAU_ELECTRICITE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 5'},{type:'PAIEMENT_EAU_ELECTRICITE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur eau-\xe9lectricit\xe9 6'}]};e.optionPaiementElectricite=k;var b={title:'PAIEMENT_FACTURE',subTitle:'CHOOSE_OPERATOR',operatorType:'phone',options:[{type:'PAIEMENT_CREDIT_TELEPHONE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur t\xe9l\xe9phonique 1'},{type:'PAIEMENT_CREDIT_TELEPHONE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur t\xe9l\xe9phonique 2'},{type:'PAIEMENT_CREDIT_TELEPHONE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur t\xe9l\xe9phonique 3'},{type:'PAIEMENT_CREDIT_TELEPHONE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur t\xe9l\xe9phonique 4'},{type:'PAIEMENT_CREDIT_TELEPHONE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur t\xe9l\xe9phonique 5'},{type:'PAIEMENT_CREDIT_TELEPHONE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur t\xe9l\xe9phonique 6'}]};e.optionPaiementCreditTelephonique=b;var R={title:'PAIEMENT_FACTURE',subTitle:'CHOOSE_OPERATOR',operatorType:'tv',options:[{type:'PAIEMENT_ABONNEMENT_TV',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur abonnement TV 1'},{type:'PAIEMENT_ABONNEMENT_TV',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur abonnement TV 2'},{type:'PAIEMENT_ABONNEMENT_TV',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur abonnement TV 3'},{type:'PAIEMENT_ABONNEMENT_TV',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur abonnement TV 4'},{type:'PAIEMENT_ABONNEMENT_TV',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur abonnement TV 5'},{type:'PAIEMENT_ABONNEMENT_TV',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur abonnement TV 6'}]};e.optionPaiementAbonnementTV=R;var P={title:'PAIEMENT_FACTURE',subTitle:'CHOOSE_OPERATOR',operatorType:'school',options:[{type:'PAIEMENT_ECOLE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur \xe9cole 1'},{type:'PAIEMENT_ECOLE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur \xe9cole 2'},{type:'PAIEMENT_ECOLE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur \xe9cole 3'},{type:'PAIEMENT_ECOLE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur \xe9cole 4'},{type:'PAIEMENT_ECOLE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur \xe9cole 5'},{type:'PAIEMENT_ECOLE',screen:l.paiementFacture,icon:'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',title:'Op\xe9rateur \xe9cole 6'}]};e.optionPaiementEcole=P;var y={type:'FACTURE',title:'PAIEMENT_FACTURE',subTitle:'CHOOSE_OPTION',options:[{type:'FACTURE_WATER_ELECTRICITY',icon:'water',title:'PAIEMENT_EAU',screen:l.operateurOptionSelect,subScreenOption:S},{type:'FACTURE_ELECTRICITY',icon:'water',title:'PAIEMENT_ELECTRICITY',screen:l.operateurOptionSelect,subScreenOption:k},{type:'FACTURE_SCHOOL',icon:'school',title:'PAIEMENT_ECOLE',screen:l.operateurOptionSelect,subScreenOption:P},{type:'FACTURE_PHONE',icon:'phone-classic',title:'PAIEMENT_CREDIT_TELEPHONIQUE',screen:l.operateurOptionSelect,subScreenOption:b},{type:'FACTURE_TV',icon:'television-classic',title:'PAIEMENT_ABONNEMENT_TV',screen:l.operateurOptionSelect,subScreenOption:R}]};e.optionPaiementFacture=y},1658,[1,688,1630,1031,1659,814]); __d(function(g,r,i,a,m,e,d){var n,o;n=this,o=function(){var n=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xa2":"cent","\xa3":"pound","\xa4":"currency","\xa5":"yen","\xa9":"(c)","\xaa":"a","\xae":"(r)","\xba":"o","\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xc6":"AE","\xc7":"C","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xd0":"D","\xd1":"N","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xdd":"Y","\xde":"TH","\xdf":"ss","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xe6":"ae","\xe7":"c","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xf0":"d","\xf1":"n","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xfd":"y","\xfe":"th","\xff":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010c":"C","\u010d":"c","\u010e":"D","\u010f":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011a":"E","\u011b":"e","\u011e":"G","\u011f":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012a":"i","\u012b":"i","\u012e":"I","\u012f":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013b":"L","\u013c":"l","\u013d":"L","\u013e":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015a":"S","\u015b":"s","\u015e":"S","\u015f":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016a":"u","\u016b":"u","\u016e":"U","\u016f":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017a":"z","\u017b":"Z","\u017c":"z","\u017d":"Z","\u017e":"z","\u0192":"f","\u01a0":"O","\u01a1":"o","\u01af":"U","\u01b0":"u","\u01c8":"LJ","\u01c9":"lj","\u01cb":"NJ","\u01cc":"nj","\u0218":"S","\u0219":"s","\u021a":"T","\u021b":"t","\u02da":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038a":"I","\u038c":"O","\u038e":"Y","\u038f":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039a":"K","\u039b":"L","\u039c":"M","\u039d":"N","\u039e":"3","\u039f":"O","\u03a0":"P","\u03a1":"R","\u03a3":"S","\u03a4":"T","\u03a5":"Y","\u03a6":"F","\u03a7":"X","\u03a8":"PS","\u03a9":"W","\u03aa":"I","\u03ab":"Y","\u03ac":"a","\u03ad":"e","\u03ae":"h","\u03af":"i","\u03b0":"y","\u03b1":"a","\u03b2":"b","\u03b3":"g","\u03b4":"d","\u03b5":"e","\u03b6":"z","\u03b7":"h","\u03b8":"8","\u03b9":"i","\u03ba":"k","\u03bb":"l","\u03bc":"m","\u03bd":"n","\u03be":"3","\u03bf":"o","\u03c0":"p","\u03c1":"r","\u03c2":"s","\u03c3":"s","\u03c4":"t","\u03c5":"y","\u03c6":"f","\u03c7":"x","\u03c8":"ps","\u03c9":"w","\u03ca":"i","\u03cb":"y","\u03cc":"o","\u03cd":"y","\u03ce":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040a":"NJ","\u040b":"C","\u040f":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041a":"K","\u041b":"L","\u041c":"M","\u041d":"N","\u041e":"O","\u041f":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042a":"U","\u042b":"Y","\u042c":"","\u042d":"E","\u042e":"Yu","\u042f":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043a":"k","\u043b":"l","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044a":"u","\u044b":"y","\u044c":"","\u044d":"e","\u044e":"yu","\u044f":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045a":"nj","\u045b":"c","\u045d":"u","\u045f":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049a":"KH","\u049b":"kh","\u04a2":"NG","\u04a3":"ng","\u04ae":"UE","\u04af":"ue","\u04b0":"U","\u04b1":"u","\u04ba":"H","\u04bb":"h","\u04d8":"AE","\u04d9":"ae","\u04e8":"OE","\u04e9":"oe","\u0e3f":"baht","\u10d0":"a","\u10d1":"b","\u10d2":"g","\u10d3":"d","\u10d4":"e","\u10d5":"v","\u10d6":"z","\u10d7":"t","\u10d8":"i","\u10d9":"k","\u10da":"l","\u10db":"m","\u10dc":"n","\u10dd":"o","\u10de":"p","\u10df":"zh","\u10e0":"r","\u10e1":"s","\u10e2":"t","\u10e3":"u","\u10e4":"f","\u10e5":"k","\u10e6":"gh","\u10e7":"q","\u10e8":"sh","\u10e9":"ch","\u10ea":"ts","\u10eb":"dz","\u10ec":"ts","\u10ed":"ch","\u10ee":"kh","\u10ef":"j","\u10f0":"h","\u1e80":"W","\u1e81":"w","\u1e82":"W","\u1e83":"w","\u1e84":"W","\u1e85":"w","\u1e9e":"SS","\u1ea0":"A","\u1ea1":"a","\u1ea2":"A","\u1ea3":"a","\u1ea4":"A","\u1ea5":"a","\u1ea6":"A","\u1ea7":"a","\u1ea8":"A","\u1ea9":"a","\u1eaa":"A","\u1eab":"a","\u1eac":"A","\u1ead":"a","\u1eae":"A","\u1eaf":"a","\u1eb0":"A","\u1eb1":"a","\u1eb2":"A","\u1eb3":"a","\u1eb4":"A","\u1eb5":"a","\u1eb6":"A","\u1eb7":"a","\u1eb8":"E","\u1eb9":"e","\u1eba":"E","\u1ebb":"e","\u1ebc":"E","\u1ebd":"e","\u1ebe":"E","\u1ebf":"e","\u1ec0":"E","\u1ec1":"e","\u1ec2":"E","\u1ec3":"e","\u1ec4":"E","\u1ec5":"e","\u1ec6":"E","\u1ec7":"e","\u1ec8":"I","\u1ec9":"i","\u1eca":"I","\u1ecb":"i","\u1ecc":"O","\u1ecd":"o","\u1ece":"O","\u1ecf":"o","\u1ed0":"O","\u1ed1":"o","\u1ed2":"O","\u1ed3":"o","\u1ed4":"O","\u1ed5":"o","\u1ed6":"O","\u1ed7":"o","\u1ed8":"O","\u1ed9":"o","\u1eda":"O","\u1edb":"o","\u1edc":"O","\u1edd":"o","\u1ede":"O","\u1edf":"o","\u1ee0":"O","\u1ee1":"o","\u1ee2":"O","\u1ee3":"o","\u1ee4":"U","\u1ee5":"u","\u1ee6":"U","\u1ee7":"u","\u1ee8":"U","\u1ee9":"u","\u1eea":"U","\u1eeb":"u","\u1eec":"U","\u1eed":"u","\u1eee":"U","\u1eef":"u","\u1ef0":"U","\u1ef1":"u","\u1ef2":"Y","\u1ef3":"y","\u1ef4":"Y","\u1ef5":"y","\u1ef6":"Y","\u1ef7":"y","\u1ef8":"Y","\u1ef9":"y","\u2018":"\'","\u2019":"\'","\u201c":"\\"","\u201d":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20a0":"ecu","\u20a2":"cruzeiro","\u20a3":"french franc","\u20a4":"lira","\u20a5":"mill","\u20a6":"naira","\u20a7":"peseta","\u20a8":"rupee","\u20a9":"won","\u20aa":"new shequel","\u20ab":"dong","\u20ac":"euro","\u20ad":"kip","\u20ae":"tugrik","\u20af":"drachma","\u20b0":"penny","\u20b1":"peso","\u20b2":"guarani","\u20b3":"austral","\u20b4":"hryvnia","\u20b5":"cedi","\u20b8":"kazakhstani tenge","\u20b9":"indian rupee","\u20bd":"russian ruble","\u20bf":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221e":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\ufdfc":"rial"}'),o=JSON.parse('{"vi":{"\u0110":"D","\u0111":"d"}}');function t(t,u){if('string'!=typeof t)throw new Error('slugify: string argument expected');var s=o[(u='string'==typeof u?{replacement:u}:u||{}).locale]||{},c=u.replacement||'-',l=t.split('').reduce(function(o,t){return o+(s[t]||n[t]||t)},'').replace(u.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,'').trim().replace(new RegExp('[\\s'+c+']+','g'),c);return u.lower&&(l=l.toLowerCase()),u.strict&&(l=l.replace(new RegExp('[^a-zA-Z0-9'+c+']','g'),'')),l}return t.extend=function(o){for(var t in o)n[t]=o[t]},t},'object'==typeof e?(m.exports=o(),m.exports.default=o()):'function'==typeof define&&define.amd?define(o):n.slugify=o()},1659,[]); __d(function(g,r,i,a,m,e,d){'use strict';m.exports=function(t,n){var c=((t||0===t?t:'')+'').split('.');return c.length&&(c[0]=c[0].replace(/(\d)(?=(\d{3})+\b)/g,'$1'+(n||','))),c.join('.')}},1660,[]); __d(function(a,i,k,r,t,o,n){t.exports={v:"4.7.0",fr:25,ip:0,op:50,w:120,h:120,nm:"Comp 1",ddd:0,assets:[],layers:[{ddd:0,ind:1,ty:4,nm:"ruoi",ks:{o:{a:1,k:[{i:{x:[.833],y:[.967]},o:{x:[.167],y:[.033]},n:["0p833_0p967_0p167_0p033"],t:35,s:[100],e:[0]},{t:49}]},r:{a:0,k:0},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:0,y:0},n:"0p833_0p833_0_0",t:0,s:[57.361,61.016,0],e:[57.699,41.796,0],to:[-4.67500305175781,-4.12800598144531,0],ti:[-13.9099960327148,5.27300262451172,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},n:"0p833_0p833_0p167_0p167",t:10.219,s:[57.699,41.796,0],e:[79.084,33.982,0],to:[12.8159942626953,-4.85800170898438,0],ti:[-4.54498291015625,3.73400115966797,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},n:"0p833_0p833_0p167_0p167",t:19.445,s:[79.084,33.982,0],e:[59.691,9.121,0],to:[6.61601257324219,-5.43799591064453,0],ti:[20.0290069580078,1.20700073242188,0]},{t:35}]},a:{a:0,k:[60.531,10.945,0]},s:{a:0,k:[100,100,100]}},ao:0,shapes:[{ty:"gr",it:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-.994,0],[0,-.994],[.995,0],[0,.994]],o:[[.995,0],[0,.994],[-.994,0],[0,-.994]],v:[[-.001,-1.801],[1.801,-.001],[-.001,1.801],[-1.801,-.001]],c:!0}},nm:"Path 1",mn:"ADBE Vector Shape - Group"},{ty:"fl",c:{a:0,k:[.529,.529,.529,1]},o:{a:0,k:100},r:1,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill"},{ty:"tr",p:{a:0,k:[62.4,13.144],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 1",np:2,cix:2,ix:1,mn:"ADBE Vector Group"},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-1.422,0],[0,-1.422],[1.421,0],[0,1.422]],o:[[1.421,0],[0,1.422],[-1.422,0],[0,-1.422]],v:[[.001,-2.574],[2.574,0],[.001,2.574],[-2.574,0]],c:!0}},nm:"Path 1",mn:"ADBE Vector Shape - Group"},{ty:"st",c:{a:0,k:[.529,.529,.529,1]},o:{a:0,k:100},w:{a:0,k:.7},lc:1,lj:1,ml:10,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke"},{ty:"fl",c:{a:0,k:[1,1,1,1]},o:{a:0,k:100},r:1,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill"},{ty:"tr",p:{a:0,k:[64.145,9.606],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 2",np:3,cix:2,ix:2,mn:"ADBE Vector Group"},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-1.996,0],[0,-1.996],[1.996,0],[0,1.996]],o:[[1.996,0],[0,1.996],[-1.996,0],[0,-1.996]],v:[[0,-3.614],[3.614,0],[0,3.614],[-3.614,0]],c:!0}},nm:"Path 1",mn:"ADBE Vector Shape - Group"},{ty:"st",c:{a:0,k:[.529,.529,.529,1]},o:{a:0,k:100},w:{a:0,k:.7},lc:1,lj:1,ml:10,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke"},{ty:"fl",c:{a:0,k:[1,1,1,1]},o:{a:0,k:100},r:1,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill"},{ty:"tr",p:{a:0,k:[57.957,10.552],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 3",np:3,cix:2,ix:3,mn:"ADBE Vector Group"},{ty:"tr",p:{a:0,k:[60.531,10.941],ix:2},a:{a:0,k:[60.531,10.941],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"ruoi",np:3,cix:2,ix:1,mn:"ADBE Vector Group"}],ip:0,op:50,st:0,bm:0,sr:1},{ddd:0,ind:2,ty:4,nm:"Shape Layer 2",ks:{o:{a:1,k:[{i:{x:[.833],y:[.967]},o:{x:[.167],y:[.033]},n:["0p833_0p967_0p167_0p033"],t:35,s:[100],e:[0]},{t:49}]},r:{a:0,k:0},p:{a:0,k:[-.75,-.75,0]},a:{a:0,k:[0,0,0]},s:{a:0,k:[100,100,100]}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[-13.91,5.273],[-4.545,3.734],[20.029,1.207]],o:[[-4.675,-4.128],[12.816,-4.858],[6.616,-5.438],[0,0]],v:[[-7.383,24.76],[-7.046,5.54],[14.34,-2.273],[-3.178,-24.76]],c:!1}},nm:"Path 1",mn:"ADBE Vector Shape - Group"},{ty:"st",c:{a:0,k:[.627,.627,.627,1]},o:{a:0,k:100},w:{a:0,k:1},lc:2,lj:2,d:[{n:"d",nm:"dash",v:{a:0,k:2.028}},{n:"g",nm:"gap",v:{a:0,k:2.028}},{n:"o",nm:"offset",v:{a:0,k:0}}],nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke"},{ty:"tr",p:{a:0,k:[67.87,37.631],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,ix:1,mn:"ADBE Vector Group"},{ty:"tm",s:{a:0,k:0,ix:1},e:{a:1,k:[{i:{x:[.833],y:[.953]},o:{x:[.167],y:[.033]},n:["0p833_0p953_0p167_0p033"],t:0,s:[0],e:[100]},{t:35}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim"}],ip:0,op:50,st:0,bm:0,sr:1},{ddd:0,ind:3,ty:4,nm:"im_emptyBox Outlines",ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[60,60,0]},a:{a:0,k:[60,60,0]},s:{a:0,k:[100,100,100]}},ao:0,shapes:[{ty:"gr",it:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-.001,-16.607],[-32.143,-.002],[-.001,16.607],[32.144,-.002]],c:!0}},nm:"Path 1",mn:"ADBE Vector Shape - Group"},{ty:"fl",c:{a:0,k:[.8,.82,.851,1]},o:{a:0,k:100},r:1,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill"},{ty:"tr",p:{a:0,k:[60,55.75],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,ix:1,mn:"ADBE Vector Group"},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[12.856,-23.249],[0,-16.605],[-12.857,-23.249],[-45,-6.641],[-32.144,.001],[-45,6.645],[-12.857,23.249],[0,16.609],[12.856,23.249],[45,6.645],[32.143,.001],[45,-6.641]],c:!0}},nm:"Path 1",mn:"ADBE Vector Shape - Group"},{ty:"fl",c:{a:0,k:[.957,.957,.957,1]},o:{a:0,k:100},r:1,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill"},{ty:"tr",p:{a:0,k:[60,55.748],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 8",np:2,cix:2,ix:2,mn:"ADBE Vector Group"},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-16.072,24.171],[16.072,11.312],[16.072,-24.171],[-16.072,-24.171]],c:!0}},nm:"Path 1",mn:"ADBE Vector Shape - Group"},{ty:"fl",c:{a:0,k:[.902,.914,.929,1]},o:{a:0,k:100},r:1,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill"},{ty:"tr",p:{a:0,k:[76.072,83.33],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,ix:3,mn:"ADBE Vector Group"},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[-32.143,-24.171],[-32.143,11.311],[-.001,24.171],[32.144,11.311],[32.144,-24.171]],c:!0}},nm:"Path 1",mn:"ADBE Vector Shape - Group"},{ty:"fl",c:{a:0,k:[.8,.82,.851,1]},o:{a:0,k:100},r:1,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill"},{ty:"tr",p:{a:0,k:[60,83.33],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,ix:4,mn:"ADBE Vector Group"},{ty:"tr",p:{a:0,k:[60,60.186],ix:2},a:{a:0,k:[60,60.186],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"box",np:4,cix:2,ix:1,mn:"ADBE Vector Group"}],ip:0,op:50,st:0,bm:0,sr:1}]}},1661,[]); @@ -1782,7 +1782,7 @@ __d(function(g,r,i,a,m,e,d){var t=r(d[0]),l=r(d[1]);Object.defineProperty(e,"__e __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.getNanoCreditUserHistoryReset=e.getNanoCreditUserHistoryAction=e.getNanoCreditAccountReset=e.getNanoCreditAccountAction=e.casserEpargneUserReset=e.casserEpargneUserAction=e.epargnerArgentUserReset=e.epargnerArgentUserAction=e.refundCreditDemandUserReset=e.refundCreditDemandUserAction=e.getUserGroupDetailReset=e.getUserGroupDetailAction=e.getNanoCreditUniqueDemandsReset=e.getNanoCreditUniqueDemandsAction=e.getNanoCreditDemandsReset=e.getNanoCreditDemandsAction=void 0;var n=t(r(d[1])),o=t(r(d[2])),s=r(d[3]),c=r(d[4]),u=r(d[5]);e.getNanoCreditDemandsAction=function(t){var f=s.store.getState().authKeyReducer,h=null!==f?f.authKey.token_type+" "+f.authKey.access_token:'';return function(s){s((0,c.fetchGetDemandsGroupPending)()),(0,n.default)({url:u.getCreditDemand+"/all/"+t,method:'GET',headers:{Authorization:h,'X-Localization':o.default.currentLocale()}}).then(function(t){console.log(t),s((0,c.fetchGetDemandsGroupSuccess)(t))}).catch(function(t){t.response?s((0,c.fetchGetDemandsGroupError)(t.response)):t.request?s((0,c.fetchGetDemandsGroupError)(t.request)):s((0,c.fetchGetDemandsGroupError)(t.message))})}};e.getNanoCreditDemandsReset=function(){return function(t){t((0,c.fetchGetDemandsGroupReset)())}};e.getNanoCreditUniqueDemandsAction=function(t){var f=s.store.getState().authKeyReducer,h=null!==f&&null!==f.authKey?f.authKey.token_type+" "+f.authKey.access_token:'';return function(s){s((0,c.fetchGetUniqueDemandsGroupPending)()),(0,n.default)({url:u.getCreditDemand+"/"+t,method:'GET',headers:{Authorization:h,'X-Localization':o.default.currentLocale()}}).then(function(t){console.log(t),s((0,c.fetchGetUniqueDemandsGroupSuccess)(t))}).catch(function(t){t.response?s((0,c.fetchGetUniqueDemandsGroupError)(t.response)):t.request?s((0,c.fetchGetUniqueDemandsGroupError)(t.request)):s((0,c.fetchGetUniqueDemandsGroupError)(t.message))})}};e.getNanoCreditUniqueDemandsReset=function(){return function(t){t((0,c.fetchGetUniqueDemandsGroupReset)())}};e.getUserGroupDetailAction=function(t){var f=s.store.getState().authKeyReducer,h=null!==f?f.authKey.token_type+" "+f.authKey.access_token:'';return function(s){s((0,c.fetchGetUserGroupDetailPending)()),(0,n.default)({url:u.groupUrl+"/my/"+t,method:'GET',headers:{Authorization:h,'X-Localization':o.default.currentLocale()}}).then(function(t){console.log(t),s((0,c.fetchGetUserGroupDetailSuccess)(t))}).catch(function(t){t.response?s((0,c.fetchGetUserGroupDetailError)(t.response)):t.request?s((0,c.fetchGetUserGroupDetailError)(t.request)):s((0,c.fetchGetUserGroupDetailError)(t.message))})}};e.getUserGroupDetailReset=function(){return function(t){t((0,c.fetchGetUserGroupDetailReset)())}};e.refundCreditDemandUserAction=function(t){var f=s.store.getState().authKeyReducer,h=null!==f?f.authKey.token_type+" "+f.authKey.access_token:'';return function(s){s((0,c.fetchCautionCreditDemandUserPending)()),(0,n.default)({url:u.refundCreditDemandUrl,method:'POST',data:t,headers:{Authorization:h,'X-Localization':o.default.currentLocale()}}).then(function(t){console.log(t),s((0,c.fetchCautionCreditDemandUserSuccess)(t))}).catch(function(t){t.response?s((0,c.fetchCautionCreditDemandUserError)(t.response)):t.request?s((0,c.fetchCautionCreditDemandUserError)(t.request)):s((0,c.fetchCautionCreditDemandUserError)(t.message))})}};e.refundCreditDemandUserReset=function(){return function(t){t((0,c.fetchCautionCreditDemandUserReset)())}};e.epargnerArgentUserAction=function(t){var f=s.store.getState().authKeyReducer,h=null!==f?f.authKey.token_type+" "+f.authKey.access_token:'';return function(s){s((0,c.fetchEpargnerArgentUserPending)()),(0,n.default)({url:u.epargnerArgentUrl,method:'POST',data:t,headers:{Authorization:h,'X-Localization':o.default.currentLocale()}}).then(function(t){console.log(t),s((0,c.fetchEpargnerArgentUserSuccess)(t))}).catch(function(t){t.response?s((0,c.fetchEpargnerArgentUserError)(t.response)):t.request?s((0,c.fetchEpargnerArgentUserError)(t.request)):s((0,c.fetchEpargnerArgentUserError)(t.message))})}};e.epargnerArgentUserReset=function(){return function(t){t((0,c.fetchEpargnerArgentUserReset)())}};e.casserEpargneUserAction=function(t){var f=s.store.getState().authKeyReducer,h=null!==f?f.authKey.token_type+" "+f.authKey.access_token:'';return function(s){s((0,c.fetchCasserEpargneUserPending)()),(0,n.default)({url:u.casserEpargneUrl,method:'POST',data:t,headers:{Authorization:h,'X-Localization':o.default.currentLocale()}}).then(function(t){console.log(t),s((0,c.fetchCasserEpargneUserSuccess)(t))}).catch(function(t){t.response?s((0,c.fetchCasserEpargneUserError)(t.response)):t.request?s((0,c.fetchCasserEpargneUserError)(t.request)):s((0,c.fetchCasserEpargneUserError)(t.message))})}};e.casserEpargneUserReset=function(){return function(t){t((0,c.fetchCasserEpargneUserReset)())}};e.getNanoCreditAccountAction=function(t){var f=s.store.getState().authKeyReducer,h=null!==f?f.authKey.token_type+" "+f.authKey.access_token:'';return function(s){s((0,c.fetchGetNanoCreditUserAccountPending)()),(0,n.default)({url:u.getNanoCreditAccount+"/"+t,method:'GET',headers:{Authorization:h,'X-Localization':o.default.currentLocale()}}).then(function(t){console.log(t),s((0,c.fetchGetNanoCreditUserAccountSuccess)(t))}).catch(function(t){t.response?s((0,c.fetchGetNanoCreditUserAccountError)(t.response)):t.request?s((0,c.fetchGetNanoCreditUserAccountError)(t.request)):s((0,c.fetchGetNanoCreditUserAccountError)(t.message))})}};e.getNanoCreditAccountReset=function(){return function(t){t((0,c.fetchGetNanoCreditUserAccountReset)())}};e.getNanoCreditUserHistoryAction=function(t,f){var h=s.store.getState().authKeyReducer,l=null!==h?h.authKey.token_type+" "+h.authKey.access_token:'';return function(s){s((0,c.fetchGetNanoCreditUserHistoryPending)()),(0,n.default)({url:(f?u.getNanoCreditUserHistoryUrl:u.getNanoCreditAgentHistoryUrl)+"/"+t,method:'GET',headers:{Authorization:l,'X-Localization':o.default.currentLocale()}}).then(function(t){console.log(t),s((0,c.fetchGetNanoCreditUserHistorySuccess)(t))}).catch(function(t){t.response?s((0,c.fetchGetNanoCreditUserHistoryError)(t.response)):t.request?s((0,c.fetchGetNanoCreditUserHistoryError)(t.request)):s((0,c.fetchGetNanoCreditUserHistoryError)(t.message))})}};e.getNanoCreditUserHistoryReset=function(){return function(t){t((0,c.fetchGetNanoCreditUserHistoryReset)())}}},1776,[1,1081,719,1107,1188,743]); __d(function(g,r,i,a,m,e,d){var n=r(d[0]),t=r(d[1]),o=r(d[2]),u=Math.ceil,f=Math.max;m.exports=function(l,v,c){v=(c?t(l,v,c):void 0===v)?1:f(o(v),0);var h=null==l?0:l.length;if(!h||v<1)return[];for(var x=0,M=0,_=Array(u(h/v));x1&&void 0!==arguments[1]?arguments[1]:'';return(0,o.ApiAction)({url:c.getInsuranceListUrl+"/networks?country_id="+t+n,method:'GET',onLoading:u,onSuccess:s,onError:f})};e.fetchGetListInsuranceWithBeneficiaries=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'';return(0,o.ApiAction)({url:""+c.getInsuranceListUrl+t,method:'GET',onLoading:u,onSuccess:s,onError:f})};var E=function(){return{type:n.default.SUBSCRIBE_INSURANCE_PENDING}};e.fetchSubscribeInsurancePending=E;e.fetchSubscribeInsuranceReset=function(){return{type:n.default.SUBSCRIBE_INSURANCE_RESET}};var S=function(t){return{type:n.default.SUBSCRIBE_INSURANCE_SUCCESS,payload:t}};e.fetchSubscribeInsuranceSuccess=S;var l=function(t){return{type:n.default.SUBSCRIBE_INSURANCE_ERROR,payload:t}};e.fetchSubscribeInsuranceError=l;e.fetchSubscribeInsurance=function(t){return(0,o.ApiAction)({url:c.subscribeInsuranceUrl,data:t,method:'POST',onLoading:E,onSuccess:S,onError:l})};var R=function(){return{type:n.default.GET_INSURANCE_PRIME_AMOUNT_PENDING}};e.fetchGetInsurancePrimeAmountPending=R;e.fetchGetInsurancePrimeAmountReset=function(){return{type:n.default.GET_INSURANCE_PRIME_AMOUNT_RESET}};var _=function(t){return{type:n.default.GET_INSURANCE_PRIME_AMOUNT_SUCCESS,payload:t}};e.fetchGetInsurancePrimeAmountSuccess=_;var p=function(t){return{type:n.default.GET_INSURANCE_PRIME_AMOUNT_ERROR,payload:t}};e.fetchGetInsurancePrimeAmountError=p;e.fetchGetInsurancePrimeAmount=function(t){return(0,o.ApiAction)({url:c.getInsurancePrimeAmountUrl,data:t,method:'POST',onLoading:R,onSuccess:_,onError:p})};var A=function(){return{type:n.default.UPLOAD_INSURANCE_IMAGES_PENDING}};e.fetchUploadInsurancePending=A;e.fetchUploadInsuranceReset=function(){return{type:n.default.UPLOAD_INSURANCE_IMAGES_RESET}};var h=function(t){return{type:n.default.UPLOAD_INSURANCE_IMAGES_SUCCESS,payload:t}};e.fetchUploadInsuranceSuccess=h;var I=function(t){return{type:n.default.UPLOAD_INSURANCE_IMAGES_ERROR,payload:t}};e.fetchUploadInsuranceError=I;e.fetchUploadInsurance=function(t){return(0,o.ApiAction)({url:c.uploadInsuranceImagetUrl,data:t,accessToken:'gZ7KibrSvFNLxrGz49usnRiKBZ4OlX99',method:'POST',onLoading:A,onSuccess:h,onError:I})};var C=function(){return{type:n.default.GET_SUBSCRIPTION_LIST_PENDING}};e.fetchGetSubscriptionListPending=C;e.fetchGetSubscriptionListReset=function(){return{type:n.default.GET_SUBSCRIPTION_LIST_RESET}};var T=function(t){return{type:n.default.GET_SUBSCRIPTION_LIST_SUCCESS,payload:t}};e.fetchGetSubscriptionListSuccess=T;var N=function(t){return{type:n.default.GET_SUBSCRIPTION_LIST_ERROR,payload:t}};e.fetchGetSubscriptionListError=N;e.fetchGetSubscriptionList=function(t,n){var u=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(0,o.ApiAction)({url:u?c.getInsuranceListUrl+"/subscriptions?user_id="+t+"&type="+n:c.getInsuranceListUrl+"?user_id="+t+"&type="+n,method:'GET',onLoading:C,onSuccess:T,onError:N})};var y=function(){return{type:n.default.ACTIVATE_PAY_SUBSCRIPTION_PENDING}};e.fetchActivePaySubscriptionPending=y;e.fetchActivePaySubscriptionReset=function(){return{type:n.default.ACTIVATE_PAY_SUBSCRIPTION_RESET}};var P=function(t){return{type:n.default.ACTIVATE_PAY_SUBSCRIPTION_SUCCESS,payload:t}};e.fetchActivePaySubscriptionSuccess=P;var G=function(t){return{type:n.default.ACTIVATE_PAY_SUBSCRIPTION_ERROR,payload:t}};e.fetchActivePaySubscriptionError=G;e.fetchActivePaySubscription=function(t,n){return(0,o.ApiAction)({url:c.subscribeInsuranceUrl+"/"+t+"/pay",data:n,method:'PUT',onLoading:y,onSuccess:P,onError:G})};var U=function(){return{type:n.default.STOP_SUBSCRIPTION_PENDING}};e.fetchStopSubscriptionPending=U;e.fetchStopSubscriptionReset=function(){return{type:n.default.STOP_SUBSCRIPTION_RESET}};var O=function(t){return{type:n.default.STOP_SUBSCRIPTION_SUCCESS,payload:t}};e.fetchStopSubscriptionSuccess=O;var D=function(t){return{type:n.default.STOP_SUBSCRIPTION_ERROR,payload:t}};e.fetchStopSubscriptionError=D;e.fetchStopSubscription=function(t,n){return(0,o.ApiAction)({url:c.getInsuranceListUrl+"/"+t+"/stop",data:n,method:'PUT',onLoading:U,onSuccess:O,onError:D})};var v=function(){return{type:n.default.ADD_BENEFICIARY_TO_SUBSCRIPTION_PENDING}};e.fetchAddBeneficiaryToSubscriptionPending=v;e.fetchAddBeneficiaryToSubscriptionReset=function(){return{type:n.default.ADD_BENEFICIARY_TO_SUBSCRIPTION_RESET}};var L=function(t){return{type:n.default.ADD_BENEFICIARY_TO_SUBSCRIPTION_SUCCESS,payload:t}};e.fetchAddBeneficiaryToSubscriptionSuccess=L;var B=function(t){return{type:n.default.ADD_BENEFICIARY_TO_SUBSCRIPTION_ERROR,payload:t}};e.fetchAddBeneficiaryToSubscriptionError=B;e.fetchAddBeneficiaryToSubscription=function(t,n){return(0,o.ApiAction)({url:c.getInsuranceListUrl+"/"+t+"/add-beneficiaries",data:n,method:'PUT',onLoading:v,onSuccess:L,onError:B})};var b=function(){return{type:n.default.GET_USER_BY_ID_QR_CODE_PENDING}};e.fetchGetUserByIdQRCodePending=b;e.fetchGetUserByIdQRCodeReset=function(){return{type:n.default.GET_USER_BY_ID_QR_CODE_RESET}};var M=function(t){return{type:n.default.GET_USER_BY_ID_QR_CODE_SUCCESS,payload:t}};e.fetchGetUserByIdQRCodeSuccess=M;var Y=function(t){return{type:n.default.GET_USER_BY_ID_QR_CODE_ERROR,payload:t}};e.fetchGetUserByIdQRCodeError=Y;e.fetchGetUserByIdQRCode=function(t,n){return(0,o.ApiAction)({url:c.getUserByIdQRCodeUrl+"?network_id="+t+"&"+n,method:'GET',onLoading:b,onSuccess:M,onError:Y})};var k=function(){return{type:n.default.GET_USER_BY_NAME_OR_NUMBER_PENDING}};e.fetchGetUserByNameOrNumberPending=k;e.fetchGetUserByNameOrNumberReset=function(){return{type:n.default.GET_USER_BY_NAME_OR_NUMBER_RESET}};var w=function(t){return{type:n.default.GET_USER_BY_NAME_OR_NUMBER_SUCCESS,payload:t}};e.fetchGetUserByNameOrNumberSuccess=w;var Q=function(t){return{type:n.default.GET_USER_BY_NAME_OR_NUMBER_ERROR,payload:t}};e.fetchGetUserByNameOrNumberError=Q;e.fetchGetUserByNameOrNumber=function(t,n){return(0,o.ApiAction)({url:c.getUserByNameOrNumberUrl+"?network_id="+t+n,method:'GET',onLoading:k,onSuccess:w,onError:Q})};var F=function(){return{type:n.default.GET_DRUG_APPAREIL_PENDING}};e.fetchGetDrugAppareilPending=F;e.fetchGetDrugAppareilReset=function(){return{type:n.default.GET_DRUG_APPAREIL_RESET}};var x=function(t){return{type:n.default.GET_DRUG_APPAREIL_SUCCESS,payload:t}};e.fetchGetDrugAppareilSuccess=x;var j=function(t){return{type:n.default.GET_DRUG_APPAREIL_ERROR,payload:t}};e.fetchGetDrugAppareilError=j;e.fetchGetDrugAppareil=function(t,n){return(0,o.ApiAction)({url:c.getDrugAndDevicesUrl+"?network_id="+t+"&name="+n,method:'GET',onLoading:F,onSuccess:x,onError:j})};var V=function(){return{type:n.default.ADD_DRUG_PENDING}};e.fetchAddDrugPending=V;e.fetchAddDrugReset=function(){return{type:n.default.ADD_DRUG_RESET}};var K=function(t){return{type:n.default.ADD_DRUG_SUCCESS,payload:t}};e.fetchAddDrugSuccess=K;var W=function(t){return{type:n.default.ADD_DRUG_ERROR,payload:t}};e.fetchAddDrugError=W;e.fetchAddDrug=function(t){return(0,o.ApiAction)({url:""+c.getDrugAndDevicesUrl,method:'POST',data:t,onLoading:V,onSuccess:K,onError:W})};var X=function(){return{type:n.default.GET_PROVIDER_CLASS_PENDING}};e.fetchGetProviderClassPending=X;e.fetchGetProviderClassReset=function(){return{type:n.default.GET_PROVIDER_CLASS_RESET}};var J=function(t){return{type:n.default.GET_PROVIDER_CLASS_SUCCESS,payload:t}};e.fetchGetProviderClassSuccess=J;var q=function(t){return{type:n.default.GET_PROVIDER_CLASS_ERROR,payload:t}};e.fetchGetProviderClassError=q;e.fetchGetProviderClass=function(t){return(0,o.ApiAction)({url:c.getProviderClassUrl+"?network_id="+t,method:'GET',onLoading:X,onSuccess:J,onError:q})};var Z=function(){return{type:n.default.GET_NETWORK_ACT_PENDING}};e.fetchGetNetworkActsPending=Z;e.fetchGetNetworkActsReset=function(){return{type:n.default.GET_NETWORK_ACT_RESET}};var z=function(t){return{type:n.default.GET_NETWORK_ACT_SUCCESS,payload:t}};e.fetchGetNetworkActsSuccess=z;var H=function(t){return{type:n.default.GET_NETWORK_ACT_ERROR,payload:t}};e.fetchGetNetworkActsError=H;e.fetchGetNetworkActs=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'',u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:'';return(0,o.ApiAction)({url:c.getNetworkActsUrl+"?network_id="+t+"&code="+n+u,method:'GET',onLoading:Z,onSuccess:z,onError:H})};var $=function(){return{type:n.default.CREATE_CONSULTATION_PENDING}};e.fetchCreateConsultationPending=$;e.fetchCreateConsultationReset=function(){return{type:n.default.CREATE_CONSULTATION_RESET}};var ee=function(t){return{type:n.default.CREATE_CONSULTATION_SUCCESS,payload:t}};e.fetchCreateConsultationSuccess=ee;var te=function(t){return{type:n.default.CREATE_CONSULTATION_ERROR,payload:t}};e.fetchCreateConsultationError=te;e.fetchCreateConsultation=function(t){return(0,o.ApiAction)({url:""+c.createConsultationUrl,method:'POST',data:t,onLoading:$,onSuccess:ee,onError:te})};var ne=function(){return{type:n.default.GET_AMOUNT_CONSULTATION_PENDING}};e.fetchGetAmountConsultationPending=ne;e.fetchGetAmountConsultationReset=function(){return{type:n.default.GET_AMOUNT_CONSULTATION_RESET}};var re=function(t){return{type:n.default.GET_AMOUNT_CONSULTATION_SUCCESS,payload:t}};e.fetchGetAmountConsultationSuccess=re;var ce=function(t){return{type:n.default.GET_AMOUNT_CONSULTATION_ERROR,payload:t}};e.fetchGetAmountConsultationError=ce;e.fetchGetAmountConsultation=function(t){return(0,o.ApiAction)({url:""+c.getAmountConsultationUrl,method:'POST',data:t,onLoading:ne,onSuccess:re,onError:ce})};var oe=function(){return{type:n.default.GET_USER_CONSULTATION_PENDING}};e.fetchGetConsultationPending=oe;e.fetchGetConsultationReset=function(){return{type:n.default.GET_USER_CONSULTATION_RESET}};var ue=function(t){return{type:n.default.GET_USER_CONSULTATION_SUCCESS,payload:t}};e.fetchGetConsultationSuccess=ue;var ie=function(t){return{type:n.default.GET_USER_CONSULTATION_ERROR,payload:t}};e.fetchGetConsultationError=ie;e.fetchGetConsultation=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'UNTREATED',u=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],arguments.length>3&&void 0!==arguments[3]?arguments[3]:'');return console.log("user_id",t),(0,o.ApiAction)({url:c.consultationUrl+"?user_id="+t+"&state="+n+u,method:'GET',onLoading:oe,onSuccess:ue,onError:ie})};e.fetchGetSubscription=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'ALL',u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:'';return console.log("user_id",t),(0,o.ApiAction)({url:c.subscribeInsuranceUrl+"?user_id="+t+"&type="+n+u,method:'GET',onLoading:oe,onSuccess:ue,onError:ie})};var ae=function(){return{type:n.default.ACCEPT_REJECT_CONSULTATION_PENDING}};e.fetchAcceptRejectConsultationPending=ae;e.fetchAcceptRejectConsultationReset=function(){return{type:n.default.ACCEPT_REJECT_CONSULTATION_RESET}};var se=function(t){return{type:n.default.ACCEPT_REJECT_CONSULTATION_SUCCESS,payload:t}};e.fetchAcceptRejectConsultationSuccess=se;var fe=function(t){return{type:n.default.ACCEPT_REJECT_CONSULTATION_ERROR,payload:t}};e.fetchAcceptRejectConsultationError=fe;e.fetchAcceptRejectConsultation=function(t){return(0,o.ApiAction)({url:""+c.consultationUrl,method:'PUT',data:t,onLoading:ae,onSuccess:se,onError:fe})};var Ee=function(){return{type:n.default.EXECUTION_PRESCRIPTION_PENDING}};e.fetchExecutionPrescriptionPending=Ee;e.fetchExecutionPrescriptionReset=function(){return{type:n.default.EXECUTION_PRESCRIPTION_RESET}};var de=function(t){return{type:n.default.EXECUTION_PRESCRIPTION_SUCCESS,payload:t}};e.fetchExecutionPrescriptionSuccess=de;var Se=function(t){return{type:n.default.EXECUTION_PRESCRIPTION_ERROR,payload:t}};e.fetchExecutionPrescriptionError=Se;e.fetchExecutionPrescription=function(t){return(0,o.ApiAction)({url:""+c.executionPrescriptionUrl,method:'POST',data:t,onLoading:Ee,onSuccess:de,onError:Se})};var le=function(){return{type:n.default.MODIFY_PRESCRIPTION_PENDING}};e.fetchModifyPrescriptionPending=le;e.fetchModifyPrescriptionReset=function(){return{type:n.default.MODIFY_PRESCRIPTION_RESET}};var Re=function(t){return{type:n.default.MODIFY_PRESCRIPTION_SUCCESS,payload:t}};e.fetchModifyPrescriptionSuccess=Re;var _e=function(t){return{type:n.default.MODIFY_PRESCRIPTION_ERROR,payload:t}};e.fetchModifyPrescriptionError=_e;e.fetchModifyPrescription=function(t,n){return(0,o.ApiAction)({url:c.consultationUrl+"/"+t,method:'PUT',data:n,onLoading:le,onSuccess:Re,onError:_e})};var pe=function(){return{type:n.default.DEMAND_AUTORISATION_PENDING}};e.fetchDemaneAutorisationSoinPending=pe;e.fetchDemaneAutorisationSoinReset=function(){return{type:n.default.DEMAND_AUTORISATION_RESET}};var Ae=function(t){return{type:n.default.DEMAND_AUTORISATION_SUCCESS,payload:t}};e.fetchDemaneAutorisationSoinSuccess=Ae;var he=function(t){return{type:n.default.DEMAND_AUTORISATION_ERROR,payload:t}};e.fetchDemaneAutorisationSoinError=he;e.fetchDemaneAutorisationSoin=function(t){return(0,o.ApiAction)({url:""+c.autorisationCareRequestUrl,method:'POST',data:t,onLoading:pe,onSuccess:Ae,onError:he})};e.fetchGetDemandeAutorisationSoin=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'';return(0,o.ApiAction)({url:""+c.autorisationCareRequestUrl+t,method:'GET',onLoading:oe,onSuccess:ue,onError:ie})};var Ie=function(){return{type:n.default.DELETE_BENEFICIARY_PENDING}};e.fetchDeleteBeneficiaryPending=Ie;e.fetchDeleteBeneficiaryReset=function(){return{type:n.default.DELETE_BENEFICIARY_RESET}};var Ce=function(t){return{type:n.default.DELETE_BENEFICIARY_SUCCESS,payload:t}};e.fetchDeleteBeneficiarySuccess=Ce;var Te=function(t){return{type:n.default.DELETE_BENEFICIARY_ERROR,payload:t}};e.fetchDeleteBeneficiaryError=Te;e.fetchDeleteBeneficiary=function(t,n){return(0,o.ApiAction)({url:c.getInsuranceListUrl+"/"+t+"/delete-beneficiaries",method:'PUT',data:n,onLoading:Ie,onSuccess:Ce,onError:Te})}},1779,[1,1185,743,1122]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.fetchModifyPrescriptionReset=e.fetchModifyPrescriptionPending=e.fetchExecutionPrescription=e.fetchExecutionPrescriptionError=e.fetchExecutionPrescriptionSuccess=e.fetchExecutionPrescriptionReset=e.fetchExecutionPrescriptionPending=e.fetchAcceptRejectConsultation=e.fetchAcceptRejectConsultationError=e.fetchAcceptRejectConsultationSuccess=e.fetchAcceptRejectConsultationReset=e.fetchAcceptRejectConsultationPending=e.fetchGetSubscription=e.fetchGetConsultation=e.fetchGetConsultationError=e.fetchGetConsultationSuccess=e.fetchGetConsultationReset=e.fetchGetConsultationPending=e.fetchGetAmountConsultation=e.fetchGetAmountConsultationError=e.fetchGetAmountConsultationSuccess=e.fetchGetAmountConsultationReset=e.fetchGetAmountConsultationPending=e.fetchCreateConsultation=e.fetchCreateConsultationError=e.fetchCreateConsultationSuccess=e.fetchCreateConsultationReset=e.fetchCreateConsultationPending=e.fetchGetNetworkActs=e.fetchGetNetworkActsError=e.fetchGetNetworkActsSuccess=e.fetchGetNetworkActsReset=e.fetchGetNetworkActsPending=e.fetchGetProviderClass=e.fetchGetProviderClassError=e.fetchGetProviderClassSuccess=e.fetchGetProviderClassReset=e.fetchGetProviderClassPending=e.fetchAddDrug=e.fetchAddDrugError=e.fetchAddDrugSuccess=e.fetchAddDrugReset=e.fetchAddDrugPending=e.fetchGetDrugAppareil=e.fetchGetDrugAppareilError=e.fetchGetDrugAppareilSuccess=e.fetchGetDrugAppareilReset=e.fetchGetDrugAppareilPending=e.fetchGetUserByNameOrNumber=e.fetchGetUserByNameOrNumberError=e.fetchGetUserByNameOrNumberSuccess=e.fetchGetUserByNameOrNumberReset=e.fetchGetUserByNameOrNumberPending=e.fetchGetUserByIdQRCode=e.fetchGetUserByIdQRCodeError=e.fetchGetUserByIdQRCodeSuccess=e.fetchGetUserByIdQRCodeReset=e.fetchGetUserByIdQRCodePending=e.fetchAddBeneficiaryToSubscription=e.fetchAddBeneficiaryToSubscriptionError=e.fetchAddBeneficiaryToSubscriptionSuccess=e.fetchAddBeneficiaryToSubscriptionReset=e.fetchAddBeneficiaryToSubscriptionPending=e.fetchRenewSubscription=e.fetchStopSubscription=e.fetchStopSubscriptionError=e.fetchStopSubscriptionSuccess=e.fetchStopSubscriptionReset=e.fetchStopSubscriptionPending=e.fetchActivePaySubscription=e.fetchActivePaySubscriptionError=e.fetchActivePaySubscriptionSuccess=e.fetchActivePaySubscriptionReset=e.fetchActivePaySubscriptionPending=e.fetchGetSubscriptionList=e.fetchGetSubscriptionListError=e.fetchGetSubscriptionListSuccess=e.fetchGetSubscriptionListReset=e.fetchGetSubscriptionListPending=e.fetchUploadInsurance=e.fetchUploadInsuranceError=e.fetchUploadInsuranceSuccess=e.fetchUploadInsuranceReset=e.fetchUploadInsurancePending=e.fetchGetInsurancePrimeAmount=e.fetchGetInsurancePrimeAmountError=e.fetchGetInsurancePrimeAmountSuccess=e.fetchGetInsurancePrimeAmountReset=e.fetchGetInsurancePrimeAmountPending=e.fetchSubscribeInsurance=e.fetchSubscribeInsuranceError=e.fetchSubscribeInsuranceSuccess=e.fetchSubscribeInsuranceReset=e.fetchSubscribeInsurancePending=e.fetchGetListInsuranceWithBeneficiaries=e.fetchGetListInsurance=e.fetchGetListInsuranceError=e.fetchGetListInsuranceSuccess=e.fetchGetListInsuranceReset=e.fetchGetListInsurancePending=void 0,e.fetchDeleteBeneficiary=e.fetchDeleteBeneficiaryError=e.fetchDeleteBeneficiarySuccess=e.fetchDeleteBeneficiaryReset=e.fetchDeleteBeneficiaryPending=e.fetchGetDemandeAutorisationSoin=e.fetchDemaneAutorisationSoin=e.fetchDemaneAutorisationSoinError=e.fetchDemaneAutorisationSoinSuccess=e.fetchDemaneAutorisationSoinReset=e.fetchDemaneAutorisationSoinPending=e.fetchModifyPrescription=e.fetchModifyPrescriptionError=e.fetchModifyPrescriptionSuccess=void 0;var n=t(r(d[1])),c=r(d[2]),o=r(d[3]),u=function(){return{type:n.default.GET_INSURANCE_LIST_PENDING}};e.fetchGetListInsurancePending=u;e.fetchGetListInsuranceReset=function(){return{type:n.default.GET_INSURANCE_LIST_RESET}};var s=function(t){return{type:n.default.GET_INSURANCE_LIST_SUCCESS,payload:t}};e.fetchGetListInsuranceSuccess=s;var f=function(t){return{type:n.default.GET_INSURANCE_LIST_ERROR,payload:t}};e.fetchGetListInsuranceError=f;e.fetchGetListInsurance=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'';return(0,o.ApiAction)({url:c.getInsuranceListUrl+"/networks?country_id="+t+n,method:'GET',onLoading:u,onSuccess:s,onError:f})};e.fetchGetListInsuranceWithBeneficiaries=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'';return(0,o.ApiAction)({url:""+c.getInsuranceListUrl+t,method:'GET',onLoading:u,onSuccess:s,onError:f})};var E=function(){return{type:n.default.SUBSCRIBE_INSURANCE_PENDING}};e.fetchSubscribeInsurancePending=E;e.fetchSubscribeInsuranceReset=function(){return{type:n.default.SUBSCRIBE_INSURANCE_RESET}};var S=function(t){return{type:n.default.SUBSCRIBE_INSURANCE_SUCCESS,payload:t}};e.fetchSubscribeInsuranceSuccess=S;var l=function(t){return{type:n.default.SUBSCRIBE_INSURANCE_ERROR,payload:t}};e.fetchSubscribeInsuranceError=l;e.fetchSubscribeInsurance=function(t){return(0,o.ApiAction)({url:c.subscribeInsuranceUrl,data:t,method:'POST',onLoading:E,onSuccess:S,onError:l})};var R=function(){return{type:n.default.GET_INSURANCE_PRIME_AMOUNT_PENDING}};e.fetchGetInsurancePrimeAmountPending=R;e.fetchGetInsurancePrimeAmountReset=function(){return{type:n.default.GET_INSURANCE_PRIME_AMOUNT_RESET}};var p=function(t){return{type:n.default.GET_INSURANCE_PRIME_AMOUNT_SUCCESS,payload:t}};e.fetchGetInsurancePrimeAmountSuccess=p;var _=function(t){return{type:n.default.GET_INSURANCE_PRIME_AMOUNT_ERROR,payload:t}};e.fetchGetInsurancePrimeAmountError=_;e.fetchGetInsurancePrimeAmount=function(t){return(0,o.ApiAction)({url:c.getInsurancePrimeAmountUrl,data:t,method:'POST',onLoading:R,onSuccess:p,onError:_})};var A=function(){return{type:n.default.UPLOAD_INSURANCE_IMAGES_PENDING}};e.fetchUploadInsurancePending=A;e.fetchUploadInsuranceReset=function(){return{type:n.default.UPLOAD_INSURANCE_IMAGES_RESET}};var h=function(t){return{type:n.default.UPLOAD_INSURANCE_IMAGES_SUCCESS,payload:t}};e.fetchUploadInsuranceSuccess=h;var I=function(t){return{type:n.default.UPLOAD_INSURANCE_IMAGES_ERROR,payload:t}};e.fetchUploadInsuranceError=I;e.fetchUploadInsurance=function(t){return(0,o.ApiAction)({url:c.uploadInsuranceImagetUrl,data:t,accessToken:'gZ7KibrSvFNLxrGz49usnRiKBZ4OlX99',method:'POST',onLoading:A,onSuccess:h,onError:I})};var T=function(){return{type:n.default.GET_SUBSCRIPTION_LIST_PENDING}};e.fetchGetSubscriptionListPending=T;e.fetchGetSubscriptionListReset=function(){return{type:n.default.GET_SUBSCRIPTION_LIST_RESET}};var C=function(t){return{type:n.default.GET_SUBSCRIPTION_LIST_SUCCESS,payload:t}};e.fetchGetSubscriptionListSuccess=C;var N=function(t){return{type:n.default.GET_SUBSCRIPTION_LIST_ERROR,payload:t}};e.fetchGetSubscriptionListError=N;e.fetchGetSubscriptionList=function(t,n){var u=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(0,o.ApiAction)({url:u?c.getInsuranceListUrl+"/subscriptions?user_id="+t+"&type="+n:c.getInsuranceListUrl+"?user_id="+t+"&type="+n,method:'GET',onLoading:T,onSuccess:C,onError:N})};var y=function(){return{type:n.default.ACTIVATE_PAY_SUBSCRIPTION_PENDING}};e.fetchActivePaySubscriptionPending=y;e.fetchActivePaySubscriptionReset=function(){return{type:n.default.ACTIVATE_PAY_SUBSCRIPTION_RESET}};var P=function(t){return{type:n.default.ACTIVATE_PAY_SUBSCRIPTION_SUCCESS,payload:t}};e.fetchActivePaySubscriptionSuccess=P;var G=function(t){return{type:n.default.ACTIVATE_PAY_SUBSCRIPTION_ERROR,payload:t}};e.fetchActivePaySubscriptionError=G;e.fetchActivePaySubscription=function(t,n){return(0,o.ApiAction)({url:c.subscribeInsuranceUrl+"/"+t+"/pay",data:n,method:'PUT',onLoading:y,onSuccess:P,onError:G})};var U=function(){return{type:n.default.STOP_SUBSCRIPTION_PENDING}};e.fetchStopSubscriptionPending=U;e.fetchStopSubscriptionReset=function(){return{type:n.default.STOP_SUBSCRIPTION_RESET}};var O=function(t){return{type:n.default.STOP_SUBSCRIPTION_SUCCESS,payload:t}};e.fetchStopSubscriptionSuccess=O;var D=function(t){return{type:n.default.STOP_SUBSCRIPTION_ERROR,payload:t}};e.fetchStopSubscriptionError=D;e.fetchStopSubscription=function(t,n){return(0,o.ApiAction)({url:c.getInsuranceListUrl+"/"+t+"/stop",data:n,method:'PUT',onLoading:U,onSuccess:O,onError:D})};e.fetchRenewSubscription=function(t,n){return(0,o.ApiAction)({url:c.getInsuranceListUrl+"/"+t+"/renew",data:n,method:'PUT',onLoading:U,onSuccess:O,onError:D})};var v=function(){return{type:n.default.ADD_BENEFICIARY_TO_SUBSCRIPTION_PENDING}};e.fetchAddBeneficiaryToSubscriptionPending=v;e.fetchAddBeneficiaryToSubscriptionReset=function(){return{type:n.default.ADD_BENEFICIARY_TO_SUBSCRIPTION_RESET}};var L=function(t){return{type:n.default.ADD_BENEFICIARY_TO_SUBSCRIPTION_SUCCESS,payload:t}};e.fetchAddBeneficiaryToSubscriptionSuccess=L;var B=function(t){return{type:n.default.ADD_BENEFICIARY_TO_SUBSCRIPTION_ERROR,payload:t}};e.fetchAddBeneficiaryToSubscriptionError=B;e.fetchAddBeneficiaryToSubscription=function(t,n){return(0,o.ApiAction)({url:c.getInsuranceListUrl+"/"+t+"/add-beneficiaries",data:n,method:'PUT',onLoading:v,onSuccess:L,onError:B})};var b=function(){return{type:n.default.GET_USER_BY_ID_QR_CODE_PENDING}};e.fetchGetUserByIdQRCodePending=b;e.fetchGetUserByIdQRCodeReset=function(){return{type:n.default.GET_USER_BY_ID_QR_CODE_RESET}};var M=function(t){return{type:n.default.GET_USER_BY_ID_QR_CODE_SUCCESS,payload:t}};e.fetchGetUserByIdQRCodeSuccess=M;var Y=function(t){return{type:n.default.GET_USER_BY_ID_QR_CODE_ERROR,payload:t}};e.fetchGetUserByIdQRCodeError=Y;e.fetchGetUserByIdQRCode=function(t,n){return(0,o.ApiAction)({url:c.getUserByIdQRCodeUrl+"?network_id="+t+"&"+n,method:'GET',onLoading:b,onSuccess:M,onError:Y})};var w=function(){return{type:n.default.GET_USER_BY_NAME_OR_NUMBER_PENDING}};e.fetchGetUserByNameOrNumberPending=w;e.fetchGetUserByNameOrNumberReset=function(){return{type:n.default.GET_USER_BY_NAME_OR_NUMBER_RESET}};var k=function(t){return{type:n.default.GET_USER_BY_NAME_OR_NUMBER_SUCCESS,payload:t}};e.fetchGetUserByNameOrNumberSuccess=k;var Q=function(t){return{type:n.default.GET_USER_BY_NAME_OR_NUMBER_ERROR,payload:t}};e.fetchGetUserByNameOrNumberError=Q;e.fetchGetUserByNameOrNumber=function(t,n){return(0,o.ApiAction)({url:c.getUserByNameOrNumberUrl+"?network_id="+t+n,method:'GET',onLoading:w,onSuccess:k,onError:Q})};var F=function(){return{type:n.default.GET_DRUG_APPAREIL_PENDING}};e.fetchGetDrugAppareilPending=F;e.fetchGetDrugAppareilReset=function(){return{type:n.default.GET_DRUG_APPAREIL_RESET}};var x=function(t){return{type:n.default.GET_DRUG_APPAREIL_SUCCESS,payload:t}};e.fetchGetDrugAppareilSuccess=x;var j=function(t){return{type:n.default.GET_DRUG_APPAREIL_ERROR,payload:t}};e.fetchGetDrugAppareilError=j;e.fetchGetDrugAppareil=function(t,n){return(0,o.ApiAction)({url:c.getDrugAndDevicesUrl+"?network_id="+t+"&name="+n,method:'GET',onLoading:F,onSuccess:x,onError:j})};var V=function(){return{type:n.default.ADD_DRUG_PENDING}};e.fetchAddDrugPending=V;e.fetchAddDrugReset=function(){return{type:n.default.ADD_DRUG_RESET}};var K=function(t){return{type:n.default.ADD_DRUG_SUCCESS,payload:t}};e.fetchAddDrugSuccess=K;var W=function(t){return{type:n.default.ADD_DRUG_ERROR,payload:t}};e.fetchAddDrugError=W;e.fetchAddDrug=function(t){return(0,o.ApiAction)({url:""+c.getDrugAndDevicesUrl,method:'POST',data:t,onLoading:V,onSuccess:K,onError:W})};var X=function(){return{type:n.default.GET_PROVIDER_CLASS_PENDING}};e.fetchGetProviderClassPending=X;e.fetchGetProviderClassReset=function(){return{type:n.default.GET_PROVIDER_CLASS_RESET}};var J=function(t){return{type:n.default.GET_PROVIDER_CLASS_SUCCESS,payload:t}};e.fetchGetProviderClassSuccess=J;var q=function(t){return{type:n.default.GET_PROVIDER_CLASS_ERROR,payload:t}};e.fetchGetProviderClassError=q;e.fetchGetProviderClass=function(t){return(0,o.ApiAction)({url:c.getProviderClassUrl+"?network_id="+t,method:'GET',onLoading:X,onSuccess:J,onError:q})};var Z=function(){return{type:n.default.GET_NETWORK_ACT_PENDING}};e.fetchGetNetworkActsPending=Z;e.fetchGetNetworkActsReset=function(){return{type:n.default.GET_NETWORK_ACT_RESET}};var z=function(t){return{type:n.default.GET_NETWORK_ACT_SUCCESS,payload:t}};e.fetchGetNetworkActsSuccess=z;var H=function(t){return{type:n.default.GET_NETWORK_ACT_ERROR,payload:t}};e.fetchGetNetworkActsError=H;e.fetchGetNetworkActs=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'',u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:'';return(0,o.ApiAction)({url:c.getNetworkActsUrl+"?network_id="+t+"&code="+n+u,method:'GET',onLoading:Z,onSuccess:z,onError:H})};var $=function(){return{type:n.default.CREATE_CONSULTATION_PENDING}};e.fetchCreateConsultationPending=$;e.fetchCreateConsultationReset=function(){return{type:n.default.CREATE_CONSULTATION_RESET}};var ee=function(t){return{type:n.default.CREATE_CONSULTATION_SUCCESS,payload:t}};e.fetchCreateConsultationSuccess=ee;var te=function(t){return{type:n.default.CREATE_CONSULTATION_ERROR,payload:t}};e.fetchCreateConsultationError=te;e.fetchCreateConsultation=function(t){return(0,o.ApiAction)({url:""+c.createConsultationUrl,method:'POST',data:t,onLoading:$,onSuccess:ee,onError:te})};var ne=function(){return{type:n.default.GET_AMOUNT_CONSULTATION_PENDING}};e.fetchGetAmountConsultationPending=ne;e.fetchGetAmountConsultationReset=function(){return{type:n.default.GET_AMOUNT_CONSULTATION_RESET}};var re=function(t){return{type:n.default.GET_AMOUNT_CONSULTATION_SUCCESS,payload:t}};e.fetchGetAmountConsultationSuccess=re;var ce=function(t){return{type:n.default.GET_AMOUNT_CONSULTATION_ERROR,payload:t}};e.fetchGetAmountConsultationError=ce;e.fetchGetAmountConsultation=function(t){return(0,o.ApiAction)({url:""+c.getAmountConsultationUrl,method:'POST',data:t,onLoading:ne,onSuccess:re,onError:ce})};var oe=function(){return{type:n.default.GET_USER_CONSULTATION_PENDING}};e.fetchGetConsultationPending=oe;e.fetchGetConsultationReset=function(){return{type:n.default.GET_USER_CONSULTATION_RESET}};var ue=function(t){return{type:n.default.GET_USER_CONSULTATION_SUCCESS,payload:t}};e.fetchGetConsultationSuccess=ue;var ie=function(t){return{type:n.default.GET_USER_CONSULTATION_ERROR,payload:t}};e.fetchGetConsultationError=ie;e.fetchGetConsultation=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'UNTREATED',u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:'CONSULTATION',s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:'';return console.log("user_id",t),(0,o.ApiAction)({url:c.consultationUrl+"?user_id="+t+"&state="+n+"&type="+u+s,method:'GET',onLoading:oe,onSuccess:ue,onError:ie})};e.fetchGetSubscription=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'ALL',u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:'';return console.log("user_id",t),(0,o.ApiAction)({url:c.subscribeInsuranceUrl+"?user_id="+t+"&type="+n+u,method:'GET',onLoading:oe,onSuccess:ue,onError:ie})};var ae=function(){return{type:n.default.ACCEPT_REJECT_CONSULTATION_PENDING}};e.fetchAcceptRejectConsultationPending=ae;e.fetchAcceptRejectConsultationReset=function(){return{type:n.default.ACCEPT_REJECT_CONSULTATION_RESET}};var se=function(t){return{type:n.default.ACCEPT_REJECT_CONSULTATION_SUCCESS,payload:t}};e.fetchAcceptRejectConsultationSuccess=se;var fe=function(t){return{type:n.default.ACCEPT_REJECT_CONSULTATION_ERROR,payload:t}};e.fetchAcceptRejectConsultationError=fe;e.fetchAcceptRejectConsultation=function(t){return(0,o.ApiAction)({url:""+c.consultationUrl,method:'PUT',data:t,onLoading:ae,onSuccess:se,onError:fe})};var Ee=function(){return{type:n.default.EXECUTION_PRESCRIPTION_PENDING}};e.fetchExecutionPrescriptionPending=Ee;e.fetchExecutionPrescriptionReset=function(){return{type:n.default.EXECUTION_PRESCRIPTION_RESET}};var de=function(t){return{type:n.default.EXECUTION_PRESCRIPTION_SUCCESS,payload:t}};e.fetchExecutionPrescriptionSuccess=de;var Se=function(t){return{type:n.default.EXECUTION_PRESCRIPTION_ERROR,payload:t}};e.fetchExecutionPrescriptionError=Se;e.fetchExecutionPrescription=function(t){return(0,o.ApiAction)({url:""+c.executionPrescriptionUrl,method:'POST',data:t,onLoading:Ee,onSuccess:de,onError:Se})};var le=function(){return{type:n.default.MODIFY_PRESCRIPTION_PENDING}};e.fetchModifyPrescriptionPending=le;e.fetchModifyPrescriptionReset=function(){return{type:n.default.MODIFY_PRESCRIPTION_RESET}};var Re=function(t){return{type:n.default.MODIFY_PRESCRIPTION_SUCCESS,payload:t}};e.fetchModifyPrescriptionSuccess=Re;var pe=function(t){return{type:n.default.MODIFY_PRESCRIPTION_ERROR,payload:t}};e.fetchModifyPrescriptionError=pe;e.fetchModifyPrescription=function(t,n){return(0,o.ApiAction)({url:c.consultationUrl+"/"+t,method:'PUT',data:n,onLoading:le,onSuccess:Re,onError:pe})};var _e=function(){return{type:n.default.DEMAND_AUTORISATION_PENDING}};e.fetchDemaneAutorisationSoinPending=_e;e.fetchDemaneAutorisationSoinReset=function(){return{type:n.default.DEMAND_AUTORISATION_RESET}};var Ae=function(t){return{type:n.default.DEMAND_AUTORISATION_SUCCESS,payload:t}};e.fetchDemaneAutorisationSoinSuccess=Ae;var he=function(t){return{type:n.default.DEMAND_AUTORISATION_ERROR,payload:t}};e.fetchDemaneAutorisationSoinError=he;e.fetchDemaneAutorisationSoin=function(t){return(0,o.ApiAction)({url:""+c.autorisationCareRequestUrl,method:'POST',data:t,onLoading:_e,onSuccess:Ae,onError:he})};e.fetchGetDemandeAutorisationSoin=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'';return(0,o.ApiAction)({url:""+c.autorisationCareRequestUrl+t,method:'GET',onLoading:oe,onSuccess:ue,onError:ie})};var Ie=function(){return{type:n.default.DELETE_BENEFICIARY_PENDING}};e.fetchDeleteBeneficiaryPending=Ie;e.fetchDeleteBeneficiaryReset=function(){return{type:n.default.DELETE_BENEFICIARY_RESET}};var Te=function(t){return{type:n.default.DELETE_BENEFICIARY_SUCCESS,payload:t}};e.fetchDeleteBeneficiarySuccess=Te;var Ce=function(t){return{type:n.default.DELETE_BENEFICIARY_ERROR,payload:t}};e.fetchDeleteBeneficiaryError=Ce;e.fetchDeleteBeneficiary=function(t,n){return(0,o.ApiAction)({url:c.getInsuranceListUrl+"/"+t+"/delete-beneficiaries",method:'PUT',data:n,onLoading:Ie,onSuccess:Te,onError:Ce})}},1779,[1,1185,743,1122]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),l=n(r(d[3])),s=n(r(d[4])),c=n(r(d[5])),u=n(r(d[6])),f=n(r(d[7])),p=n(r(d[8])),h=t(r(d[9])),I=r(d[10]),C=t(r(d[11])),y=n(r(d[12])),v=r(d[13]),E=n(r(d[14])),A=n(r(d[15])),S=r(d[16]),b=r(d[17]),T=n(r(d[18])),w=n(r(d[19])),R=r(d[20]),k=n(r(d[21])),P=n(r(d[22])),O=r(d[23]),_=r(d[24]),V=r(d[25]),D=r(d[26]),L=n(r(d[27])),U=r(d[28]),N=r(d[29]),F=r(d[30]),x=r(d[31]),B=(r(d[32]),r(d[33]),r(d[34]),(function(t){function n(t){var o;return(0,l.default)(this,n),(o=(0,c.default)(this,(0,u.default)(n).call(this,t))).createFormData=function(t,n){o.dataToSendTemp.append(t,{name:n.path.split('/').pop(),type:n.mime,uri:"android"===I.Platform.OS?n.path:n.path.replace("file://","")})},o.renderLoader=function(){return h.default.createElement(N.ProgressDialog,{visible:o.props.loadingUserIndentification||o.props.loadingValidateIdentification,title:E.default.t('LOADING'),message:E.default.t('LOADING_INFO')})},o.renderGetUserIdentificationResponse=function(){var t=o.props,n=t.resultUserIndentification,l=t.errorUserIndentification;null!==n&&void 0!==n.response&&200===n.status&&(n.response.isIdentifiedValidated&&I.Alert.alert(E.default.t('ERROR_IDENTIFICATION'),E.default.t('ALREADY_VALIDATED'),[{text:E.default.t("OK"),onPress:function(){o.props.getUserIdentificationResetAction(),o.setState({triggerSubmitClick:!1})}}],{cancelable:!1}),n.response.isIdentified||n.response.isIdentifiedValidated||I.Alert.alert(E.default.t('ERROR_IDENTIFICATION'),E.default.t('NOT_IDENTIFIED'),[{text:E.default.t("OK"),onPress:function(){o.props.getUserIdentificationResetAction(),o.setState({triggerSubmitClick:!1}),o.props.navigation.pop()}}],{cancelable:!1}),n.response.isIdentified&&!n.response.isIdentifiedValidated&&o.setState({isIdentified:n.response.isIdentified,isIdentifiedValidated:n.response.isIdentifiedValidated,idIdentification:n.response.data.id,idNetwork:n.response.data.idNetwork,idUser:n.response.data.id_user,displayUploadButtons:!0,triggerSubmitClick:!1})),null!==l&&(void 0!==l.data?I.Alert.alert(E.default.t('ERROR_LABEL'),l.data.error,[{text:E.default.t("OK"),onPress:function(){o.props.getUserIdentificationResetAction(),o.setState({triggerSubmitClick:!1}),o.props.navigation.pop()}}],{cancelable:!1}):I.Alert.alert(E.default.t('ERROR_LABEL'),JSON.stringify(l),[{text:E.default.t("OK"),onPress:function(){o.setState({triggerSubmitClick:!1}),o.props.getUserIdentificationResetAction(),o.props.navigation.pop()}}],{cancelable:!1}))},o.renderValidationResponse=function(){var t=o.props,n=t.resultValidateIdentification,l=t.errorValidateIdentification;null!==n&&void 0!==n.response&&200===n.status&&I.Alert.alert('Validation effectu\xe9','Utilisateur valid\xe9 avec succ\xe8s',[{text:E.default.t("OK"),onPress:function(){o.props.validateIdentificationResetAction(),o.setState({triggerSubmitClick:!1}),o.props.navigation.pop()}}],{cancelable:!1}),null!==l&&(void 0!==l.data?I.Alert.alert(E.default.t('ERROR_LABEL'),l.data.error,[{text:E.default.t("OK"),onPress:function(){o.props.validateIdentificationResetAction(),o.setState({triggerSubmitClick:!1})}}],{cancelable:!1}):I.Alert.alert(E.default.t('ERROR_LABEL'),JSON.stringify(l),[{text:E.default.t("OK"),onPress:function(){o.props.validateIdentificationResetAction(),o.setState({triggerSubmitClick:!1})}}],{cancelable:!1}))},o.onSubmitValidationClient=function(){var t=o.state,n=t.displayUploadButtons,l=t.numeroTelephone;n?(console.log('TRUE',n),o.dataToSendTemp.append('id_network',1),o.dataToSendTemp.append('id_country',1),o.props.validateIdentificationAction(o.dataToSendTemp,o.state.idIdentification)):o.ckeckIfFieldIsOK(l)?o.numeroTelephoneAnim.shake(800):o.props.getUserIdentificationAction(l)},o.onPicture=function(t){var n=t.uri;o.setState({image:n,displayCamera:!0}),console.log("URI",n)},o.onBackToCamera=function(){o.setState({image:null,displayCamera:!1})},o.renderDialogImage=function(){return h.default.createElement(y.default.Container,{contentStyle:{width:(0,S.responsiveWidth)(80)},useNativeDriver:!0,visible:o.state.displayImage},h.default.createElement(y.default.Title,null,E.default.t('PREVISUALISATION')),h.default.createElement(I.View,null,h.default.createElement(I.View,{style:{width:50}}),h.default.createElement(I.View,{style:{justifyContent:'center',alignContent:'center',alignItems:'center'}},h.default.createElement(I.Image,{source:{uri:o.state.image.path},style:{width:o.state.image.width,height:o.state.image.height,aspectRatio:1,resizeMode:'contain'}})),h.default.createElement(I.View,{style:{width:50}})),h.default.createElement(y.default.Button,{bold:!0,label:E.default.t('OK'),onPress:function(){o.setState({displayImage:!1})}}))},o.state={numeroTelephone:null,image:null,displayImage:!1,idNetwork:null,idUser:null,idIdentification:null,displayUploadButtons:!1,triggerSubmitClick:!1,triggerValidateClick:!1,isIdentified:!1,modalVisible:!0,isIdentifiedValidated:!1,userId:null,isLoging:!1,countries:[],town:[],townName:null,country:null,datatoSend:null},o.dataToSendTemp=new FormData,o.props.getUserIdentificationResetAction(),o.props.validateIdentificationResetAction(),o}return(0,f.default)(n,t),(0,s.default)(n,[{key:"componentDidMount",value:function(){var t=this;(0,_.readUser)().then(function(n){n&&void 0!==n&&t.setState({user:n})}),'android'===I.Platform.OS?this.requestCameraPermission():this.watchLocation()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,this.watchID&&L.default.clearWatch(this.watchID)}},{key:"showErrorDialog",value:function(){var t=this;this.setState({modalDialog:!1}),I.Alert.alert("Une erreur est survenue","Impossible de r\xe9cuperer des informations du pays verifier que votre gps est activ\xe9,et que vous \xeates connect\xe9 \xe0 internet puis ressayer",[{text:"Recommencer",onPress:function(){t.watchLocation()}},{text:"Annuler",onPress:function(){t.props.navigation.popToTop()}}])}},{key:"watchLocation",value:function(){var t=this;return o.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:L.default.getCurrentPosition(function(n){t.treatPosition(n)},function(n){t.showErrorDialog()},this.props.geolocationOptions),this.watchID||L.default.watchPosition(function(n){t.treatPosition(n)},function(n){t.showErrorDialog()},this.props.geolocationOptions);case 2:case"end":return n.stop()}},null,this,null,Promise)}},{key:"requestCameraPermission",value:function(){var t=this;return o.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,o.default.awrap(I.PermissionsAndroid.request(I.PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,{title:'Cool Photo App Camera Permission',message:"Cool Photo App needs access to your camera so you can take awesome pictures."}));case 3:n.sent===I.PermissionsAndroid.RESULTS.GRANTED?this.watchLocation():(this.setState({modalDialog:!1}),I.Alert.alert("Echec \xe0 l'autorisation","L'application n'est pas autoris\xe9 \xe0 acceder \xe0 votre position veuillez verifier que votre GPS est activ\xe9 et configurer en mode Haute Precision",[{text:"Ok",onPress:function(){t.props.navigation.popToTop()}}])),n.next=11;break;case 7:n.prev=7,n.t0=n.catch(0),this.setState({modalDialog:!1}),I.Alert.alert("Une erreur est Survenue","Une erreur est survenu lors du demarrage de l'application veuillez relancer l'application",[{text:"Ok",onPress:function(){BackHandler.exitApp()}}]);case 11:case"end":return n.stop()}},null,this,[[0,7]],Promise)}},{key:"treatPosition",value:function(t){var n=this,o=this.state.myPosition,l=t.coords;(0,P.default)(l,o)||((0,x.getPositionInformation)(l).then(function(t){if(void 0!==t.results&&t.results.length>0){var o=t.results[0],l=o.address_components,s=o.formatted_address,c=o.place_id;n.setState({address:l,textadress:s,place:c});for(var u,f,p=t.results,h=0;h=l.length)break;f=l[c++]}else{if((c=l.next()).done)break;f=c.value}var p=f;p.code_country===u&&(o=!0,n.setState({modalVisible:!1,indicatif:p.code_dial,country:p.name}))}o||I.Alert.alert("Impossible de recup\xe9rer vos informations","Nous n'avons pas pu recuperer les informations de votre pays veuillez contacter les administrateurs",[{text:"OK"}])})}}).catch(function(t){n.showErrorDialog()}),this.setState({myPosition:l}))}},{key:"renderLoaderModal",value:function(){return h.default.createElement(O.MaterialDialog,{visible:this.state.modalVisible,title:E.default.t("LOADING_INFO")},h.default.createElement(I.View,{style:{justifyContent:'center',alignItems:'center'}},h.default.createElement(I.Text,null,E.default.t("LOADING_DESCRIPTION_COUNTRY")),h.default.createElement(I.ProgressBarAndroid,null)))}},{key:"ckeckIfFieldIsOK",value:function(t){return(0,k.default)(t)||(0,P.default)(t.length,0)}},{key:"render",value:function(){var t=this;console.log("STATE",this.state);this.state.showPickerDateNaissance;return h.default.createElement(h.default.Fragment,null,(this.props.loadingUserIndentification||this.props.loadingValidateIdentification)&&this.renderLoader(),this.state.displayImage&&this.renderDialogImage(),this.state.modalVisible&&this.renderLoaderModal(),this.state.triggerSubmitClick&&this.renderGetUserIdentificationResponse(),this.state.triggerValidateClick&&this.renderValidationResponse(),h.default.createElement(I.ScrollView,{style:K.container},h.default.createElement(I.Text,{style:K.subbigtitle},E.default.t('CREATE_IDENTIFICATION_TITLE')),h.default.createElement(C.View,{ref:function(n){t.numeroTelephoneAnim=n}},h.default.createElement(b.Fumi,{iconClass:T.default,iconName:'phone',label:""+E.default.t('PHONE_NUMBER'),iconColor:'#f95a25',keyboardType:"phone-pad",value:null===this.state.numeroTelephone?this.state.indicatif:this.state.numeroTelephone,iconSize:20,onChangeText:function(n){t.setState({numeroTelephone:n})},style:K.input})),this.state.displayUploadButtons&&h.default.createElement(I.View,{style:{marginTop:20,flexDirection:'row'}},h.default.createElement(I.View,{style:[K.contentPicker]},h.default.createElement(I.View,{style:[K.contentPicker]},h.default.createElement(v.TouchableOpacity,{style:[K.contain],onPress:function(){A.default.openCamera({width:200,height:200,cropping:!0,useFrontCamera:!0}).then(function(n){t.createFormData('user_image',n),t.setState({image:n,displayImage:!0})})},activeOpacity:.9},h.default.createElement(I.View,{style:[K.contcontainerCenterentLeft]},h.default.createElement(I.View,null,h.default.createElement(w.default,{name:"account-circle",color:R.Color.whiteColor,style:[K.thumb],size:80}),h.default.createElement(I.View,{style:[K.point,{backgroundColor:R.Color.accentColor}]},h.default.createElement(w.default,{name:"camera-image",color:R.Color.whiteColor,size:20}))))),h.default.createElement(I.Text,{style:(V.Typography.footnote,V.FontWeight.semibold,{color:R.Color.whiteColor})},E.default.t('PROFILE_PICTURE')))),h.default.createElement(I.View,{style:[K.contentPicker]},h.default.createElement(I.View,{style:[K.contentPicker]},h.default.createElement(v.TouchableOpacity,{style:[K.contain],onPress:function(){A.default.openCamera({width:400,height:281,cropping:!0,useFrontCamera:!1}).then(function(n){t.createFormData('document_image_front',n),t.setState({image:n,displayImage:!0})})},activeOpacity:.9},h.default.createElement(I.View,{style:[K.contcontainerCenterentLeft]},h.default.createElement(I.View,null,h.default.createElement(w.default,{name:"credit-card-scan",color:R.Color.whiteColor,style:[K.thumb],size:80}),h.default.createElement(I.View,{style:[K.point,{backgroundColor:R.Color.accentColor}]},h.default.createElement(w.default,{name:"camera-image",color:R.Color.whiteColor,size:20}))))),h.default.createElement(I.Text,{style:(V.Typography.footnote,V.FontWeight.semibold,{color:R.Color.whiteColor})},E.default.t('FRONT_FACE_CB')))),h.default.createElement(I.View,{style:[K.contentPicker]},h.default.createElement(v.TouchableOpacity,{style:[K.contain],onPress:function(){A.default.openCamera({width:400,height:281,cropping:!0,useFrontCamera:!1}).then(function(n){t.createFormData('document_image_back',n),t.setState({image:n,displayImage:!0})})},activeOpacity:.9},h.default.createElement(I.View,{style:[K.contcontainerCenterentLeft]},h.default.createElement(I.View,null,h.default.createElement(w.default,{name:"credit-card-off",color:R.Color.whiteColor,style:[K.thumb],size:80}),h.default.createElement(I.View,{style:[K.point,{backgroundColor:R.Color.accentColor}]},h.default.createElement(w.default,{name:"camera-image",color:R.Color.whiteColor,size:20}))))),h.default.createElement(I.Text,{style:(V.Typography.footnote,V.FontWeight.semibold,{color:R.Color.whiteColor})},E.default.t('BACK_FACE_CB')))),h.default.createElement(p.default,{style:K.btnvalide,textStyle:K.textbtnvalide,isLoading:this.state.isLoging,onPress:function(){t.onSubmitValidationClient(),t.state.displayUploadButtons&&t.setState({triggerValidateClick:!0}),t.setState({triggerSubmitClick:!0})}},E.default.t('SUBMIT_LABEL'))))}}]),n})(h.Component));B.navigatorStyle={navBarBackgroundColor:R.Color.primaryColor,statusBarColor:R.Color.primaryDarkColor,navBarTextColor:'#FFFFFF',navBarButtonColor:'#FFFFFF'},B.navigationOptions=function(){return{drawerLabel:function(){return null},headerTitle:E.default.t('VALIDATE_IDENTIFICATION_DESCRIPTION'),headerTintColor:'white',headerStyle:{backgroundColor:R.Color.primaryColor,marginTop:0,color:'white'},headerTitleStyle:{color:"white"},title:E.default.t('VALIDATE_IDENTIFICATION_DESCRIPTION')}};var z=(0,D.connect)(function(t){return{loadingUserIndentification:t.getUserIdentificationReducer.loading,resultUserIndentification:t.getUserIdentificationReducer.result,errorUserIndentification:t.getUserIdentificationReducer.error,loadingValidateIdentification:t.validateIdentificationReducer.loading,resultValidateIdentification:t.validateIdentificationReducer.result,errorValidateIdentification:t.validateIdentificationReducer.error}},function(t){return(0,U.bindActionCreators)({getUserIdentificationAction:F.getUserIdentificationAction,getUserIdentificationResetAction:F.getUserIdentificationResetAction,validateIdentificationResetAction:F.validateIdentificationResetAction,validateIdentificationAction:F.validateIdentificationAction},t)})(B);e.default=z;var K=I.StyleSheet.create({container:{flex:1,backgroundColor:R.Color.primaryDarkColor},contain:{flexDirection:"row"},containerCenter:{flex:8,flexDirection:"row",justifyContent:"center",alignItems:"center"},thumb:{borderRadius:30,marginRight:10},point:{width:25,height:25,borderRadius:11,alignItems:"center",justifyContent:"center",position:"absolute",right:9,bottom:0},textbtnvalide:{color:'white',fontWeight:'bold'},bigtitle:{color:'white',fontSize:20,flex:1,fontWeight:'bold',textAlign:'center',margin:20},contentPicker:{padding:10,borderRadius:8,flex:1,alignItems:"center"},subbigtitle:{color:'white',fontSize:17,textAlign:'center',margin:5},btnvalide:{marginTop:20,marginLeft:20,marginRight:20,borderColor:'transparent',backgroundColor:R.Color.accentLightColor,height:52},input:{height:60,marginTop:(0,S.responsiveHeight)(2),marginLeft:(0,S.responsiveWidth)(5),marginRight:(0,S.responsiveWidth)(5),borderRadius:5},lottie:{width:540,height:300}})},1780,[4,1,273,8,9,10,12,13,716,15,18,749,1639,2,719,1781,534,703,538,881,1031,1625,688,774,718,1079,1046,810,1063,1528,1770,770,813,814,1038]); __d(function(g,r,i,a,m,e,d){var n=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.cleanSingle=e.clean=e.openCropper=e.openCamera=e.openPicker=e.default=void 0;n(r(d[1]));var o=r(d[2]).NativeModules.ImageCropPicker,p=o;e.default=p;var l=o.openPicker;e.openPicker=l;var c=o.openCamera;e.openCamera=c;var v=o.openCropper;e.openCropper=v;var C=o.clean;e.clean=C;var t=o.cleanSingle;e.cleanSingle=t},1781,[1,15,18]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),s=n(r(d[3])),l=n(r(d[4])),c=n(r(d[5])),u=n(r(d[6])),f=n(r(d[7])),h=n(r(d[8])),p=t(r(d[9])),I=r(d[10]),E=n(r(d[11])),v=r(d[12]),C=r(d[13]),y=t(r(d[14])),N=n(r(d[15])),w=n(r(d[16])),D=n(r(d[17])),k=n(r(d[18])),P=r(d[19]),S=n(r(d[20])),A=r(d[21]),b=r(d[22]),x=r(d[23]),T=r(d[24]),O=r(d[25]),_=n(r(d[26])),F=r(d[27]),R=r(d[28]),L=r(d[29]),M=r(d[30]),Y=n(r(d[31])),V=(r(d[32]),r(d[33]),r(d[34])),U=(function(t){function n(t){var o;return(0,l.default)(this,n),(o=(0,u.default)(this,(0,f.default)(n).call(this,t))).onChangeDateNaissance=function(t,n){var s=(0,k.default)(o.state.dateNaissance)?new Date:o.state.dateNaissance,l=n||s;o.setState({showPickerDateNaissance:'ios'===I.Platform.OS||!1,dateNaissance:l})},o.onChangeDateExpiration=function(t,n){var s=(0,k.default)(o.state.dateExpiration)?new Date:o.state.dateExpiration,l=n||s;o.setState({showPickerDateExpiration:'ios'===I.Platform.OS||!1,dateExpiration:l})},o.onSubmitIdentityClient=function(){var t=o.state,n=t.lastname,s=t.numeroIdentite,l=t.dateNaissance,c=t.dateExpiration,u=t.country,f=t.townName,h=t.identityPiecesName;o.ckeckIfFieldIsOK(n)?o.lastnameAnim.shake(800):o.ckeckIfFieldIsOK(l)?o.datenaissanceAnim.shake(800):o.ckeckIfFieldIsOK(u)?o.countryAnim.shake(800):o.ckeckIfFieldIsOK(f)?o.townAnim.shake(800):o.ckeckIfFieldIsOK(h)?o.identityPiecesAnim.shake(800):o.ckeckIfFieldIsOK(s)?o.numeroIdentiteAnim.shake(800):o.ckeckIfFieldIsOK(c)?o.identityDateExpiryAnim.shake(800):o.props.createIndentificationAction({lastname:o.state.lastname,firstname:"",birth_date:V(o.state.dateNaissance).format('DD-MM-YYYY'),town:o.state.townName,country:o.state.country,identity_document:o.state.identityPiecesName,id_identity_document:o.state.numeroIdentite,expiry_date_document:V(o.state.dateExpiration).format('DD-MM-YYYY'),phone_number:null,id_user:o.state.user.id,gender:o.state.gender}),o.setState({triggerSubmitClick:!0})},o.renderLoader=function(){return p.default.createElement(x.ProgressDialog,{visible:o.props.loading,title:w.default.t('LOADING'),message:w.default.t('LOADING_INFO')})},o.renderDateNaissancePicker=function(){return p.default.createElement(S.default,{testID:"dateTimePicker",timeZoneOffsetInMinutes:0,is24Hour:!0,value:(0,k.default)(o.state.dateNaissance)?new Date:o.state.dateNaissance,mode:"date",maximumDate:new Date,display:"spinner",onChange:o.onChangeDateNaissance})},o.renderDateExpirationPicker=function(){return p.default.createElement(S.default,{testID:"dateTimePicker",timeZoneOffsetInMinutes:0,is24Hour:!0,value:(0,k.default)(o.state.dateExpiration)?new Date:o.state.dateExpiration,mode:"date",maximumDate:new Date(2300,10,20),display:"spinner",onChange:o.onChangeDateExpiration})},o.state={lastname:'',numeroIdentite:null,dateNaissance:null,dateExpiration:null,networksinglePickerVisible:!1,isLoging:!1,countries:[],town:[],townName:null,country:null,identityPieces:(0,F.identityPieces)(),identityPiecesName:w.default.t((0,F.identityPieces)()[0].name),snackVisible:!1,snackText:'',disableNetwork:!1,networks:[],showPickerDateNaissance:!1,showPickerDateExpiration:!1,modalVisible:!0,select_network:w.default.t("SELECT_NETWORK"),user:null,triggerSubmitClick:!1,sexe:[{label:w.default.t('MASCULIN'),value:"M"},{label:w.default.t('FEMININ'),value:"F"}],gender:'M'},o.dateNaissanceFumiProps={},o.dateExpirationFumiProps={},o.props.createIndentificationResetAction(),o}return(0,h.default)(n,t),(0,c.default)(n,[{key:"componentDidMount",value:function(){var t=this;(0,T.readUser)().then(function(n){if(n&&void 0!==n){var o=null!==n.firstname?n.firstname:'';t.setState({user:n,lastname:o+" "+n.lastname})}}),'android'===I.Platform.OS?this.requestCameraPermission():this.watchLocation()}},{key:"renderCreateIdentificationResponse",value:function(){var t=this,n=this.props,o=n.result,s=n.error;console.log("PROPS",this.props),null!==o&&void 0!==o.response&&I.Alert.alert(w.default.t('SUCCESS_IDENTIFICATION'),o.response,[{text:w.default.t("OK"),onPress:function(){t.props.createIndentificationResetAction(),t.props.getUserIdentificationAction(t.state.user.phone),t.setState({triggerSubmitClick:!1}),t.props.navigation.pop()}}],{cancelable:!1}),null!==s&&(void 0!==s.data?I.Alert.alert(w.default.t('ERROR_IDENTIFICATION'),s.data.error,[{text:w.default.t("OK"),onPress:function(){t.props.createIndentificationResetAction(),t.setState({triggerSubmitClick:!1})}}],{cancelable:!1}):I.Alert.alert(w.default.t('ERROR_IDENTIFICATION'),JSON.stringify(s),[{text:w.default.t("OK"),onPress:function(){t.props.createIndentificationResetAction()}}],{cancelable:!1}))}},{key:"componentWillUpdate",value:function(t,n){var o=n.dateNaissance||new Date;this.state.showPickerDateNaissance&&(this.dateNaissanceFumiProps.value=V(o).format('DD-MM-YYYY')),this.state.showPickerDateExpiration&&(this.dateExpirationFumiProps.value=V(n.dateExpiration).format('DD-MM-YYYY'))}},{key:"componentWillUnmount",value:function(){this.mounted=!1,this.watchID&&_.default.clearWatch(this.watchID)}},{key:"showErrorDialog",value:function(){var t=this;this.setState({modalDialog:!1}),Aler.alert("Une erreur est survenue","Impossible de r\xe9cuperer des informations du pays verifier que votre gps est activ\xe9,et que vous \xeates connect\xe9 \xe0 internet puis ressayer",[{text:"Recommencer",onPress:function(){t.watchLocation()}},{text:"Annuler",onPress:function(){t.props.navigation.popToTop()}}])}},{key:"watchLocation",value:function(){var t=this;return s.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:_.default.getCurrentPosition(function(n){t.treatPosition(n)},function(n){t.showErrorDialog()},this.props.geolocationOptions),this.watchID||_.default.watchPosition(function(n){t.treatPosition(n)},function(n){t.showErrorDialog()},this.props.geolocationOptions);case 2:case"end":return n.stop()}},null,this,null,Promise)}},{key:"requestCameraPermission",value:function(){var t=this;return s.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,s.default.awrap(I.PermissionsAndroid.request(I.PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,{title:'Cool Photo App Camera Permission',message:"Cool Photo App needs access to your camera so you can take awesome pictures."}));case 3:n.sent===I.PermissionsAndroid.RESULTS.GRANTED?this.watchLocation():(this.setState({modalDialog:!1}),I.Alert.alert("Echec \xe0 l'autorisation","L'application n'est pas autoris\xe9 \xe0 acceder \xe0 votre position veuillez verifier que votre GPS est activ\xe9 et configurer en mode Haute Precision",[{text:"Ok",onPress:function(){t.props.navigation.popToTop()}}])),n.next=11;break;case 7:n.prev=7,n.t0=n.catch(0),this.setState({modalDialog:!1}),I.Alert.alert("Une erreur est Survenue","Une erreur est survenu lors du demarrage de l'application veuillez relancer l'application",[{text:"Ok",onPress:function(){BackHandler.exitApp()}}]);case 11:case"end":return n.stop()}},null,this,[[0,7]],Promise)}},{key:"treatPosition",value:function(t){var n=this,o=this.state.myPosition,s=t.coords;(0,D.default)(s,o)||((0,b.getPositionInformation)(s).then(function(t){if(void 0!==t.results&&t.results.length>0){var o=t.results[0],s=o.address_components,l=o.formatted_address,c=o.place_id;n.setState({address:s,textadress:l,place:c});for(var u,f,h=t.results,p=0;p=s.length)break;f=s[c++]}else{if((c=s.next()).done)break;f=c.value}var h=f;h.code_country===u&&(o=!0,n.setState({modalVisible:!1,country:h.name}))}o||I.Alert.alert("Impossible de recup\xe9rer vos informations","Nous n'avons pas pu recuperer les informations de votre pays veuillez contacter les administrateurs",[{text:"OK"}])})}}).catch(function(t){n.showErrorDialog()}),this.setState({myPosition:s}))}},{key:"ckeckIfFieldIsOK",value:function(t){return(0,k.default)(t)||(0,D.default)(t.length,0)}},{key:"renderLoaderModal",value:function(){return p.default.createElement(O.MaterialDialog,{visible:this.state.modalVisible,title:w.default.t("LOADING_INFO")},p.default.createElement(I.View,{style:{justifyContent:'center',alignItems:'center'}},p.default.createElement(I.Text,null,w.default.t("LOADING_DESCRIPTION_COUNTRY")),p.default.createElement(I.ProgressBarAndroid,null)))}},{key:"render",value:function(){var t=this;return console.log("STATE",this.state),p.default.createElement(p.default.Fragment,null,this.state.showPickerDateNaissance&&this.renderDateNaissancePicker(),this.state.showPickerDateExpiration&&this.renderDateExpirationPicker(),this.state.modalVisible&&this.renderLoaderModal(),this.props.loading&&this.renderLoader(),this.state.triggerSubmitClick&&this.renderCreateIdentificationResponse(),p.default.createElement(I.ScrollView,{style:W.container},p.default.createElement(I.Text,{style:W.subbigtitle},w.default.t('CREATE_IDENTIFICATION_TITLE')),p.default.createElement(y.View,{ref:function(n){t.lastnameAnim=n}},p.default.createElement(C.Fumi,{iconClass:E.default,iconName:'user',label:w.default.t('NAME')+" "+w.default.t('AND')+" "+w.default.t('FIRSTNAME'),iconColor:'#f95a25',iconSize:20,value:this.state.lastname,onChangeText:function(n){t.setState({lastname:n})},style:W.input})),p.default.createElement(y.View,{ref:function(n){t.datenaissanceAnim=n}},p.default.createElement(C.Fumi,(0,o.default)({iconClass:E.default,iconName:'calendar',label:w.default.t('DATE_NAISSANCE'),iconColor:'#f95a25',iconSize:20,style:W.input,onFocus:function(){I.Keyboard.dismiss(),t.setState({showPickerDateNaissance:!0})}},this.dateNaissanceFumiProps))),p.default.createElement(y.View,{ref:function(n){t.countryAnim=n},style:{width:(0,v.responsiveWidth)(90),height:60,marginTop:20,alignSelf:'center',borderRadius:10,paddingLeft:20,paddingRight:20,backgroundColor:'white'}},p.default.createElement(A.Dropdown,{label:w.default.t('COUNTRY_CHOICE'),data:this.state.countries,useNativeDriver:!0,value:null===this.state.country?"":this.state.country,onChangeText:function(n,o,s){t.setState({country:n})},valueExtractor:function(t){return t.name},labelExtractor:function(t){return t.name}})),p.default.createElement(y.View,{ref:function(n){t.townAnim=n},style:{width:(0,v.responsiveWidth)(90),height:60,marginTop:20,alignSelf:'center',borderRadius:10,paddingLeft:20,paddingRight:20,backgroundColor:'white'}},p.default.createElement(A.Dropdown,{label:w.default.t('CHOICE_TOWN'),data:this.state.town,useNativeDriver:!0,value:null===this.state.townName?"":this.state.townName,onChangeText:function(n,o,s){t.setState({townName:n})},valueExtractor:function(t){return t.name},labelExtractor:function(t){return t.name}})),p.default.createElement(y.View,{ref:function(n){t.identityPiecesAnim=n},style:{width:(0,v.responsiveWidth)(90),height:60,marginTop:20,alignSelf:'center',borderRadius:10,paddingLeft:20,paddingRight:20,backgroundColor:'white'}},p.default.createElement(A.Dropdown,{label:w.default.t('PIECE_IDENTITE'),data:this.state.identityPieces,useNativeDriver:!0,value:this.state.identityPiecesName,onChangeText:function(n,o,s){t.setState({identityPiecesName:n})},valueExtractor:function(t){return w.default.t(t.name)},labelExtractor:function(t){return w.default.t(t.name)}})),p.default.createElement(y.View,{ref:function(n){t.numeroIdentiteAnim=n}},p.default.createElement(C.Fumi,{iconClass:E.default,iconName:'address-card',label:""+w.default.t('NUMERO_IDENTITE'),iconColor:'#f95a25',iconSize:20,onChangeText:function(n){t.setState({numeroIdentite:n})},style:W.input})),p.default.createElement(y.View,{ref:function(n){t.identityDateExpiryAnim=n}},p.default.createElement(C.Fumi,(0,o.default)({iconClass:E.default,iconName:'calendar-times-o',label:w.default.t('IDENTITY_PIECE_EXPIRY_DATE'),iconColor:'#f95a25',iconSize:20,style:W.input,onFocus:function(){I.Keyboard.dismiss(),t.setState({showPickerDateExpiration:!0})}},this.dateExpirationFumiProps))),p.default.createElement(I.View,{style:{paddingLeft:20,paddingRight:20,marginTop:10,flexDirection:'row',justifyContent:"space-between"}},p.default.createElement(I.Text,{style:{color:P.Color.whiteColor}},w.default.t('SEXE')),p.default.createElement(I.View,{style:W.contentSwitch},p.default.createElement(Y.default,{options:this.state.sexe,initial:0,buttonColor:P.Color.accentColor,backgroundColor:P.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(n){t.setState({gender:n})}}))),p.default.createElement(N.default,{style:W.btnvalide,textStyle:W.textbtnvalide,isLoading:this.state.isLoging,onPress:function(){t.onSubmitIdentityClient()}},w.default.t('SUBMIT_LABEL'))))}}]),n})(p.Component);U.navigatorStyle={navBarBackgroundColor:P.Color.primaryColor,statusBarColor:P.Color.primaryDarkColor,navBarTextColor:'#FFFFFF',navBarButtonColor:'#FFFFFF'},U.navigationOptions=function(){return{drawerLabel:function(){return null},headerTitle:w.default.t('CREATION_IDENTIFICATION_DESCRIPTION'),headerTintColor:'white',headerStyle:{backgroundColor:P.Color.primaryColor,marginTop:0,color:'white'},headerTitleStyle:{color:"white"},title:w.default.t('CREATION_IDENTIFICATION_DESCRIPTION')}};var K=(0,R.connect)(function(t){return{loading:t.createIdentificationReducer.loading,result:t.createIdentificationReducer.result,error:t.createIdentificationReducer.error}},function(t){return(0,L.bindActionCreators)({createIndentificationAction:M.createIndentificationAction,createIndentificationResetAction:M.createIndentificationResetAction,getUserIdentificationAction:M.getUserIdentificationAction},t)})(U);e.default=K;var W=I.StyleSheet.create({container:{flex:1,backgroundColor:P.Color.primaryDarkColor},textbtnvalide:{color:'white',fontWeight:'bold'},bigtitle:{color:'white',fontSize:20,flex:1,fontWeight:'bold',textAlign:'center',margin:20},subbigtitle:{color:'white',fontSize:17,textAlign:'center',margin:5},btnvalide:{marginTop:20,marginLeft:20,marginRight:20,borderColor:'transparent',backgroundColor:P.Color.accentLightColor,height:52},input:{height:60,marginTop:(0,v.responsiveHeight)(2),marginLeft:(0,v.responsiveWidth)(5),marginRight:(0,v.responsiveWidth)(5),borderRadius:5},contentSwitch:{width:(0,v.responsiveWidth)(40)}})},1782,[4,1,6,273,8,9,10,12,13,15,18,538,534,703,749,716,719,688,1625,1031,1763,979,770,1528,718,774,810,1658,1046,1063,1770,771,813,814,1038]); @@ -1825,7 +1825,7 @@ __d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__e __d(function(g,r,i,a,m,e,d){var t=r(d[0]),l=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=l(r(d[2])),n=l(r(d[3])),s=l(r(d[4])),u=l(r(d[5])),c=l(r(d[6])),f=l(r(d[7])),p=l(r(d[8])),y=t(r(d[9])),E=r(d[10]),h=l(r(d[11])),C=r(d[12]),w=r(d[13]),T=r(d[14]),x=r(d[15]),b=l(r(d[16])),I=r(d[17]),_=r(d[18]),D=r(d[19]),A=r(d[20]),S=r(d[21]),V=r(d[22]),v=r(d[23]),N=t(r(d[24])),P=l(r(d[25])),R=l(r(d[26])),B=l(r(d[27])),k=(r(d[28]),r(d[29]),(function(t){function l(t){var n;return(0,o.default)(this,l),(n=(0,s.default)(this,(0,u.default)(l).call(this,t))).renderBreakEpargneRespons=function(){var t=n.props,l=t.result,o=t.error;null!==o&&void 0!==o.data&&E.Alert.alert(h.default.t("ERROR_LABLE"),o.data.error,[{text:h.default.t("OK"),onPress:function(){n.props.casserEpargneUserReset()}}],{cancelable:!1}),null!==l&&null!==l.response&&E.Alert.alert(h.default.t("BREAK_EPARGNE_DONE"),l.response,[{text:h.default.t("OK"),onPress:function(){n.props.casserEpargneUserReset(),D.IlinkEmitter.emit("refreshWallet"),n.props.navigation.pop()}}],{cancelable:!1})},n.onSubmitCasserEpargne=function(){var t=n.state,l=t.idEpargne,o=t.password;n.ckeckIfFieldIsOK(l)?n.idEpargneAnim.shake(800):n.ckeckIfFieldIsOK(o)?n.passwordAnim.shake(800):n.props.casserEpargneUserAction({id_user:n.state.user.id,id_epargne:n.state.idEpargne,password:n.state.password},0),n.setState({isDataSubmit:!0})},n.renderLoader=function(){return y.default.createElement(w.ProgressDialog,{visible:n.props.loading||n.props.loadingGetCommission||n.props.loadingNanoCreditHistory,title:h.default.t('LOADING'),message:h.default.t('LOADING_INFO')})},n.renderModalHistoryDetail=function(){return y.default.createElement(B.default.Container,{useNativeDriver:!0,visible:n.state.displayModalHistory},y.default.createElement(B.default.Title,null,h.default.t('DEMAND_DETAIL')),y.default.createElement(E.ScrollView,null,y.default.createElement(E.View,{style:[O.blockView,{borderBottomColor:I.Color.borderColor}]},y.default.createElement(E.View,{style:{flexDirection:'row',marginTop:10}},y.default.createElement(E.View,{style:{flex:1}},y.default.createElement(E.Text,{style:[O.body2]},h.default.t('ID_SAVINGS'))),y.default.createElement(E.View,{style:{flex:1,alignItems:'flex-end'}},y.default.createElement(E.Text,{style:[_.Typography.caption1,I.Color.grayColor]},n.state.historyItemDetail.id_epargne))),y.default.createElement(E.View,{style:{flexDirection:'row',marginTop:10}},y.default.createElement(E.View,{style:{flex:1}},y.default.createElement(E.Text,{style:[O.body2]},h.default.t('STATUS'))),y.default.createElement(E.View,{style:{flex:1,alignItems:'flex-end'}},y.default.createElement(E.Text,{style:[_.Typography.caption1,I.Color.grayColor]},n.state.historyItemDetail.etat))),y.default.createElement(E.View,{style:{flexDirection:'row',marginTop:10}},y.default.createElement(E.View,{style:{flex:1}},y.default.createElement(E.Text,{style:[O.body2]},h.default.t('DEMAND_DURATION_IN_MONTH'))),y.default.createElement(E.View,{style:{flex:1,alignItems:'flex-end'}},y.default.createElement(E.Text,{style:[_.Typography.caption1,I.Color.grayColor]},n.state.historyItemDetail.duree_mois))),y.default.createElement(E.View,{style:{flexDirection:'row',marginTop:10}},y.default.createElement(E.View,{style:{flex:1}},y.default.createElement(E.Text,{style:[O.body2]},"Type")),y.default.createElement(E.View,{style:{flex:1,alignItems:'flex-end'}},y.default.createElement(E.Text,{style:[_.Typography.caption1,I.Color.grayColor]},n.state.historyItemDetail.type))),y.default.createElement(E.View,{style:{flexDirection:'row',marginTop:10}},y.default.createElement(E.View,{style:{flex:1}},y.default.createElement(E.Text,{tyle:[_.Typography.body2]},h.default.t('AMOUNT'))),y.default.createElement(E.View,{style:{flex:1,alignItems:'flex-end'}},y.default.createElement(E.Text,{style:[_.Typography.caption1,I.Color.grayColor]},n.state.historyItemDetail.montant+' '+n.state.wallet.currency_code))),y.default.createElement(E.View,{style:{flexDirection:'row',marginTop:10}},y.default.createElement(E.View,{style:{flex:1}},y.default.createElement(E.Text,{tyle:[_.Typography.body2]},h.default.t('AMOUNT_WITHDRAWAL'))),y.default.createElement(E.View,{style:{flex:1,alignItems:'flex-end'}},y.default.createElement(E.Text,{style:[_.Typography.caption1,I.Color.grayColor]},n.state.historyItemDetail.montant_retire+' '+n.state.wallet.currency_code))),y.default.createElement(E.View,{style:{flexDirection:'row',marginTop:10}},y.default.createElement(E.View,{style:{flex:1}},y.default.createElement(E.Text,{tyle:[_.Typography.body2]},h.default.t('TAXES'))),y.default.createElement(E.View,{style:{flex:1,alignItems:'flex-end'}},y.default.createElement(E.Text,{style:[_.Typography.caption1,I.Color.grayColor]},n.state.historyItemDetail.taxe+' '+n.state.wallet.currency_code))),y.default.createElement(E.View,{style:{flexDirection:'row',marginTop:10}},y.default.createElement(E.View,{style:{flex:1}},y.default.createElement(E.Text,{tyle:[_.Typography.body2]},h.default.t('INTERET'))),y.default.createElement(E.View,{style:{flex:1,alignItems:'flex-end'}},y.default.createElement(E.Text,{style:[_.Typography.caption1,I.Color.grayColor]},n.state.historyItemDetail.interet+' '+n.state.wallet.currency_code))),y.default.createElement(E.View,{style:{flexDirection:'row',marginTop:10}},y.default.createElement(E.View,{style:{flex:1}},y.default.createElement(E.Text,{style:[O.body2]},h.default.t('CREATION_DATE'))),y.default.createElement(E.View,{style:{flex:1,alignItems:'flex-end'}},y.default.createElement(E.Text,{style:[_.Typography.caption1,I.Color.grayColor]},n.state.historyItemDetail.date_creation))),y.default.createElement(E.View,{style:{flexDirection:'row',marginTop:10}},y.default.createElement(E.View,{style:{flex:1}},y.default.createElement(E.Text,{tyle:[_.Typography.body2]},h.default.t('FINAL_DATE'))),y.default.createElement(E.View,{style:{flex:1,alignItems:'flex-end'}},y.default.createElement(E.Text,{style:[_.Typography.caption1,I.Color.grayColor]},(0,f.default)(n.state.historyItemDetail.type,'SIMPLE')?h.default.t('NON_APPLICABLE'):n.state.historyItemDetail.date_fin))),y.default.createElement(E.View,{style:{flexDirection:'row',marginTop:10}},y.default.createElement(E.View,{style:{flex:1}},y.default.createElement(E.Text,{tyle:[_.Typography.body2]},h.default.t('CASSATION_DATE'))),y.default.createElement(E.View,{style:{flex:1,alignItems:'flex-end'}},y.default.createElement(E.Text,{style:[_.Typography.caption1,I.Color.grayColor]},n.state.historyItemDetail.date_cassation))))),y.default.createElement(B.default.Button,{bold:!0,label:h.default.t('CANCEL_LABEL'),onPress:function(){n.setState({displayModalHistory:!n.state.displayModalHistory})}}),y.default.createElement(B.default.Button,{bold:!0,label:h.default.t('SUBMIT_LABEL'),onPress:function(){n.setState({displayPasswordModal:!n.state.displayPasswordModal})}}))},n.renderPasswordDialog=function(){return y.default.createElement(B.default.Container,{useNativeDriver:!0,visible:n.state.displayPasswordModal},y.default.createElement(B.default.Title,null,h.default.t('PASSWORD')),y.default.createElement(B.default.Input,{placeholder:h.default.t('PLEASE_ENTER_THE_PASSWORD'),style:{borderBottomWidth:1,borderBottomColor:I.Color.borderColor},showSoftInputOnFocus:!0,onChangeText:function(t){n.setState({password:t})},secureTextEntry:!0,value:n.state.password,onSubmitEditing:function(){n.setState({displayPasswordModal:!1,displayModalHistory:!1,isDataSubmit:!0}),n.props.refundCreditDemandUserAction({id_user:n.state.user.id,id_epargne:n.state.historyItemDetail.id_epargne,password:n.state.password})}}),y.default.createElement(B.default.Button,{label:h.default.t('CANCEL_LABEL'),onPress:function(){n.setState({displayPasswordModal:!n.state.displayPasswordModal})}}),y.default.createElement(B.default.Button,{label:h.default.t('SUBMIT_LABEL'),onPress:function(){n.setState({displayPasswordModal:!1,displayModalHistory:!1,isDataSubmit:!0}),n.props.casserEpargneUserAction({id_user:n.state.user.id,id_epargne:n.state.historyItemDetail.id_epargne,password:n.state.password})}}))},n.renderNanoCreditItem=function(t,l){return y.default.createElement(E.TouchableOpacity,{onPress:function(){n.setState({displayModalHistory:!0,historyItemDetail:t})},style:[O.contentService,{borderBottomColor:I.Color.primaryColor}]},Object.keys((0,b.default)(t,['id','id_epargne','montant_retire','type','date_demande','date_fin','date_remboursement_prevu','date_validation','date_cassation','date_remboursement','id_demande','duree_mois','taxe','date_fin','date_cassation','id_user','id_network','user','partiellement_rembourse','user_phone','interet','date_remboursement_prevu','date_remboursement','id_wallet_agent','retrait_cash','codeParrain','agent','montant_rembourse',''])).map(function(l,o){return y.default.createElement(E.View,{style:{alignItems:'center'},key:o},y.default.createElement(E.Text,{style:(_.Typography.overline,I.Color.grayColor,{marginTop:4})},(0,f.default)(l,'montant')?" "+(t[l].length>8?(0,v.cutString)((0,R.default)(t[l],' '),6):(0,R.default)(t[l],' '))+" "+n.state.wallet.currency_code:(0,f.default)(l,'date_creation')?(0,v.cutStringWithoutDot)(t[l],16):t[l]))}))},n.renderNanoCreditList=function(){var t=n.props,l=t.errorNanoCreditHistory,o=t.resultNanoCreditHistory;return null!==l?void 0!==l.data?y.default.createElement(E.View,{style:{flex:1,justifyContent:'center',alignItems:'center'}},y.default.createElement(E.Text,{style:_.Typography.body1},l.data.error)):y.default.createElement(E.View,{style:{flex:1,justifyContent:'center',alignItems:'center'}},y.default.createElement(E.Text,{style:_.Typography.body1},l)):null!==o&&null!==o.response?Array.isArray(o.response)&&o.response.length>0?y.default.createElement(y.default.Fragment,null,y.default.createElement(E.View,{style:[O.contentService,{borderBottomColor:I.Color.primaryColor}]},(0,v.nanoCreditHistoryLabel)().map(function(t,l){return y.default.createElement(E.View,{style:{alignItems:'center'},key:l},y.default.createElement(P.default,{name:t.icon,size:24,color:I.Color.primaryColor}),y.default.createElement(E.Text,{style:(_.Typography.overline,I.Color.grayColor,{marginTop:4})},h.default.t(t.label)))})),o.response.map(function(t,l){return n.renderNanoCreditItem(t,l)})):y.default.createElement(E.View,{style:{flex:1,justifyContent:'center',alignItems:'flex-start'}},y.default.createElement(E.Text,{style:_.Typography.body1},h.default.t('NO_SAVINGS'))):void 0},n.renderNanoCreditHistory=function(){return y.default.createElement(E.View,{style:{backgroundColor:I.Color.containerBackgroundColor,flex:1}},n.props.loadingNanoCreditHistory?y.default.createElement(E.View,{style:{flex:1,justifyContent:'center',alignItems:'center'}},y.default.createElement(y.default.Fragment,null,y.default.createElement(E.ProgressBarAndroid,null),y.default.createElement(E.Text,null,h.default.t('LOADING_DOTS')))):n.renderNanoCreditList())},n.state={password:null,idEpargne:null,codeGroup:null,loading:!1,user:null,triggerSubmitClick:!1,isSubmitClick:!1,isDataSubmit:!1,isModalConfirmVisible:!1,isGroupToModify:!1,displayModalHistory:!1,historyItemDetail:null,isDataHasLoaded:!1,displayPasswordModal:!1,wallet:n.props.navigation.state.params.wallet},n.props.getEpargneInProgressReset(),n}return(0,c.default)(l,t),(0,n.default)(l,[{key:"componentDidMount",value:function(){var t=this;(0,A.readUser)().then(function(l){l&&void 0!==l&&(t.setState({user:l}),t.props.getEpargneInProgressAction(l.id))})}},{key:"ckeckIfFieldIsOK",value:function(t){return(0,p.default)(t)||(0,f.default)(t.length,0)}},{key:"updateLangue",value:function(){this.props.navigation.setParams({name:h.default.t('REFUND_NANO_CREDIT')}),this.forceUpdate()}},{key:"ckeckIfFieldIsOK",value:function(t){return(0,p.default)(t)||(0,f.default)(t.length,0)}},{key:"render",value:function(){return y.default.createElement(y.default.Fragment,null,(this.props.loading||this.props.loadingGetCommission||this.props.loadingNanoCreditHistory)&&this.renderLoader(),this.state.isDataSubmit&&this.renderBreakEpargneRespons(),this.state.displayModalHistory&&this.renderModalHistoryDetail(),this.state.displayPasswordModal&&this.renderPasswordDialog(),y.default.createElement(E.ScrollView,{style:O.container},y.default.createElement(E.View,{style:[O.checkDefault,{borderBottomColor:I.Color.borderColor}]},y.default.createElement(E.Text,{style:[_.Typography.title3,_.Typography.semibold]},h.default.t('SAVINGS_LIST'))),this.renderNanoCreditHistory()))}}]),l})(y.Component));k.navigatorStyle={navBarBackgroundColor:I.Color.primaryColor,statusBarColor:I.Color.primaryDarkColor,navBarTextColor:'#FFFFFF',navBarButtonColor:'#FFFFFF'},k.navigationOptions=function(){return{drawerLabel:function(){return null},headerTitle:h.default.t('BREAK_EPARGNE'),headerTintColor:'white',headerStyle:{backgroundColor:I.Color.primaryColor,marginTop:0,color:'white'},headerTitleStyle:{color:"white"},title:h.default.t('BREAK_EPARGNE')}};var L=(0,T.connect)(function(t){return{loading:t.casserEpargneUserReducer.loading,result:t.casserEpargneUserReducer.result,error:t.casserEpargneUserReducer.error,errorNanoCreditHistory:t.getEpargneInProgressReducer.error,resultNanoCreditHistory:t.getEpargneInProgressReducer.result,loadingNanoCreditHistory:t.getEpargneInProgressReducer.loading}},function(t){return(0,x.bindActionCreators)({casserEpargneUserAction:V.casserEpargneUserAction,casserEpargneUserReset:V.casserEpargneUserReset,getEpargneInProgressAction:S.getEpargneInProgressAction,getEpargneInProgressReset:S.getEpargneInProgressReset},t)})(k);e.default=L;var O=E.StyleSheet.create({container:{flex:1,backgroundColor:I.Color.containerBackgroundColor,paddingHorizontal:20},textbtnvalide:{color:'white',fontWeight:'bold'},bigtitle:{color:'white',fontSize:20,flex:1,fontWeight:'bold',textAlign:'center',margin:20},blockView:{paddingVertical:10,borderBottomWidth:1},subbigtitle:{color:'white',fontSize:17,textAlign:'center',margin:5},btnvalide:{marginTop:20,marginLeft:20,marginRight:20,borderColor:'transparent',backgroundColor:I.Color.accentLightColor,height:52},btnSubmit:{marginTop:20,borderColor:'transparent',backgroundColor:I.Color.accentLightColor,height:52,width:"30%",marginLeft:20,marginRight:20},input:{height:60,marginTop:(0,C.responsiveHeight)(2),marginLeft:(0,C.responsiveWidth)(5),marginRight:(0,C.responsiveWidth)(5),borderRadius:5},circlePoint:{width:50,height:50,borderRadius:25,marginRight:5,alignItems:'center',justifyContent:'center'},checkDefault:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderBottomWidth:1,paddingVertical:10,marginTop:5},transactionContainer:{flexDirection:'row',paddingTop:10},containerTouch:{flex:1,flexDirection:'row',alignItems:'center',shadowColor:I.Color.borderColor,borderColor:I.Color.borderColor,borderWidth:.5,shadowOffset:{width:1.5,height:1.5},shadowOpacity:1,elevation:5,borderRadius:10,backgroundColor:I.Color.cardBackgroundColor},contain:{flexDirection:'row',justifyContent:'space-between'},imageBanner:{marginTop:15,marginLeft:5,width:N.scaleWithPixel(30),height:N.scaleWithPixel(30)},content:{height:N.scaleWithPixel(65),paddingHorizontal:10,justifyContent:'space-between',alignItems:'flex-start',flex:1},contentTitle:{paddingTop:12},contentService:{paddingVertical:10,borderBottomWidth:.5,flexDirection:'row',flexWrap:'wrap',justifyContent:'space-between'},containField:{padding:10,marginBottom:20,borderWidth:.5,shadowOffset:{width:1.5,height:1.5},shadowOpacity:1,elevation:5,flexDirection:"row",height:140,borderRadius:10},paymentItem:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottomWidth:1,paddingVertical:5,width:(0,C.responsiveWidth)(100),marginBottom:15},iconContent:{width:60,marginRight:10,alignItems:"center"},contentLeftItem:{flex:1,paddingTop:40,paddingLeft:10,paddingRight:10,alignItems:"center"}})},1819,[4,1,8,9,10,12,13,688,1625,15,18,719,534,1528,1046,1063,552,1031,1079,772,718,1809,1776,1658,1020,881,1660,1639,813,814]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),l=n(r(d[3])),s=n(r(d[4])),u=n(r(d[5])),c=n(r(d[6])),f=n(r(d[7])),p=n(r(d[8])),h=n(r(d[9])),v=t(r(d[10])),k=r(d[11]),b=t(r(d[12])),T=n(r(d[13])),E=r(d[14]),C=r(d[15]),S=n(r(d[16])),W=r(d[17]),w=r(d[18]),B=r(d[19]),y=r(d[20]),_=r(d[21]),A=r(d[22]),R=r(d[23]),I=r(d[24]),O=r(d[25]),F=r(d[26]),L=(r(d[27]),r(d[28]),(function(t){function n(t){var l;return(0,o.default)(this,n),(l=(0,s.default)(this,(0,u.default)(n).call(this,t))).renderEnvoieWalletToBankResponse=function(){var t=l.props,n=t.resultEnvoieWalletToBank,o=t.errorEnvoieWalletToBank;null!==o&&void 0!==o.data&&k.Alert.alert(T.default.t("ERROR_TRANSFER"),o.data.error,[{text:T.default.t("OK"),onPress:function(){l.props.envoieUserWalletToBankReset()}}],{cancelable:!1}),null!==n&&null!==n.response&&k.Alert.alert(T.default.t("SUCCESS_TRANSFER"),n.response,[{text:T.default.t("OK"),onPress:function(){l.props.envoieUserWalletToBankReset(),R.IlinkEmitter.emit("refreshWallet"),l.props.navigation.pop()}}],{cancelable:!1})},l.isMontantValid=function(){var t=l.state.montant;return parseInt((0,p.default)(t,0))||t<0?{errorMessage:T.default.t('ENTER_AMOUNT_SUPERIOR_ZEROR'),isValid:!1}:(0,F.isNormalInteger)(t)?{errorMessage:'',isValid:!0}:{errorMessage:T.default.t('ENTER_VALID_AMOUNT'),isValid:!1}},l.onSubmitSendWalletToBank=function(){var t=l.state,n=t.montant,o=t.password,s=t.codeIban;l.ckeckIfFieldIsOK(s)?(s.length,l.codeIbanAnim.shake(800)):l.ckeckIfFieldIsOK(n)||!l.isMontantValid().isValid?l.montantAnim.shake(800):l.ckeckIfFieldIsOK(o)?l.passwordAnim.shake(800):(console.log("id wallet network",l.state.bank),l.props.envoieUserWalletToBankAction({type:18,id_wallet_agent:l.state.wallet.id,id_wallet_network:l.state.wallet.id_network,iban:s,id_bank:l.state.bank.id_operator,montant:n,password:o})),l.setState({isDataSubmit:!0})},l.renderLoader=function(){return v.default.createElement(C.ProgressDialog,{visible:l.props.loadingEnvoieWalletToBank,title:T.default.t('LOADING'),message:T.default.t('LOADING_INFO')})},l.state={montant:null,password:null,codeIban:null,loading:!1,user:null,triggerSubmitClick:!1,isSubmitClick:!1,isDataSubmit:!1,isModalConfirmVisible:!1,wallet:A.store.getState().walletDetailReducer.result.response,bank:l.props.navigation.state.params.bank},l.props.envoieUserWalletToBankReset(),l}return(0,c.default)(n,t),(0,l.default)(n,[{key:"componentDidMount",value:function(){var t=this;(0,I.readUser)().then(function(n){n&&void 0!==n&&t.setState({user:n})})}},{key:"componentWillReceiveProps",value:function(t){console.log('PROPS',t)}},{key:"updateLangue",value:function(){this.props.navigation.setParams({name:T.default.t('DEPOSIT_TO_CARD')}),this.forceUpdate()}},{key:"ckeckIfFieldIsOK",value:function(t){return(0,h.default)(t)||(0,p.default)(t.length,0)}},{key:"render",value:function(){var t=this;return v.default.createElement(v.default.Fragment,null,this.props.loadingEnvoieWalletToBank&&this.renderLoader(),this.state.isDataSubmit&&this.renderEnvoieWalletToBankResponse(),v.default.createElement(k.ScrollView,{style:U.container},v.default.createElement(k.Text,{style:U.subbigtitle},T.default.t('ENVOIE_WALLET_TO_BANK')),v.default.createElement(b.View,{ref:function(n){t.codeIbanAnim=n}},v.default.createElement(W.Fumi,{iconClass:S.default,iconName:'id-card',label:T.default.t('CODE_IBAN'),iconColor:'#f95a25',iconSize:20,value:this.state.codeIban,onChangeText:function(n){t.setState({codeIban:n})},style:U.input})),v.default.createElement(b.View,{ref:function(n){t.montantAnim=n}},v.default.createElement(W.Fumi,{iconClass:S.default,iconName:'money',label:T.default.t('AMOUNT'),iconColor:'#f95a25',keyboardType:"numeric",iconSize:20,value:this.state.montant,onChangeText:function(n){t.setState({montant:n})},style:U.input}),v.default.createElement(k.View,{style:{position:'absolute',left:(0,E.responsiveWidth)(82),top:35,flexDirection:'row'}},v.default.createElement(k.View,{style:{width:1,borderLeftColor:'#f0f0f0',height:40,left:-8,top:-10,borderLeftWidth:1}}),v.default.createElement(k.Text,{style:[_.Typography.body1,_.FontWeight.bold]},this.state.wallet.currency_code))),v.default.createElement(b.View,{ref:function(n){t.passwordAnim=n}},v.default.createElement(W.Fumi,{iconClass:S.default,iconName:'lock',label:T.default.t('PASSWORD'),iconColor:'#f95a25',iconSize:20,secureTextEntry:!0,value:this.state.password,onChangeText:function(n){t.setState({password:n})},style:U.input})),v.default.createElement(f.default,{style:U.btnvalide,textStyle:U.textbtnvalide,onPress:function(){t.onSubmitSendWalletToBank()}},T.default.t('SUBMIT_LABEL'))))}}]),n})(v.Component));L.navigatorStyle={navBarBackgroundColor:y.Color.primaryColor,statusBarColor:y.Color.primaryDarkColor,navBarTextColor:'#FFFFFF',navBarButtonColor:'#FFFFFF'},L.navigationOptions=function(){return{drawerLabel:function(){return null},headerTitle:T.default.t('DEPOSIT_WALLET_TO_BANK'),headerTintColor:'white',headerStyle:{backgroundColor:y.Color.primaryColor,marginTop:0,color:'white'},headerTitleStyle:{color:"white"},title:T.default.t('DEPOSIT_WALLET_TO_BANK')}};var N=(0,w.connect)(function(t){return{loadingEnvoieWalletToBank:t.envoieUserWalletToBank.loading,resultEnvoieWalletToBank:t.envoieUserWalletToBank.result,errorEnvoieWalletToBank:t.envoieUserWalletToBank.error}},function(t){return(0,B.bindActionCreators)({envoieUserWalletToBankAction:O.envoieUserWalletToBankAction,envoieUserWalletToBankReset:O.envoieUserWalletToBankReset},t)})(L);e.default=N;var U=k.StyleSheet.create({container:{flex:1,backgroundColor:y.Color.primaryDarkColor},textbtnvalide:{color:'white',fontWeight:'bold'},bigtitle:{color:'white',fontSize:20,flex:1,fontWeight:'bold',textAlign:'center',margin:20},blockView:{paddingVertical:10,borderBottomWidth:1},subbigtitle:{color:'white',fontSize:17,textAlign:'center',margin:5},btnvalide:{marginTop:20,marginLeft:20,marginRight:20,borderColor:'transparent',backgroundColor:y.Color.accentLightColor,height:52},btnSubmit:{marginTop:20,borderColor:'transparent',backgroundColor:y.Color.accentLightColor,height:52,width:"30%",marginLeft:20,marginRight:20},input:{height:60,marginTop:(0,E.responsiveHeight)(2),marginLeft:(0,E.responsiveWidth)(5),marginRight:(0,E.responsiveWidth)(5),borderRadius:5}})},1820,[4,1,8,9,10,12,13,716,688,1625,15,18,749,719,534,1528,538,703,1046,1063,1031,1079,1107,772,718,1790,1658,813,814]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),l=n(r(d[3])),s=n(r(d[4])),u=n(r(d[5])),c=n(r(d[6])),k=n(r(d[7])),f=n(r(d[8])),h=n(r(d[9])),p=t(r(d[10])),b=r(d[11]),A=t(r(d[12])),R=n(r(d[13])),C=r(d[14]),S=r(d[15]),B=r(d[16]),v=n(r(d[17])),_=r(d[18]),I=r(d[19]),T=r(d[20]),E=(r(d[21]),r(d[22])),L=r(d[23]),O=r(d[24]),w=r(d[25]),D=r(d[26]),N=r(d[27]),y=(r(d[28]),r(d[29]),(function(t){function n(t){var l;return(0,o.default)(this,n),(l=(0,s.default)(this,(0,u.default)(n).call(this,t))).isMontantValid=function(){var t=l.state.montant;return parseInt((0,f.default)(t,0))||t<0?{errorMessage:R.default.t('ENTER_AMOUNT_SUPERIOR_ZEROR'),isValid:!1}:(0,O.isNormalInteger)(t)?t>parseInt(l.state.comptePrincipal)?{errorMessage:R.default.t('AMOUNT_SUPERIOR_TO_PRINCIPAL_ACCOUNT'),isValid:!1}:{errorMessage:'',isValid:!0}:{errorMessage:R.default.t('ENTER_VALID_AMOUNT'),isValid:!1}},l.renderIlinkBankList=function(){var t=l.props,n=t.resultGetBank,o=t.errorGetBank;null!==n&&void 0!==n.response&&(n.response.length>0?l.setState({hasLoadBank:!0,ilinkBanks:n.response,bankSelect:n.response[0].bank_name+" - "+n.response[0].bank_address,bankToSend:n.response[0],modalVisible:!1}):0===n.response.length&&l.setState({hasLoadBank:!0,ilinkBanks:[],bankSelect:'',bankToSend:null,modalVisible:!1})),null!==o&&(void 0!==o.data?b.Alert.alert(R.default.t('ERROR_LABEL'),o.data.error,[{text:R.default.t("OK"),onPress:function(){l.props.getIlinkBankReset()}}],{cancelable:!1}):b.Alert.alert(R.default.t('ERROR_LABEL'),JSON.stringify(o),[{text:R.default.t("OK"),onPress:function(){l.props.getIlinkBankReset()}}],{cancelable:!1}))},l.renderReattachAccountResponse=function(){var t=l.props,n=t.result,o=t.error;null!==o&&void 0!==o.data&&b.Alert.alert(R.default.t("ERROR_LABLE"),o.data.error,[{text:R.default.t("OK"),onPress:function(){l.props.reattachAccountReset()}}],{cancelable:!1}),null!==n&&null!==n.response&&b.Alert.alert(R.default.t("DEMAND_SEND"),n.response,[{text:R.default.t("OK"),onPress:function(){l.props.reattachAccountReset(),l.props.navigation.pop()}}],{cancelable:!1})},l.onSubmitSendWalletToCard=function(){var t=l.state,n=t.iban,o=t.bankSelect;l.ckeckIfFieldIsOK(o)?l.listBankAnim.shake(800):l.ckeckIfFieldIsOK(n)?l.ibanAnim.shake(800):(console.warn("Code Iban",l.state.iban),console.warn("Bank",l.state.bankToSend),l.props.reattachAccountAction({iban:l.state.iban,id_bank:l.state.bankToSend.id_bank,id_wallet_network:l.state.wallet.id_wallet_network,id_user:l.state.user.id})),l.setState({isDataSubmit:!0})},l.renderLoader=function(){return p.default.createElement(S.ProgressDialog,{visible:l.props.loading||l.props.loadingGetBank,title:R.default.t('LOADING'),message:R.default.t('LOADING_INFO')})},l.state={codeGroupe:null,codeSponsor:null,nomGroupe:null,user:null,iban:null,bankToSend:null,ilinkBanks:[],bankSelect:null,triggerSubmitClick:!1,hasLoadBank:!1,modalVisible:!1,isSubmitClick:!1,isDataSubmit:!1,isModalConfirmVisible:!1,wallet:E.store.getState().walletDetailReducer.result.response},l.props.getIlinkBankReset(),l.props.getIlinkBankAction(l.state.wallet.id_wallet_network),l}return(0,c.default)(n,t),(0,l.default)(n,[{key:"componentDidMount",value:function(){var t=this;(0,L.readUser)().then(function(n){n&&void 0!==n&&t.setState({user:n})})}},{key:"ckeckIfFieldIsOK",value:function(t){return(0,h.default)(t)||(0,f.default)(t.length,0)}},{key:"updateLangue",value:function(){this.props.navigation.setParams({name:R.default.t('DEPOSIT_TO_CARD')}),this.forceUpdate()}},{key:"render",value:function(){var t=this;return console.log(this.state),p.default.createElement(p.default.Fragment,null,(this.props.loading||this.props.loadingGetBank)&&this.renderLoader(),this.state.isDataSubmit&&this.renderReattachAccountResponse(),!this.state.hasLoadBank&&this.renderIlinkBankList(),p.default.createElement(b.ScrollView,{style:x.container},p.default.createElement(b.Text,{style:x.subbigtitle},R.default.t('FILL_INFORMATION')),p.default.createElement(A.View,{ref:function(n){t.listBankAnim=n},style:{width:(0,C.responsiveWidth)(90),height:60,marginTop:20,alignSelf:'center',borderRadius:10,paddingLeft:20,paddingRight:20,backgroundColor:'white'}},p.default.createElement(D.Dropdown,{label:R.default.t('BANK_LIST'),data:this.state.ilinkBanks,useNativeDriver:!0,value:null!==this.state.bankSelect?this.state.bankSelect:'',onChangeText:function(n,o,l){console.log(n),t.setState({bankSelect:n.bank_name+" - "+n.bank_address,bankToSend:n})},valueExtractor:function(t){return t},labelExtractor:function(t){return t.bank_name+" - "+t.bank_address}})),p.default.createElement(A.View,{ref:function(n){t.ibanAnim=n}},p.default.createElement(B.Fumi,{iconClass:v.default,iconName:'id-card',label:R.default.t('CODE_IBAN'),iconColor:'#f95a25',iconSize:20,value:this.state.iban,onChangeText:function(n){t.setState({iban:n})},style:x.input})),p.default.createElement(k.default,{style:x.btnvalide,textStyle:x.textbtnvalide,onPress:function(){t.onSubmitSendWalletToCard()}},R.default.t('SUBMIT_LABEL'))))}}]),n})(p.Component));y.navigatorStyle={navBarBackgroundColor:T.Color.primaryColor,statusBarColor:T.Color.primaryDarkColor,navBarTextColor:'#FFFFFF',navBarButtonColor:'#FFFFFF'},y.navigationOptions=function(){return{drawerLabel:function(){return null},headerTitle:R.default.t('REATTACH_CARD'),headerTintColor:'white',headerStyle:{backgroundColor:T.Color.primaryColor,marginTop:0,color:'white'},headerTitleStyle:{color:"white"},title:R.default.t('REATTACH_CARD')}};var F=(0,_.connect)(function(t){return{loadingGetBank:t.getIlinkBankReducer.loading,resultGetBank:t.getIlinkBankReducer.result,errorGetBank:t.getIlinkBankReducer.error,loading:t.reattachAccountReducer.loading,result:t.reattachAccountReducer.result,error:t.reattachAccountReducer.error}},function(t){return(0,I.bindActionCreators)({getIlinkBankAction:N.getIlinkBankAction,getIlinkBankReset:N.getIlinkBankReset,reattachAccountAction:N.reattachAccountAction,reattachAccountReset:N.reattachAccountReset,askNanoCreditAction:w.askNanoCreditAction,getNanoCreditDemandDurationAction:w.getNanoCreditDemandDurationAction},t)})(y);e.default=F;var x=b.StyleSheet.create({container:{flex:1,backgroundColor:T.Color.primaryDarkColor},textbtnvalide:{color:'white',fontWeight:'bold'},bigtitle:{color:'white',fontSize:20,flex:1,fontWeight:'bold',textAlign:'center',margin:20},blockView:{paddingVertical:10,borderBottomWidth:1},subbigtitle:{color:'white',fontSize:17,textAlign:'center',margin:5},btnvalide:{marginTop:20,marginLeft:20,marginRight:20,borderColor:'transparent',backgroundColor:T.Color.accentLightColor,height:52},btnSubmit:{marginTop:20,borderColor:'transparent',backgroundColor:T.Color.accentLightColor,height:52,width:"30%",marginLeft:20,marginRight:20},input:{height:60,marginTop:(0,C.responsiveHeight)(2),marginLeft:(0,C.responsiveWidth)(5),marginRight:(0,C.responsiveWidth)(5),borderRadius:5}})},1821,[4,1,8,9,10,12,13,716,688,1625,15,18,749,719,534,1528,703,538,1046,1063,1031,1079,1107,718,1658,1809,979,1622,813,814]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),o=n(r(d[3])),u=n(r(d[4])),c=t(r(d[5])),s=r(d[6]),f=r(d[7]),h=n(r(d[8])),b=r(d[9]),p=t(r(d[10])),_=t(r(d[11])),E=r(d[12]),C=n(r(d[13])),w=r(d[14]),I=n(r(d[15])),S=n(r(d[16])),y=n(r(d[17])),D=n(r(d[18])),T=n(r(d[19])),A=r(d[20]),x=n(r(d[21])),R=n(r(d[22])),O=r(d[23]),M=n(r(d[24])),N=r(d[25]),F=n(r(d[26])),v=n(r(d[27])),L=t(r(d[28])),k=r(d[29]),V=r(d[30]),B=n(r(d[31])),P=r(d[32]),U=r(d[33]),Y=n(r(d[34])),j=n(r(d[35]));function H(t,n){var l=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),l.push.apply(l,o)}return l}function W(t){for(var n=1;n1?J.result.response[1]:null,marriage_certificate_doc:J.result.response[0],id_document_type:"CNI",id_document_front:J.result.response[1],id_document_back:J.result.response[2]}].concat((0,o.default)(Ft))),Ve.alertWithType('success',C.default.t('SUCCESS'),C.default.t('BENEFICIARY_SUCCESSFULLY_ADDED')),ee(!1))),J.error&&(Ve.alertWithType('error',C.default.t('ERROR_LABEL'),_.getErrorMsg(J)),ke((0,O.fetchUploadInsuranceReset)()))},[J]);var St=p.object().shape({password:p.string().required(C.default.t('THIS_FIELD_IS_REQUIRED'))}),yt=p.object().shape({lastname:p.string().required(C.default.t('THIS_FIELD_IS_REQUIRED')),firstname:p.string()}),Dt=(0,c.useState)(!0),Tt=(0,u.default)(Dt,2),At=(Tt[0],Tt[1],(0,c.useState)([{label:C.default.t('COPIE_LEGALISE_ACTE_NAISSANCE_CERTIFICAT_NAISSANCE'),name:'birthdate_proof_doc',isFrontCamera:!1,file:null,hasCheckbox:!0,checkboxValue:['CERTIFICATE','CERTIFIED_COPY'],checboxSelectedValue:'CERTIFICATE'},{label:C.default.t('DOCUMENT_JUSTICE_ENFANT_ADOPTE'),name:'justice_doc',isFrontCamera:!1,file:null,hasCheckbox:!1}])),xt=(0,u.default)(At,2),Rt=xt[0],Ot=xt[1],Mt=(0,c.useState)([]),Nt=(0,u.default)(Mt,2),Ft=Nt[0],vt=Nt[1],Lt=(0,c.useState)([{label:C.default.t('ACTE_MARIAGE'),name:'marriage_certificate_doc',isFrontCamera:!1,file:null,hasCheckbox:!1},{label:C.default.t('CNI_FRONT_FACE'),name:'id_document_front',isFrontCamera:!1,file:null,hasCheckbox:!1},{label:C.default.t('CNI_BACK_FACE'),name:'id_document_back',isFrontCamera:!1,file:null,hasCheckbox:!1}]),kt=(0,u.default)(Lt,2),Vt=kt[0],Bt=kt[1],Pt=function(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1],F.default.openCamera({cropping:!0,compressImageQuality:.7,useFrontCamera:!1}).then(function(n){var l,u;"CHILD"===gt?Ot(Rt.map(function(l){return t===l.name?l.hasCheckbox?{label:l.label,name:l.name,isFrontCamera:l.isFrontCamera,file:n,hasCheckbox:l.hasCheckbox,checkboxValue:l.checkboxValue,checboxSelectedValue:l.checboxSelectedValue}:{label:l.label,name:l.name,isFrontCamera:l.isFrontCamera,file:n}:l})):Bt(Vt.map(function(l){return t===l.name?l.hasCheckbox?{label:l.label,name:l.name,isFrontCamera:l.isFrontCamera,file:n,hasCheckbox:l.hasCheckbox,checkboxValue:l.checkboxValue,checboxSelectedValue:l.checboxSelectedValue}:{label:l.label,name:l.name,isFrontCamera:l.isFrontCamera,file:n}:l})),l=t,u=n,null!==Oe&&(Ae=Oe),Ae.append("files[]",{name:u.path.split('/').pop(),type:u.mime,uri:"android"===s.Platform.OS?u.path:u.path.replace("file://","")}),Le([l].concat((0,o.default)(ve))),Me(Ae)})},Ut=function(t,n){var l=n||Je;$e('ios'===s.Platform.OS),Qe(l)};return c.default.createElement(w.ScreenComponent,null,c.default.createElement(M.default,{ref:function(t){return Ve=t}}),c.default.createElement(s.KeyboardAvoidingView,{behavior:'android'===s.Platform.OS?'height':'padding',style:{flex:1}},c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(b.Formik,{validationSchema:St,initialValues:{password:''},onSubmit:function(t){null!==re&&(null===ce?It.shake(800):(console.log(re),console.log("insurance",ce),Te(t.password),z({network_id:ce.id,month_price_id:ce.months_prices.filter(function(t){return t.checked})[0].id,beneficiaries:Ft})))}},function(t){var n=t.values,l=t.errors,o=t.touched,u=t.handleChange,f=t.handleBlur,h=t.handleSubmit;return t.isSubmitting,c.default.createElement(s.View,{style:Q.contain},c.default.createElement(L.View,{ref:function(t){It=t},style:{width:(0,A.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,paddingRight:20,backgroundColor:'white'}},c.default.createElement(U.Dropdown,{label:C.default.t('SELECT_INSURANCE'),data:Ue,useNativeDriver:!0,onChangeText:function(t,n,l){console.log("Value",t),se({age_limit_of_child_beneficiary:t.age_limit_of_child_beneficiary,age_limit_of_insured_and_spouse:t.age_limit_of_insured_and_spouse,id:t.id,max_number_of_beneficiaries:t.max_number_of_beneficiaries,name:t.name,months_prices:t.months_prices.map(function(t,n){return{id:t.id,number_of_months:t.number_of_months,min_amount:t.min_amount,checked:0===n}})}),he(t.months_prices[0])},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),null!==ce&&c.default.createElement(L.View,{ref:function(t){},style:{width:(0,A.responsiveWidth)(90),height:60,marginTop:10,alignSelf:'center',borderRadius:10,paddingLeft:20,paddingRight:20,backgroundColor:'white'}},c.default.createElement(U.Dropdown,{label:C.default.t('AMOUNT_PER_MONTH'),value:null!==me?C.default.t('NUMBER_OF_MONTHS')+": "+me.number_of_months+" | "+C.default.t('MINIMUM_AMOUNT')+": "+me.min_amount:C.default.t('NUMBER_OF_MONTHS')+": "+ce.months_prices[0].number_of_months+" | "+C.default.t('MINIMUM_AMOUNT')+": "+ce.months_prices[0].min_amount,data:ce.months_prices.map(function(t,n){return W({checked:(0,j.default)(t.checked)?0===n:t.checked},t)}),useNativeDriver:!0,onChangeText:function(t,n,l){var o,u;console.log("Value",l[n]),he(l[n]),o=l[n],u=ce,se({age_limit_of_child_beneficiary:ce.age_limit_of_child_beneficiary,age_limit_of_insured_and_spouse:ce.age_limit_of_insured_and_spouse,id:ce.id,max_number_of_beneficiaries:ce.max_number_of_beneficiaries,name:ce.name,months_prices:u.months_prices.map(function(t){return{id:t.id,number_of_months:t.number_of_months,min_amount:t.min_amount,checked:t.id===o.id}})})},valueExtractor:function(t){return C.default.t('NUMBER_OF_MONTHS')+": "+t.number_of_months+" | "+C.default.t('MINIMUM_AMOUNT')+": "+t.min_amount},labelExtractor:function(t){return C.default.t('NUMBER_OF_MONTHS')+": "+t.number_of_months+" | "+C.default.t('MINIMUM_AMOUNT')+": "+t.min_amount}})),c.default.createElement(y.default,{style:{marginTop:10},onChangeText:u('password'),placeholder:C.default.t('PASSWORD'),secureTextEntry:!0,icon:c.default.createElement(T.default,{name:"lock",size:20}),value:n.password,onBlur:f('password'),success:o.password&&!l.password,touched:o.password,error:l.password}),c.default.createElement(s.View,{style:{flexDirection:'column',alignItems:'center',justifyContent:'space-between',marginTop:25}},c.default.createElement(s.TouchableOpacity,{onPress:function(){null===ce?Ve.alertWithType('error',C.default.t('ERROR_LABEL'),C.default.t('PLEASE_SELECT_INSURANCE_BEFORE')):(ee(!0),$e(!1),ke((0,O.fetchUploadInsuranceReset)()),pt('CHILD'),wt(new Date((new Date).getFullYear()-parseInt(ce.age_limit_of_child_beneficiary),0,1)),Qe(''+G(new Date((new Date).getFullYear()-parseInt(ce.age_limit_of_child_beneficiary),0,1)).format('YYYY-MM-DD')),_e(null),Ie(null),Le([]))}},c.default.createElement(S.default,{body1:!0,primaryColor:!0,bold:!0},C.default.t('ADD_AYANT_DROIT')))),c.default.createElement(D.default,{style:{marginTop:20},full:!0,loading:k.loading,onPress:h},C.default.t('SUBMIT_LABEL')),at&&c.default.createElement(B.default.Container,{useNativeDriver:!0,visible:at},c.default.createElement(B.default.Title,null,C.default.t('DETAIL')),c.default.createElement(s.View,null,c.default.createElement(s.View,{style:[Q.blockView,{borderBottomColor:E.Color.borderColor}]},c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(S.default,{style:[Q.body2]},C.default.t('PRIME_AMOUNT'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(S.default,{style:[P.Typography.caption1,E.Color.grayColor]},k.result.response.bonus_amount_formatted))))),c.default.createElement(B.default.Button,{bold:!0,label:C.default.t('OK'),onPress:function(){V({network_id:ce.id,user_id:re.id,password:De,beneficiaries:Ft,month_price_id:ce.months_prices.filter(function(t){return t.checked})[0].id}),ke((0,O.fetchGetInsurancePrimeAmountReset)()),nt(!1)}})))}))),$&&c.default.createElement(b.Formik,{validationSchema:yt,initialValues:{firstname:'',lastname:''},onSubmit:function(t){K(Oe),_e(t.firstname),Ie(t.lastname)}},function(t){var n=t.values,o=t.errors,u=t.touched,f=t.handleChange,b=t.handleBlur,p=t.handleSubmit;return t.isSubmitting,c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[Q.containModal,{backgroundColor:E.Color.containerBackgroundColor}]},c.default.createElement(h.default,{isVisible:$,onSwipeComplete:function(){ee(!1)},swipeDirection:['down'],style:Q.bottomModal},c.default.createElement(s.View,{style:[Q.contentFilterBottom,{backgroundColor:E.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:Q.contentSwipeDown},c.default.createElement(s.View,{style:Q.lineSwipeDown})),c.default.createElement(S.default,{body2:!0,style:{marginTop:10}},C.default.t('ADD_AYANT_DROIT')),c.default.createElement(I.default,{style:{marginTop:10},placeholder:C.default.t('NOM_ASSURE'),value:n.lastname,onChangeText:f('lastname'),onBlur:b('lastname'),success:u.lastname&&!o.lastname,touched:u.lastname,error:o.lastname}),c.default.createElement(I.default,{style:{marginTop:10},placeholder:C.default.t('PRENOM_ASSURE'),value:n.firstname,onChangeText:f('firstname'),onBlur:b('firstname'),success:u.firstname&&!o.firstname,touched:u.firstname,error:o.firstname}),c.default.createElement(I.default,{style:{marginTop:10},placeholder:C.default.t('DATE_NAISSANCE'),value:''+G(Je).format('YYYY-MM-DD'),onChangeText:f('birthdate'),onBlur:b('birthdate'),onFocus:function(){s.Keyboard.dismiss(),$e(!0)},success:u.birthdate&&!o.birthdate,touched:u.birthdate,error:o.birthdate}),c.default.createElement(s.View,{style:{marginTop:10,width:"100%",flexDirection:'row',justifyContent:"space-between"}},c.default.createElement(S.default,{body2:!0},C.default.t('SEXE')),c.default.createElement(s.View,{style:Q.contentSwitch},c.default.createElement(x.default,{options:Ge,initial:0,buttonColor:E.Color.accentColor,backgroundColor:E.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){dt(t)}}))),c.default.createElement(s.View,{style:{marginTop:10,width:"100%",flexDirection:'row',justifyContent:"space-between"}},c.default.createElement(S.default,{body2:!0},C.default.t('AFFILIATION')),c.default.createElement(s.View,{style:Q.contentSwitch},c.default.createElement(x.default,{options:mt,initial:0,buttonColor:E.Color.accentColor,backgroundColor:E.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){Le([]),wt('CHILD'===t?new Date((new Date).getFullYear()-parseInt(ce.age_limit_of_child_beneficiary),0,1):new Date((new Date).getFullYear()-parseInt(ce.age_limit_of_insured_and_spouse),0,1)),pt(t)}}))),c.default.createElement(s.View,{style:Q.contentService},c.default.createElement(s.FlatList,{horizontal:!0,showsHorizontalScrollIndicator:!1,data:'CHILD'===gt?Rt:Vt,extraData:'CHILD'===gt?Rt:Vt,keyExtractor:function(t,n){return n},renderItem:function(t){var n=t.item,l=t.index;return 0===l?c.default.createElement(s.TouchableOpacity,{style:Q.choosePhotoBtn,onPress:function(){return Pt(n.name,n.isFrontCamera)}},null===n.file?c.default.createElement(R.default,{name:"camera-image",size:50,color:E.Color.accentColor}):c.default.createElement(s.Image,{source:{uri:n.file.path},style:{width:50,height:50}}),c.default.createElement(S.default,{style:{alignSelf:'flex-start',fontSize:13},textAlign:"center"},n.label)):c.default.createElement(s.TouchableOpacity,{style:Q.choosePhotoBtn,onPress:function(){return Pt(n.name,n.isFrontCamera)},disabled:!ve.includes('CHILD'===gt?Rt[l-1].name:Vt[l-1].name)},null===n.file?c.default.createElement(R.default,{name:"camera-image",size:50,color:ve.includes('CHILD'===gt?Rt[l-1].name:Vt[l-1].name)?E.Color.accentColor:E.Color.grayColor}):c.default.createElement(s.Image,{source:{uri:n.file.path},style:{width:50,height:50}}),c.default.createElement(S.default,{style:{alignSelf:'flex-start',fontSize:13},textAlign:"center"},n.label))}})),c.default.createElement(D.default,{style:{marginTop:20,marginBottom:20},full:!0,loading:J.loading||l.loading,onPress:p},C.default.t('SUBMIT_LABEL'))))))}),ot&&c.default.createElement(h.default,{isVisible:ot,onSwipeComplete:function(){return it(!1)},swipeDirection:['down'],style:Q.bottomModal},c.default.createElement(s.View,{style:[Q.contentFilterBottom,{backgroundColor:E.Color.cardBackgroundColor}]},c.default.createElement(s.View,{style:Q.contentSwipeDown},c.default.createElement(s.View,{style:Q.lineSwipeDown})),c.default.createElement(s.View,{style:[Q.contentActionModalBottom,{borderBottomColor:E.Color.borderColor}]}),c.default.createElement(s.View,{style:[{marginBottom:40}]},c.default.createElement(s.FlatList,{data:Ft,extraData:Ft,keyExtractor:function(t,n){return n},renderItem:function(t){var n=t.item,l=t.index;return c.default.createElement(s.View,{style:Q.lineRow},c.default.createElement(s.View,{style:{alignItems:'flex-start'}},c.default.createElement(S.default,{body1:!0},C.default.t('NOM_ASSURE')),c.default.createElement(S.default,{caption1:!0,grayColor:!0},n.firstname+" "+n.lastname)),c.default.createElement(s.View,{style:{alignItems:'flex-start'}},c.default.createElement(S.default,{body1:!0},C.default.t('AFFILIATION')),c.default.createElement(S.default,{caption1:!0,grayColor:!0},'CHILD'===n.affiliation?C.default.t('ENFANT'):C.default.t('CONJOINT'))),c.default.createElement(s.View,{style:Q.iconRight},c.default.createElement(s.TouchableOpacity,{onPress:function(){var t=Ft;console.log("beneficiariesTemp index",l),t.splice(l),console.log("beneficiariesTemp",t),vt((0,o.default)(t))}},c.default.createElement(Y.default,{name:"minus-circle",size:24,color:E.Color.grayColor}))))}})),c.default.createElement(D.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:function(){it(!1)}},C.default.t('OK')))),Ze&&c.default.createElement(v.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date(Je),mode:"date",minimumDate:Ct,display:"spinner",onChange:Ut}),Ft.length>=1&&c.default.createElement(s.TouchableOpacity,{style:{alignItems:'center',flexDirection:'row',width:60,position:'absolute',bottom:10,right:10,height:60,padding:3,backgroundColor:E.Color.primaryColor,borderRadius:100},onPress:function(){return it(!0)}},c.default.createElement(S.default,{whiteColor:!0,title2:!0},Ft.length),c.default.createElement(S.default,{whiteColor:!0,caption2:!0},C.default.t('AYANT_DROIT'))))});e.default=X},1822,[4,1,7,33,27,15,18,1046,1823,1827,1950,1658,1031,719,2147,2158,2157,2159,2162,538,534,771,881,1779,2164,718,1781,1763,749,2180,2182,1639,1079,979,1013,1625,1189]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),o=n(r(d[3])),u=n(r(d[4])),c=t(r(d[5])),s=r(d[6]),f=r(d[7]),h=n(r(d[8])),b=r(d[9]),_=t(r(d[10])),p=t(r(d[11])),E=r(d[12]),C=n(r(d[13])),w=r(d[14]),I=n(r(d[15])),S=n(r(d[16])),y=n(r(d[17])),D=n(r(d[18])),A=n(r(d[19])),x=r(d[20]),T=n(r(d[21])),O=n(r(d[22])),R=r(d[23]),M=n(r(d[24])),N=r(d[25]),F=n(r(d[26])),v=n(r(d[27])),L=t(r(d[28])),k=r(d[29]),P=r(d[30]),V=n(r(d[31])),B=r(d[32]),U=r(d[33]),Y=n(r(d[34])),j=n(r(d[35]));function H(t,n){var l=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),l.push.apply(l,o)}return l}function G(t){for(var n=1;n1?J.result.response[1]:null,marriage_certificate_doc:J.result.response[0],id_document_type:"CNI",id_document_front:J.result.response[1],id_document_back:J.result.response[2]}].concat((0,o.default)(Ft))),Pe.alertWithType('success',C.default.t('SUCCESS'),C.default.t('BENEFICIARY_SUCCESSFULLY_ADDED')),ee(!1))),J.error&&s.Alert.alert(C.default.t("ERROR_LABLE"),p.getErrorMsg(J),[{text:C.default.t("OK"),onPress:function(){ke((0,R.fetchUploadInsuranceReset)())}}],{cancelable:!1})},[J]);var St=_.object().shape({password:_.string().required(C.default.t('THIS_FIELD_IS_REQUIRED'))}),yt=_.object().shape({lastname:_.string().required(C.default.t('THIS_FIELD_IS_REQUIRED')),firstname:_.string()}),Dt=(0,c.useState)(!0),At=(0,u.default)(Dt,2),xt=(At[0],At[1],(0,c.useState)([{label:C.default.t('COPIE_LEGALISE_ACTE_NAISSANCE_CERTIFICAT_NAISSANCE'),name:'birthdate_proof_doc',isFrontCamera:!1,file:null,hasCheckbox:!0,checkboxValue:['CERTIFICATE','CERTIFIED_COPY'],checboxSelectedValue:'CERTIFICATE'},{label:C.default.t('DOCUMENT_JUSTICE_ENFANT_ADOPTE'),name:'justice_doc',isFrontCamera:!1,file:null,hasCheckbox:!1}])),Tt=(0,u.default)(xt,2),Ot=Tt[0],Rt=Tt[1],Mt=(0,c.useState)([]),Nt=(0,u.default)(Mt,2),Ft=Nt[0],vt=Nt[1],Lt=(0,c.useState)([{label:C.default.t('ACTE_MARIAGE'),name:'marriage_certificate_doc',isFrontCamera:!1,file:null,hasCheckbox:!1},{label:C.default.t('CNI_FRONT_FACE'),name:'id_document_front',isFrontCamera:!1,file:null,hasCheckbox:!1},{label:C.default.t('CNI_BACK_FACE'),name:'id_document_back',isFrontCamera:!1,file:null,hasCheckbox:!1}]),kt=(0,u.default)(Lt,2),Pt=kt[0],Vt=kt[1],Bt=function(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1],F.default.openCamera({cropping:!0,compressImageQuality:.7,useFrontCamera:!1}).then(function(n){var l,u;"CHILD"===gt?Rt(Ot.map(function(l){return t===l.name?l.hasCheckbox?{label:l.label,name:l.name,isFrontCamera:l.isFrontCamera,file:n,hasCheckbox:l.hasCheckbox,checkboxValue:l.checkboxValue,checboxSelectedValue:l.checboxSelectedValue}:{label:l.label,name:l.name,isFrontCamera:l.isFrontCamera,file:n}:l})):Vt(Pt.map(function(l){return t===l.name?l.hasCheckbox?{label:l.label,name:l.name,isFrontCamera:l.isFrontCamera,file:n,hasCheckbox:l.hasCheckbox,checkboxValue:l.checkboxValue,checboxSelectedValue:l.checboxSelectedValue}:{label:l.label,name:l.name,isFrontCamera:l.isFrontCamera,file:n}:l})),l=t,u=n,null!==Re&&(xe=Re),xe.append("files[]",{name:u.path.split('/').pop(),type:u.mime,uri:"android"===s.Platform.OS?u.path:u.path.replace("file://","")}),Le([l].concat((0,o.default)(ve))),Me(xe)})},Ut=function(t,n){var l=n||Je;$e('ios'===s.Platform.OS),Qe(l)};return c.default.createElement(w.ScreenComponent,null,c.default.createElement(M.default,{ref:function(t){return Pe=t}}),c.default.createElement(s.KeyboardAvoidingView,{behavior:'android'===s.Platform.OS?'height':'padding',style:{flex:1}},c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(b.Formik,{validationSchema:St,initialValues:{password:''},onSubmit:function(t){null!==re&&(null===ce?It.shake(800):(console.log(re),console.log("insurance",ce),Ae(t.password),z({network_id:ce.id,month_price_id:ce.months_prices.filter(function(t){return t.checked})[0].id,beneficiaries:Ft})))}},function(t){var n=t.values,l=t.errors,o=t.touched,u=t.handleChange,f=t.handleBlur,h=t.handleSubmit;return t.isSubmitting,c.default.createElement(s.View,{style:Q.contain},c.default.createElement(L.View,{ref:function(t){It=t},style:{width:(0,x.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,paddingRight:20,backgroundColor:'white'}},c.default.createElement(U.Dropdown,{label:C.default.t('SELECT_INSURANCE'),data:Ue,useNativeDriver:!0,onChangeText:function(t,n,l){console.log("Value",t),se({age_limit_of_child_beneficiary:t.age_limit_of_child_beneficiary,age_limit_of_insured_and_spouse:t.age_limit_of_insured_and_spouse,id:t.id,max_number_of_beneficiaries:t.max_number_of_beneficiaries,name:t.name,months_prices:t.months_prices.map(function(t,n){return{id:t.id,number_of_months:t.number_of_months,min_amount:t.min_amount,checked:0===n}})}),he(t.months_prices[0])},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),null!==ce&&c.default.createElement(L.View,{ref:function(t){},style:{width:(0,x.responsiveWidth)(90),height:60,marginTop:10,alignSelf:'center',borderRadius:10,paddingLeft:20,paddingRight:20,backgroundColor:'white'}},c.default.createElement(U.Dropdown,{label:C.default.t('AMOUNT_PER_MONTH'),value:null!==me?C.default.t('NUMBER_OF_MONTHS')+": "+me.number_of_months+" | "+C.default.t('MINIMUM_AMOUNT')+": "+me.min_amount:C.default.t('NUMBER_OF_MONTHS')+": "+ce.months_prices[0].number_of_months+" | "+C.default.t('MINIMUM_AMOUNT')+": "+ce.months_prices[0].min_amount,data:ce.months_prices.map(function(t,n){return G({checked:(0,j.default)(t.checked)?0===n:t.checked},t)}),useNativeDriver:!0,onChangeText:function(t,n,l){var o,u;console.log("Value",l[n]),he(l[n]),o=l[n],u=ce,se({age_limit_of_child_beneficiary:ce.age_limit_of_child_beneficiary,age_limit_of_insured_and_spouse:ce.age_limit_of_insured_and_spouse,id:ce.id,max_number_of_beneficiaries:ce.max_number_of_beneficiaries,name:ce.name,months_prices:u.months_prices.map(function(t){return{id:t.id,number_of_months:t.number_of_months,min_amount:t.min_amount,checked:t.id===o.id}})})},valueExtractor:function(t){return C.default.t('NUMBER_OF_MONTHS')+": "+t.number_of_months+" | "+C.default.t('MINIMUM_AMOUNT')+": "+t.min_amount},labelExtractor:function(t){return C.default.t('NUMBER_OF_MONTHS')+": "+t.number_of_months+" | "+C.default.t('MINIMUM_AMOUNT')+": "+t.min_amount}})),c.default.createElement(y.default,{style:{marginTop:10},onChangeText:u('password'),placeholder:C.default.t('PASSWORD'),secureTextEntry:!0,icon:c.default.createElement(A.default,{name:"lock",size:20}),value:n.password,onBlur:f('password'),success:o.password&&!l.password,touched:o.password,error:l.password}),c.default.createElement(s.View,{style:{flexDirection:'column',alignItems:'center',justifyContent:'space-between',marginTop:25}},c.default.createElement(s.TouchableOpacity,{onPress:function(){null===ce?s.Alert.alert(C.default.t("ERROR_LABLE"),C.default.t("PLEASE_SELECT_INSURANCE_BEFORE"),p.getErrorMsg(J),[{text:C.default.t("OK"),onPress:function(){}}],{cancelable:!1}):(ee(!0),$e(!1),ke((0,R.fetchUploadInsuranceReset)()),_t('CHILD'),wt(new Date((new Date).getFullYear()-parseInt(ce.age_limit_of_child_beneficiary),0,1)),Qe(''+K(new Date((new Date).getFullYear()-parseInt(ce.age_limit_of_child_beneficiary),0,1)).format('YYYY-MM-DD')),pe(null),Ie(null),Le([]))}},c.default.createElement(S.default,{body1:!0,primaryColor:!0,bold:!0},C.default.t('ADD_AYANT_DROIT')))),c.default.createElement(D.default,{style:{marginTop:20},full:!0,loading:k.loading,onPress:h},C.default.t('SUBMIT_LABEL')),at&&c.default.createElement(V.default.Container,{useNativeDriver:!0,visible:at},c.default.createElement(V.default.Title,null,C.default.t('DETAIL')),c.default.createElement(s.View,null,c.default.createElement(s.View,{style:[Q.blockView,{borderBottomColor:E.Color.borderColor}]},c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(S.default,{style:[Q.body2]},C.default.t('PRIME_AMOUNT'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(S.default,{style:[B.Typography.caption1,E.Color.grayColor]},k.result.response.bonus_amount_formatted))))),c.default.createElement(V.default.Button,{bold:!0,label:C.default.t('OK'),onPress:function(){P({network_id:ce.id,user_id:re.id,password:De,beneficiaries:Ft,month_price_id:ce.months_prices.filter(function(t){return t.checked})[0].id}),ke((0,R.fetchGetInsurancePrimeAmountReset)()),nt(!1)}})))}))),$&&c.default.createElement(b.Formik,{validationSchema:yt,initialValues:{firstname:'',lastname:''},onSubmit:function(t){W(Re),pe(t.firstname),Ie(t.lastname)}},function(t){var n=t.values,o=t.errors,u=t.touched,f=t.handleChange,b=t.handleBlur,_=t.handleSubmit;return t.isSubmitting,c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[Q.containModal,{backgroundColor:E.Color.containerBackgroundColor}]},c.default.createElement(h.default,{isVisible:$,onSwipeComplete:function(){ee(!1)},swipeDirection:['down'],style:Q.bottomModal},c.default.createElement(s.View,{style:[Q.contentFilterBottom,{backgroundColor:E.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:Q.contentSwipeDown},c.default.createElement(s.View,{style:Q.lineSwipeDown})),c.default.createElement(S.default,{body2:!0,style:{marginTop:10}},C.default.t('ADD_AYANT_DROIT')),c.default.createElement(I.default,{style:{marginTop:10},placeholder:C.default.t('NOM_ASSURE'),value:n.lastname,onChangeText:f('lastname'),onBlur:b('lastname'),success:u.lastname&&!o.lastname,touched:u.lastname,error:o.lastname}),c.default.createElement(I.default,{style:{marginTop:10},placeholder:C.default.t('PRENOM_ASSURE'),value:n.firstname,onChangeText:f('firstname'),onBlur:b('firstname'),success:u.firstname&&!o.firstname,touched:u.firstname,error:o.firstname}),c.default.createElement(I.default,{style:{marginTop:10},placeholder:C.default.t('DATE_NAISSANCE'),value:''+K(Je).format('YYYY-MM-DD'),onChangeText:f('birthdate'),onBlur:b('birthdate'),onFocus:function(){s.Keyboard.dismiss(),$e(!0)},success:u.birthdate&&!o.birthdate,touched:u.birthdate,error:o.birthdate}),c.default.createElement(s.View,{style:{marginTop:10,width:"100%",flexDirection:'row',justifyContent:"space-between"}},c.default.createElement(S.default,{body2:!0},C.default.t('SEXE')),c.default.createElement(s.View,{style:Q.contentSwitch},c.default.createElement(T.default,{options:Ke,initial:0,buttonColor:E.Color.accentColor,backgroundColor:E.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){dt(t)}}))),c.default.createElement(s.View,{style:{marginTop:10,width:"100%",flexDirection:'row',justifyContent:"space-between"}},c.default.createElement(S.default,{body2:!0},C.default.t('AFFILIATION')),c.default.createElement(s.View,{style:Q.contentSwitch},c.default.createElement(T.default,{options:mt,initial:0,buttonColor:E.Color.accentColor,backgroundColor:E.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){Le([]),wt('CHILD'===t?new Date((new Date).getFullYear()-parseInt(ce.age_limit_of_child_beneficiary),0,1):new Date((new Date).getFullYear()-parseInt(ce.age_limit_of_insured_and_spouse),0,1)),_t(t)}}))),c.default.createElement(s.View,{style:Q.contentService},c.default.createElement(s.FlatList,{horizontal:!0,showsHorizontalScrollIndicator:!1,data:'CHILD'===gt?Ot:Pt,extraData:'CHILD'===gt?Ot:Pt,keyExtractor:function(t,n){return n},renderItem:function(t){var n=t.item,l=t.index;return 0===l?c.default.createElement(s.TouchableOpacity,{style:Q.choosePhotoBtn,onPress:function(){return Bt(n.name,n.isFrontCamera)}},null===n.file?c.default.createElement(O.default,{name:"camera-image",size:50,color:E.Color.accentColor}):c.default.createElement(s.Image,{source:{uri:n.file.path},style:{width:50,height:50}}),c.default.createElement(S.default,{style:{alignSelf:'flex-start',fontSize:13},textAlign:"center"},n.label)):c.default.createElement(s.TouchableOpacity,{style:Q.choosePhotoBtn,onPress:function(){return Bt(n.name,n.isFrontCamera)},disabled:!ve.includes('CHILD'===gt?Ot[l-1].name:Pt[l-1].name)},null===n.file?c.default.createElement(O.default,{name:"camera-image",size:50,color:ve.includes('CHILD'===gt?Ot[l-1].name:Pt[l-1].name)?E.Color.accentColor:E.Color.grayColor}):c.default.createElement(s.Image,{source:{uri:n.file.path},style:{width:50,height:50}}),c.default.createElement(S.default,{style:{alignSelf:'flex-start',fontSize:13},textAlign:"center"},n.label))}})),c.default.createElement(D.default,{style:{marginTop:20,marginBottom:20},full:!0,loading:J.loading||l.loading,onPress:_},C.default.t('SUBMIT_LABEL'))))))}),ot&&c.default.createElement(h.default,{isVisible:ot,onSwipeComplete:function(){return it(!1)},swipeDirection:['down'],style:Q.bottomModal},c.default.createElement(s.View,{style:[Q.contentFilterBottom,{backgroundColor:E.Color.cardBackgroundColor}]},c.default.createElement(s.View,{style:Q.contentSwipeDown},c.default.createElement(s.View,{style:Q.lineSwipeDown})),c.default.createElement(s.View,{style:[Q.contentActionModalBottom,{borderBottomColor:E.Color.borderColor}]}),c.default.createElement(s.View,{style:[{marginBottom:40}]},c.default.createElement(s.FlatList,{data:Ft,extraData:Ft,keyExtractor:function(t,n){return n},renderItem:function(t){var n=t.item,l=t.index;return c.default.createElement(s.View,{style:Q.lineRow},c.default.createElement(s.View,{style:{alignItems:'flex-start'}},c.default.createElement(S.default,{body1:!0},C.default.t('NOM_ASSURE')),c.default.createElement(S.default,{caption1:!0,grayColor:!0},n.firstname+" "+n.lastname)),c.default.createElement(s.View,{style:{alignItems:'flex-start'}},c.default.createElement(S.default,{body1:!0},C.default.t('AFFILIATION')),c.default.createElement(S.default,{caption1:!0,grayColor:!0},'CHILD'===n.affiliation?C.default.t('ENFANT'):C.default.t('CONJOINT'))),c.default.createElement(s.View,{style:Q.iconRight},c.default.createElement(s.TouchableOpacity,{onPress:function(){var t=Ft;console.log("beneficiariesTemp index",l),t.splice(l),console.log("beneficiariesTemp",t),vt((0,o.default)(t))}},c.default.createElement(Y.default,{name:"minus-circle",size:24,color:E.Color.grayColor}))))}})),c.default.createElement(D.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:function(){it(!1)}},C.default.t('OK')))),Ze&&c.default.createElement(v.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date(Je),mode:"date",minimumDate:Ct,display:"spinner",onChange:Ut}),Ft.length>=1&&c.default.createElement(s.TouchableOpacity,{style:{alignItems:'center',flexDirection:'row',width:60,position:'absolute',bottom:10,right:10,height:60,padding:3,backgroundColor:E.Color.primaryColor,borderRadius:100},onPress:function(){return it(!0)}},c.default.createElement(S.default,{whiteColor:!0,title2:!0},Ft.length),c.default.createElement(S.default,{whiteColor:!0,caption2:!0},C.default.t('AYANT_DROIT'))))});e.default=X},1822,[4,1,7,33,27,15,18,1046,1823,1827,1950,1658,1031,719,2147,2158,2157,2159,2162,538,534,771,881,1779,2164,718,1781,1763,749,2180,2182,1639,1079,979,1013,1625,1189]); __d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ReactNativeModal",{enumerable:!0,get:function(){return t.ReactNativeModal}}),e.default=void 0;var t=r(d[0]),o=t.ReactNativeModal;e.default=o},1823,[1824]); __d(function(g,r,i,a,m,e,d){var n=r(d[0]),t=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ReactNativeModal=void 0;var o=t(r(d[2])),s=t(r(d[3])),p=t(r(d[4])),c=t(r(d[5])),l=t(r(d[6])),u=t(r(d[7])),f=t(r(d[8])),h=t(r(d[9])),w=n(r(d[10])),v=r(d[11]),b=n(r(d[12])),S=n(r(d[13])),k=r(d[14]),D=t(r(d[15]));function O(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),o.push.apply(o,s)}return o}function y(n){for(var t=1;t=o.props.panResponderThreshold||Math.abs(s.dy)>=o.props.panResponderThreshold;return p&&o.props.onSwipeStart&&o.props.onSwipeStart(s),o.currentSwipingDirection=o.getSwipingDirection(s),n=o.createAnimationEventForSwipe(),p}return!1},onStartShouldSetPanResponder:function(n,t){return!(n._dispatchInstances&&n._dispatchInstances.some(function(n){return/scrollview|flatlist/i.test(n.type)})&&o.shouldPropagateSwipe(n,t)&&o.props.scrollTo&&o.props.scrollOffset>0)&&(o.props.onSwipeStart&&o.props.onSwipeStart(t),o.currentSwipingDirection=null,!0)},onPanResponderMove:function(t,s){if(!o.currentSwipingDirection){if(0===s.dx&&0===s.dy)return;o.currentSwipingDirection=o.getSwipingDirection(s),n=o.createAnimationEventForSwipe()}if(o.isSwipeDirectionAllowed(s)){var p=1-o.calcDistancePercentage(s);o.backdropRef&&o.backdropRef.transitionTo({opacity:o.props.backdropOpacity*p}),n(t,s),o.props.onSwipeMove&&o.props.onSwipeMove(p,s)}else if(o.props.scrollTo)if(o.props.scrollHorizontal){var c=-s.dx;c>o.props.scrollOffsetMax&&(c-=(c-o.props.scrollOffsetMax)/2),o.props.scrollTo({x:c,animated:!1})}else{var l=-s.dy;l>o.props.scrollOffsetMax&&(l-=(l-o.props.scrollOffsetMax)/2),o.props.scrollTo({y:l,animated:!1})}},onPanResponderRelease:function(n,t){if(o.getAccDistancePerDirection(t)>o.props.swipeThreshold&&o.isSwipeDirectionAllowed(t)){if(o.props.onSwipeComplete)return o.inSwipeClosingState=!0,void o.props.onSwipeComplete({swipingDirection:o.getSwipingDirection(t)},t);if(o.props.onSwipe)return o.inSwipeClosingState=!0,void o.props.onSwipe()}o.props.onSwipeCancel&&o.props.onSwipeCancel(t),o.backdropRef&&o.backdropRef.transitionTo({opacity:o.props.backdropOpacity}),v.Animated.spring(o.state.pan,{toValue:{x:0,y:0},bounciness:0,useNativeDriver:!1}).start(),o.props.scrollTo&&o.props.scrollOffset>o.props.scrollOffsetMax&&o.props.scrollTo({y:o.props.scrollOffsetMax,animated:!0})}})},o.getAccDistancePerDirection=function(n){switch(o.currentSwipingDirection){case'up':return-n.dy;case'down':return n.dy;case'right':return n.dx;case'left':return-n.dx;default:return 0}},o.getSwipingDirection=function(n){return Math.abs(n.dx)>Math.abs(n.dy)?n.dx>0?'right':'left':n.dy>0?'down':'up'},o.calcDistancePercentage=function(n){switch(o.currentSwipingDirection){case'down':return(n.moveY-n.y0)/((o.props.deviceHeight||o.state.deviceHeight)-n.y0);case'up':return(0,k.reversePercentage)(n.moveY/n.y0);case'left':return(0,k.reversePercentage)(n.moveX/n.x0);case'right':return(n.moveX-n.x0)/((o.props.deviceWidth||o.state.deviceWidth)-n.x0);default:return 0}},o.createAnimationEventForSwipe=function(){return'right'===o.currentSwipingDirection||'left'===o.currentSwipingDirection?v.Animated.event([null,{dx:o.state.pan.x}],{useNativeDriver:!1}):v.Animated.event([null,{dy:o.state.pan.y}],{useNativeDriver:!1})},o.isDirectionIncluded=function(n){return Array.isArray(o.props.swipeDirection)?o.props.swipeDirection.includes(n):o.props.swipeDirection===n},o.isSwipeDirectionAllowed=function(n){var t=n.dy,s=n.dx,p=t>0,c=t<0,l=s<0,u=s>0;return!('up'!==o.currentSwipingDirection||!o.isDirectionIncluded('up')||!c)||(!('down'!==o.currentSwipingDirection||!o.isDirectionIncluded('down')||!p)||(!('right'!==o.currentSwipingDirection||!o.isDirectionIncluded('right')||!u)||!('left'!==o.currentSwipingDirection||!o.isDirectionIncluded('left')||!l)))},o.handleDimensionsUpdate=function(){if(!o.props.deviceHeight&&!o.props.deviceWidth){var n=v.Dimensions.get('window').width,t=v.Dimensions.get('window').height;n===o.state.deviceWidth&&t===o.state.deviceHeight||o.setState({deviceWidth:n,deviceHeight:t})}},o.open=function(){o.isTransitioning||(o.isTransitioning=!0,o.backdropRef&&o.backdropRef.transitionTo({opacity:o.props.backdropOpacity},o.props.backdropTransitionInTiming),o.state.isSwipeable&&o.state.pan.setValue({x:0,y:0}),o.contentRef&&(o.props.onModalWillShow&&o.props.onModalWillShow(),null==o.interactionHandle&&(o.interactionHandle=v.InteractionManager.createInteractionHandle()),o.contentRef.animate(o.animationIn,o.props.animationInTiming).then(function(){o.isTransitioning=!1,o.interactionHandle&&(v.InteractionManager.clearInteractionHandle(o.interactionHandle),o.interactionHandle=null),o.props.isVisible?o.props.onModalShow():o.close()})))},o.close=function(){if(!o.isTransitioning){o.isTransitioning=!0,o.backdropRef&&o.backdropRef.transitionTo({opacity:0},o.props.backdropTransitionOutTiming);var n=o.animationOut;o.inSwipeClosingState&&(o.inSwipeClosingState=!1,'up'===o.currentSwipingDirection?n='slideOutUp':'down'===o.currentSwipingDirection?n='slideOutDown':'right'===o.currentSwipingDirection?n='slideOutRight':'left'===o.currentSwipingDirection&&(n='slideOutLeft')),o.contentRef&&(o.props.onModalWillHide&&o.props.onModalWillHide(),null==o.interactionHandle&&(o.interactionHandle=v.InteractionManager.createInteractionHandle()),o.contentRef.animate(n,o.props.animationOutTiming).then(function(){o.isTransitioning=!1,o.interactionHandle&&(v.InteractionManager.clearInteractionHandle(o.interactionHandle),o.interactionHandle=null),o.props.isVisible?o.open():o.setState({showContent:!1},function(){o.setState({isVisible:!1},function(){o.props.onModalHide()})})}))}},o.makeBackdrop=function(){if(!o.props.hasBackdrop)return null;o.props.customBackdrop&&!w.isValidElement(o.props.customBackdrop)&&console.warn('Invalid customBackdrop element passed to Modal. You must provide a valid React element.');var n=o.props,t=n.customBackdrop,s=n.backdropColor,p=n.useNativeDriver,c=n.useNativeDriverForBackdrop,l=n.onBackdropPress,u=!!o.props.customBackdrop,f=[{width:o.getDeviceWidth(),height:o.getDeviceHeight(),backgroundColor:o.state.showContent&&!u?s:'transparent'}],h=w.createElement(S.View,{ref:function(n){return o.backdropRef=n},useNativeDriver:void 0!==c?c:p,style:[D.default.backdrop,f]},u&&t);return u?h:w.createElement(v.TouchableWithoutFeedback,{onPress:l},h)};var s=(0,k.buildAnimations)(T(n)),p=s.animationIn,l=s.animationOut;return o.animationIn=p,o.animationOut=l,o.state.isSwipeable&&(o.state=y({},o.state,{pan:new v.Animated.ValueXY}),o.buildPanResponder()),n.isVisible&&(o.state=y({},o.state,{isVisible:!0,showContent:!0})),o}return(0,h.default)(t,n),(0,l.default)(t,[{key:"componentDidMount",value:function(){this.props.onSwipe&&console.warn('`` is deprecated and will be removed starting from 13.0.0. Use `` instead.'),v.DeviceEventEmitter.addListener('didUpdateDimensions',this.handleDimensionsUpdate),this.state.isVisible&&this.open(),v.BackHandler.addEventListener('hardwareBackPress',this.onBackButtonPress)}},{key:"componentWillUnmount",value:function(){v.BackHandler.removeEventListener('hardwareBackPress',this.onBackButtonPress),v.DeviceEventEmitter.removeListener('didUpdateDimensions',this.handleDimensionsUpdate),this.interactionHandle&&(v.InteractionManager.clearInteractionHandle(this.interactionHandle),this.interactionHandle=null)}},{key:"componentDidUpdate",value:function(n){if(this.props.animationIn!==n.animationIn||this.props.animationOut!==n.animationOut){var t=(0,k.buildAnimations)(T(this.props)),o=t.animationIn,s=t.animationOut;this.animationIn=o,this.animationOut=s}this.props.backdropOpacity!==n.backdropOpacity&&this.backdropRef&&this.backdropRef.transitionTo({opacity:this.props.backdropOpacity},this.props.backdropTransitionInTiming),this.props.isVisible&&!n.isVisible?this.open():!this.props.isVisible&&n.isVisible&&this.close()}},{key:"render",value:function(){var n=this,t=this.props,p=(t.animationIn,t.animationInTiming,t.animationOut,t.animationOutTiming,t.avoidKeyboard),c=t.coverScreen,l=(t.hasBackdrop,t.backdropColor,t.backdropOpacity,t.backdropTransitionInTiming,t.backdropTransitionOutTiming,t.customBackdrop,t.children),u=(t.isVisible,t.onModalShow,t.onBackButtonPress),f=t.useNativeDriver,h=(t.propagateSwipe,t.style),b=(0,s.default)(t,["animationIn","animationInTiming","animationOut","animationOutTiming","avoidKeyboard","coverScreen","hasBackdrop","backdropColor","backdropOpacity","backdropTransitionInTiming","backdropTransitionOutTiming","customBackdrop","children","isVisible","onModalShow","onBackButtonPress","useNativeDriver","propagateSwipe","style"]),k=(b.testID,(0,s.default)(b,["testID"])),O=[{margin:.05*this.getDeviceWidth(),transform:[{translateY:0}]},D.default.content,h],T={},M={};this.state.isSwipeable&&(T=y({},this.panResponder.panHandlers),M=f?{transform:this.state.pan.getTranslateTransform()}:this.state.pan.getLayout());var B=this.props.hideModalContentWhileAnimating&&this.props.useNativeDriver&&!this.state.showContent?w.createElement(S.View,null):l,I=w.createElement(S.View,(0,o.default)({},T,{ref:function(t){return n.contentRef=t},style:[M,O],pointerEvents:"box-none",useNativeDriver:f},k),B);return!c&&this.state.isVisible?w.createElement(v.View,{pointerEvents:"box-none",style:[D.default.backdrop,D.default.containerBox]},this.makeBackdrop(),I):w.createElement(v.Modal,(0,o.default)({transparent:!0,animationType:'none',visible:this.state.isVisible,onRequestClose:u},b),this.makeBackdrop(),p?w.createElement(v.KeyboardAvoidingView,{behavior:'ios'===v.Platform.OS?'padding':void 0,pointerEvents:"box-none",style:O.concat([{margin:0}])},I):I)}}],[{key:"getDerivedStateFromProps",value:function(n,t){return!t.isVisible&&n.isVisible?{isVisible:!0,showContent:!0}:null}}]),t})(w.Component);e.ReactNativeModal=M,M.propTypes={animationIn:b.oneOfType([b.string,b.object]),animationInTiming:b.number,animationOut:b.oneOfType([b.string,b.object]),animationOutTiming:b.number,avoidKeyboard:b.bool,coverScreen:b.bool,hasBackdrop:b.bool,backdropColor:b.string,backdropOpacity:b.number,backdropTransitionInTiming:b.number,backdropTransitionOutTiming:b.number,customBackdrop:b.node,children:b.node.isRequired,deviceHeight:b.number,deviceWidth:b.number,isVisible:b.bool.isRequired,hideModalContentWhileAnimating:b.bool,propagateSwipe:b.oneOfType([b.bool,b.func]),onModalShow:b.func,onModalWillShow:b.func,onModalHide:b.func,onModalWillHide:b.func,onBackButtonPress:b.func,onBackdropPress:b.func,panResponderThreshold:b.number,onSwipeStart:b.func,onSwipeMove:b.func,onSwipeComplete:b.func,onSwipeCancel:b.func,swipeThreshold:b.number,swipeDirection:b.oneOfType([b.arrayOf(b.oneOf(['up','down','left','right'])),b.oneOf(['up','down','left','right'])]),useNativeDriver:b.bool,useNativeDriverForBackdrop:b.bool,style:b.any,scrollTo:b.func,scrollOffset:b.number,scrollOffsetMax:b.number,scrollHorizontal:b.bool,supportedOrientations:b.arrayOf(b.oneOf(['portrait','portrait-upside-down','landscape','landscape-left','landscape-right']))},M.defaultProps={animationIn:'slideInUp',animationInTiming:300,animationOut:'slideOutDown',animationOutTiming:300,avoidKeyboard:!1,coverScreen:!0,hasBackdrop:!0,backdropColor:'black',backdropOpacity:.7,backdropTransitionInTiming:300,backdropTransitionOutTiming:300,customBackdrop:null,useNativeDriver:!1,deviceHeight:null,deviceWidth:null,hideModalContentWhileAnimating:!1,propagateSwipe:!1,isVisible:!1,panResponderThreshold:4,swipeThreshold:100,onModalShow:function(){return null},onModalWillShow:function(){return null},onModalHide:function(){return null},onModalWillHide:function(){return null},onBackdropPress:function(){return null},onBackButtonPress:function(){return null},scrollTo:null,scrollOffset:0,scrollOffsetMax:0,scrollHorizontal:!1,statusBarTranslucent:!1,supportedOrientations:['portrait','landscape']};var B=M;e.default=B},1824,[4,1,6,57,7,8,9,10,12,13,15,18,68,749,1825,1826]); __d(function(g,r,i,a,m,e,d){var n=r(d[0]),t=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.reversePercentage=e.buildAnimations=e.makeSlideTranslation=e.initializeAnimations=void 0;var s=t(r(d[2])),l=r(d[3]),o=n(r(d[4])),u=l.Dimensions.get('window'),f=u.height,c=u.width;e.initializeAnimations=function(){var n={slideInDown:v('translateY',-f,0),slideInUp:v('translateY',f,0),slideInLeft:v('translateX',-c,0),slideInRight:v('translateX',c,0),slideOutDown:v('translateY',0,f),slideOutUp:v('translateY',0,-f),slideOutLeft:v('translateX',0,-c),slideOutRight:v('translateX',0,c)};o.initializeRegistryWithDefinitions(n)};var v=function(n,t,l){return{from:(0,s.default)({},n,t),to:(0,s.default)({},n,l)}};e.makeSlideTranslation=v;e.buildAnimations=function(n){var t,s,l=n.animationIn,o=n.animationOut;if(h(l)){var u=JSON.stringify(l);O(u,l),t=u}else t=l;if(h(o)){var f=JSON.stringify(o);O(f,o),s=f}else s=o;return{animationIn:t,animationOut:s}};e.reversePercentage=function(n){return-(n-1)};var O=function(n,t){o.registerAnimation(n,o.createAnimation(t))},h=function(n){return null!==n&&'object'==typeof n}},1825,[4,1,7,18,749]); @@ -2186,9 +2186,9 @@ __d(function(g,r,i,a,m,e,d){m.exports=r(d[0]).registerAsset({__packager_asset:!0 __d(function(g,r,i,a,m,e,d){"use strict";var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.createSelector=void 0,e.createSelectorCreator=u,e.createStructuredSelector=void 0,Object.defineProperty(e,"defaultEqualityCheck",{enumerable:!0,get:function(){return n.defaultEqualityCheck}}),Object.defineProperty(e,"defaultMemoize",{enumerable:!0,get:function(){return n.defaultMemoize}});var n=r(d[1]);function o(t){var n=Array.isArray(t[0])?t[0]:t;if(!n.every(function(t){return'function'==typeof t})){var o=n.map(function(t){return'function'==typeof t?"function "+(t.name||'unnamed')+"()":typeof t}).join(', ');throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+o+"]")}return n}function u(n){for(var u=arguments.length,c=new Array(u>1?u-1:0),f=1;f-1){var l=c[f];return f>0&&(c.splice(f,1),c.unshift(l)),l.value}return t}return{get:f,put:function(u,l){f(u)===t&&(c.unshift({key:u,value:l}),c.length>n&&c.pop())},getEntries:function(){return c},clear:function(){c=[]}}}var u=function(t,n){return t===n};function c(t){return function(n,u){if(null===n||null===u||n.length!==u.length)return!1;for(var c=n.length,f=0;f1?N.result.response[1]:null,marriage_certificate_doc:N.result.response[0],id_document_type:"CNI",id_document_front:N.result.response[1],id_document_back:N.result.response[2],isEditable:!0}].concat((0,l.default)(At))),Le.alertWithType('success',C.default.t('SUCCESS'),C.default.t('BENEFICIARY_SUCCESSFULLY_ADDED')),Q(!1))),N.error&&(Le.alertWithType('error',C.default.t('ERROR_LABEL'),p.getErrorMsg(N)),xe((0,L.fetchUploadInsuranceReset)()))},[N]);var Ct=b.object().shape({password:b.string().required(C.default.t('THIS_FIELD_IS_REQUIRED'))}),St=b.object().shape({lastname:b.string().required(C.default.t('THIS_FIELD_IS_REQUIRED')),firstname:b.string()}),wt=(0,u.useState)([{label:C.default.t('COPIE_LEGALISE_ACTE_NAISSANCE_CERTIFICAT_NAISSANCE'),name:'birthdate_proof_doc',isFrontCamera:!1,file:null,hasCheckbox:!0,checkboxValue:['CERTIFICATE','CERTIFIED_COPY'],checboxSelectedValue:'CERTIFICATE'},{label:C.default.t('DOCUMENT_JUSTICE_ENFANT_ADOPTE'),name:'justice_doc',isFrontCamera:!1,file:null,hasCheckbox:!1}]),_t=(0,o.default)(wt,2),It=_t[0],yt=_t[1],Tt=(0,u.useState)([]),Dt=(0,o.default)(Tt,2),At=Dt[0],xt=Dt[1],Lt=(0,u.useState)([{label:C.default.t('ACTE_MARIAGE'),name:'marriage_certificate_doc',isFrontCamera:!1,file:null,hasCheckbox:!1},{label:C.default.t('CNI_FRONT_FACE'),name:'id_document_front',isFrontCamera:!1,file:null,hasCheckbox:!1},{label:C.default.t('CNI_BACK_FACE'),name:'id_document_back',isFrontCamera:!1,file:null,hasCheckbox:!1}]),Rt=(0,o.default)(Lt,2),Bt=Rt[0],Ft=Rt[1],kt=function(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1],F.default.openCamera({cropping:!0,compressImageQuality:.7,useFrontCamera:!1}).then(function(n){var o,u;"CHILD"===lt?yt(It.map(function(l){return t===l.name?l.hasCheckbox?{label:l.label,name:l.name,isFrontCamera:l.isFrontCamera,file:n,hasCheckbox:l.hasCheckbox,checkboxValue:l.checkboxValue,checboxSelectedValue:l.checboxSelectedValue}:{label:l.label,name:l.name,isFrontCamera:l.isFrontCamera,file:n}:l})):Ft(Bt.map(function(l){return t===l.name?l.hasCheckbox?{label:l.label,name:l.name,isFrontCamera:l.isFrontCamera,file:n,hasCheckbox:l.hasCheckbox,checkboxValue:l.checkboxValue,checboxSelectedValue:l.checboxSelectedValue}:{label:l.label,name:l.name,isFrontCamera:l.isFrontCamera,file:n}:l})),o=t,u=n,null!==_e&&(Ce=_e),Ce.append("files[]",{name:u.path.split('/').pop(),type:u.mime,uri:"android"===c.Platform.OS?u.path:u.path.replace("file://","")}),Ae([o].concat((0,l.default)(De))),Ie(Ce)})},vt=function(t,n){var l=n||Me;je('ios'===c.Platform.OS),Pe(l)};return u.default.createElement(S.ScreenComponent,null,u.default.createElement(R.default,{ref:function(t){return Le=t}}),u.default.createElement(c.KeyboardAvoidingView,{behavior:'android'===c.Platform.OS?'height':'padding',style:{flex:1}},u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(h.Formik,{validationSchema:Ct,initialValues:{password:''},onSubmit:function(t){null!==ee&&(null===ut?Et.shake(800):(console.log(ee),console.log("insurance",le),Ee(t.password),Y(ut.id,{password:t.password,beneficiaries:At})))}},function(t){var n=t.values,l=t.errors,o=t.touched,s=t.handleChange,f=t.handleBlur,h=t.handleSubmit;return t.isSubmitting,u.default.createElement(c.View,{style:j.contain},u.default.createElement(v.View,{ref:function(t){Et=t},style:{width:(0,D.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,paddingRight:20,backgroundColor:'white'}},u.default.createElement(O.Dropdown,{label:C.default.t('SELECT_SUBSCRIPTION'),data:ft,useNativeDriver:!0,onChangeText:function(t,n,l){console.log("Value",t),ct({id:t.id,network:t.network,insurance_subscription_id:t.insurance_subscription_id,network_id:t.network_id,user_id:t.user_id,number_of_months:t.number_of_months,bonus_amount:t.bonus_amount,number_of_beneficiaries:t.number_of_beneficiaries,total_bonus_amount:t.total_bonus_amount,state:t.state,created_at:t.created_at,updated_at:t.updated_at,start_at:t.start_at,end_at:t.end_at,insured_id:t.insured_id,subscription:t.subscription,beneficiaries:t.beneficiaries})},valueExtractor:function(t){return t},labelExtractor:function(t){return t.network.name+" | "+C.default.t('ETAT')+": "+t.state+" | "+C.default.t('AMOUNT_LABEL')+": "+t.total_bonus_amount}})),u.default.createElement(I.default,{style:{marginTop:10},onChangeText:s('password'),placeholder:C.default.t('PASSWORD'),secureTextEntry:!0,icon:u.default.createElement(T.default,{name:"lock",size:20}),value:n.password,onBlur:f('password'),success:o.password&&!l.password,touched:o.password,error:l.password}),u.default.createElement(c.View,{style:{flexDirection:'column',alignItems:'center',justifyContent:'space-between',marginTop:25}},u.default.createElement(c.TouchableOpacity,{onPress:function(){var t,n;null===ut?Le.alertWithType('error',C.default.t('ERROR_LABEL'),C.default.t('PLEASE_SELECT_INSURANCE_BEFORE')):(console.log("Souscription",ut),Q(!0),je(!1),xe((0,L.fetchUploadInsuranceReset)()),ot('CHILD'),gt(new Date((new Date).getFullYear()-parseInt(null==ut?void 0:null==(t=ut.network)?void 0:t.age_limit_of_child_beneficiary),0,1)),Pe(''+P(new Date((new Date).getFullYear()-parseInt(null==ut?void 0:null==(n=ut.network)?void 0:n.age_limit_of_child_beneficiary),0,1)).format('YYYY-MM-DD')),de(null),be(null),Ae([]))}},u.default.createElement(_.default,{body1:!0,primaryColor:!0,bold:!0},C.default.t('ADD_AYANT_DROIT')))),u.default.createElement(y.default,{style:{marginTop:20},full:!0,loading:U.loading,onPress:h},C.default.t('SUBMIT_LABEL')))}))),J&&u.default.createElement(h.Formik,{validationSchema:St,initialValues:{firstname:'',lastname:''},onSubmit:function(t){V(_e),de(t.firstname),be(t.lastname)}},function(t){var l=t.values,o=t.errors,s=t.touched,h=t.handleChange,b=t.handleBlur,p=t.handleSubmit;return t.isSubmitting,u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[j.containModal,{backgroundColor:E.Color.containerBackgroundColor}]},u.default.createElement(f.default,{isVisible:J,onSwipeComplete:function(){Q(!1)},swipeDirection:['down'],style:j.bottomModal},u.default.createElement(c.View,{style:[j.contentFilterBottom,{backgroundColor:E.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:j.contentSwipeDown},u.default.createElement(c.View,{style:j.lineSwipeDown})),u.default.createElement(_.default,{body2:!0,style:{marginTop:10}},C.default.t('ADD_AYANT_DROIT')),u.default.createElement(w.default,{style:{marginTop:10},placeholder:C.default.t('NOM_ASSURE'),value:l.lastname,onChangeText:h('lastname'),onBlur:b('lastname'),success:s.lastname&&!o.lastname,touched:s.lastname,error:o.lastname}),u.default.createElement(w.default,{style:{marginTop:10},placeholder:C.default.t('PRENOM_ASSURE'),value:l.firstname,onChangeText:h('firstname'),onBlur:b('firstname'),success:s.firstname&&!o.firstname,touched:s.firstname,error:o.firstname}),u.default.createElement(w.default,{style:{marginTop:10},placeholder:C.default.t('DATE_NAISSANCE'),value:''+P(Me).format('YYYY-MM-DD'),onChangeText:h('birthdate'),onBlur:b('birthdate'),onFocus:function(){c.Keyboard.dismiss(),je(!0)},success:s.birthdate&&!o.birthdate,touched:s.birthdate,error:o.birthdate}),u.default.createElement(c.View,{style:{marginTop:10,width:"100%",flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(_.default,{body2:!0},C.default.t('SEXE')),u.default.createElement(c.View,{style:j.contentSwitch},u.default.createElement(A.default,{options:Ve,initial:0,buttonColor:E.Color.accentColor,backgroundColor:E.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){$e(t)}}))),u.default.createElement(c.View,{style:{marginTop:10,width:"100%",flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(_.default,{body2:!0},C.default.t('AFFILIATION')),u.default.createElement(c.View,{style:j.contentSwitch},u.default.createElement(A.default,{options:tt,initial:0,buttonColor:E.Color.accentColor,backgroundColor:E.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){Ae([]),gt('CHILD'===t?new Date((new Date).getFullYear()-parseInt(ut.network.age_limit_of_child_beneficiary),0,1):new Date((new Date).getFullYear()-parseInt(ut.network.age_limit_of_insured_and_spouse),0,1)),ot(t)}}))),u.default.createElement(c.View,{style:j.contentService},u.default.createElement(c.FlatList,{horizontal:!0,showsHorizontalScrollIndicator:!1,data:'CHILD'===lt?It:Bt,extraData:'CHILD'===lt?It:Bt,keyExtractor:function(t,n){return n},renderItem:function(t){var n=t.item,l=t.index;return 0===l?u.default.createElement(c.TouchableOpacity,{style:j.choosePhotoBtn,onPress:function(){return kt(n.name,n.isFrontCamera)}},null===n.file?u.default.createElement(x.default,{name:"camera-image",size:50,color:E.Color.accentColor}):u.default.createElement(c.Image,{source:{uri:n.file.path},style:{width:50,height:50}}),u.default.createElement(_.default,{style:{alignSelf:'flex-start',fontSize:13},textAlign:"center"},n.label)):u.default.createElement(c.TouchableOpacity,{style:j.choosePhotoBtn,onPress:function(){return kt(n.name,n.isFrontCamera)},disabled:!De.includes('CHILD'===lt?It[l-1].name:Bt[l-1].name)},null===n.file?u.default.createElement(x.default,{name:"camera-image",size:50,color:De.includes('CHILD'===lt?It[l-1].name:Bt[l-1].name)?E.Color.accentColor:E.Color.grayColor}):u.default.createElement(c.Image,{source:{uri:n.file.path},style:{width:50,height:50}}),u.default.createElement(_.default,{style:{alignSelf:'flex-start',fontSize:13},textAlign:"center"},n.label))}})),u.default.createElement(y.default,{style:{marginTop:20,marginBottom:20},full:!0,loading:N.loading||n.loading,onPress:p},C.default.t('SUBMIT_LABEL'))))))}),Je&&u.default.createElement(f.default,{isVisible:Je,onSwipeComplete:function(){return Qe(!1)},swipeDirection:['down'],style:j.bottomModal},u.default.createElement(c.View,{style:[j.contentFilterBottom,{backgroundColor:E.Color.cardBackgroundColor}]},u.default.createElement(c.View,{style:j.contentSwipeDown},u.default.createElement(c.View,{style:j.lineSwipeDown})),u.default.createElement(c.View,{style:[j.contentActionModalBottom,{borderBottomColor:E.Color.borderColor}]}),u.default.createElement(c.View,{style:[{marginBottom:40}]},u.default.createElement(c.FlatList,{data:At.concat(ut.beneficiaries),extraData:At.concat(ut.beneficiaries),keyExtractor:function(t,n){return n},renderItem:function(t){var n=t.item,o=t.index;return console.log("Item",n),u.default.createElement(c.View,{style:j.lineRow},u.default.createElement(c.View,{style:{alignItems:'flex-start'}},u.default.createElement(_.default,{body1:!0},C.default.t('NOM_ASSURE')),u.default.createElement(_.default,{caption1:!0,grayColor:!0},n.firstname+" "+n.lastname)),u.default.createElement(c.View,{style:{alignItems:'flex-start'}},u.default.createElement(_.default,{body1:!0},C.default.t('AFFILIATION')),u.default.createElement(_.default,{caption1:!0,grayColor:!0},'CHILD'===n.affiliation?C.default.t('ENFANT'):C.default.t('CONJOINT'))),u.default.createElement(c.View,{style:j.iconRight},n.hasOwnProperty('isEditable')&&u.default.createElement(c.TouchableOpacity,{onPress:function(){var t=At;console.log("beneficiariesTemp index",o),t.splice(o),console.log("beneficiariesTemp",t),xt((0,l.default)(t))}},u.default.createElement(M.default,{name:"minus-circle",size:24,color:E.Color.grayColor}))))}})),u.default.createElement(y.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:function(){Qe(!1)}},C.default.t('OK')))),He&&u.default.createElement(k.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date(Me),mode:"date",minimumDate:pt,display:"spinner",onChange:vt}),null!==ut&&u.default.createElement(c.TouchableOpacity,{style:{alignItems:'center',flexDirection:'row',width:60,position:'absolute',bottom:10,right:10,height:60,padding:3,backgroundColor:E.Color.primaryColor,borderRadius:100},onPress:function(){return Qe(!0)}},u.default.createElement(_.default,{whiteColor:!0,title2:!0},At.concat(ut.beneficiaries).length),u.default.createElement(_.default,{whiteColor:!0,caption2:!0},C.default.t('AYANT_DROIT'))))});e.default=W},2183,[4,1,33,27,15,18,1046,1823,1827,1950,1658,1031,719,2147,2158,2157,2159,2162,538,534,771,881,1779,2164,718,1781,1763,749,2180,2182,979,1013,1189]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),l=t(r(d[3])),s=r(d[4]),u=r(d[5]),c=r(d[6]),f=t(r(d[7])),h=t(r(d[8])),p=r(d[9]),b=n(r(d[10])),w=r(d[11]),S=n(r(d[12])),_=n(r(d[13])),E=n(r(d[14])),C=r(d[15]),v=r(d[16]),y=n(r(d[17])),R=r(d[18]),L=t(r(d[19])),A=r(d[20]),T=r(d[21]),x=r(d[22]),B=(r(d[23]),s.Dimensions.get('window')),P=B.width,k=(B.height,.5*P),D=s.StyleSheet.create({textInput:{height:46,backgroundColor:p.Color.fieldColor,borderRadius:5,marginTop:10,padding:10,width:'100%'},lineRow:{flexDirection:'row',justifyContent:'space-between',paddingBottom:20},contain:{alignItems:'center',marginTop:40,paddingBottom:20,paddingLeft:20,paddingRight:20,flex:1},circle:{width:k,height:k,borderRadius:k/2,position:'absolute',top:'15%'},circleContainer:{alignItems:'flex-end',right:-k/3,top:-k/1.5},lineSeparator:{borderWidth:1,width:'40%',height:1,alignSelf:'center'},line:{width:1,height:14,backgroundColor:p.Color.grayColor,marginLeft:10},contentModeView:{width:30,height:'100%',alignItems:'flex-end',justifyContent:'center'},contentFilter:{flexDirection:'row',alignItems:'center',marginLeft:10},bottomModal:{justifyContent:'flex-end',margin:0},contentFilterBottom:{width:"100%",borderTopLeftRadius:8,borderTopRightRadius:8,paddingHorizontal:20},contentSwipeDown:{paddingTop:10,alignItems:'center'},lineSwipeDown:{width:30,height:2.5,backgroundColor:p.Color.dividerColor},contentActionModalBottom:{flexDirection:'row',paddingVertical:15,justifyContent:'space-between',borderBottomWidth:1},containModal:{paddingVertical:10,paddingHorizontal:20,flexDirection:'row',justifyContent:'space-between'},floatingButtonAdd:{backgroundColor:p.Color.accentColor,position:"absolute",width:25,bottom:0,zIndex:1e3,right:20,top:35,height:25,borderRadius:12.5,alignItems:'center',justifyContent:'center'},contentSwitch:{width:(0,C.responsiveWidth)(40)},switch:{},choosePhotoBtn:{marginTop:10,marginBottom:10,width:"auto",height:"auto",padding:5,alignItems:'center',borderColor:p.Color.borderColor,marginRight:10,elevation:2},checkbox:{alignSelf:"center",color:"white"},itemAmountPerMonth:{paddingLeft:10,marginTop:10,flexDirection:'row'},dot:{width:12,height:12,borderRadius:6},blockView:{paddingVertical:10,borderBottomWidth:.5}}),I=(0,A.createStructuredSelector)({subscriptionList:T.selectSubscriptionList,activatePaySubscription:T.selectActivatePaySubscription}),V=(0,u.connect)(I,{fetchActivePaySubscription:v.fetchActivePaySubscription,fetchGetSubscriptionList:v.fetchGetSubscriptionList})(function(t){var n=t.activatePaySubscription,p=t.fetchGetSubscriptionList,A=t.subscriptionList,T=t.fetchActivePaySubscription,B=t.navigation,P=(0,l.useState)(null),k=(0,o.default)(P,2),I=k[0],V=k[1],M=(0,l.useState)(null),j=(0,o.default)(M,2),W=(j[0],j[1],(0,l.useState)([])),O=(0,o.default)(W,2),U=O[0],G=O[1],z=(0,l.useState)(null),F=(0,o.default)(z,2),N=F[0],H=F[1],K=(0,u.useDispatch)(),q=null,Q=null;(0,l.useEffect)(function(){(0,R.readUser)().then(function(t){V(t)}),K((0,v.fetchGetSubscriptionListReset)()),K((0,v.fetchActivePaySubscriptionReset)())},[]),(0,l.useEffect)(function(){null!==I&&(console.log("user",I.id),p(I.id,'ACCEPTED',!0))},[I]),(0,l.useEffect)(function(){if(null!==A.result){var t=[];A.result.response.map(function(n,o){t.push(n)}),G(t)}A.error&&(q.alertWithType('error',b.default.t('ERROR_LABEL'),h.getErrorMsg(A)),K((0,v.fetchGetSubscriptionListReset)()))},[A]),(0,l.useEffect)(function(){null!==n.result&&s.Alert.alert(b.default.t("SUCCESS"),n.result.response,[{text:b.default.t("OK"),onPress:function(){K((0,v.fetchActivePaySubscriptionReset)()),B.goBack()}}],{cancelable:!1}),n.error&&(q.alertWithType('error',b.default.t('ERROR_LABEL'),h.getErrorMsg(n)),K((0,v.fetchActivePaySubscriptionReset)()))},[n]);var J=f.object().shape({password:f.string().required(b.default.t('THIS_FIELD_IS_REQUIRED'))});return l.default.createElement(w.ScreenComponent,null,l.default.createElement(y.default,{ref:function(t){return q=t}}),l.default.createElement(s.KeyboardAvoidingView,{behavior:'android'===s.Platform.OS?'height':'padding',style:{flex:1}},l.default.createElement(s.ScrollView,{style:{flex:1}},l.default.createElement(c.Formik,{validationSchema:J,initialValues:{password:''},onSubmit:function(t){null!==I&&(null===N?Q.shake(800):(console.log("subscription",N),T(N.id,{password:t.password})))}},function(t){var o=t.values,u=t.errors,c=t.touched,f=t.handleChange,h=t.handleBlur,p=t.handleSubmit;return t.isSubmitting,l.default.createElement(s.View,{style:D.contain},l.default.createElement(L.View,{ref:function(t){Q=t},style:{width:(0,C.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,paddingRight:20,backgroundColor:'white'}},l.default.createElement(x.Dropdown,{label:b.default.t('SELECT_INSURANCE'),data:U,useNativeDriver:!0,onChangeText:function(t,n,o){console.log("Value",t),H({id:t.id,insurance_subscription_id:t.insurance_subscription_id,network_id:t.network_id,user_id:t.user_id,number_of_months:t.number_of_months,bonus_amount:t.bonus_amount,number_of_beneficiaries:t.number_of_beneficiaries,total_bonus_amount:t.total_bonus_amount,state:t.state,created_at:t.created_at,updated_at:t.updated_at,start_at:t.start_at,end_at:t.end_at,reason:t.reason,network:t.network,beneficiaries:t.beneficiaries})},valueExtractor:function(t){return t},labelExtractor:function(t){return t.network.name+" | "+b.default.t('ETAT')+": "+t.state+" | "+b.default.t('AMOUNT_LABEL')+": "+t.total_bonus_amount}})),l.default.createElement(S.default,{style:{marginTop:10},onChangeText:f('password'),placeholder:b.default.t('PASSWORD'),secureTextEntry:!0,icon:l.default.createElement(E.default,{name:"lock",size:20}),value:o.password,onBlur:h('password'),success:c.password&&!u.password,touched:c.password,error:u.password}),l.default.createElement(_.default,{style:{marginTop:20},full:!0,loading:n.loading,onPress:p},b.default.t('SUBMIT_LABEL')))}))))});e.default=V},2184,[4,1,27,15,18,1046,1827,1950,1658,1031,719,2147,2159,2162,538,534,1779,2164,718,749,2180,2182,979,1189]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),l=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=l(r(d[2])),o=l(r(d[3])),u=t(r(d[4])),s=r(d[5]),c=r(d[6]),f=l(r(d[7])),p=r(d[8]),E=t(r(d[9])),_=r(d[10]),h=l(r(d[11])),C=r(d[12]),S=l(r(d[13])),y=r(d[14]),b=r(d[15]),w=l(r(d[16])),T=r(d[17]),R=l(r(d[18])),D=r(d[19]),I=r(d[20]),v=l(r(d[21])),A=l(r(d[22])),N=l(r(d[23])),O=l(r(d[24])),x=l(r(d[25])),B=l(r(d[26])),V=t(r(d[27])),M=r(d[28]),P=l(r(d[29])),k=l(r(d[30])),L=l(r(d[31])),U=r(d[32]),F=t(r(d[33])),Y=r(d[34]),G=l(r(d[35])),q=l(r(d[36])),H=r(d[37]),Q=s.Dimensions.get('window'),W=Q.width,j=(Q.height,.5*W),z=s.StyleSheet.create({textInput:{height:46,backgroundColor:_.Color.fieldColor,borderRadius:5,marginTop:10,padding:10,width:'100%'},lineRow:{flexDirection:'row',justifyContent:'space-between',paddingBottom:20},contain:{alignItems:'center',marginTop:40,paddingBottom:20,paddingLeft:20,paddingRight:20,flex:1},circle:{width:j,height:j,borderRadius:j/2,position:'absolute',top:'15%'},circleContainer:{alignItems:'flex-end',right:-j/3,top:-j/1.5},lineSeparator:{borderWidth:1,width:'40%',height:1,alignSelf:'center'},line:{width:1,height:14,backgroundColor:_.Color.grayColor,marginLeft:10},contentModeView:{width:30,height:'100%',alignItems:'flex-end',justifyContent:'center'},contentFilter:{flexDirection:'row',alignItems:'center',marginLeft:10},bottomModal:{justifyContent:'flex-end',margin:0},contentFilterBottom:{width:"100%",borderTopLeftRadius:8,borderTopRightRadius:8,paddingHorizontal:20},contentSwipeDown:{paddingTop:10,alignItems:'center'},lineSwipeDown:{width:30,height:2.5,backgroundColor:_.Color.dividerColor},contentActionModalBottom:{flexDirection:'row',paddingVertical:15,justifyContent:'space-between',borderBottomWidth:1},containModal:{paddingVertical:10,paddingHorizontal:20,flexDirection:'row',justifyContent:'space-between'},floatingButtonAdd:{backgroundColor:_.Color.accentColor,position:"absolute",width:25,bottom:0,zIndex:1e3,right:20,top:35,height:25,borderRadius:12.5,alignItems:'center',justifyContent:'center'},contentSwitch:{width:(0,y.responsiveWidth)(40)},switch:{},choosePhotoBtn:{marginTop:10,marginBottom:10,width:"auto",height:"auto",padding:5,alignItems:'center',borderColor:_.Color.borderColor,marginRight:10,elevation:2},checkbox:{alignSelf:"center",color:"white"},itemAmountPerMonth:{paddingLeft:10,marginTop:10,flexDirection:'row'},dot:{width:12,height:12,borderRadius:6},blockView:{paddingVertical:10,borderBottomWidth:.5},iconNavigation:{width:'100%',flexDirection:'row',marginTop:20,justifyContent:'space-between',alignItems:'center'},iconNavigationButton:{borderWidth:1,borderRadius:25,width:50,height:50,alignItems:'center',justifyContent:'center'},beneficiarySubSection:{marginTop:10,flexDirection:'row',width:'100%'}}),K=(0,D.createStructuredSelector)({subscriptionList:I.selectSubscriptionList,activatePaySubscription:I.selectActivatePaySubscription,getUserByNameOrNumber:I.selectGetUserByNameOrNumber,getUserByIdQRCode:I.selectGetUserByIdQRCode,getDrugAppareil:I.selectGetDrugAppareil,addDrug:I.selectAddDrug,getProviderClass:I.selectGetProviderClass,createConsultation:I.selectCreateConsultation,getNetworkAct:I.selectGetNetworkAct,getAmountConsultation:I.selectGetAmountConsultation}),X=(0,c.connect)(K,{fetchActivePaySubscription:b.fetchActivePaySubscription,fetchGetSubscriptionList:b.fetchGetSubscriptionList,fetchGetUserByIdQRCode:b.fetchGetUserByIdQRCode,fetchGetUserByNameOrNumber:b.fetchGetUserByNameOrNumber,fetchGetDrugAppareil:b.fetchGetDrugAppareil,fetchAddDrug:b.fetchAddDrug,fetchGetProviderClass:b.fetchGetProviderClass,fetchGetNetworkActs:b.fetchGetNetworkActs,fetchCreateConsultation:b.fetchCreateConsultation,fetchGetAmountConsultation:b.fetchGetAmountConsultation})(function(t){t.activatePaySubscription,t.fetchGetSubscriptionList;var l,D=t.subscriptionList,I=(t.fetchActivePaySubscription,t.fetchGetUserByIdQRCode,t.fetchGetUserByNameOrNumber),Q=t.fetchGetDrugAppareil,W=t.fetchAddDrug,j=t.fetchGetProviderClass,K=t.fetchGetNetworkActs,X=t.fetchCreateConsultation,Z=t.fetchGetAmountConsultation,J=t.getUserByNameOrNumber,$=t.getUserByIdQRCode,ee=t.getDrugAppareil,te=t.getProviderClass,ae=t.addDrug,le=t.createConsultation,re=t.getNetworkAct,ne=t.getAmountConsultation,oe=t.navigation,ie=(0,u.useState)(''+H(new Date).format('YYYY-MM-DD HH:mm')),ue=(0,o.default)(ie,2),de=ue[0],se=ue[1],ce=(0,u.useState)(!1),fe=(0,o.default)(ce,2),me=fe[0],pe=fe[1],ge=(0,u.useState)(null),Ee=(0,o.default)(ge,2),_e=Ee[0],he=Ee[1],Ce=(0,u.useState)(!1),Se=(0,o.default)(Ce,2),ye=Se[0],be=Se[1],we=(0,u.useState)(!1),Te=(0,o.default)(we,2),Re=Te[0],De=Te[1],Ie=(0,u.useState)(!1),ve=(0,o.default)(Ie,2),Ae=ve[0],Ne=ve[1],Oe=(0,u.useState)(Y.store.getState().walletDetailReducer.result.response),xe=(0,o.default)(Oe,1)[0],Be=(0,u.useState)(!1),Ve=(0,o.default)(Be,2),Me=Ve[0],Pe=Ve[1],ke=(0,u.useState)(!1),Le=(0,o.default)(ke,2),Ue=Le[0],Fe=Le[1],Ye=(0,u.useState)(null),Ge=(0,o.default)(Ye,2),qe=Ge[0],He=Ge[1],Qe=(0,u.useState)(null),We=(0,o.default)(Qe,2),je=We[0],ze=We[1],Ke=(0,u.useState)(!1),Xe=(0,o.default)(Ke,2),Ze=Xe[0],Je=Xe[1],$e=(0,u.useState)(!1),et=(0,o.default)($e,2),tt=et[0],at=et[1],lt=(0,u.useState)(!1),rt=(0,o.default)(lt,2),nt=rt[0],ot=rt[1],it=(0,u.useState)(null),ut=(0,o.default)(it,2),dt=ut[0],st=ut[1],ct=(0,u.useState)(null),ft=(0,o.default)(ct,2),mt=ft[0],pt=ft[1],gt=(0,u.useState)(null),Et=(0,o.default)(gt,2),_t=Et[0],ht=Et[1],Ct=(0,u.useState)(null),St=(0,o.default)(Ct,2),yt=St[0],bt=St[1],wt=(0,u.useState)(null),Tt=(0,o.default)(wt,2),Rt=Tt[0],Dt=Tt[1],It=(0,u.useRef)(),vt=(0,u.useState)(!0),At=(0,o.default)(vt,2),Nt=At[0],Ot=At[1],xt=(0,u.useState)(!1),Bt=(0,o.default)(xt,2),Vt=(Bt[0],Bt[1]),Mt=(0,u.useState)(1),Pt=(0,o.default)(Mt,2),kt=Pt[0],Lt=Pt[1],Ut=(0,u.useState)(!1),Ft=(0,o.default)(Ut,2),Yt=Ft[0],Gt=Ft[1],qt=(0,u.useState)(!1),Ht=(0,o.default)(qt,2),Qt=Ht[0],Wt=Ht[1],jt=(0,u.useState)(!1),zt=(0,o.default)(jt,2),Kt=zt[0],Xt=zt[1],Zt=(0,u.useState)(!1),Jt=(0,o.default)(Zt,2),$t=Jt[0],ea=Jt[1],ta=(0,u.useState)(!1),aa=(0,o.default)(ta,2),la=aa[0],ra=aa[1],na=(0,u.useState)(!1),oa=(0,o.default)(na,2),ia=oa[0],ua=oa[1],da=(0,u.useState)(null),sa=(0,o.default)(da,2),ca=(sa[0],sa[1],(0,u.useState)([])),fa=(0,o.default)(ca,2),ma=fa[0],pa=fa[1],ga=(0,u.useState)([]),Ea=(0,o.default)(ga,2),_a=Ea[0],ha=Ea[1],Ca=(0,u.useState)([]),Sa=(0,o.default)(Ca,2),ya=Sa[0],ba=Sa[1];console.log("Prestations",ma),console.log("examens",_a),console.log("prescriptions",ya);var wa=(0,u.useState)([{label:h.default.t('AYANT_DROITS'),value:"M"},{label:h.default.t('ASSURE'),value:"F"}]),Ta=(0,o.default)(wa,1)[0],Ra=(0,u.useState)(1),Da=(0,o.default)(Ra,2),Ia=Da[0],va=Da[1],Aa=(0,u.useState)([{label:h.default.t('YES'),value:"YES"},{label:h.default.t('NO'),value:"NO"}]),Na=(0,o.default)(Aa,1)[0],Oa=(0,u.useState)([{label:h.default.t('YES'),value:"YES"},{label:h.default.t('NO'),value:"NO"}]),xa=(0,o.default)(Oa,1)[0],Ba=(0,u.useState)([{label:h.default.t('YES'),value:"YES"},{label:h.default.t('NO'),value:"NO"}]),Va=(0,o.default)(Ba,1)[0],Ma=(0,u.useState)(!1),Pa=(0,o.default)(Ma,2),ka=Pa[0],La=Pa[1],Ua=(0,u.useState)([{label:h.default.t('AFFECTION_COURANTE'),value:"CURRENT_AFFECTION"},{label:h.default.t('AFFECTION_LONGUE'),value:"LONG_TERM_AFFECTION"},{label:h.default.t('EXONERE'),value:"EXONERATION"}]),Fa=(0,o.default)(Ua,1)[0],Ya=(0,u.useState)([{label:h.default.t('COMPRESSED'),value:"COMPRESSED"},{label:h.default.t('SYRUP'),value:"SYRUP"},{label:h.default.t('SOLUTION'),value:"SOLUTION"},{label:h.default.t('SUPPOSITORY'),value:"SUPPOSITORY"},{label:h.default.t('DEVICE'),value:"DEVICE"}]),Ga=(0,o.default)(Ya,1)[0],qa=(0,c.useDispatch)(),Ha=null,Qa=null;(0,u.useEffect)(function(){(0,T.readUser)().then(function(t){fl('agrement_praticien',t.code_membre),console.log("User",t),pt(t)}),qa((0,b.fetchGetSubscriptionListReset)()),qa((0,b.fetchActivePaySubscriptionReset)()),qa((0,b.fetchGetUserByNameOrNumberReset)()),qa((0,b.fetchGetUserByIdQRCodeReset)()),qa((0,b.fetchGetDrugAppareilReset)()),qa((0,b.fetchCreateConsultationReset)()),qa((0,b.fetchGetNetworkActsReset)()),qa((0,b.fetchGetProviderClassReset)()),qa((0,b.fetchAddDrugReset)()),j(xe.id_network)},[]),(0,u.useEffect)(function(){null!==mt&&console.log("user",mt)},[mt]),(0,u.useEffect)(function(){console.log("getUserByNameOrNumber.result",J),null!==J.result&&(J.result.response.length>0?ra(!0):(Ha.alertWithType('warn',h.default.t('EMPTY_LIST'),h.default.t('NO_ASSURE_MATCH_SEARCH')),qa((0,b.fetchGetUserByNameOrNumberReset)()))),J.error&&(Ha.alertWithType('error',h.default.t('ERROR_LABEL'),F.getErrorMsg(J)),qa((0,b.fetchGetUserByNameOrNumberReset)()))},[J]),(0,u.useEffect)(function(){null!==ee.result&&(ee.result.response.length>0?ua(!0):s.Alert.alert(h.default.t("ERROR_LABEL"),h.default.t('NO_DRUG_MATCH_YOU_SEARCH'),[{text:h.default.t("OK"),onPress:function(){Xt(!0),qa((0,b.fetchGetDrugAppareilReset)()),qa((0,b.fetchAddDrugReset)())}}],{cancelable:!1})),ee.error&&(Ha.alertWithType('error',h.default.t('ERROR_LABEL'),F.getErrorMsg(ee)),qa((0,b.fetchGetDrugAppareilReset)()))},[ee]),(0,u.useEffect)(function(){null!==ae.result&&(Xt(!1),Dt(ae.result.response)),ae.error&&(Ha.alertWithType('error',h.default.t('ERROR_LABEL'),F.getErrorMsg(ae)),qa((0,b.fetchAddDrugReset)()))},[ae]),(0,u.useEffect)(function(){null!==le.result&&s.Alert.alert(h.default.t("SUCCESS"),le.result.response,[{text:h.default.t("OK"),onPress:function(){qa((0,b.fetchCreateConsultationReset)()),oe.goBack()}}],{cancelable:!1}),le.error&&(Ha.alertWithType('error',h.default.t('ERROR_LABEL'),F.getErrorMsg(le)),qa((0,b.fetchCreateConsultationReset)()))},[le]);var Wa,ja,za,Ka,Xa=E.object().shape({numero_assure:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),password:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),practitioner_lastname:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),practitioner_firstname:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),Za=E.object().shape({amount_prestation:E.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),code_acte:E.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),frais_deplacement:E.number(),date_prestation:E.date(),ticker_moderateur:E.number()}),Ja=E.object().shape({examen_name:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),code_acte:E.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),examen_quantite:E.number().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),$a=E.object().shape({drug_name:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),drug_quantity:E.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),drug_posologie:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),el=E.object().shape({code:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),name:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),type:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),tl=function(t,l){var n=l||''+H(new Date).format('YYYY-MM-DD');pe('ios'===s.Platform.OS),se(n)},al=function(t,l){var n=l||new Date;Ne('ios'===s.Platform.OS),he(H(n).format('YYYY-MM-DD')),fl('accident_date',H(n).format('YYYY-MM-DD'))},ll=function(t,l){var n=l||new Date;at('ios'===s.Platform.OS),He(H(n).format('YYYY-MM-DD')),fl('pregnancy_start_at',H(n).format('YYYY-MM-DD'))},rl=function(t,l){var n=l||new Date;ot('ios'===s.Platform.OS),ze(H(n).format('YYYY-MM-DD')),fl('pregnancy_end_at',H(n).format('YYYY-MM-DD'))},nl=(0,p.useFormik)({validationSchema:Xa,initialValues:{numero_assure:'',password:'',firstname_patient:'',lastname_patient:'',practitioner_firstname:'',practitioner_lastname:'',agrement_praticien:null==mt?void 0:mt.code_membre,accident_date:null,pregnancy_start_at:null,pregnancy_end_at:null},onSubmit:function(t){0===ma.length?Ha.alertWithType('error',h.default.t('ERROR_LABEL'),h.default.t('YOU_MUST_ADD_AT_LEAST_ONE_PRESTATION')):X({insured_id:_t.insured_id,network_agent_id:xe.network_agent_id,password:t.password,beneficiary_id:null!==yt?yt.id:null,practitioner_lastname:t.practitioner_lastname,practitioner_firstname:t.practitioner_firstname,practitioner_provider_class_id:t.practitioner_provider_class_id,care_condition:t.care_condition,accident_date:t.accident_date,pregnancy_start_at:t.pregnancy_start_at,pregnancy_end_at:t.pregnancy_end_at,performances:ma,prescriptions:ya,exams:_a})}}),ol=nl.handleChange,il=nl.handleSubmit,ul=nl.handleBlur,dl=nl.values,sl=nl.errors,cl=nl.touched,fl=nl.setFieldValue,ml=nl.setFieldTouched,pl=(nl.isValid,function(){switch(console.log("currentStep",kt),kt){case 0:return console.log("values",dl),''!==dl.numero_assure&&(qa((0,b.fetchGetUserByNameOrNumberReset)()),I(xe.id_network,Me?"&insured_id="+dl.numero_assure:Ue?"&phone="+dl.numero_assure:"&name="+dl.numero_assure),console.log("errors",sl)),!1;default:return!0}}),gl=[{title:h.default.t('ASSURE'),content:u.default.createElement(s.View,null,u.default.createElement(R.default,{style:{marginTop:10},placeholder:Me?h.default.t('NUMERO_ASSURE'):Ue?h.default.t('PHONE_NUMBER'):h.default.t('NOM_ASSURE'),value:dl.numero_assure,keyboardType:Ue?'numeric':'default',onChangeText:ol('numero_assure'),onBlur:ul('numero_assure'),success:cl.numero_assure&&!sl.numero_assure,touched:cl.numero_assure,error:sl.numero_assure,icon:u.default.createElement(O.default,{style:{zIndex:10},name:Me?'lock':Ue?'phone':'user',size:20})}),u.default.createElement(s.View,{style:{flexDirection:'row',position:'absolute',top:22,right:50,justifyContent:'space-between',width:50}},u.default.createElement(N.default,{style:{paddingRight:5},name:"lock",size:20,color:_.Color.primaryColor,onPress:function(){Pe(!0),Fe(!1)}}),u.default.createElement(N.default,{style:{paddingRight:5},name:"phone",size:20,color:_.Color.primaryColor,onPress:function(){Pe(!1),Fe(!0)}}),u.default.createElement(N.default,{style:{paddingRight:5},name:"user",size:20,color:_.Color.primaryColor,onPress:function(){Pe(!1),Fe(!1)}}),u.default.createElement(N.default,{style:{paddingRight:5},name:"qrcode",size:20,color:_.Color.primaryColor,onPress:function(){De(!0)}})))},{title:h.default.t('PATIENT'),content:u.default.createElement(s.View,null,u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('NOM_CLIENT'),value:dl.lastname_patient,onChangeText:ol('lastname_patient'),onBlur:ul('lastname_patient'),success:cl.lastname_patient&&!sl.lastname_patient,touched:cl.lastname_patient,editable:!1,error:sl.lastname_patient}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('PRENOM_CLIENT'),value:dl.firstname_patient,editable:!1,onChangeText:ol('firstname_patient'),onBlur:ul('firstname_patient'),success:cl.firstname_patient&&!sl.firstname_patient,touched:cl.firstname_patient,error:sl.firstname_patient}),u.default.createElement(s.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(x.default,{body2:!0},h.default.t('SITUATION')),u.default.createElement(s.View,{style:{width:(0,y.responsiveWidth)(60)}},u.default.createElement(B.default,{options:Ta,disabled:!0,value:Ia,initial:Ia,buttonColor:_.Color.accentColor,backgroundColor:_.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){}}))))},{title:h.default.t('PRATICIEN'),content:u.default.createElement(s.View,null,u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('CODE_AGREMENT'),value:dl.agrement_praticien,editable:!1}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('NOM_PRATICIEN'),value:dl.practitioner_lastname,onChangeText:ol('practitioner_lastname'),onBlur:ul('practitioner_lastname'),success:cl.practitioner_lastname&&!sl.practitioner_lastname,touched:cl.practitioner_lastname,error:sl.practitioner_lastname}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('PRENOM_PRATICIEN'),value:dl.practitioner_firstname,onChangeText:ol('practitioner_firstname'),onBlur:ul('practitioner_firstname'),success:cl.practitioner_firstname&&!sl.practitioner_firstname,touched:cl.practitioner_firstname,error:sl.practitioner_firstname}),u.default.createElement(V.View,{ref:function(t){},style:{width:(0,y.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},u.default.createElement(M.Dropdown,{label:h.default.t('CLASSIFICATION'),data:null!==te.result?null==(l=te.result)?void 0:l.response:[],useNativeDriver:!0,onChangeText:function(t,l,n){ml('practitioner_provider_class_id'),fl('practitioner_provider_class_id',t.id),console.log("Value",t)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),u.default.createElement(V.View,{ref:function(t){},style:{width:(0,y.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},u.default.createElement(M.Dropdown,{label:h.default.t('CONDITION_PRISE_CHARGE'),data:Fa,useNativeDriver:!0,onChangeText:function(t,l,n){console.log("Value",t),st(t),ml('care_condition'),fl('care_condition',t)},valueExtractor:function(t){return t.value},labelExtractor:function(t){return t.label}})),u.default.createElement(s.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(x.default,{body2:!0},h.default.t('ACCIDENT')),u.default.createElement(s.View,{style:{width:(0,y.responsiveWidth)(40)}},u.default.createElement(B.default,{options:Na,initial:1,buttonColor:_.Color.accentColor,backgroundColor:_.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){console.log(t),be('YES'===t)}}))),ye&&u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('DATE_ACCIDENT'),value:null!==_e?_e:'',onChangeText:ol('date_accident'),onBlur:ul('date_accident'),onFocus:function(){s.Keyboard.dismiss(),Ne(!0)},success:cl.date_accident&&!sl.date_accident,touched:cl.date_accident,error:sl.date_accident}),u.default.createElement(s.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(x.default,{body2:!0},h.default.t('GROSSESSE')),u.default.createElement(s.View,{style:z.contentSwitch},u.default.createElement(B.default,{options:xa,initial:1,buttonColor:_.Color.accentColor,backgroundColor:_.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){Je('YES'===t)}}))),Ze&&u.default.createElement(u.default.Fragment,null,u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('DATE_DEBUT_GROSSESSE'),value:null!==qe?qe:'',onChangeText:ol('date_debut_grossesse'),onBlur:ul('date_debut_grossesse'),onFocus:function(){s.Keyboard.dismiss(),at(!0)},success:cl.date_debut_grossesse&&!sl.date_debut_grossesse,touched:cl.date_debut_grossesse,error:sl.date_debut_grossesse}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('DATE_FIN_GROSSESSE'),value:null!==je?je:'',onChangeText:ol('date_fin_grossesse'),onBlur:ul('date_fin_grossesse'),onFocus:function(){s.Keyboard.dismiss(),ot(!0)},success:cl.date_fin_grossesse&&!sl.date_fin_grossesse,touched:cl.date_fin_grossesse,error:sl.date_fin_grossesse})),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('PASSWORD'),value:dl.password,onChangeText:ol('password'),onBlur:ul('password'),success:cl.password&&!sl.password,touched:cl.password,error:sl.password,secureTextEntry:!0}),u.default.createElement(s.View,{style:{marginTop:25}},u.default.createElement(s.View,{style:{flexDirection:'row',alignItems:'center',justifyContent:'space-between'}},u.default.createElement(s.TouchableOpacity,{style:[z.iconNavigationButton,{borderRadius:5,width:100,height:30,flexDirection:"row",backgroundColor:_.Color.primaryColor,borderColor:_.Color.primaryColor}],onPress:function(t){qa((0,b.fetchGetAmountConsultationReset)()),La(!1),null===dt?Ha.alertWithType('warn',h.default.t('ERROR_LABEL'),h.default.t('PLEASE_SELECT_CONDITON_PRISE_CHARGE_FIRST')):Gt(!0)}},u.default.createElement(x.default,{whiteColor:!0},h.default.t('PRESTATION')),u.default.createElement(G.default,{name:"medical-bag",size:20,color:_.Color.whiteColor})),u.default.createElement(s.TouchableOpacity,{style:[z.iconNavigationButton,{borderRadius:5,width:100,height:30,flexDirection:"row",backgroundColor:_.Color.primaryColor,borderColor:_.Color.primaryColor}],onPress:function(t){ea(!0)}},u.default.createElement(x.default,{whiteColor:!0},h.default.t('EXAMEN')),u.default.createElement(N.default,{name:"file-medical",size:20,color:_.Color.whiteColor})),u.default.createElement(s.TouchableOpacity,{style:[z.iconNavigationButton,{borderRadius:5,width:110,height:30,flexDirection:"row",backgroundColor:_.Color.primaryColor,borderColor:_.Color.primaryColor}],onPress:function(t){Wt(!0),Dt(null)}},u.default.createElement(x.default,{whiteColor:!0},h.default.t('MEDICAMENT')),u.default.createElement(q.default,{name:"drug-pack",size:20,color:_.Color.whiteColor})))))}];return u.default.createElement(C.ScreenComponent,null,u.default.createElement(w.default,{ref:function(t){return Ha=t}}),u.default.createElement(s.KeyboardAvoidingView,{behavior:'android'===s.Platform.OS?'height':'padding',style:{flex:1}},u.default.createElement(s.ScrollView,{style:{flex:1}},u.default.createElement(s.View,{style:z.contain},u.default.createElement(v.default,{steps:gl,currentStepIndex:kt+1}),u.default.createElement(s.View,{style:{flexDirection:'column',alignItems:'center'}},u.default.createElement(A.default,{ref:It,activeStep:0,steps:gl,useNativeDriver:!0,nextStepAnimation:"slideLeft",prevStepAnimation:"slideRight",isFirstStep:function(t){return Ot(t)},isLastStep:function(t){return Vt(t)},onNext:function(){pl()},onPrev:function(){},currentStep:function(t){var l=t.currentStep,n=t.isLastStep,o=t.isFirstStep;Lt(l),Ot(o),Vt(n)}})),u.default.createElement(s.View,{style:z.iconNavigation},Nt?u.default.createElement(s.View,null):u.default.createElement(s.TouchableOpacity,{style:[z.iconNavigationButton,{backgroundColor:_.Color.primaryColor,borderColor:_.Color.primaryColor}],onPress:function(){return It.current.prev()}},u.default.createElement(N.default,{name:"arrow-left",size:20,color:_.Color.whiteColor})),2===kt?u.default.createElement(S.default,{loading:le.loading,onPress:il},h.default.t('SUBMIT_LABEL')):u.default.createElement(s.TouchableOpacity,{style:[z.iconNavigationButton,{backgroundColor:_.Color.primaryColor,borderColor:_.Color.primaryColor}],onPress:function(t){il(t),pl()&&It.current.next()}},D.loading||J.loading||$.loading?u.default.createElement(s.ActivityIndicator,{size:"small",color:"#fff"}):u.default.createElement(N.default,{name:"arrow-right",size:24,color:_.Color.whiteColor}))),Yt&&u.default.createElement(p.Formik,{validationSchema:Za,initialValues:{amount_prestation:'',frais_deplacement:'',code_acte:''},onSubmit:function(t){''===t.code_acte?Qa.shake(200):(pa([{act_id:t.code_acte,amount:t.amount_prestation,home_visit_fees:t.frais_deplacement}].concat((0,n.default)(ma))),Gt(!1),F.displayToast(h.default.t('PRESTATION_SUCCESSFULLY_ADD')))}},function(t){var l,n=t.values,o=t.errors,c=t.touched,f=t.handleChange,p=t.handleBlur,E=t.setFieldValue,C=t.setFieldTouched,b=t.handleSubmit;return t.isSubmitting,u.default.createElement(s.ScrollView,{style:{flex:1}},u.default.createElement(s.View,{style:[z.containModal,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(P.default,{isVisible:Yt,onSwipeComplete:function(){Gt(!1)},swipeDirection:['down'],style:z.bottomModal},u.default.createElement(s.View,{style:[z.contentFilterBottom,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(s.View,{style:z.contentSwipeDown},u.default.createElement(s.View,{style:z.lineSwipeDown})),u.default.createElement(x.default,{body2:!0,style:{marginTop:10}},h.default.t('ADD_PRESTATION')),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('DATE'),value:''+H(de).format('YYYY-MM-DD HH:mm'),editable:!1}),u.default.createElement(V.View,{ref:function(t){Qa=t},style:{width:(0,y.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},u.default.createElement(M.Dropdown,{label:h.default.t('CODE_ACTE'),data:null!==re.result?null==(l=re.result)?void 0:l.response:[],useNativeDriver:!0,onChangeText:function(t,l,n){C('code_acte'),E('code_acte',t.id)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('AMOUNT'),value:n.amount_prestation,onChangeText:f('amount_prestation'),onBlur:p('amount_prestation'),success:c.amount_prestation&&!o.amount_prestation,touched:c.amount_prestation,error:o.amount_prestation,onKeyPress:function(){Z({network_id:xe.id_network,amount:n.amount_prestation,care_condition:dt})}}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('TICKET_MONDERATEUR'),editable:!1,value:null!==ne.result?ne.result.response.moderator_ticket:''}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('AMOUNT_PER_INSURANCE'),editable:!1,value:null!==ne.result?ne.result.response.insurance_amount:''}),u.default.createElement(s.View,{style:{marginTop:10,width:"100%",flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(x.default,{body2:!0},h.default.t('VISITE_DOMICILE')),u.default.createElement(s.View,{style:z.contentSwitch},u.default.createElement(B.default,{options:Va,initial:1,buttonColor:_.Color.accentColor,backgroundColor:_.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){La('YES'===t)}}))),ka&&u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('FRAIS_DEPLACEMENT'),value:n.frais_deplacement,onChangeText:f('frais_deplacement'),onBlur:p('frais_deplacement'),success:c.frais_deplacement&&!o.frais_deplacement,touched:c.frais_deplacement,error:o.frais_deplacement}),u.default.createElement(S.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:b},h.default.t('SUBMIT_LABEL'))))))}),Qt&&u.default.createElement(p.Formik,{validationSchema:$a,initialValues:{drug_name:'',drug_posologie:'',drug_quantity:''},onSubmit:function(t){ba([{drug_or_device_id:Rt.id,dosage:t.drug_posologie,quantity:t.drug_quantity}].concat((0,n.default)(ya))),Wt(!1),F.displayToast(h.default.t('PRESCRIPTIONS_SUCCESSFULLY_ADD'))}},function(t){var l=t.values,n=t.errors,o=t.touched,c=t.handleChange,f=t.handleBlur,p=t.handleSubmit;return t.isSubmitting,u.default.createElement(s.ScrollView,{style:{flex:1}},u.default.createElement(s.View,{style:[z.containModal,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(P.default,{isVisible:Qt,onSwipeComplete:function(){Wt(!1)},swipeDirection:['down'],style:z.bottomModal},u.default.createElement(s.View,{style:[z.contentFilterBottom,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(s.View,{style:z.contentSwipeDown},u.default.createElement(s.View,{style:z.lineSwipeDown})),u.default.createElement(x.default,{body2:!0,style:{marginTop:10}},h.default.t('AJOUTER_MEDICAMENT')),u.default.createElement(s.View,{style:{flexDirection:'row'}},u.default.createElement(R.default,{style:{marginTop:10,width:"90%"},placeholder:h.default.t('NAME'),value:null!==Rt?Rt.name:l.drug_name,onChangeText:c('drug_name'),onBlur:f('drug_name'),success:o.drug_name&&!n.drug_name,touched:o.drug_name,error:n.drug_name,editable:null===Rt}),u.default.createElement(s.TouchableOpacity,{style:[z.iconNavigationButton,{backgroundColor:_.Color.primaryColor,borderColor:_.Color.primaryColor,marginTop:10,width:40,height:40}],onPress:function(t){Q(xe.id_network,l.drug_name)}},ee.loading?u.default.createElement(s.ActivityIndicator,{size:"small",color:"#fff"}):u.default.createElement(O.default,{name:"search",size:24,color:_.Color.whiteColor}))),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('POSOLOGIE'),value:l.drug_posologie,onChangeText:c('drug_posologie'),onBlur:f('drug_posologie'),success:o.drug_posologie&&!n.drug_posologie,touched:o.drug_posologie,error:n.drug_posologie}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('QUANTITE'),value:l.drug_quantity,onChangeText:c('drug_quantity'),onBlur:f('drug_quantity'),success:o.drug_quantity&&!n.drug_quantity,touched:o.drug_quantity,error:n.drug_quantity,keyboardType:"numeric"}),u.default.createElement(S.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:p},h.default.t('SUBMIT_LABEL'))))))}),$t&&u.default.createElement(p.Formik,{validationSchema:Ja,initialValues:{examen_name:'',examen_quantite:'',code_acte:''},onSubmit:function(t){console.log("Value",t),ha([{act_id:t.code_acte,description:t.examen_name,quantity:t.examen_quantite}].concat((0,n.default)(_a))),ea(!1),F.displayToast(h.default.t('EXAMENS_SUCCESSFULLY_ADD'))}},function(t){var l,n=t.values,o=t.errors,c=t.touched,f=t.handleChange,p=t.setFieldValue,E=t.setFieldTouched,C=t.handleBlur,b=t.handleSubmit;return t.isSubmitting,u.default.createElement(s.ScrollView,{style:{flex:1}},u.default.createElement(s.View,{style:[z.containModal,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(P.default,{isVisible:$t,onSwipeComplete:function(){ea(!1)},swipeDirection:['down'],style:z.bottomModal},u.default.createElement(s.View,{style:[z.contentFilterBottom,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(s.View,{style:z.contentSwipeDown},u.default.createElement(s.View,{style:z.lineSwipeDown})),u.default.createElement(x.default,{body2:!0,style:{marginTop:10}},h.default.t('AJOUTER_EXAMEN')),u.default.createElement(V.View,{ref:function(t){Qa=t},style:{width:(0,y.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},u.default.createElement(M.Dropdown,{label:h.default.t('CODE_ACTE'),data:null!==re.result?null==(l=re.result)?void 0:l.response:[],useNativeDriver:!0,onChangeText:function(t,l,n){console.log("Value",t),E('code_acte'),p('code_acte',t.id)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('NAME'),value:n.examen_name,onChangeText:f('examen_name'),onBlur:C('examen_name'),success:c.examen_name&&!o.examen_name,touched:c.examen_name,error:o.examen_name}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('QUANTITE'),value:n.examen_quantite,onChangeText:f('examen_quantite'),onBlur:C('examen_quantite'),success:c.examen_quantite&&!o.examen_quantite,touched:c.examen_quantite,error:o.examen_quantite,keyboardType:"numeric"}),u.default.createElement(S.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:function(){console.log("errors",o),console.log("values",n),b()}},h.default.t('SUBMIT_LABEL'))))))}),me&&u.default.createElement(k.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date(de),mode:"date",display:"spinner",onChange:tl}),Ae&&u.default.createElement(k.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date,mode:"date",display:"spinner",onChange:al}),tt&&u.default.createElement(k.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date,mode:"date",display:"spinner",onChange:ll}),nt&&u.default.createElement(k.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date,mode:"date",display:"spinner",onChange:rl}),Re&&u.default.createElement(f.default.Container,{contentStyle:{width:(0,y.responsiveWidth)(80)},useNativeDriver:!0,visible:Re},u.default.createElement(f.default.Title,null,h.default.t('SCAN')),u.default.createElement(s.ScrollView,{style:[z.blockView,{borderBottomColor:_.Color.borderColor,maxHeight:300}]},u.default.createElement(x.default,null,h.default.t('BRING_YOUR_CAMERA_CLOSER_TO_SCAN_QR_CODE')),u.default.createElement(L.default,{onRead:function(t){De(!1),console.log("result",t.data)},flashMode:U.RNCamera.Constants.FlashMode.off})),u.default.createElement(f.default.Button,{bold:!0,label:h.default.t('CLOSE'),onPress:function(){De(!1)}})),la&&u.default.createElement(s.ScrollView,{style:{flex:1}},u.default.createElement(s.View,{style:[z.containModal,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(P.default,{isVisible:la,onSwipeComplete:function(){ra(!1)},swipeDirection:['down'],style:z.bottomModal},u.default.createElement(s.View,{style:[z.contentFilterBottom,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(s.View,{style:z.contentSwipeDown},u.default.createElement(s.View,{style:z.lineSwipeDown})),u.default.createElement(x.default,{body2:!0,style:{marginTop:10}},h.default.t('LIST_ASSURE')),u.default.createElement(s.FlatList,{data:null==(za=J.result)?void 0:za.response,extraData:null==(Ka=J.result)?void 0:Ka.response,keyExtractor:function(t,l){return l},ListEmptyComponent:u.default.createElement(x.default,{body2:!0},h.default.t('NO_ASSURE_MATCH_SEARCH')),renderItem:function(t){var l=t.item;return t.index,u.default.createElement(s.View,{style:{paddingVertical:15,alignItems:'flex-start'}},u.default.createElement(s.TouchableOpacity,{style:[z.contentActionModalBottom,{borderBottomColor:_.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){'PAID'!==l.state?s.Alert.alert(h.default.t('ERROR_LABEL'),h.default.t('ASSURE_NON_EN_REGLE'),[{text:h.default.t('OK'),onPress:function(){}}]):(ht(l),bt(null),va(1),ra(!1),fl('lastname_patient',l.user.lastname),fl('firstname_patient',l.user.firstname),K(xe.id_network,'',"&user_id="+l.id),qa((0,b.fetchGetUserByNameOrNumberReset)()),It.current.next())}},u.default.createElement(x.default,{body2:!0,semibold:!0},l.user.firstname+" "+l.user.lastname)),l.beneficiaries.map(function(t){return u.default.createElement(s.TouchableOpacity,{style:z.beneficiarySubSection,onPress:function(){ht(l),bt(t),va(0),ra(!1),fl('lastname_patient',t.lastname),fl('firstname_patient',t.firstname),K(xe.id_network,'',"&user_id="+l.id+"&beneficiary_id="+t.id),qa((0,b.fetchGetUserByNameOrNumberReset)()),It.current.next()}},u.default.createElement(s.View,{style:{width:10}}),u.default.createElement(s.View,{style:{paddingHorizontal:10,alignItems:'flex-start'}},u.default.createElement(x.default,{subhead:!0,semibold:!0},t.firstname+" "+t.lastname+" ("+h.default.t('AYANT_DROITS')+")")))}))}}),u.default.createElement(S.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return ra(!1)}},h.default.t('OK')))))),ia&&u.default.createElement(s.ScrollView,{style:{flex:1}},u.default.createElement(s.View,{style:[z.containModal,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(P.default,{isVisible:ia,onSwipeComplete:function(){ua(!1)},swipeDirection:['down'],style:z.bottomModal},u.default.createElement(s.View,{style:[z.contentFilterBottom,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(s.View,{style:z.contentSwipeDown},u.default.createElement(s.View,{style:z.lineSwipeDown})),u.default.createElement(x.default,{body2:!0,style:{marginTop:10}},h.default.t('LISTE_MEDICAMENT')),u.default.createElement(s.FlatList,{data:null==(Wa=ee.result)?void 0:Wa.response,extraData:null==(ja=ee.result)?void 0:ja.response,keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(s.View,{style:{paddingVertical:15,alignItems:'flex-start'}},u.default.createElement(s.TouchableOpacity,{style:[z.contentActionModalBottom,{borderBottomColor:_.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){Dt(l),ua(!1)}},u.default.createElement(x.default,{body2:!0,semibold:!0},l.name+" | "+l.type)))}}),u.default.createElement(S.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return ua(!1)}},h.default.t('OK')))))),Kt&&u.default.createElement(p.Formik,{validationSchema:el,initialValues:{code:'',name:'',type:'',on_prescription:!1},onSubmit:function(t){Dt(null),W({network_id:xe.id_network,code:t.code,name:t.name,type:t.type,on_prescription:t.on_prescription})}},function(t){var l=t.values,n=t.errors,o=t.touched,c=t.handleChange,f=t.handleBlur,p=t.handleSubmit,E=t.setFieldValue;return t.isSubmitting,u.default.createElement(s.ScrollView,{style:{flex:1}},u.default.createElement(s.View,{style:[z.containModal,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(P.default,{isVisible:Kt,onSwipeComplete:function(){Xt(!1)},swipeDirection:['down'],style:z.bottomModal},u.default.createElement(s.View,{style:[z.contentFilterBottom,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(s.View,{style:z.contentSwipeDown},u.default.createElement(s.View,{style:z.lineSwipeDown})),u.default.createElement(x.default,{body2:!0,style:{marginTop:10}},h.default.t('AJOUTER_NOUVEAU_MEDICAMENT')),u.default.createElement(R.default,{style:{marginTop:10},placeholder:"Code",value:l.code,onChangeText:c('code'),onBlur:f('code'),success:o.code&&!n.code,touched:o.code,error:n.code}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('NAME'),value:l.name,onChangeText:c('name'),onBlur:f('name'),success:o.name&&!n.name,touched:o.name,error:n.name}),u.default.createElement(V.View,{ref:function(t){},style:{width:(0,y.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},u.default.createElement(M.Dropdown,{label:"Type",data:Ga,useNativeDriver:!0,onChangeText:function(t,l,n){E('type',t.value)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.label}})),u.default.createElement(s.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(x.default,{body2:!0},h.default.t('SOUS_ORDONNANCE')),u.default.createElement(s.View,{style:{width:(0,y.responsiveWidth)(60)}},u.default.createElement(B.default,{options:xa,initial:1,buttonColor:_.Color.accentColor,backgroundColor:_.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){E('on_prescription','YES'===t),console.log("On Prescription",t)}}))),u.default.createElement(S.default,{style:{marginTop:20,marginBottom:20},full:!0,loading:ae.loading,onPress:p},h.default.t('SUBMIT_LABEL'))))))})))))});e.default=X},2185,[4,1,33,27,15,18,1046,1639,1827,1950,1031,719,2147,2162,534,1779,2164,718,2158,2180,2182,2186,2187,1013,538,2157,771,749,979,1823,1763,2188,2194,1658,1107,881,1032,1189]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),o=n(r(d[3])),u=t(r(d[4])),c=r(d[5]),s=r(d[6]),f=n(r(d[7])),h=r(d[8]),b=t(r(d[9])),p=t(r(d[10])),E=r(d[11]),C=n(r(d[12])),S=r(d[13]),w=n(r(d[14])),_=n(r(d[15])),I=n(r(d[16])),y=n(r(d[17])),A=n(r(d[18])),T=r(d[19]),D=n(r(d[20])),x=n(r(d[21])),L=r(d[22]),R=n(r(d[23])),B=r(d[24]),F=n(r(d[25])),k=n(r(d[26])),v=t(r(d[27])),O=r(d[28]),V=r(d[29]),N=r(d[30]),P=n(r(d[31])),M=r(d[32]),Y=c.Dimensions.get('window'),U=Y.width,H=(Y.height,.5*U),j=c.StyleSheet.create({textInput:{height:46,backgroundColor:E.Color.fieldColor,borderRadius:5,marginTop:10,padding:10,width:'100%'},lineRow:{flexDirection:'row',justifyContent:'space-between',paddingBottom:20},contain:{alignItems:'center',marginTop:40,paddingBottom:20,paddingLeft:20,paddingRight:20,flex:1},circle:{width:H,height:H,borderRadius:H/2,position:'absolute',top:'15%'},circleContainer:{alignItems:'flex-end',right:-H/3,top:-H/1.5},lineSeparator:{borderWidth:1,width:'40%',height:1,alignSelf:'center'},line:{width:1,height:14,backgroundColor:E.Color.grayColor,marginLeft:10},contentModeView:{width:30,height:'100%',alignItems:'flex-end',justifyContent:'center'},contentFilter:{flexDirection:'row',alignItems:'center',marginLeft:10},bottomModal:{justifyContent:'flex-end',margin:0},contentFilterBottom:{width:"100%",borderTopLeftRadius:8,borderTopRightRadius:8,paddingHorizontal:20},contentSwipeDown:{paddingTop:10,alignItems:'center'},lineSwipeDown:{width:30,height:2.5,backgroundColor:E.Color.dividerColor},contentActionModalBottom:{flexDirection:'row',paddingVertical:15,justifyContent:'space-between',borderBottomWidth:1},containModal:{paddingVertical:10,paddingHorizontal:20,flexDirection:'row',justifyContent:'space-between'},floatingButtonAdd:{backgroundColor:E.Color.accentColor,position:"absolute",width:25,bottom:0,zIndex:1e3,right:20,top:35,height:25,borderRadius:12.5,alignItems:'center',justifyContent:'center'},contentSwitch:{width:(0,T.responsiveWidth)(40)},switch:{},choosePhotoBtn:{marginTop:10,marginBottom:10,width:"auto",height:"auto",padding:5,alignItems:'center',borderColor:E.Color.borderColor,marginRight:10,elevation:2},checkbox:{alignSelf:"center",color:"white"},itemAmountPerMonth:{paddingLeft:10,marginTop:10,flexDirection:'row'},dot:{width:12,height:12,borderRadius:6},blockView:{paddingVertical:10,borderBottomWidth:.5}}),G=(0,O.createStructuredSelector)({insuranceList:V.selectInsuranceList,subscribeInsurance:V.selectSubscribeInsurance,uploadInsuranceImages:V.selectUploadInsuranceImages,insurancePrimeAmount:V.selectInsurancePrimeAmount,addBeneficiaryToSubscription:V.selectAddBeneficiaryToSubscription,subscriptionList:V.selectSubscriptionList}),z=(0,s.connect)(G,{fetchGetListInsurance:L.fetchGetListInsurance,fetchSubscribeInsurance:L.fetchSubscribeInsurance,fetchGetInsurancePrimeAmount:L.fetchGetInsurancePrimeAmount,fetchUploadInsurance:L.fetchUploadInsurance,fetchAddBeneficiaryToSubscription:L.fetchAddBeneficiaryToSubscription,fetchGetSubscriptionList:L.fetchGetSubscriptionList})(function(t){t.insuranceList;var n=t.subscribeInsurance,O=(t.insurancePrimeAmount,t.fetchSubscribeInsurance,t.fetchGetListInsurance,t.fetchGetInsurancePrimeAmount,t.fetchUploadInsurance),V=t.uploadInsuranceImages,Y=t.fetchAddBeneficiaryToSubscription,U=t.addBeneficiaryToSubscription,H=t.fetchGetSubscriptionList,G=t.subscriptionList,z=t.navigation,K=(0,u.useState)(!1),W=(0,o.default)(K,2),J=W[0],Q=W[1],q=(0,u.useState)(!1),X=(0,o.default)(q,2),Z=(X[0],X[1],(0,u.useState)(null)),$=(0,o.default)(Z,2),ee=$[0],te=$[1],ae=(0,u.useState)(null),ne=(0,o.default)(ae,2),le=ne[0],oe=(ne[1],(0,u.useState)(null)),re=(0,o.default)(oe,2),ie=re[0];re[1];(0,u.useEffect)(function(){console.log("amountPerMonth",ie)});var ue=(0,u.useState)(null),ce=(0,o.default)(ue,2),se=ce[0],de=ce[1],fe=(0,u.useState)(null),me=(0,o.default)(fe,2),he=me[0],be=me[1],pe=(0,u.useState)(null),ge=(0,o.default)(pe,2),Ee=(ge[0],ge[1]),Ce=new FormData,Se=(0,u.useState)(null),we=(0,o.default)(Se,2),_e=we[0],Ie=we[1],ye=(0,u.useState)([]),Ae=(0,o.default)(ye,2),Te=Ae[0],De=Ae[1],xe=(0,s.useDispatch)(),Le=null,Re=(0,u.useState)([]),Be=(0,o.default)(Re,2),Fe=(Be[0],Be[1],(0,u.useState)([{label:C.default.t('YES'),value:0},{label:C.default.t('NO'),value:1}])),ke=(0,o.default)(Fe,2),ve=(ke[0],ke[1],(0,u.useState)([{label:C.default.t('MASCULIN'),value:"M"},{label:C.default.t('FEMININ'),value:"F"}])),Oe=(0,o.default)(ve,1)[0],Ve=(0,u.useState)(''+M(new Date((new Date).getFullYear()-5,0,1)).format('YYYY-MM-DD')),Ne=(0,o.default)(Ve,2),Pe=Ne[0],Me=Ne[1],Ye=(0,u.useState)(!1),Ue=(0,o.default)(Ye,2),He=Ue[0],je=Ue[1],Ge=(0,u.useState)(!1),ze=(0,o.default)(Ge,2),Ke=(ze[0],ze[1],(0,u.useState)(!1)),We=(0,o.default)(Ke,2),Je=We[0],Qe=We[1],qe=(0,u.useState)('M'),Xe=(0,o.default)(qe,2),Ze=Xe[0],$e=Xe[1],et=(0,u.useState)([{label:C.default.t('ENFANT'),value:"CHILD"},{label:C.default.t('CONJOINT'),value:'SPOUSE'}]),tt=(0,o.default)(et,1)[0],at=(0,u.useState)('CHILD'),nt=(0,o.default)(at,2),lt=nt[0],ot=nt[1],rt=(0,u.useState)(null),it=(0,o.default)(rt,2),ut=it[0],ct=it[1],st=(0,u.useState)([]),dt=(0,o.default)(st,2),ft=dt[0],mt=dt[1],ht=(0,u.useState)(new Date((new Date).getFullYear()-5,0,1)),bt=(0,o.default)(ht,2),pt=bt[0],gt=bt[1],Et=null;(0,u.useEffect)(function(){(0,B.readUser)().then(function(t){console.log("user",t),te(t)}),xe((0,L.fetchUploadInsuranceReset)()),xe((0,L.fetchAddBeneficiaryToSubscriptionReset)()),xe((0,L.fetchGetSubscriptionListReset)())},[]),(0,u.useEffect)(function(){null!==ee&&H(ee.id,'EDITABLE',!1)},[ee]),(0,u.useEffect)(function(){console.log('Beneficiaries',Dt)},[Dt]),(0,u.useEffect)(function(){null!==ut&&console.log('Subscription',ut)},[ut]),(0,u.useEffect)(function(){console.log("currentYearMinusAgeLimit",pt)},pt),(0,u.useEffect)(function(){if(null!==G.result){var t=[];G.result.response.map(function(n,l){t.push(n)}),mt(t)}G.error&&c.Alert.alert(C.default.t("ERROR_LABLE"),p.getErrorMsg(G),[{text:C.default.t("OK"),onPress:function(){xe((0,L.fetchGetListInsuranceReset)())}}],{cancelable:!1})},[G]),(0,u.useEffect)(function(){null!==U.result&&c.Alert.alert(C.default.t("SUCCESS"),U.result.response,[{text:C.default.t("OK"),onPress:function(){xe((0,L.fetchAddBeneficiaryToSubscriptionReset)()),z.goBack()}}],{cancelable:!1}),U.error&&c.Alert.alert(C.default.t("ERROR_LABLE"),p.getErrorMsg(U),[{text:C.default.t("OK"),onPress:function(){xe((0,L.fetchSubscribeInsuranceReset)())}}],{cancelable:!1})},[U]),(0,u.useEffect)(function(){null!==V.result&&(Q(!1),null!==ut)&&(Dt.length===parseInt(ut.max_number_of_beneficiaries)?c.Alert.alert(C.default.t("ERROR_LABLE"),C.default.t('NUMBER_MAX_BENEFICIARY'),[{text:C.default.t("OK"),onPress:function(){}}],{cancelable:!1}):(console.log("affiliation",lt),xt([{lastname:he,firstname:se,gender:Ze,birthdate:M(Pe).format('YYYY-MM-DD'),affiliation:lt,birthdate_proof:It[0].checboxSelectedValue,birthdate_proof_doc:V.result.response[0],justice_doc:V.result.response.length>1?V.result.response[1]:null,marriage_certificate_doc:V.result.response[0],id_document_type:"CNI",id_document_front:V.result.response[1],id_document_back:V.result.response[2],isEditable:!0}].concat((0,l.default)(Dt))),Le.alertWithType('success',C.default.t('SUCCESS'),C.default.t('BENEFICIARY_SUCCESSFULLY_ADDED')),Q(!1))),V.error&&c.Alert.alert(C.default.t("ERROR_LABLE"),p.getErrorMsg(V),[{text:C.default.t("OK"),onPress:function(){xe((0,L.fetchUploadInsuranceReset)())}}],{cancelable:!1})},[V]);var Ct=b.object().shape({password:b.string().required(C.default.t('THIS_FIELD_IS_REQUIRED'))}),St=b.object().shape({lastname:b.string().required(C.default.t('THIS_FIELD_IS_REQUIRED')),firstname:b.string()}),wt=(0,u.useState)([{label:C.default.t('COPIE_LEGALISE_ACTE_NAISSANCE_CERTIFICAT_NAISSANCE'),name:'birthdate_proof_doc',isFrontCamera:!1,file:null,hasCheckbox:!0,checkboxValue:['CERTIFICATE','CERTIFIED_COPY'],checboxSelectedValue:'CERTIFICATE'},{label:C.default.t('DOCUMENT_JUSTICE_ENFANT_ADOPTE'),name:'justice_doc',isFrontCamera:!1,file:null,hasCheckbox:!1}]),_t=(0,o.default)(wt,2),It=_t[0],yt=_t[1],At=(0,u.useState)([]),Tt=(0,o.default)(At,2),Dt=Tt[0],xt=Tt[1],Lt=(0,u.useState)([{label:C.default.t('ACTE_MARIAGE'),name:'marriage_certificate_doc',isFrontCamera:!1,file:null,hasCheckbox:!1},{label:C.default.t('CNI_FRONT_FACE'),name:'id_document_front',isFrontCamera:!1,file:null,hasCheckbox:!1},{label:C.default.t('CNI_BACK_FACE'),name:'id_document_back',isFrontCamera:!1,file:null,hasCheckbox:!1}]),Rt=(0,o.default)(Lt,2),Bt=Rt[0],Ft=Rt[1],kt=function(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1],F.default.openCamera({cropping:!0,compressImageQuality:.7,useFrontCamera:!1}).then(function(n){var o,u;"CHILD"===lt?yt(It.map(function(l){return t===l.name?l.hasCheckbox?{label:l.label,name:l.name,isFrontCamera:l.isFrontCamera,file:n,hasCheckbox:l.hasCheckbox,checkboxValue:l.checkboxValue,checboxSelectedValue:l.checboxSelectedValue}:{label:l.label,name:l.name,isFrontCamera:l.isFrontCamera,file:n}:l})):Ft(Bt.map(function(l){return t===l.name?l.hasCheckbox?{label:l.label,name:l.name,isFrontCamera:l.isFrontCamera,file:n,hasCheckbox:l.hasCheckbox,checkboxValue:l.checkboxValue,checboxSelectedValue:l.checboxSelectedValue}:{label:l.label,name:l.name,isFrontCamera:l.isFrontCamera,file:n}:l})),o=t,u=n,null!==_e&&(Ce=_e),Ce.append("files[]",{name:u.path.split('/').pop(),type:u.mime,uri:"android"===c.Platform.OS?u.path:u.path.replace("file://","")}),De([o].concat((0,l.default)(Te))),Ie(Ce)})},vt=function(t,n){var l=n||Pe;je('ios'===c.Platform.OS),Me(l)};return u.default.createElement(S.ScreenComponent,null,u.default.createElement(R.default,{ref:function(t){return Le=t}}),u.default.createElement(c.KeyboardAvoidingView,{behavior:'android'===c.Platform.OS?'height':'padding',style:{flex:1}},u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(h.Formik,{validationSchema:Ct,initialValues:{password:''},onSubmit:function(t){null!==ee&&(null===ut?Et.shake(800):(console.log(ee),console.log("insurance",le),Ee(t.password),Y(ut.id,{password:t.password,beneficiaries:Dt})))}},function(t){var n=t.values,l=t.errors,o=t.touched,s=t.handleChange,f=t.handleBlur,h=t.handleSubmit;return t.isSubmitting,u.default.createElement(c.View,{style:j.contain},u.default.createElement(v.View,{ref:function(t){Et=t},style:{width:(0,T.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,paddingRight:20,backgroundColor:'white'}},u.default.createElement(N.Dropdown,{label:C.default.t('SELECT_SUBSCRIPTION'),data:ft,useNativeDriver:!0,onChangeText:function(t,n,l){console.log("Value",t),ct({id:t.id,network:t.network,insurance_subscription_id:t.insurance_subscription_id,network_id:t.network_id,user_id:t.user_id,number_of_months:t.number_of_months,bonus_amount:t.bonus_amount,number_of_beneficiaries:t.number_of_beneficiaries,total_bonus_amount:t.total_bonus_amount,state:t.state,created_at:t.created_at,updated_at:t.updated_at,start_at:t.start_at,end_at:t.end_at,insured_id:t.insured_id,subscription:t.subscription,beneficiaries:t.beneficiaries})},valueExtractor:function(t){return t},labelExtractor:function(t){return t.network.name+" | "+C.default.t('ETAT')+": "+t.state+" | "+C.default.t('AMOUNT_LABEL')+": "+t.total_bonus_amount}})),u.default.createElement(I.default,{style:{marginTop:10},onChangeText:s('password'),placeholder:C.default.t('PASSWORD'),secureTextEntry:!0,icon:u.default.createElement(A.default,{name:"lock",size:20}),value:n.password,onBlur:f('password'),success:o.password&&!l.password,touched:o.password,error:l.password}),u.default.createElement(c.View,{style:{flexDirection:'column',alignItems:'center',justifyContent:'space-between',marginTop:25}},u.default.createElement(c.TouchableOpacity,{onPress:function(){var t,n;null===ut?Le.alertWithType('warn',C.default.t('ERROR_LABEL'),C.default.t('PLEASE_SELECT_INSURANCE_BEFORE')):(console.log("Souscription",ut),Q(!0),je(!1),xe((0,L.fetchUploadInsuranceReset)()),ot('CHILD'),gt(new Date((new Date).getFullYear()-parseInt(null==ut?void 0:null==(t=ut.network)?void 0:t.age_limit_of_child_beneficiary),0,1)),Me(''+M(new Date((new Date).getFullYear()-parseInt(null==ut?void 0:null==(n=ut.network)?void 0:n.age_limit_of_child_beneficiary),0,1)).format('YYYY-MM-DD')),de(null),be(null),De([]))}},u.default.createElement(_.default,{body1:!0,primaryColor:!0,bold:!0},C.default.t('ADD_AYANT_DROIT')))),u.default.createElement(y.default,{style:{marginTop:20},full:!0,loading:U.loading,onPress:h},C.default.t('SUBMIT_LABEL')))}))),J&&u.default.createElement(h.Formik,{validationSchema:St,initialValues:{firstname:'',lastname:''},onSubmit:function(t){O(_e),de(t.firstname),be(t.lastname)}},function(t){var l=t.values,o=t.errors,s=t.touched,h=t.handleChange,b=t.handleBlur,p=t.handleSubmit;return t.isSubmitting,u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[j.containModal,{backgroundColor:E.Color.containerBackgroundColor}]},u.default.createElement(f.default,{isVisible:J,onSwipeComplete:function(){Q(!1)},swipeDirection:['down'],style:j.bottomModal},u.default.createElement(c.View,{style:[j.contentFilterBottom,{backgroundColor:E.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:j.contentSwipeDown},u.default.createElement(c.View,{style:j.lineSwipeDown})),u.default.createElement(_.default,{body2:!0,style:{marginTop:10}},C.default.t('ADD_AYANT_DROIT')),u.default.createElement(w.default,{style:{marginTop:10},placeholder:C.default.t('NOM_ASSURE'),value:l.lastname,onChangeText:h('lastname'),onBlur:b('lastname'),success:s.lastname&&!o.lastname,touched:s.lastname,error:o.lastname}),u.default.createElement(w.default,{style:{marginTop:10},placeholder:C.default.t('PRENOM_ASSURE'),value:l.firstname,onChangeText:h('firstname'),onBlur:b('firstname'),success:s.firstname&&!o.firstname,touched:s.firstname,error:o.firstname}),u.default.createElement(w.default,{style:{marginTop:10},placeholder:C.default.t('DATE_NAISSANCE'),value:''+M(Pe).format('YYYY-MM-DD'),onChangeText:h('birthdate'),onBlur:b('birthdate'),onFocus:function(){c.Keyboard.dismiss(),je(!0)},success:s.birthdate&&!o.birthdate,touched:s.birthdate,error:o.birthdate}),u.default.createElement(c.View,{style:{marginTop:10,width:"100%",flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(_.default,{body2:!0},C.default.t('SEXE')),u.default.createElement(c.View,{style:j.contentSwitch},u.default.createElement(D.default,{options:Oe,initial:0,buttonColor:E.Color.accentColor,backgroundColor:E.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){$e(t)}}))),u.default.createElement(c.View,{style:{marginTop:10,width:"100%",flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(_.default,{body2:!0},C.default.t('AFFILIATION')),u.default.createElement(c.View,{style:j.contentSwitch},u.default.createElement(D.default,{options:tt,initial:0,buttonColor:E.Color.accentColor,backgroundColor:E.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){De([]),gt('CHILD'===t?new Date((new Date).getFullYear()-parseInt(ut.network.age_limit_of_child_beneficiary),0,1):new Date((new Date).getFullYear()-parseInt(ut.network.age_limit_of_insured_and_spouse),0,1)),ot(t)}}))),u.default.createElement(c.View,{style:j.contentService},u.default.createElement(c.FlatList,{horizontal:!0,showsHorizontalScrollIndicator:!1,data:'CHILD'===lt?It:Bt,extraData:'CHILD'===lt?It:Bt,keyExtractor:function(t,n){return n},renderItem:function(t){var n=t.item,l=t.index;return 0===l?u.default.createElement(c.TouchableOpacity,{style:j.choosePhotoBtn,onPress:function(){return kt(n.name,n.isFrontCamera)}},null===n.file?u.default.createElement(x.default,{name:"camera-image",size:50,color:E.Color.accentColor}):u.default.createElement(c.Image,{source:{uri:n.file.path},style:{width:50,height:50}}),u.default.createElement(_.default,{style:{alignSelf:'flex-start',fontSize:13},textAlign:"center"},n.label)):u.default.createElement(c.TouchableOpacity,{style:j.choosePhotoBtn,onPress:function(){return kt(n.name,n.isFrontCamera)},disabled:!Te.includes('CHILD'===lt?It[l-1].name:Bt[l-1].name)},null===n.file?u.default.createElement(x.default,{name:"camera-image",size:50,color:Te.includes('CHILD'===lt?It[l-1].name:Bt[l-1].name)?E.Color.accentColor:E.Color.grayColor}):u.default.createElement(c.Image,{source:{uri:n.file.path},style:{width:50,height:50}}),u.default.createElement(_.default,{style:{alignSelf:'flex-start',fontSize:13},textAlign:"center"},n.label))}})),u.default.createElement(y.default,{style:{marginTop:20,marginBottom:20},full:!0,loading:V.loading||n.loading,onPress:p},C.default.t('SUBMIT_LABEL'))))))}),Je&&u.default.createElement(f.default,{isVisible:Je,onSwipeComplete:function(){return Qe(!1)},swipeDirection:['down'],style:j.bottomModal},u.default.createElement(c.View,{style:[j.contentFilterBottom,{backgroundColor:E.Color.cardBackgroundColor}]},u.default.createElement(c.View,{style:j.contentSwipeDown},u.default.createElement(c.View,{style:j.lineSwipeDown})),u.default.createElement(c.View,{style:[j.contentActionModalBottom,{borderBottomColor:E.Color.borderColor}]}),u.default.createElement(c.View,{style:[{marginBottom:40}]},u.default.createElement(c.FlatList,{data:Dt.concat(ut.beneficiaries),extraData:Dt.concat(ut.beneficiaries),keyExtractor:function(t,n){return n},renderItem:function(t){var n=t.item,o=t.index;return console.log("Item",n),u.default.createElement(c.View,{style:j.lineRow},u.default.createElement(c.View,{style:{alignItems:'flex-start'}},u.default.createElement(_.default,{body1:!0},C.default.t('NOM_ASSURE')),u.default.createElement(_.default,{caption1:!0,grayColor:!0},n.firstname+" "+n.lastname)),u.default.createElement(c.View,{style:{alignItems:'flex-start'}},u.default.createElement(_.default,{body1:!0},C.default.t('AFFILIATION')),u.default.createElement(_.default,{caption1:!0,grayColor:!0},'CHILD'===n.affiliation?C.default.t('ENFANT'):C.default.t('CONJOINT'))),u.default.createElement(c.View,{style:j.iconRight},n.hasOwnProperty('isEditable')&&u.default.createElement(c.TouchableOpacity,{onPress:function(){var t=Dt;console.log("beneficiariesTemp index",o),t.splice(o),console.log("beneficiariesTemp",t),xt((0,l.default)(t))}},u.default.createElement(P.default,{name:"minus-circle",size:24,color:E.Color.grayColor}))))}})),u.default.createElement(y.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:function(){Qe(!1)}},C.default.t('OK')))),He&&u.default.createElement(k.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date(Pe),mode:"date",minimumDate:pt,display:"spinner",onChange:vt}),null!==ut&&u.default.createElement(c.TouchableOpacity,{style:{alignItems:'center',flexDirection:'row',width:60,position:'absolute',bottom:10,right:10,height:60,padding:3,backgroundColor:E.Color.primaryColor,borderRadius:100},onPress:function(){return Qe(!0)}},u.default.createElement(_.default,{whiteColor:!0,title2:!0},Dt.concat(ut.beneficiaries).length),u.default.createElement(_.default,{whiteColor:!0,caption2:!0},C.default.t('AYANT_DROIT'))))});e.default=z},2183,[4,1,33,27,15,18,1046,1823,1827,1950,1658,1031,719,2147,2158,2157,2159,2162,538,534,771,881,1779,2164,718,1781,1763,749,2180,2182,979,1013,1189]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),l=t(r(d[3])),s=r(d[4]),u=r(d[5]),c=r(d[6]),f=t(r(d[7])),h=t(r(d[8])),p=r(d[9]),b=n(r(d[10])),w=r(d[11]),S=n(r(d[12])),_=n(r(d[13])),E=n(r(d[14])),C=r(d[15]),v=r(d[16]),R=n(r(d[17])),y=r(d[18]),L=t(r(d[19])),A=r(d[20]),x=r(d[21]),P=r(d[22]),T=(r(d[23]),s.Dimensions.get('window')),B=T.width,k=(T.height,.5*B),D=s.StyleSheet.create({textInput:{height:46,backgroundColor:p.Color.fieldColor,borderRadius:5,marginTop:10,padding:10,width:'100%'},lineRow:{flexDirection:'row',justifyContent:'space-between',paddingBottom:20},contain:{alignItems:'center',marginTop:40,paddingBottom:20,paddingLeft:20,paddingRight:20,flex:1},circle:{width:k,height:k,borderRadius:k/2,position:'absolute',top:'15%'},circleContainer:{alignItems:'flex-end',right:-k/3,top:-k/1.5},lineSeparator:{borderWidth:1,width:'40%',height:1,alignSelf:'center'},line:{width:1,height:14,backgroundColor:p.Color.grayColor,marginLeft:10},contentModeView:{width:30,height:'100%',alignItems:'flex-end',justifyContent:'center'},contentFilter:{flexDirection:'row',alignItems:'center',marginLeft:10},bottomModal:{justifyContent:'flex-end',margin:0},contentFilterBottom:{width:"100%",borderTopLeftRadius:8,borderTopRightRadius:8,paddingHorizontal:20},contentSwipeDown:{paddingTop:10,alignItems:'center'},lineSwipeDown:{width:30,height:2.5,backgroundColor:p.Color.dividerColor},contentActionModalBottom:{flexDirection:'row',paddingVertical:15,justifyContent:'space-between',borderBottomWidth:1},containModal:{paddingVertical:10,paddingHorizontal:20,flexDirection:'row',justifyContent:'space-between'},floatingButtonAdd:{backgroundColor:p.Color.accentColor,position:"absolute",width:25,bottom:0,zIndex:1e3,right:20,top:35,height:25,borderRadius:12.5,alignItems:'center',justifyContent:'center'},contentSwitch:{width:(0,C.responsiveWidth)(40)},switch:{},choosePhotoBtn:{marginTop:10,marginBottom:10,width:"auto",height:"auto",padding:5,alignItems:'center',borderColor:p.Color.borderColor,marginRight:10,elevation:2},checkbox:{alignSelf:"center",color:"white"},itemAmountPerMonth:{paddingLeft:10,marginTop:10,flexDirection:'row'},dot:{width:12,height:12,borderRadius:6},blockView:{paddingVertical:10,borderBottomWidth:.5}}),I=(0,A.createStructuredSelector)({subscriptionList:x.selectSubscriptionList,activatePaySubscription:x.selectActivatePaySubscription}),V=(0,u.connect)(I,{fetchActivePaySubscription:v.fetchActivePaySubscription,fetchGetSubscriptionList:v.fetchGetSubscriptionList})(function(t){var n=t.activatePaySubscription,p=t.fetchGetSubscriptionList,A=t.subscriptionList,x=t.fetchActivePaySubscription,T=t.navigation,B=(0,l.useState)(null),k=(0,o.default)(B,2),I=k[0],V=k[1],M=(0,l.useState)(null),O=(0,o.default)(M,2),j=(O[0],O[1],(0,l.useState)([])),U=(0,o.default)(j,2),W=U[0],G=U[1],z=(0,l.useState)(null),F=(0,o.default)(z,2),K=F[0],N=F[1],H=(0,u.useDispatch)(),q=null;(0,l.useEffect)(function(){(0,y.readUser)().then(function(t){V(t)}),H((0,v.fetchGetSubscriptionListReset)()),H((0,v.fetchActivePaySubscriptionReset)())},[]),(0,l.useEffect)(function(){null!==I&&(console.log("user",I.id),p(I.id,'ACCEPTED',!0))},[I]),(0,l.useEffect)(function(){if(null!==A.result){var t=[];A.result.response.map(function(n,o){t.push(n)}),G(t)}A.error&&s.Alert.alert(b.default.t("ERROR_LABLE"),h.getErrorMsg(A),[{text:b.default.t("OK"),onPress:function(){H((0,v.fetchGetSubscriptionListReset)())}}],{cancelable:!1})},[A]),(0,l.useEffect)(function(){null!==n.result&&s.Alert.alert(b.default.t("SUCCESS"),n.result.response,[{text:b.default.t("OK"),onPress:function(){H((0,v.fetchActivePaySubscriptionReset)()),T.goBack()}}],{cancelable:!1}),n.error&&s.Alert.alert(b.default.t("ERROR_LABLE"),h.getErrorMsg(n),[{text:b.default.t("OK"),onPress:function(){H((0,v.fetchActivePaySubscriptionReset)())}}],{cancelable:!1})},[n]);var Q=f.object().shape({password:f.string().required(b.default.t('THIS_FIELD_IS_REQUIRED'))});return l.default.createElement(w.ScreenComponent,null,l.default.createElement(R.default,{ref:function(t){return t}}),l.default.createElement(s.KeyboardAvoidingView,{behavior:'android'===s.Platform.OS?'height':'padding',style:{flex:1}},l.default.createElement(s.ScrollView,{style:{flex:1}},l.default.createElement(c.Formik,{validationSchema:Q,initialValues:{password:''},onSubmit:function(t){null!==I&&(null===K?q.shake(800):(console.log("subscription",K),x(K.id,{password:t.password})))}},function(t){var o=t.values,u=t.errors,c=t.touched,f=t.handleChange,h=t.handleBlur,p=t.handleSubmit;return t.isSubmitting,l.default.createElement(s.View,{style:D.contain},l.default.createElement(L.View,{ref:function(t){q=t},style:{width:(0,C.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,paddingRight:20,backgroundColor:'white'}},l.default.createElement(P.Dropdown,{label:b.default.t('SELECT_INSURANCE'),data:W,useNativeDriver:!0,onChangeText:function(t,n,o){console.log("Value",t),N({id:t.id,insurance_subscription_id:t.insurance_subscription_id,network_id:t.network_id,user_id:t.user_id,number_of_months:t.number_of_months,bonus_amount:t.bonus_amount,number_of_beneficiaries:t.number_of_beneficiaries,total_bonus_amount:t.total_bonus_amount,state:t.state,created_at:t.created_at,updated_at:t.updated_at,start_at:t.start_at,end_at:t.end_at,reason:t.reason,network:t.network,beneficiaries:t.beneficiaries})},valueExtractor:function(t){return t},labelExtractor:function(t){return t.network.name+" | "+b.default.t('ETAT')+": "+t.state+" | "+b.default.t('AMOUNT_LABEL')+": "+t.total_bonus_amount}})),l.default.createElement(S.default,{style:{marginTop:10},onChangeText:f('password'),placeholder:b.default.t('PASSWORD'),secureTextEntry:!0,icon:l.default.createElement(E.default,{name:"lock",size:20}),value:o.password,onBlur:h('password'),success:c.password&&!u.password,touched:c.password,error:u.password}),l.default.createElement(_.default,{style:{marginTop:20},full:!0,loading:n.loading,onPress:p},b.default.t('SUBMIT_LABEL')))}))))});e.default=V},2184,[4,1,27,15,18,1046,1827,1950,1658,1031,719,2147,2159,2162,538,534,1779,2164,718,749,2180,2182,979,1189]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),l=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=l(r(d[2])),o=l(r(d[3])),u=t(r(d[4])),s=r(d[5]),c=r(d[6]),f=l(r(d[7])),p=r(d[8]),E=t(r(d[9])),_=r(d[10]),h=l(r(d[11])),C=r(d[12]),S=l(r(d[13])),y=r(d[14]),b=r(d[15]),w=l(r(d[16])),T=r(d[17]),R=l(r(d[18])),D=r(d[19]),I=r(d[20]),v=l(r(d[21])),A=l(r(d[22])),N=l(r(d[23])),O=l(r(d[24])),x=l(r(d[25])),B=l(r(d[26])),P=t(r(d[27])),V=r(d[28]),M=l(r(d[29])),k=l(r(d[30])),L=l(r(d[31])),U=r(d[32]),F=t(r(d[33])),Y=r(d[34]),G=l(r(d[35])),q=l(r(d[36])),H=r(d[37]),Q=s.Dimensions.get('window'),j=Q.width,z=(Q.height,.5*j),W=s.StyleSheet.create({textInput:{height:46,backgroundColor:_.Color.fieldColor,borderRadius:5,marginTop:10,padding:10,width:'100%'},lineRow:{flexDirection:'row',justifyContent:'space-between',paddingBottom:20},contain:{alignItems:'center',marginTop:40,paddingBottom:20,paddingLeft:20,paddingRight:20,flex:1},circle:{width:z,height:z,borderRadius:z/2,position:'absolute',top:'15%'},circleContainer:{alignItems:'flex-end',right:-z/3,top:-z/1.5},lineSeparator:{borderWidth:1,width:'40%',height:1,alignSelf:'center'},line:{width:1,height:14,backgroundColor:_.Color.grayColor,marginLeft:10},contentModeView:{width:30,height:'100%',alignItems:'flex-end',justifyContent:'center'},contentFilter:{flexDirection:'row',alignItems:'center',marginLeft:10},bottomModal:{justifyContent:'flex-end',margin:0},contentFilterBottom:{width:"100%",borderTopLeftRadius:8,borderTopRightRadius:8,paddingHorizontal:20},contentSwipeDown:{paddingTop:10,alignItems:'center'},lineSwipeDown:{width:30,height:2.5,backgroundColor:_.Color.dividerColor},contentActionModalBottom:{flexDirection:'row',paddingVertical:15,justifyContent:'space-between',borderBottomWidth:1},containModal:{paddingVertical:10,paddingHorizontal:20,flexDirection:'row',justifyContent:'space-between'},floatingButtonAdd:{backgroundColor:_.Color.accentColor,position:"absolute",width:25,bottom:0,zIndex:1e3,right:20,top:35,height:25,borderRadius:12.5,alignItems:'center',justifyContent:'center'},contentSwitch:{width:(0,y.responsiveWidth)(40)},switch:{},choosePhotoBtn:{marginTop:10,marginBottom:10,width:"auto",height:"auto",padding:5,alignItems:'center',borderColor:_.Color.borderColor,marginRight:10,elevation:2},checkbox:{alignSelf:"center",color:"white"},itemAmountPerMonth:{paddingLeft:10,marginTop:10,flexDirection:'row'},dot:{width:12,height:12,borderRadius:6},blockView:{paddingVertical:10,borderBottomWidth:.5},iconNavigation:{width:'100%',flexDirection:'row',marginTop:20,justifyContent:'space-between',alignItems:'center'},iconNavigationButton:{borderWidth:1,borderRadius:25,width:50,height:50,alignItems:'center',justifyContent:'center'},beneficiarySubSection:{marginTop:10,flexDirection:'row',width:'100%'}}),K=(0,D.createStructuredSelector)({subscriptionList:I.selectSubscriptionList,activatePaySubscription:I.selectActivatePaySubscription,getUserByNameOrNumber:I.selectGetUserByNameOrNumber,getUserByIdQRCode:I.selectGetUserByIdQRCode,getDrugAppareil:I.selectGetDrugAppareil,addDrug:I.selectAddDrug,getProviderClass:I.selectGetProviderClass,createConsultation:I.selectCreateConsultation,getNetworkAct:I.selectGetNetworkAct,getAmountConsultation:I.selectGetAmountConsultation}),X=(0,c.connect)(K,{fetchActivePaySubscription:b.fetchActivePaySubscription,fetchGetSubscriptionList:b.fetchGetSubscriptionList,fetchGetUserByIdQRCode:b.fetchGetUserByIdQRCode,fetchGetUserByNameOrNumber:b.fetchGetUserByNameOrNumber,fetchGetDrugAppareil:b.fetchGetDrugAppareil,fetchAddDrug:b.fetchAddDrug,fetchGetProviderClass:b.fetchGetProviderClass,fetchGetNetworkActs:b.fetchGetNetworkActs,fetchCreateConsultation:b.fetchCreateConsultation,fetchGetAmountConsultation:b.fetchGetAmountConsultation})(function(t){t.activatePaySubscription,t.fetchGetSubscriptionList;var l,D=t.subscriptionList,I=(t.fetchActivePaySubscription,t.fetchGetUserByIdQRCode,t.fetchGetUserByNameOrNumber),Q=t.fetchGetDrugAppareil,j=t.fetchAddDrug,z=t.fetchGetProviderClass,K=t.fetchGetNetworkActs,X=t.fetchCreateConsultation,Z=t.fetchGetAmountConsultation,J=t.getUserByNameOrNumber,$=t.getUserByIdQRCode,ee=t.getDrugAppareil,te=t.getProviderClass,ae=t.addDrug,le=t.createConsultation,ne=t.getNetworkAct,re=t.getAmountConsultation,oe=t.navigation,ie=(0,u.useState)(''+H(new Date).format('YYYY-MM-DD HH:mm')),ue=(0,o.default)(ie,2),de=ue[0],se=ue[1],ce=(0,u.useState)(!1),fe=(0,o.default)(ce,2),me=fe[0],pe=fe[1],ge=(0,u.useState)(null),Ee=(0,o.default)(ge,2),_e=Ee[0],he=Ee[1],Ce=(0,u.useState)(!1),Se=(0,o.default)(Ce,2),ye=Se[0],be=Se[1],we=(0,u.useState)(!1),Te=(0,o.default)(we,2),Re=Te[0],De=Te[1],Ie=(0,u.useState)(!1),ve=(0,o.default)(Ie,2),Ae=ve[0],Ne=ve[1],Oe=(0,u.useState)(Y.store.getState().walletDetailReducer.result.response),xe=(0,o.default)(Oe,1)[0],Be=(0,u.useState)(!1),Pe=(0,o.default)(Be,2),Ve=Pe[0],Me=Pe[1],ke=(0,u.useState)(!1),Le=(0,o.default)(ke,2),Ue=Le[0],Fe=Le[1],Ye=(0,u.useState)(null),Ge=(0,o.default)(Ye,2),qe=Ge[0],He=Ge[1],Qe=(0,u.useState)(null),je=(0,o.default)(Qe,2),ze=je[0],We=je[1],Ke=(0,u.useState)(!1),Xe=(0,o.default)(Ke,2),Ze=Xe[0],Je=Xe[1],$e=(0,u.useState)(!1),et=(0,o.default)($e,2),tt=et[0],at=et[1],lt=(0,u.useState)(!1),nt=(0,o.default)(lt,2),rt=nt[0],ot=nt[1],it=(0,u.useState)(null),ut=(0,o.default)(it,2),dt=ut[0],st=ut[1],ct=(0,u.useState)(null),ft=(0,o.default)(ct,2),mt=ft[0],pt=ft[1],gt=(0,u.useState)(null),Et=(0,o.default)(gt,2),_t=Et[0],ht=Et[1],Ct=(0,u.useState)(null),St=(0,o.default)(Ct,2),yt=St[0],bt=St[1],wt=(0,u.useState)(null),Tt=(0,o.default)(wt,2),Rt=Tt[0],Dt=Tt[1],It=(0,u.useRef)(),vt=(0,u.useState)(!0),At=(0,o.default)(vt,2),Nt=At[0],Ot=At[1],xt=(0,u.useState)(!1),Bt=(0,o.default)(xt,2),Pt=(Bt[0],Bt[1]),Vt=(0,u.useState)(1),Mt=(0,o.default)(Vt,2),kt=Mt[0],Lt=Mt[1],Ut=(0,u.useState)(!1),Ft=(0,o.default)(Ut,2),Yt=Ft[0],Gt=Ft[1],qt=(0,u.useState)(!1),Ht=(0,o.default)(qt,2),Qt=Ht[0],jt=Ht[1],zt=(0,u.useState)(!1),Wt=(0,o.default)(zt,2),Kt=Wt[0],Xt=Wt[1],Zt=(0,u.useState)(!1),Jt=(0,o.default)(Zt,2),$t=Jt[0],ea=Jt[1],ta=(0,u.useState)(!1),aa=(0,o.default)(ta,2),la=aa[0],na=aa[1],ra=(0,u.useState)(!1),oa=(0,o.default)(ra,2),ia=oa[0],ua=oa[1],da=(0,u.useState)(null),sa=(0,o.default)(da,2),ca=(sa[0],sa[1],(0,u.useState)([])),fa=(0,o.default)(ca,2),ma=fa[0],pa=fa[1],ga=(0,u.useState)([]),Ea=(0,o.default)(ga,2),_a=Ea[0],ha=Ea[1],Ca=(0,u.useState)([]),Sa=(0,o.default)(Ca,2),ya=Sa[0],ba=Sa[1];console.log("Prestations",ma),console.log("examens",_a),console.log("prescriptions",ya);var wa=(0,u.useState)([{label:h.default.t('AYANT_DROITS'),value:"M"},{label:h.default.t('ASSURE'),value:"F"}]),Ta=(0,o.default)(wa,1)[0],Ra=(0,u.useState)(1),Da=(0,o.default)(Ra,2),Ia=Da[0],va=Da[1],Aa=(0,u.useState)([{label:h.default.t('YES'),value:"YES"},{label:h.default.t('NO'),value:"NO"}]),Na=(0,o.default)(Aa,1)[0],Oa=(0,u.useState)([{label:h.default.t('YES'),value:"YES"},{label:h.default.t('NO'),value:"NO"}]),xa=(0,o.default)(Oa,1)[0],Ba=(0,u.useState)([{label:h.default.t('YES'),value:"YES"},{label:h.default.t('NO'),value:"NO"}]),Pa=(0,o.default)(Ba,1)[0],Va=(0,u.useState)(!1),Ma=(0,o.default)(Va,2),ka=Ma[0],La=Ma[1],Ua=(0,u.useState)([{label:h.default.t('AFFECTION_COURANTE'),value:"CURRENT_AFFECTION"},{label:h.default.t('AFFECTION_LONGUE'),value:"LONG_TERM_AFFECTION"},{label:h.default.t('EXONERE'),value:"EXONERATION"}]),Fa=(0,o.default)(Ua,1)[0],Ya=(0,u.useState)([{label:h.default.t('COMPRESSED'),value:"COMPRESSED"},{label:h.default.t('SYRUP'),value:"SYRUP"},{label:h.default.t('SOLUTION'),value:"SOLUTION"},{label:h.default.t('SUPPOSITORY'),value:"SUPPOSITORY"},{label:h.default.t('DEVICE'),value:"DEVICE"}]),Ga=(0,o.default)(Ya,1)[0],qa=(0,c.useDispatch)(),Ha=null,Qa=null;(0,u.useEffect)(function(){(0,T.readUser)().then(function(t){fl('agrement_praticien',t.code_membre),console.log("User",t),pt(t)}),qa((0,b.fetchGetSubscriptionListReset)()),qa((0,b.fetchActivePaySubscriptionReset)()),qa((0,b.fetchGetUserByNameOrNumberReset)()),qa((0,b.fetchGetUserByIdQRCodeReset)()),qa((0,b.fetchGetDrugAppareilReset)()),qa((0,b.fetchCreateConsultationReset)()),qa((0,b.fetchGetNetworkActsReset)()),qa((0,b.fetchGetProviderClassReset)()),qa((0,b.fetchAddDrugReset)()),z(xe.id_network)},[]),(0,u.useEffect)(function(){null!==mt&&console.log("user",mt)},[mt]),(0,u.useEffect)(function(){console.log("getUserByNameOrNumber.result",J),null!==J.result&&(J.result.response.length>0?na(!0):(Ha.alertWithType('warn',h.default.t('EMPTY_LIST'),h.default.t('NO_ASSURE_MATCH_SEARCH')),qa((0,b.fetchGetUserByNameOrNumberReset)()))),J.error&&s.Alert.alert(h.default.t("ERROR_LABLE"),F.getErrorMsg(J),[{text:h.default.t("OK"),onPress:function(){qa((0,b.fetchGetUserByNameOrNumberReset)())}}],{cancelable:!1})},[J]),(0,u.useEffect)(function(){null!==ee.result&&(ee.result.response.length>0?ua(!0):s.Alert.alert(h.default.t("ERROR_LABEL"),h.default.t('NO_DRUG_MATCH_YOU_SEARCH'),[{text:h.default.t("OK"),onPress:function(){Xt(!0),qa((0,b.fetchGetDrugAppareilReset)()),qa((0,b.fetchAddDrugReset)())}}],{cancelable:!1})),ee.error&&s.Alert.alert(h.default.t("ERROR_LABLE"),F.getErrorMsg(ee),[{text:h.default.t("OK"),onPress:function(){qa((0,b.fetchGetDrugAppareilReset)())}}],{cancelable:!1})},[ee]),(0,u.useEffect)(function(){null!==ae.result&&(Xt(!1),Dt(ae.result.response)),ae.error&&s.Alert.alert(h.default.t("ERROR_LABLE"),F.getErrorMsg(ae),[{text:h.default.t("OK"),onPress:function(){qa((0,b.fetchAddDrugReset)())}}],{cancelable:!1})},[ae]),(0,u.useEffect)(function(){null!==le.result&&s.Alert.alert(h.default.t("SUCCESS"),le.result.response,[{text:h.default.t("OK"),onPress:function(){qa((0,b.fetchCreateConsultationReset)()),oe.goBack()}}],{cancelable:!1}),le.error&&s.Alert.alert(h.default.t("ERROR_LABLE"),F.getErrorMsg(le),[{text:h.default.t("OK"),onPress:function(){qa((0,b.fetchCreateConsultationReset)())}}],{cancelable:!1})},[le]);var ja,za,Wa,Ka,Xa=E.object().shape({numero_assure:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),password:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),practitioner_lastname:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),practitioner_firstname:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),Za=E.object().shape({amount_prestation:E.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),code_acte:E.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),frais_deplacement:E.number(),date_prestation:E.date(),ticker_moderateur:E.number()}),Ja=E.object().shape({examen_name:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),code_acte:E.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),examen_quantite:E.number().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),$a=E.object().shape({drug_name:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),drug_quantity:E.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),drug_posologie:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),el=E.object().shape({code:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),name:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),type:E.string().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),tl=function(t,l){var n=l||''+H(new Date).format('YYYY-MM-DD');pe('ios'===s.Platform.OS),se(n)},al=function(t,l){var n=l||new Date;Ne('ios'===s.Platform.OS),he(H(n).format('YYYY-MM-DD')),fl('accident_date',H(n).format('YYYY-MM-DD'))},ll=function(t,l){var n=l||new Date;at('ios'===s.Platform.OS),He(H(n).format('YYYY-MM-DD')),fl('pregnancy_start_at',H(n).format('YYYY-MM-DD'))},nl=function(t,l){var n=l||new Date;ot('ios'===s.Platform.OS),We(H(n).format('YYYY-MM-DD')),fl('pregnancy_end_at',H(n).format('YYYY-MM-DD'))},rl=(0,p.useFormik)({validationSchema:Xa,initialValues:{numero_assure:'',password:'',firstname_patient:'',lastname_patient:'',practitioner_firstname:'',practitioner_lastname:'',agrement_praticien:null==mt?void 0:mt.code_membre,accident_date:null,pregnancy_start_at:null,pregnancy_end_at:null},onSubmit:function(t){0===ma.length?s.Alert.alert(h.default.t("ERROR_LABLE"),h.default.t('YOU_MUST_ADD_AT_LEAST_ONE_PRESTATION'),[{text:h.default.t("OK"),onPress:function(){}}],{cancelable:!1}):X({insured_id:_t.insured_id,network_agent_id:xe.network_agent_id,password:t.password,beneficiary_id:null!==yt?yt.id:null,practitioner_lastname:t.practitioner_lastname,practitioner_firstname:t.practitioner_firstname,practitioner_provider_class_id:t.practitioner_provider_class_id,care_condition:t.care_condition,accident_date:t.accident_date,pregnancy_start_at:t.pregnancy_start_at,pregnancy_end_at:t.pregnancy_end_at,performances:ma,prescriptions:ya,exams:_a})}}),ol=rl.handleChange,il=rl.handleSubmit,ul=rl.handleBlur,dl=rl.values,sl=rl.errors,cl=rl.touched,fl=rl.setFieldValue,ml=rl.setFieldTouched,pl=(rl.isValid,function(){switch(console.log("currentStep",kt),kt){case 0:return console.log("values",dl),qa((0,b.fetchGetUserByNameOrNumberReset)()),''!==dl.numero_assure&&null===J.result&&(I(xe.id_network,Ve?"&insured_id="+dl.numero_assure:Ue?"&phone="+dl.numero_assure:"&name="+dl.numero_assure),console.log("errors",sl)),!1;default:return!0}}),gl=[{title:h.default.t('ASSURE'),content:u.default.createElement(s.View,null,u.default.createElement(R.default,{style:{marginTop:10},placeholder:Ve?h.default.t('NUMERO_ASSURE'):Ue?h.default.t('PHONE_NUMBER'):h.default.t('NOM_ASSURE'),value:dl.numero_assure,keyboardType:Ue?'numeric':'default',onChangeText:ol('numero_assure'),onBlur:ul('numero_assure'),success:cl.numero_assure&&!sl.numero_assure,touched:cl.numero_assure,error:sl.numero_assure,icon:u.default.createElement(O.default,{style:{zIndex:10},name:Ve?'lock':Ue?'phone':'user',size:20})}),u.default.createElement(s.View,{style:{flexDirection:'row',position:'absolute',top:22,right:50,justifyContent:'space-between',width:50}},u.default.createElement(N.default,{style:{paddingRight:5},name:"lock",size:20,color:_.Color.primaryColor,onPress:function(){Me(!0),Fe(!1)}}),u.default.createElement(N.default,{style:{paddingRight:5},name:"phone",size:20,color:_.Color.primaryColor,onPress:function(){Me(!1),Fe(!0)}}),u.default.createElement(N.default,{style:{paddingRight:5},name:"user",size:20,color:_.Color.primaryColor,onPress:function(){Me(!1),Fe(!1)}}),u.default.createElement(N.default,{style:{paddingRight:5},name:"qrcode",size:20,color:_.Color.primaryColor,onPress:function(){De(!0)}})))},{title:h.default.t('PATIENT'),content:u.default.createElement(s.View,null,u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('NOM_CLIENT'),value:dl.lastname_patient,onChangeText:ol('lastname_patient'),onBlur:ul('lastname_patient'),success:cl.lastname_patient&&!sl.lastname_patient,touched:cl.lastname_patient,editable:!1,error:sl.lastname_patient}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('PRENOM_CLIENT'),value:dl.firstname_patient,editable:!1,onChangeText:ol('firstname_patient'),onBlur:ul('firstname_patient'),success:cl.firstname_patient&&!sl.firstname_patient,touched:cl.firstname_patient,error:sl.firstname_patient}),u.default.createElement(s.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(x.default,{body2:!0},h.default.t('SITUATION')),u.default.createElement(s.View,{style:{width:(0,y.responsiveWidth)(60)}},u.default.createElement(B.default,{options:Ta,disabled:!0,value:Ia,initial:Ia,buttonColor:_.Color.accentColor,backgroundColor:_.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){}}))))},{title:h.default.t('PRATICIEN'),content:u.default.createElement(s.View,null,u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('CODE_AGREMENT'),value:dl.agrement_praticien,editable:!1}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('NOM_PRATICIEN'),value:dl.practitioner_lastname,onChangeText:ol('practitioner_lastname'),onBlur:ul('practitioner_lastname'),success:cl.practitioner_lastname&&!sl.practitioner_lastname,touched:cl.practitioner_lastname,error:sl.practitioner_lastname}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('PRENOM_PRATICIEN'),value:dl.practitioner_firstname,onChangeText:ol('practitioner_firstname'),onBlur:ul('practitioner_firstname'),success:cl.practitioner_firstname&&!sl.practitioner_firstname,touched:cl.practitioner_firstname,error:sl.practitioner_firstname}),u.default.createElement(P.View,{ref:function(t){},style:{width:(0,y.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},u.default.createElement(V.Dropdown,{label:h.default.t('CLASSIFICATION'),data:null!==te.result?null==(l=te.result)?void 0:l.response:[],useNativeDriver:!0,onChangeText:function(t,l,n){ml('practitioner_provider_class_id'),fl('practitioner_provider_class_id',t.id),console.log("Value",t)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),u.default.createElement(P.View,{ref:function(t){},style:{width:(0,y.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},u.default.createElement(V.Dropdown,{label:h.default.t('CONDITION_PRISE_CHARGE'),data:Fa,useNativeDriver:!0,onChangeText:function(t,l,n){console.log("Value",t),st(t),ml('care_condition'),fl('care_condition',t)},valueExtractor:function(t){return t.value},labelExtractor:function(t){return t.label}})),u.default.createElement(s.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(x.default,{body2:!0},h.default.t('ACCIDENT')),u.default.createElement(s.View,{style:{width:(0,y.responsiveWidth)(40)}},u.default.createElement(B.default,{options:Na,initial:1,buttonColor:_.Color.accentColor,backgroundColor:_.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){console.log(t),be('YES'===t)}}))),ye&&u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('DATE_ACCIDENT'),value:null!==_e?_e:'',onChangeText:ol('date_accident'),onBlur:ul('date_accident'),onFocus:function(){s.Keyboard.dismiss(),Ne(!0)},success:cl.date_accident&&!sl.date_accident,touched:cl.date_accident,error:sl.date_accident}),u.default.createElement(s.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(x.default,{body2:!0},h.default.t('GROSSESSE')),u.default.createElement(s.View,{style:W.contentSwitch},u.default.createElement(B.default,{options:xa,initial:1,buttonColor:_.Color.accentColor,backgroundColor:_.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){Je('YES'===t)}}))),Ze&&u.default.createElement(u.default.Fragment,null,u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('DATE_DEBUT_GROSSESSE'),value:null!==qe?qe:'',onChangeText:ol('date_debut_grossesse'),onBlur:ul('date_debut_grossesse'),onFocus:function(){s.Keyboard.dismiss(),at(!0)},success:cl.date_debut_grossesse&&!sl.date_debut_grossesse,touched:cl.date_debut_grossesse,error:sl.date_debut_grossesse}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('DATE_FIN_GROSSESSE'),value:null!==ze?ze:'',onChangeText:ol('date_fin_grossesse'),onBlur:ul('date_fin_grossesse'),onFocus:function(){s.Keyboard.dismiss(),ot(!0)},success:cl.date_fin_grossesse&&!sl.date_fin_grossesse,touched:cl.date_fin_grossesse,error:sl.date_fin_grossesse})),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('PASSWORD'),value:dl.password,onChangeText:ol('password'),onBlur:ul('password'),success:cl.password&&!sl.password,touched:cl.password,error:sl.password,secureTextEntry:!0}),u.default.createElement(s.View,{style:{marginTop:25}},u.default.createElement(s.View,{style:{flexDirection:'row',alignItems:'center',justifyContent:'space-between'}},u.default.createElement(s.TouchableOpacity,{style:[W.iconNavigationButton,{borderRadius:5,width:100,height:30,flexDirection:"row",backgroundColor:_.Color.primaryColor,borderColor:_.Color.primaryColor}],onPress:function(t){qa((0,b.fetchGetAmountConsultationReset)()),La(!1),null===dt?Ha.alertWithType('warn',h.default.t('ERROR_LABEL'),h.default.t('PLEASE_SELECT_CONDITON_PRISE_CHARGE_FIRST')):Gt(!0)}},u.default.createElement(x.default,{whiteColor:!0},h.default.t('PRESTATION')),u.default.createElement(G.default,{name:"medical-bag",size:20,color:_.Color.whiteColor})),u.default.createElement(s.TouchableOpacity,{style:[W.iconNavigationButton,{borderRadius:5,width:100,height:30,flexDirection:"row",backgroundColor:_.Color.primaryColor,borderColor:_.Color.primaryColor}],onPress:function(t){ea(!0)}},u.default.createElement(x.default,{whiteColor:!0},h.default.t('EXAMEN')),u.default.createElement(N.default,{name:"file-medical",size:20,color:_.Color.whiteColor})),u.default.createElement(s.TouchableOpacity,{style:[W.iconNavigationButton,{borderRadius:5,width:110,height:30,flexDirection:"row",backgroundColor:_.Color.primaryColor,borderColor:_.Color.primaryColor}],onPress:function(t){jt(!0),Dt(null)}},u.default.createElement(x.default,{whiteColor:!0},h.default.t('MEDICAMENT')),u.default.createElement(q.default,{name:"drug-pack",size:20,color:_.Color.whiteColor})))))}];return u.default.createElement(C.ScreenComponent,null,u.default.createElement(w.default,{ref:function(t){return Ha=t}}),u.default.createElement(s.KeyboardAvoidingView,{behavior:'android'===s.Platform.OS?'height':'padding',style:{flex:1}},u.default.createElement(s.ScrollView,{style:{flex:1}},u.default.createElement(s.View,{style:W.contain},u.default.createElement(v.default,{steps:gl,currentStepIndex:kt+1}),u.default.createElement(s.View,{style:{flexDirection:'column',alignItems:'center'}},u.default.createElement(A.default,{ref:It,activeStep:0,steps:gl,useNativeDriver:!0,nextStepAnimation:"slideLeft",prevStepAnimation:"slideRight",isFirstStep:function(t){return Ot(t)},isLastStep:function(t){return Pt(t)},onNext:function(){pl()},onPrev:function(){},currentStep:function(t){var l=t.currentStep,n=t.isLastStep,o=t.isFirstStep;Lt(l),Ot(o),Pt(n)}})),u.default.createElement(s.View,{style:W.iconNavigation},Nt?u.default.createElement(s.View,null):u.default.createElement(s.TouchableOpacity,{style:[W.iconNavigationButton,{backgroundColor:_.Color.primaryColor,borderColor:_.Color.primaryColor}],onPress:function(){return It.current.prev()}},u.default.createElement(N.default,{name:"arrow-left",size:20,color:_.Color.whiteColor})),2===kt?u.default.createElement(S.default,{loading:le.loading,onPress:il},h.default.t('SUBMIT_LABEL')):u.default.createElement(s.TouchableOpacity,{style:[W.iconNavigationButton,{backgroundColor:_.Color.primaryColor,borderColor:_.Color.primaryColor}],onPress:function(t){il(t),pl()&&It.current.next()}},D.loading||J.loading||$.loading?u.default.createElement(s.ActivityIndicator,{size:"small",color:"#fff"}):u.default.createElement(N.default,{name:"arrow-right",size:24,color:_.Color.whiteColor}))),Yt&&u.default.createElement(p.Formik,{validationSchema:Za,initialValues:{amount_prestation:'',frais_deplacement:'',code_acte:''},onSubmit:function(t){''===t.code_acte?Qa.shake(200):(pa([{act_id:t.code_acte,amount:t.amount_prestation,home_visit_fees:t.frais_deplacement}].concat((0,n.default)(ma))),Gt(!1),F.displayToast(h.default.t('PRESTATION_SUCCESSFULLY_ADD')))}},function(t){var l,n=t.values,o=t.errors,c=t.touched,f=t.handleChange,p=t.handleBlur,E=t.setFieldValue,C=t.setFieldTouched,b=t.handleSubmit;return t.isSubmitting,u.default.createElement(s.ScrollView,{style:{flex:1}},u.default.createElement(s.View,{style:[W.containModal,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(M.default,{isVisible:Yt,onSwipeComplete:function(){Gt(!1)},swipeDirection:['down'],style:W.bottomModal},u.default.createElement(s.View,{style:[W.contentFilterBottom,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(s.View,{style:W.contentSwipeDown},u.default.createElement(s.View,{style:W.lineSwipeDown})),u.default.createElement(x.default,{body2:!0,style:{marginTop:10}},h.default.t('ADD_PRESTATION')),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('DATE'),value:''+H(de).format('YYYY-MM-DD HH:mm'),editable:!1}),u.default.createElement(P.View,{ref:function(t){Qa=t},style:{width:(0,y.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},u.default.createElement(V.Dropdown,{label:h.default.t('CODE_ACTE'),data:null!==ne.result?null==(l=ne.result)?void 0:l.response:[],useNativeDriver:!0,onChangeText:function(t,l,n){C('code_acte'),E('code_acte',t.id)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('AMOUNT'),value:n.amount_prestation,onChangeText:f('amount_prestation'),onBlur:p('amount_prestation'),success:c.amount_prestation&&!o.amount_prestation,touched:c.amount_prestation,error:o.amount_prestation,onKeyPress:function(){Z({network_id:xe.id_network,amount:n.amount_prestation,care_condition:dt})}}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('TICKET_MONDERATEUR'),editable:!1,value:null!==re.result?re.result.response.moderator_ticket:''}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('AMOUNT_PER_INSURANCE'),editable:!1,value:null!==re.result?re.result.response.insurance_amount:''}),u.default.createElement(s.View,{style:{marginTop:10,width:"100%",flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(x.default,{body2:!0},h.default.t('VISITE_DOMICILE')),u.default.createElement(s.View,{style:W.contentSwitch},u.default.createElement(B.default,{options:Pa,initial:1,buttonColor:_.Color.accentColor,backgroundColor:_.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){La('YES'===t)}}))),ka&&u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('FRAIS_DEPLACEMENT'),value:n.frais_deplacement,onChangeText:f('frais_deplacement'),onBlur:p('frais_deplacement'),success:c.frais_deplacement&&!o.frais_deplacement,touched:c.frais_deplacement,error:o.frais_deplacement}),u.default.createElement(S.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:b},h.default.t('SUBMIT_LABEL'))))))}),Qt&&u.default.createElement(p.Formik,{validationSchema:$a,initialValues:{drug_name:'',drug_posologie:'',drug_quantity:''},onSubmit:function(t){ba([{drug_or_device_id:Rt.id,dosage:t.drug_posologie,quantity:t.drug_quantity}].concat((0,n.default)(ya))),jt(!1),F.displayToast(h.default.t('PRESCRIPTIONS_SUCCESSFULLY_ADD'))}},function(t){var l=t.values,n=t.errors,o=t.touched,c=t.handleChange,f=t.handleBlur,p=t.handleSubmit;return t.isSubmitting,u.default.createElement(s.ScrollView,{style:{flex:1}},u.default.createElement(s.View,{style:[W.containModal,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(M.default,{isVisible:Qt,onSwipeComplete:function(){jt(!1)},swipeDirection:['down'],style:W.bottomModal},u.default.createElement(s.View,{style:[W.contentFilterBottom,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(s.View,{style:W.contentSwipeDown},u.default.createElement(s.View,{style:W.lineSwipeDown})),u.default.createElement(x.default,{body2:!0,style:{marginTop:10}},h.default.t('AJOUTER_MEDICAMENT')),u.default.createElement(s.View,{style:{flexDirection:'row'}},u.default.createElement(R.default,{style:{marginTop:10,width:"90%"},placeholder:h.default.t('NAME'),value:null!==Rt?Rt.name:l.drug_name,onChangeText:c('drug_name'),onBlur:f('drug_name'),success:o.drug_name&&!n.drug_name,touched:o.drug_name,error:n.drug_name,editable:null===Rt}),u.default.createElement(s.TouchableOpacity,{style:[W.iconNavigationButton,{backgroundColor:_.Color.primaryColor,borderColor:_.Color.primaryColor,marginTop:10,width:40,height:40}],onPress:function(t){Q(xe.id_network,l.drug_name)}},ee.loading?u.default.createElement(s.ActivityIndicator,{size:"small",color:"#fff"}):u.default.createElement(O.default,{name:"search",size:24,color:_.Color.whiteColor}))),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('POSOLOGIE'),value:l.drug_posologie,onChangeText:c('drug_posologie'),onBlur:f('drug_posologie'),success:o.drug_posologie&&!n.drug_posologie,touched:o.drug_posologie,error:n.drug_posologie}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('QUANTITE'),value:l.drug_quantity,onChangeText:c('drug_quantity'),onBlur:f('drug_quantity'),success:o.drug_quantity&&!n.drug_quantity,touched:o.drug_quantity,error:n.drug_quantity,keyboardType:"numeric"}),u.default.createElement(S.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:p},h.default.t('SUBMIT_LABEL'))))))}),$t&&u.default.createElement(p.Formik,{validationSchema:Ja,initialValues:{examen_name:'',examen_quantite:'',code_acte:''},onSubmit:function(t){console.log("Value",t),ha([{act_id:t.code_acte,description:t.examen_name,quantity:t.examen_quantite}].concat((0,n.default)(_a))),ea(!1),F.displayToast(h.default.t('EXAMENS_SUCCESSFULLY_ADD'))}},function(t){var l,n=t.values,o=t.errors,c=t.touched,f=t.handleChange,p=t.setFieldValue,E=t.setFieldTouched,C=t.handleBlur,b=t.handleSubmit;return t.isSubmitting,u.default.createElement(s.ScrollView,{style:{flex:1}},u.default.createElement(s.View,{style:[W.containModal,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(M.default,{isVisible:$t,onSwipeComplete:function(){ea(!1)},swipeDirection:['down'],style:W.bottomModal},u.default.createElement(s.View,{style:[W.contentFilterBottom,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(s.View,{style:W.contentSwipeDown},u.default.createElement(s.View,{style:W.lineSwipeDown})),u.default.createElement(x.default,{body2:!0,style:{marginTop:10}},h.default.t('AJOUTER_EXAMEN')),u.default.createElement(P.View,{ref:function(t){Qa=t},style:{width:(0,y.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},u.default.createElement(V.Dropdown,{label:h.default.t('CODE_ACTE'),data:null!==ne.result?null==(l=ne.result)?void 0:l.response:[],useNativeDriver:!0,onChangeText:function(t,l,n){console.log("Value",t),E('code_acte'),p('code_acte',t.id)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('NAME'),value:n.examen_name,onChangeText:f('examen_name'),onBlur:C('examen_name'),success:c.examen_name&&!o.examen_name,touched:c.examen_name,error:o.examen_name}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('QUANTITE'),value:n.examen_quantite,onChangeText:f('examen_quantite'),onBlur:C('examen_quantite'),success:c.examen_quantite&&!o.examen_quantite,touched:c.examen_quantite,error:o.examen_quantite,keyboardType:"numeric"}),u.default.createElement(S.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:function(){console.log("errors",o),console.log("values",n),b()}},h.default.t('SUBMIT_LABEL'))))))}),me&&u.default.createElement(k.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date(de),mode:"date",display:"spinner",onChange:tl}),Ae&&u.default.createElement(k.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date,mode:"date",display:"spinner",onChange:al}),tt&&u.default.createElement(k.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date,mode:"date",display:"spinner",onChange:ll}),rt&&u.default.createElement(k.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date,mode:"date",display:"spinner",onChange:nl}),Re&&u.default.createElement(f.default.Container,{contentStyle:{width:(0,y.responsiveWidth)(80)},useNativeDriver:!0,visible:Re},u.default.createElement(f.default.Title,null,h.default.t('SCAN')),u.default.createElement(s.ScrollView,{style:[W.blockView,{borderBottomColor:_.Color.borderColor,maxHeight:300}]},u.default.createElement(x.default,null,h.default.t('BRING_YOUR_CAMERA_CLOSER_TO_SCAN_QR_CODE')),u.default.createElement(L.default,{onRead:function(t){De(!1),console.log("result",t.data)},flashMode:U.RNCamera.Constants.FlashMode.off})),u.default.createElement(f.default.Button,{bold:!0,label:h.default.t('CLOSE'),onPress:function(){De(!1)}})),la&&u.default.createElement(s.ScrollView,{style:{flex:1}},u.default.createElement(s.View,{style:[W.containModal,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(M.default,{isVisible:la,onSwipeComplete:function(){na(!1)},swipeDirection:['down'],style:W.bottomModal},u.default.createElement(s.View,{style:[W.contentFilterBottom,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(s.View,{style:W.contentSwipeDown},u.default.createElement(s.View,{style:W.lineSwipeDown})),u.default.createElement(x.default,{body2:!0,style:{marginTop:10}},h.default.t('LIST_ASSURE')),u.default.createElement(s.FlatList,{data:null==(Wa=J.result)?void 0:Wa.response,extraData:null==(Ka=J.result)?void 0:Ka.response,keyExtractor:function(t,l){return l},ListEmptyComponent:u.default.createElement(x.default,{body2:!0},h.default.t('NO_ASSURE_MATCH_SEARCH')),renderItem:function(t){var l=t.item;return t.index,u.default.createElement(s.View,{style:{paddingVertical:15,alignItems:'flex-start'}},u.default.createElement(s.TouchableOpacity,{style:[W.contentActionModalBottom,{borderBottomColor:_.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){'PAID'!==l.state?s.Alert.alert(h.default.t('ERROR_LABEL'),h.default.t('ASSURE_NON_EN_REGLE'),[{text:h.default.t('OK'),onPress:function(){}}]):(ht(l),bt(null),va(1),na(!1),fl('lastname_patient',l.user.lastname),fl('firstname_patient',l.user.firstname),K(xe.id_network,'',"&user_id="+l.user.id),qa((0,b.fetchGetUserByNameOrNumberReset)()),It.current.next())}},u.default.createElement(x.default,{body2:!0,semibold:!0},(null!==l.user.firstname?l.user.firstname:'')+" "+(null!==l.user.lastname?l.user.lastname:''))),l.beneficiaries.map(function(t){return u.default.createElement(s.TouchableOpacity,{style:W.beneficiarySubSection,onPress:function(){ht(l),bt(t),va(0),na(!1),fl('lastname_patient',t.lastname),fl('firstname_patient',t.firstname),K(xe.id_network,'',"&user_id="+l.user.id+"&beneficiary_id="+t.id),qa((0,b.fetchGetUserByNameOrNumberReset)()),It.current.next()}},u.default.createElement(s.View,{style:{width:10}}),u.default.createElement(s.View,{style:{paddingHorizontal:10,alignItems:'flex-start'}},u.default.createElement(x.default,{subhead:!0,semibold:!0},(null!==t.firstname?t.firstname:'')+" "+(null!==t.lastname?t.lastname:'')+" ("+h.default.t('AYANT_DROITS')+")")))}))}}),u.default.createElement(S.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return na(!1)}},h.default.t('OK')))))),ia&&u.default.createElement(s.ScrollView,{style:{flex:1}},u.default.createElement(s.View,{style:[W.containModal,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(M.default,{isVisible:ia,onSwipeComplete:function(){ua(!1)},swipeDirection:['down'],style:W.bottomModal},u.default.createElement(s.View,{style:[W.contentFilterBottom,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(s.View,{style:W.contentSwipeDown},u.default.createElement(s.View,{style:W.lineSwipeDown})),u.default.createElement(x.default,{body2:!0,style:{marginTop:10}},h.default.t('LISTE_MEDICAMENT')),u.default.createElement(s.FlatList,{data:null==(ja=ee.result)?void 0:ja.response,extraData:null==(za=ee.result)?void 0:za.response,keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(s.View,{style:{paddingVertical:15,alignItems:'flex-start'}},u.default.createElement(s.TouchableOpacity,{style:[W.contentActionModalBottom,{borderBottomColor:_.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){Dt(l),ua(!1)}},u.default.createElement(x.default,{body2:!0,semibold:!0},l.name+" | "+l.type)))}}),u.default.createElement(S.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return ua(!1)}},h.default.t('OK')))))),Kt&&u.default.createElement(p.Formik,{validationSchema:el,initialValues:{code:'',name:'',type:'',on_prescription:!1},onSubmit:function(t){Dt(null),j({network_id:xe.id_network,code:t.code,name:t.name,type:t.type,on_prescription:t.on_prescription})}},function(t){var l=t.values,n=t.errors,o=t.touched,c=t.handleChange,f=t.handleBlur,p=t.handleSubmit,E=t.setFieldValue;return t.isSubmitting,u.default.createElement(s.ScrollView,{style:{flex:1}},u.default.createElement(s.View,{style:[W.containModal,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(M.default,{isVisible:Kt,onSwipeComplete:function(){Xt(!1)},swipeDirection:['down'],style:W.bottomModal},u.default.createElement(s.View,{style:[W.contentFilterBottom,{backgroundColor:_.Color.containerBackgroundColor}]},u.default.createElement(s.View,{style:W.contentSwipeDown},u.default.createElement(s.View,{style:W.lineSwipeDown})),u.default.createElement(x.default,{body2:!0,style:{marginTop:10}},h.default.t('AJOUTER_NOUVEAU_MEDICAMENT')),u.default.createElement(R.default,{style:{marginTop:10},placeholder:"Code",value:l.code,onChangeText:c('code'),onBlur:f('code'),success:o.code&&!n.code,touched:o.code,error:n.code}),u.default.createElement(R.default,{style:{marginTop:10},placeholder:h.default.t('NAME'),value:l.name,onChangeText:c('name'),onBlur:f('name'),success:o.name&&!n.name,touched:o.name,error:n.name}),u.default.createElement(P.View,{ref:function(t){},style:{width:(0,y.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},u.default.createElement(V.Dropdown,{label:"Type",data:Ga,useNativeDriver:!0,onChangeText:function(t,l,n){E('type',t.value)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.label}})),u.default.createElement(s.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(x.default,{body2:!0},h.default.t('SOUS_ORDONNANCE')),u.default.createElement(s.View,{style:{width:(0,y.responsiveWidth)(60)}},u.default.createElement(B.default,{options:xa,initial:1,buttonColor:_.Color.accentColor,backgroundColor:_.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){E('on_prescription','YES'===t),console.log("On Prescription",t)}}))),u.default.createElement(S.default,{style:{marginTop:20,marginBottom:20},full:!0,loading:ae.loading,onPress:p},h.default.t('SUBMIT_LABEL'))))))})))))});e.default=X},2185,[4,1,33,27,15,18,1046,1639,1827,1950,1031,719,2147,2162,534,1779,2164,718,2158,2180,2182,2186,2187,1013,538,2157,771,749,979,1823,1763,2188,2194,1658,1107,881,1032,1189]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=t(r(d[1])),n=t(r(d[2])),l=r(d[3]),c=r(d[4]),u=t(r(d[5]));function f(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);o&&(l=l.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,l)}return n}function s(t){for(var n=1;n0&&(j(Y-1),U(!1),p({currentStep:Y-1,isFirstStep:Y-1==0,isLastStep:Y-1==s.length-1}),A())},goTo:function(t){(s.length-1<=t||t>=0)&&(Y>t?(U(!1),A()):(U(!0),w()),p({currentStep:t,isFirstStep:0===t,isLastStep:0!==t}),j(t))}},(0,u.useEffect)(function(){p({currentStep:Y,isFirstStep:0===Y,isLastStep:Y===s.length-1})},[Y,s.length]),(0,u.useEffect)(function(){V(0===Y),y(Y===s.length-1)},[Y,s.length]),u.default.createElement(c,{contentContainerStyle:P,currentStep:Y,duration:b,animation:T?F:_,content:s[Y].content,useNativeDriver:C})});e.default=l;var c=function(t){var n=t.content,l=t.animation,c=t.duration,v=t.currentStep,f=t.useNativeDriver,p=t.contentContainerStyle,S=(0,u.useState)(void 0),w=(0,o.default)(S,2),h=w[0],A=w[1];return(0,u.useEffect)(function(){switch(l){case"slideLeft":var t=new s.Animated.Value(-s.Dimensions.get("window").width);s.Animated.timing(t,{toValue:0,duration:c,useNativeDriver:f}).start(),A({transform:[{translateX:t}]});break;case"slideRight":var n=new s.Animated.Value(s.Dimensions.get("window").width);s.Animated.timing(n,{toValue:0,duration:c,useNativeDriver:f}).start(),A({transform:[{translateX:n}]});break;case"slideUp":var o=new s.Animated.Value(-s.Dimensions.get("window").height);s.Animated.timing(o,{toValue:0,duration:c,useNativeDriver:f}).start(),A({transform:[{translateY:o}]});break;case"slideDown":var u=new s.Animated.Value(s.Dimensions.get("window").height);s.Animated.timing(u,{toValue:0,duration:c}).start(),A({transform:[{translateY:u}]});break;case"fade":default:var v=new s.Animated.Value(0);s.Animated.timing(v,{toValue:1,duration:c,useNativeDriver:f}).start(),A({opacity:v})}return function(){var t=new s.Animated.Value(1);s.Animated.timing(t,{toValue:0,duration:300,useNativeDriver:f}).start(),A({opacity:t})}},[l,c,A,v]),u.default.createElement(s.Animated.View,{style:[h,p]},n)}},2187,[4,1,27,15,18]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),s=n(r(d[3])),l=n(r(d[4])),u=n(r(d[5])),c=n(r(d[6])),h=n(r(d[7])),p=n(r(d[8])),f=t(r(d[9])),y=n(r(d[10])),C=r(d[11]),v=r(d[12]),b=r(d[13]),w=b.RNCamera.Constants.FlashMode,k=[w.torch,w.on,w.off,w.auto],A=(function(t){function n(t){var o;return(0,s.default)(this,n),(o=(0,u.default)(this,(0,c.default)(n).call(this,t))).state={scanning:!1,isCameraActivated:!0,fadeInOpacity:new C.Animated.Value(0),isAuthorized:!1,isAuthorizationChecked:!1,disableVibrationByUser:!1},o.timer=null,o._scannerTimeout=null,o._handleBarCodeRead=o._handleBarCodeRead.bind((0,h.default)(o)),o}return(0,p.default)(n,t),(0,l.default)(n,[{key:"componentDidMount",value:function(){var t=this;'ios'===C.Platform.OS?(0,v.request)(v.PERMISSIONS.IOS.CAMERA).then(function(n){t.setState({isAuthorized:n===v.RESULTS.GRANTED,isAuthorizationChecked:!0})}):'android'===C.Platform.OS&&this.props.checkAndroid6Permissions?C.PermissionsAndroid.request(C.PermissionsAndroid.PERMISSIONS.CAMERA,{title:this.props.permissionDialogTitle,message:this.props.permissionDialogMessage,buttonPositive:this.props.buttonPositive}).then(function(n){var o=n===C.PermissionsAndroid.RESULTS.GRANTED;t.setState({isAuthorized:o,isAuthorizationChecked:!0})}):this.setState({isAuthorized:!0,isAuthorizationChecked:!0}),this.props.fadeIn&&C.Animated.sequence([C.Animated.delay(1e3),C.Animated.timing(this.state.fadeInOpacity,{toValue:1,easing:C.Easing.inOut(C.Easing.quad),useNativeDriver:!0})]).start()}},{key:"componentWillUnmount",value:function(){null!==this._scannerTimeout&&clearTimeout(this._scannerTimeout),null!==this.timer&&clearTimeout(this.timer),this.timer=null,this._scannerTimeout=null}},{key:"disable",value:function(){this.setState({disableVibrationByUser:!0})}},{key:"enable",value:function(){this.setState({disableVibrationByUser:!1})}},{key:"_setScanning",value:function(t){this.setState({scanning:t})}},{key:"_setCamera",value:function(t){var n=this;this.setState({isCameraActivated:t,scanning:!1,fadeInOpacity:new C.Animated.Value(0)},function(){t&&n.props.fadeIn&&n.props.fadeIn&&C.Animated.sequence([C.Animated.delay(10),C.Animated.timing(n.state.fadeInOpacity,{toValue:1,easing:C.Easing.inOut(C.Easing.quad),useNativeDriver:!0})]).start()})}},{key:"_handleBarCodeRead",value:function(t){var n=this;this.state.scanning||this.state.disableVibrationByUser||(this.props.vibrate&&C.Vibration.vibrate(),this._setScanning(!0),this.props.onRead(t),this.props.reactivate&&(this._scannerTimeout=setTimeout(function(){return n._setScanning(!1)},this.props.reactivateTimeout)))}},{key:"_renderTopContent",value:function(){return this.props.topContent?this.props.topContent:null}},{key:"_renderBottomContent",value:function(){return this.props.bottomContent?this.props.bottomContent:null}},{key:"_renderCameraMarker",value:function(){return this.props.showMarker?this.props.customMarker?this.props.customMarker:f.default.createElement(C.View,{style:S.rectangleContainer},f.default.createElement(C.View,{style:[S.rectangle,this.props.markerStyle?this.props.markerStyle:null]})):null}},{key:"_renderCameraComponent",value:function(){return f.default.createElement(b.RNCamera,(0,o.default)({androidCameraPermissionOptions:{title:this.props.permissionDialogTitle,message:this.props.permissionDialogMessage,buttonPositive:this.props.buttonPositive},style:[S.camera,this.props.cameraStyle],onBarCodeRead:this._handleBarCodeRead.bind(this),type:this.props.cameraType,flashMode:this.props.flashMode,captureAudio:!1},this.props.cameraProps),this._renderCameraMarker())}},{key:"_renderCamera",value:function(){var t=this,n=this.props,o=n.notAuthorizedView,s=n.pendingAuthorizationView,l=(n.cameraType,n.cameraTimeoutView);if(!this.state.isCameraActivated)return f.default.createElement(C.TouchableWithoutFeedback,{onPress:function(){return t._setCamera(!0)}},l);var u=this.state,c=u.isAuthorized,h=u.isAuthorizationChecked;return c?(this.props.cameraTimeout>0&&(this.timer&&clearTimeout(this.timer),this.timer=setTimeout(function(){return t._setCamera(!1)},this.props.cameraTimeout)),this.props.fadeIn?f.default.createElement(C.Animated.View,{style:{opacity:this.state.fadeInOpacity,backgroundColor:'transparent',height:this.props.cameraStyle&&this.props.cameraStyle.height||S.camera.height}},this._renderCameraComponent()):this._renderCameraComponent()):h?o:s}},{key:"reactivate",value:function(){this._setScanning(!1)}},{key:"render",value:function(){return f.default.createElement(C.View,{style:[S.mainContainer,this.props.containerStyle]},f.default.createElement(C.View,{style:[S.infoView,this.props.topViewStyle]},this._renderTopContent()),f.default.createElement(C.View,{style:this.props.cameraStyle},this._renderCamera()),f.default.createElement(C.View,{style:[S.infoView,this.props.bottomViewStyle]},this._renderBottomContent()))}}]),n})(f.Component);e.default=A,A.propTypes={onRead:y.default.func.isRequired,vibrate:y.default.bool,reactivate:y.default.bool,reactivateTimeout:y.default.number,cameraTimeout:y.default.number,fadeIn:y.default.bool,showMarker:y.default.bool,cameraType:y.default.oneOf(['front','back']),customMarker:y.default.element,containerStyle:y.default.any,cameraStyle:y.default.any,markerStyle:y.default.any,topViewStyle:y.default.any,bottomViewStyle:y.default.any,topContent:y.default.oneOfType([y.default.element,y.default.string]),bottomContent:y.default.oneOfType([y.default.element,y.default.string]),notAuthorizedView:y.default.element,permissionDialogTitle:y.default.string,permissionDialogMessage:y.default.string,buttonPositive:y.default.string,checkAndroid6Permissions:y.default.bool,flashMode:y.default.oneOf(k),cameraProps:y.default.object,cameraTimeoutView:y.default.element},A.defaultProps={onRead:function(){return console.log('QR code scanned!')},reactivate:!1,vibrate:!0,reactivateTimeout:0,cameraTimeout:0,fadeIn:!0,showMarker:!1,cameraType:'back',notAuthorizedView:f.default.createElement(C.View,{style:{flex:1,alignItems:'center',justifyContent:'center'}},f.default.createElement(C.Text,{style:{textAlign:'center',fontSize:16}},"Camera not authorized")),pendingAuthorizationView:f.default.createElement(C.View,{style:{flex:1,alignItems:'center',justifyContent:'center'}},f.default.createElement(C.Text,{style:{textAlign:'center',fontSize:16}},"...")),permissionDialogTitle:'Info',permissionDialogMessage:'Need camera permission',buttonPositive:'OK',checkAndroid6Permissions:!1,flashMode:w.auto,cameraProps:{},cameraTimeoutView:f.default.createElement(C.View,{style:{flex:0,alignItems:'center',justifyContent:'center',height:C.Dimensions.get('window').height,width:C.Dimensions.get('window').width,backgroundColor:'black'}},f.default.createElement(C.Text,{style:{color:'white'}},"Tap to activate camera"))};var S=C.StyleSheet.create({mainContainer:{flex:1},infoView:{flex:2,justifyContent:'center',alignItems:'center',width:C.Dimensions.get('window').width},camera:{flex:0,alignItems:'center',justifyContent:'center',backgroundColor:'transparent',height:C.Dimensions.get('window').width,width:C.Dimensions.get('window').width},rectangleContainer:{flex:1,alignItems:'center',justifyContent:'center',backgroundColor:'transparent'},rectangle:{height:250,width:250,borderWidth:2,borderColor:'#00FF00',backgroundColor:'transparent'}})},2188,[4,1,6,8,9,10,12,11,13,15,68,18,2189,2194]); @@ -2200,17 +2200,18 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{v __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RNCamera",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"FaceDetector",{enumerable:!0,get:function(){return u.default}});var n=t(r(d[1])),u=t(r(d[2]))},2194,[1,2195,2196]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.Constants=e.default=void 0;var n=t(r(d[1])),o=t(r(d[2])),s=t(r(d[3])),u=t(r(d[4])),c=t(r(d[5])),l=t(r(d[6])),f=t(r(d[7])),p=t(r(d[8])),h=t(r(d[9])),b=t(r(d[10])),A=t(r(d[11])),y=t(r(d[12])),v=t(r(d[13])),C=r(d[14]);function P(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);n&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),o.push.apply(o,s)}return o}function O(t){for(var n=1;n0?pt(!0):Bt.alertWithType('warn',C.default.t('EMPTY_LIST'),C.default.t('NO_ASSURE_MATCH_SEARCH'))),Q.error&&(Bt.alertWithType('error',C.default.t('ERROR_LABEL'),U.getErrorMsg(Q)),Nt((0,_.fetchGetUserByNameOrNumberReset)()))},[Q]),(0,u.useEffect)(function(){null!==W.result&&He(!0),W.error&&(Bt.alertWithType('error',C.default.t('ERROR_LABEL'),U.getErrorMsg(W)),Nt((0,_.fetchGetConsultationReset)()))},[W]),(0,u.useEffect)(function(){null!==J.result&&c.Alert.alert(C.default.t("SUCCESS"),J.result.response,[{text:C.default.t("OK"),onPress:function(){Nt((0,_.fetchExecutionPrescriptionReset)()),Z.goBack()}}],{cancelable:!1}),J.error&&(Bt.alertWithType('error',C.default.t('ERROR_LABEL'),U.getErrorMsg(J)),Nt((0,_.fetchExecutionPrescriptionReset)()))},[J]);var Pt=y.object().shape({numero_assure:y.string().required(C.default.t('THIS_FIELD_IS_REQUIRED')),password:y.string().required(C.default.t('THIS_FIELD_IS_REQUIRED')),practitioner_lastname:y.string().required(C.default.t('THIS_FIELD_IS_REQUIRED')),practitioner_firstname:y.string().required(C.default.t('THIS_FIELD_IS_REQUIRED'))}),At=y.object().shape({price:y.number().required(C.default.t('THIS_FIELD_IS_REQUIRED'))});console.log("consultaiton",Qe);var Lt,kt,Mt,Ut,Ft=(0,p.useFormik)({validationSchema:Pt,initialValues:{numero_assure:'',password:'',firstname_patient:'',lastname_patient:'',practitioner_firstname:'',practitioner_lastname:'',agrement_praticien:null==ye?void 0:ye.code_membre,pregnancy_start_at:null,pregnancy_end_at:null},onSubmit:function(t){z({health_care_sheet_id:Qe.id,network_agent_id:re.network_agent_id,password:t.password,practitioner_lastname:t.practitioner_lastname,practitioner_firstname:t.practitioner_firstname,practitioner_provider_class_id:t.practitioner_provider_class_id,prescriptions:Qe.prescriptions.filter(function(t){return t.checked}).map(function(t){return{id:t.id,unit_price:t.unit_price}}),exams:Qe.exams.filter(function(t){return t.checked}).map(function(t){return{id:t.id,unit_price:t.unit_price}})})}}),Gt=Ft.handleChange,jt=Ft.handleSubmit,zt=Ft.handleBlur,Ht=Ft.values,Yt=Ft.errors,Wt=Ft.touched,Qt=Ft.setFieldValue,Kt=Ft.setFieldTouched,qt=(Ft.isValid,function(){switch(console.log("currentStep",Ue),Ue){case 0:return console.log("values",Ht),''!==Ht.numero_assure&&(Nt((0,_.fetchGetUserByNameOrNumberReset)()),n(re.id_network,ie?"&insured_id="+Ht.numero_assure:se?"&phone="+Ht.numero_assure:"&name="+Ht.numero_assure),console.log("errors",Yt)),!1;default:return!0}}),Xt=[{title:C.default.t('ASSURE'),content:u.default.createElement(c.View,null,u.default.createElement(x.default,{style:{marginTop:10},placeholder:ie?C.default.t('NUMERO_ASSURE'):se?C.default.t('PHONE_NUMBER'):C.default.t('NOM_ASSURE'),value:Ht.numero_assure,keyboardType:se?'numeric':'default',onChangeText:Gt('numero_assure'),onBlur:zt('numero_assure'),success:Wt.numero_assure&&!Yt.numero_assure,touched:Wt.numero_assure,error:Yt.numero_assure,icon:u.default.createElement(D.default,{style:{zIndex:10},name:ie?'lock':se?'phone':'user',size:20})}),u.default.createElement(c.View,{style:{flexDirection:'row',position:'absolute',top:22,right:50,justifyContent:'space-between',width:50}},u.default.createElement(v.default,{style:{paddingRight:5},name:"lock",size:20,color:E.Color.primaryColor,onPress:function(){ue(!0),fe(!1)}}),u.default.createElement(v.default,{style:{paddingRight:5},name:"phone",size:20,color:E.Color.primaryColor,onPress:function(){ue(!1),fe(!0)}}),u.default.createElement(v.default,{style:{paddingRight:5},name:"user",size:20,color:E.Color.primaryColor,onPress:function(){ue(!1),fe(!1)}}),u.default.createElement(v.default,{style:{paddingRight:5},name:"qrcode",size:20,color:E.Color.primaryColor,onPress:function(){le(!0)}})))},{title:C.default.t('PATIENT'),content:u.default.createElement(c.View,null,u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('NOM_CLIENT'),value:Ht.lastname_patient,onChangeText:Gt('lastname_patient'),onBlur:zt('lastname_patient'),success:Wt.lastname_patient&&!Yt.lastname_patient,touched:Wt.lastname_patient,editable:!1,error:Yt.lastname_patient}),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('PRENOM_CLIENT'),value:Ht.firstname_patient,editable:!1,onChangeText:Gt('firstname_patient'),onBlur:zt('firstname_patient'),success:Wt.firstname_patient&&!Yt.firstname_patient,touched:Wt.firstname_patient,error:Yt.firstname_patient}),u.default.createElement(c.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(N.default,{body2:!0},C.default.t('SITUATION')),u.default.createElement(c.View,{style:{width:(0,b.responsiveWidth)(60)}},u.default.createElement(B.default,{options:It,disabled:!0,value:Ot,initial:Ot,buttonColor:E.Color.accentColor,backgroundColor:E.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){}}))))},{title:C.default.t('PRATICIEN'),content:u.default.createElement(c.View,null,u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('CODE_AGREMENT'),value:Ht.agrement_praticien,editable:!1}),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('NOM_PRATICIEN'),value:Ht.practitioner_lastname,onChangeText:Gt('practitioner_lastname'),onBlur:zt('practitioner_lastname'),success:Wt.practitioner_lastname&&!Yt.practitioner_lastname,touched:Wt.practitioner_lastname,error:Yt.practitioner_lastname}),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('PRENOM_PRATICIEN'),value:Ht.practitioner_firstname,onChangeText:Gt('practitioner_firstname'),onBlur:zt('practitioner_firstname'),success:Wt.practitioner_firstname&&!Yt.practitioner_firstname,touched:Wt.practitioner_firstname,error:Yt.practitioner_firstname}),u.default.createElement(P.View,{ref:function(t){},style:{width:(0,b.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},u.default.createElement(A.Dropdown,{label:C.default.t('CLASSIFICATION'),data:null!==X.result?null==(l=X.result)?void 0:l.response:[],useNativeDriver:!0,onChangeText:function(t,l,n){Kt('practitioner_provider_class_id'),Qt('practitioner_provider_class_id',t.id),console.log("Value",t)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('PASSWORD'),value:Ht.password,onChangeText:Gt('password'),onBlur:zt('password'),success:Wt.password&&!Yt.password,touched:Wt.password,error:Yt.password,secureTextEntry:!0}),u.default.createElement(c.View,{style:{marginTop:25}},u.default.createElement(c.View,{style:{flexDirection:'row',alignItems:'center',justifyContent:'space-between'}},null!==Qe?!Qe.prescriptions.filter(function(t){return t.checked}).length>0?u.default.createElement(c.TouchableOpacity,{style:[q.iconNavigationButton,{borderRadius:5,width:100,height:30,flexDirection:"row",backgroundColor:E.Color.primaryColor,borderColor:E.Color.primaryColor}],onPress:function(t){Qe.prescriptions.filter(function(t){return t.checked}).length>0?(0,U.displayToast)("Vous avez deja renseigner les m\xe9dicaments"):ot(!0)}},u.default.createElement(N.default,{whiteColor:!0},C.default.t('EXAMEN')),u.default.createElement(v.default,{name:"file-medical",size:20,color:E.Color.whiteColor})):u.default.createElement(c.View,null):null,null!==Qe?!Qe.exams.filter(function(t){return t.checked}).length>0?u.default.createElement(c.TouchableOpacity,{style:[q.iconNavigationButton,{borderRadius:5,width:110,height:30,flexDirection:"row",backgroundColor:E.Color.primaryColor,borderColor:E.Color.primaryColor}],onPress:function(t){Qe.exams.filter(function(t){return t.checked}).length>0?(0,U.displayToast)("Vous avez deja renseigner les examens"):Ct(!0)}},u.default.createElement(N.default,{whiteColor:!0},C.default.t('MEDICAMENT')),u.default.createElement(G.default,{name:"drug-pack",size:20,color:E.Color.whiteColor})):u.default.createElement(c.View,null):null)))}];return u.default.createElement(h.ScreenComponent,null,u.default.createElement(S.default,{ref:function(t){return Bt=t}}),u.default.createElement(c.KeyboardAvoidingView,{behavior:'android'===c.Platform.OS?'height':'padding',style:{flex:1}},u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:q.contain},u.default.createElement(R.default,{steps:Xt,currentStepIndex:Ue+1}),u.default.createElement(c.View,{style:{flexDirection:'column',alignItems:'center'}},u.default.createElement(O.default,{ref:Oe,activeStep:0,steps:Xt,useNativeDriver:!0,nextStepAnimation:"slideLeft",prevStepAnimation:"slideRight",isFirstStep:function(t){return Be(t)},isLastStep:function(t){return Le(t)},onNext:function(){qt()},onPrev:function(){0===Ue&&Nt((0,_.fetchGetUserByNameOrNumberReset)())},currentStep:function(t){var l=t.currentStep,n=t.isLastStep,o=t.isFirstStep;Fe(l),Be(o),Le(n)}})),u.default.createElement(c.View,{style:q.iconNavigation},Ne?u.default.createElement(c.View,null):u.default.createElement(c.TouchableOpacity,{style:[q.iconNavigationButton,{backgroundColor:E.Color.primaryColor,borderColor:E.Color.primaryColor}],onPress:function(){return Oe.current.prev()}},u.default.createElement(v.default,{name:"arrow-left",size:20,color:E.Color.whiteColor})),2===Ue?u.default.createElement(w.default,{loading:J.loading,onPress:jt},C.default.t('SUBMIT_LABEL')):u.default.createElement(c.TouchableOpacity,{style:[q.iconNavigationButton,{backgroundColor:E.Color.primaryColor,borderColor:E.Color.primaryColor}],onPress:function(t){jt(t),qt()&&Oe.current.next()}},Q.loading||K.loading||W.loading?u.default.createElement(c.ActivityIndicator,{size:"small",color:"#fff"}):u.default.createElement(v.default,{name:"arrow-right",size:24,color:E.Color.whiteColor}))),nt&&u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:E.Color.containerBackgroundColor}]},u.default.createElement(L.default,{isVisible:nt,onSwipeComplete:function(){ot(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:E.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(N.default,{body2:!0,style:{marginTop:10}},C.default.t('EXAMEN')),u.default.createElement(c.FlatList,{data:Qe.exams,extraData:Qe.exams,keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(c.TouchableOpacity,{style:[q.contentActionModalBottom,{borderBottomColor:E.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){Re(H({},l,{examen:!0})),Ke(H({},Qe,{exams:Qe.exams.map(function(t){return l.id===t.id?H({},t,{checked:!l.checked}):t})})),l.checked||ct(!0)}},u.default.createElement(N.default,{body2:!0,semibold:!0,numberOfLines:2},l.quantity+" "+l.description+" "+(l.unit_price?' - '+l.unit_price:'')+" \n "+l.act.name),l.checked&&u.default.createElement(v.default,{name:"check",size:14,color:E.Color.primaryColor}))}}),u.default.createElement(w.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return ot(!1)}},C.default.t('OK')))))),te&&u.default.createElement(f.default.Container,{contentStyle:{width:(0,b.responsiveWidth)(80)},useNativeDriver:!0,visible:te},u.default.createElement(f.default.Title,null,C.default.t('SCAN')),u.default.createElement(c.ScrollView,{style:[q.blockView,{borderBottomColor:E.Color.borderColor,maxHeight:300}]},u.default.createElement(N.default,null,C.default.t('BRING_YOUR_CAMERA_CLOSER_TO_SCAN_QR_CODE')),u.default.createElement(k.default,{onRead:function(t){le(!1),console.log("result",t.data)},flashMode:M.RNCamera.Constants.FlashMode.off})),u.default.createElement(f.default.Button,{bold:!0,label:C.default.t('CLOSE'),onPress:function(){le(!1)}})),mt&&u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:E.Color.containerBackgroundColor}]},u.default.createElement(L.default,{isVisible:mt,onSwipeComplete:function(){pt(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:E.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(N.default,{body2:!0,style:{marginTop:10}},C.default.t('LIST_ASSURE')),u.default.createElement(c.FlatList,{data:null==(Mt=Q.result)?void 0:Mt.response,extraData:null==(Ut=Q.result)?void 0:Ut.response,ListEmptyComponent:u.default.createElement(N.default,{body2:!0},C.default.t('NO_ASSURE_MATCH_SEARCH')),keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(c.View,{style:{paddingVertical:15,alignItems:'flex-start'}},u.default.createElement(c.TouchableOpacity,{style:[q.contentActionModalBottom,{borderBottomColor:E.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){'PAID'!==l.state?c.Alert.alert(C.default.t('ERROR_LABEL'),C.default.t('ASSURE_NON_EN_REGLE'),[{text:C.default.t('OK'),onPress:function(){}}]):(he(l),_e(null),vt(1),pt(!1),Qt('lastname_patient',l.user.lastname),Qt('firstname_patient',l.user.firstname),V(l.user.id,'TO_BILL','CONSULTATION'))}},u.default.createElement(N.default,{body2:!0,semibold:!0},l.user.firstname+" "+l.user.lastname)),l.beneficiaries.map(function(t){return u.default.createElement(c.TouchableOpacity,{style:q.beneficiarySubSection,onPress:function(){he(l),_e(t),vt(0),pt(!1),Qt('lastname_patient',t.lastname),Qt('firstname_patient',t.firstname),V(l.user.id,'TO_BILL','CONSULTATION',"&beneficiary_id="+t.id)}},u.default.createElement(c.View,{style:{width:10}}),u.default.createElement(c.View,{style:{paddingHorizontal:10,alignItems:'flex-start'}},u.default.createElement(N.default,{subhead:!0,semibold:!0},t.firstname+" "+t.lastname+" ("+C.default.t('AYANT_DROITS')+")")))}))}}),u.default.createElement(w.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return pt(!1)}},C.default.t('OK')))))),gt&&u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:E.Color.containerBackgroundColor}]},u.default.createElement(L.default,{isVisible:gt,onSwipeComplete:function(){Ct(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:E.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(N.default,{body2:!0,style:{marginTop:10}},C.default.t('MEDICAMENTS')),u.default.createElement(c.FlatList,{data:Qe.prescriptions,extraData:Qe.prescriptions,keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(c.TouchableOpacity,{style:[q.contentActionModalBottom,{borderBottomColor:E.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){Re(H({},l,{drugs:!0})),Ke(H({},Qe,{prescriptions:Qe.prescriptions.map(function(t){return l.id===t.id?H({},t,{checked:!l.checked}):t})})),l.checked||ct(!0)}},u.default.createElement(N.default,{body2:!0,semibold:!0,numberOfLines:2},l.quantity+" "+l.drug_or_device.name+" "+(l.unit_price?' - '+l.unit_price:'')+" \n "+l.dosage),l.checked&&u.default.createElement(v.default,{name:"check",size:14,color:E.Color.primaryColor}))}}),u.default.createElement(w.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return Ct(!1)}},C.default.t('OK')))))),ze&&u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:E.Color.containerBackgroundColor}]},u.default.createElement(L.default,{isVisible:ze,onSwipeComplete:function(){He(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:E.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(N.default,{body2:!0,style:{marginTop:10}},C.default.t('LIST_CONSULTATION')),u.default.createElement(c.FlatList,{data:null==(Lt=W.result)?void 0:Lt.response,extraData:null==(kt=W.result)?void 0:kt.response,ListEmptyComponent:u.default.createElement(N.default,{body2:!0},C.default.t('NO_CONSULTATION')),keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(c.TouchableOpacity,{style:[q.contentActionModalBottom,{borderBottomColor:E.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){lt(l),Ze(!0)}},u.default.createElement(N.default,{body2:!0,semibold:!0},l.type+" #"+l.health_care_sheet_id+" - "+Y(l.created_at).format('YYYY-MM-DD')))}}),u.default.createElement(w.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return He(!1)}},C.default.t('OK')))))),Je&&u.default.createElement(f.default.Container,{useNativeDriver:!0,visible:Je},u.default.createElement(f.default.Title,null,C.default.t('DETAIL')),u.default.createElement(c.ScrollView,{persistentScrollbar:!0},u.default.createElement(c.View,{style:[q.blockView,{borderBottomColor:E.Color.borderColor}]},u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('PATIENT'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,E.Color.grayColor]},tt.patient_lastname+" "+tt.patient_firstname))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},"Situation")),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,E.Color.grayColor]},tt.patient_situation.toLowerCase()))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('PRATICIEN'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,E.Color.grayColor]},tt.practitioner_lastname+" "+tt.practitioner_firstname))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('CLASSE_PRESTATAIRE'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,E.Color.grayColor]},(0,U.uppercaseFirstLetter)(tt.practitioner_provider_class.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('STATE'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,E.Color.grayColor]},(0,U.uppercaseFirstLetter)(tt.state.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},"Type")),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,E.Color.grayColor]},(0,U.uppercaseFirstLetter)(tt.type.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('CONDITION_PRISE_CHARGE'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,E.Color.grayColor]},(0,U.uppercaseFirstLetter)(tt.care_condition.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('INSTITUTE_NAME'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,E.Color.grayColor]},(0,U.uppercaseFirstLetter)(tt.institution_name.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},"Date")),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,E.Color.grayColor]},Y(tt.created_at).format('YYYY-MM-DD')))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('PRESTATION'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},tt.performances.map(function(t){return u.default.createElement(N.default,{style:[j.Typography.caption1,E.Color.grayColor]},t.act.name+" \n "+t.amount+" \n")}))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('EXAMEN'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},tt.exams.map(function(t){return u.default.createElement(N.default,{style:[j.Typography.caption1,E.Color.grayColor]},t.description+" \n "+t.act.name+" \n")}))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('MEDICAMENT'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},tt.prescriptions.map(function(t){return u.default.createElement(N.default,{style:[j.Typography.caption1,E.Color.grayColor]},t.drug_or_device.name+" \n "+t.dosage+" \n")}))))),u.default.createElement(f.default.Button,{bold:!0,label:C.default.t('CANCEL_LABEL'),onPress:function(){Ze(!1)}}),u.default.createElement(f.default.Button,{bold:!0,label:C.default.t('OK'),onPress:function(){Ze(!1),pt(!1),He(!1),Ke(tt),Oe.current.next()}})),dt&&u.default.createElement(p.Formik,{validationSchema:At,initialValues:{price:''},onSubmit:function(t){console.log("Value",Ve),Ve.examen?Ke(H({},Qe,{exams:Qe.exams.map(function(l){return Ve.id===l.id?H({},l,{unit_price:t.price}):l})})):Ke(H({},Qe,{prescriptions:Qe.prescriptions.map(function(l){return Ve.id===l.id?H({},l,{unit_price:t.price}):l})})),ct(!1)}},function(t){var l=t.values,n=t.errors,o=t.touched,s=t.handleChange,f=(t.setFieldValue,t.setFieldTouched,t.handleBlur),p=t.handleSubmit;return t.isSubmitting,u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:E.Color.containerBackgroundColor}]},u.default.createElement(L.default,{isVisible:dt,onSwipeComplete:function(){ct(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:E.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(N.default,{body2:!0,style:{marginTop:10}},C.default.t('AMOUNT_LABEL')),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('AMOUNT_LABEL_DESCRIPTION'),value:l.price,onChangeText:s('price'),onBlur:f('price'),success:o.price&&!n.price,touched:o.price,error:n.price,keyboardType:"numeric"}),u.default.createElement(w.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:p},C.default.t('OK'))))))})))))});e.default=J},2200,[4,1,7,27,15,18,1046,1639,1827,1950,1031,719,2147,2162,534,1779,2164,718,2158,2180,2182,2186,2187,1013,538,2157,771,749,979,1823,2188,2194,1658,1107,1032,1079,1189]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),l=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=l(r(d[2])),o=l(r(d[3])),u=l(r(d[4])),c=t(r(d[5])),s=r(d[6]),f=r(d[7]),p=l(r(d[8])),E=l(r(d[9])),_=r(d[10]),y=t(r(d[11])),C=r(d[12]),h=l(r(d[13])),w=r(d[14]),b=l(r(d[15])),S=r(d[16]),T=r(d[17]),I=l(r(d[18])),D=r(d[19]),x=l(r(d[20])),R=r(d[21]),v=l(r(d[22])),O=l(r(d[23])),V=l(r(d[24])),N=l(r(d[25])),A=l(r(d[26])),B=l(r(d[27])),M=t(r(d[28])),P=r(d[29]),k=l(r(d[30])),L=l(r(d[31])),U=r(d[32]),F=t(r(d[33])),Y=r(d[34]),q=r(d[35]),G=l(r(d[36])),H=r(d[37]),j=l(r(d[38])),Q=l(r(d[39]));function z(t,l){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);l&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),n.push.apply(n,o)}return n}function W(t){for(var l=1;l0?ha(!0):Sl.alertWithType('warn',h.default.t('EMPTY_LIST'),h.default.t('NO_ASSURE_MATCH_SEARCH'))),ee.error&&(Sl.alertWithType('error',h.default.t('ERROR_LABEL'),F.getErrorMsg(ee)),bl((0,T.fetchGetUserByNameOrNumberReset)()))},[ee]),(0,c.useEffect)(function(){null!==J.result&&Qt(!0),J.error&&(Sl.alertWithType('error',h.default.t('ERROR_LABEL'),F.getErrorMsg(J)),bl((0,T.fetchGetConsultationReset)()))},[J]),(0,c.useEffect)(function(){null!==ie.result&&s.Alert.alert(h.default.t("SUCCESS"),ie.result.response,[{text:h.default.t("OK"),onPress:function(){bl((0,T.fetchModifyPrescriptionReset)()),ue.goBack()}}],{cancelable:!1}),ie.error&&(Sl.alertWithType('error',h.default.t('ERROR_LABEL'),F.getErrorMsg(ie)),bl((0,T.fetchModifyPrescriptionReset)()))},[ie]);var Il=y.object().shape({numero_assure:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),password:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),practitioner_lastname:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),practitioner_firstname:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),Dl=y.object().shape({price:y.number().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),xl=y.object().shape({amount_prestation:y.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),code_acte:y.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),frais_deplacement:y.number(),date_prestation:y.date(),ticker_moderateur:y.number()}),Rl=y.object().shape({amount_prestation:y.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),date_prestation:y.date()}),vl=(y.object().shape({examen_name:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),code_acte:y.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),examen_quantite:y.number().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),y.object().shape({examen_name:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),examen_quantite:y.number().required(h.default.t('THIS_FIELD_IS_REQUIRED'))})),Ol=y.object().shape({drug_name:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),drug_quantity:y.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),drug_posologie:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),Vl=(y.object().shape({code:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),name:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),type:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),function(t,l){var n=l||new Date;ge('ios'===s.Platform.OS),he(K(n).format('YYYY-MM-DD')),Ql('accident_date',K(n).format('YYYY-MM-DD'))}),Nl=function(t,l){var n=l||new Date;rt('ios'===s.Platform.OS),Qe(K(n).format('YYYY-MM-DD')),Ql('pregnancy_start_at',K(n).format('YYYY-MM-DD'))},Al=function(t,l){var n=l||new Date;ut('ios'===s.Platform.OS),Xe(K(n).format('YYYY-MM-DD')),Ql('pregnancy_end_at',K(n).format('YYYY-MM-DD'))};console.log("consultaiton",Kt);var Bl,Ml,Pl,kl,Ll,Ul=(0,_.useFormik)({validationSchema:Il,initialValues:{numero_assure:'',password:'',firstname_patient:'',lastname_patient:'',practitioner_firstname:'',practitioner_lastname:'',agrement_praticien:null==Et?void 0:Et.code_membre,pregnancy_start_at:null,pregnancy_end_at:null,accident_date:null},onSubmit:function(t){X(Kt.id,{network_agent_id:De.network_agent_id,password:t.password,practitioner_lastname:t.practitioner_lastname,practitioner_firstname:t.practitioner_firstname,practitioner_provider_class_id:t.practitioner_provider_class_id,care_condition:t.care_condition,accident_date:t.accident_date,pregnancy_start_at:t.pregnancy_start_at,pregnancy_end_at:t.pregnancy_end_at,performances:Kt.performances,prescriptions:Kt.prescriptions,exams:Kt.exams})}}),Fl=Ul.handleChange,Yl=Ul.handleSubmit,ql=Ul.handleBlur,Gl=Ul.values,Hl=Ul.errors,jl=Ul.touched,Ql=Ul.setFieldValue,zl=Ul.setFieldTouched,Wl=(Ul.isValid,function(){switch(console.log("currentStep",Yt),Yt){case 0:return console.log("values",Gl),''!==Gl.numero_assure&&(bl((0,T.fetchGetUserByNameOrNumberReset)()),o(De.id_network,ve?"&insured_id="+Gl.numero_assure:Ae?"&phone="+Gl.numero_assure:"&name="+Gl.numero_assure),console.log("errors",Hl)),!1;default:return!0}}),Kl=[{title:h.default.t('ASSURE'),content:c.default.createElement(s.View,null,c.default.createElement(x.default,{style:{marginTop:10},placeholder:ve?h.default.t('NUMERO_ASSURE'):Ae?h.default.t('PHONE_NUMBER'):h.default.t('NOM_ASSURE'),value:Gl.numero_assure,keyboardType:Ae?'numeric':'default',onChangeText:Fl('numero_assure'),onBlur:ql('numero_assure'),success:jl.numero_assure&&!Hl.numero_assure,touched:jl.numero_assure,error:Hl.numero_assure,icon:c.default.createElement(N.default,{style:{zIndex:10},name:ve?'lock':Ae?'phone':'user',size:20})}),c.default.createElement(s.View,{style:{flexDirection:'row',position:'absolute',top:22,right:50,justifyContent:'space-between',width:50}},c.default.createElement(V.default,{style:{paddingRight:5},name:"lock",size:20,color:C.Color.primaryColor,onPress:function(){Oe(!0),Be(!1)}}),c.default.createElement(V.default,{style:{paddingRight:5},name:"phone",size:20,color:C.Color.primaryColor,onPress:function(){Oe(!1),Be(!0)}}),c.default.createElement(V.default,{style:{paddingRight:5},name:"user",size:20,color:C.Color.primaryColor,onPress:function(){Oe(!1),Be(!1)}}),c.default.createElement(V.default,{style:{paddingRight:5},name:"qrcode",size:20,color:C.Color.primaryColor,onPress:function(){fe(!0)}})))},{title:h.default.t('PATIENT'),content:c.default.createElement(s.View,null,c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('NOM_CLIENT'),value:Gl.lastname_patient,onChangeText:Fl('lastname_patient'),onBlur:ql('lastname_patient'),success:jl.lastname_patient&&!Hl.lastname_patient,touched:jl.lastname_patient,editable:!1,error:Hl.lastname_patient}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('PRENOM_CLIENT'),value:Gl.firstname_patient,editable:!1,onChangeText:Fl('firstname_patient'),onBlur:ql('firstname_patient'),success:jl.firstname_patient&&!Hl.firstname_patient,touched:jl.firstname_patient,error:Hl.firstname_patient}),c.default.createElement(s.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},c.default.createElement(A.default,{body2:!0},h.default.t('SITUATION')),c.default.createElement(s.View,{style:{width:(0,S.responsiveWidth)(60)}},c.default.createElement(B.default,{options:rl,disabled:!0,value:il,initial:il,buttonColor:C.Color.accentColor,backgroundColor:C.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){}}))))},{title:h.default.t('PRATICIEN'),content:c.default.createElement(s.View,null,c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('CODE_AGREMENT'),value:Gl.agrement_praticien,editable:!1}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('NOM_PRATICIEN'),value:Gl.practitioner_lastname,onChangeText:Fl('practitioner_lastname'),onBlur:ql('practitioner_lastname'),success:jl.practitioner_lastname&&!Hl.practitioner_lastname,touched:jl.practitioner_lastname,error:Hl.practitioner_lastname}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('PRENOM_PRATICIEN'),value:Gl.practitioner_firstname,onChangeText:Fl('practitioner_firstname'),onBlur:ql('practitioner_firstname'),success:jl.practitioner_firstname&&!Hl.practitioner_firstname,touched:jl.practitioner_firstname,error:Hl.practitioner_firstname}),c.default.createElement(M.View,{ref:function(t){},style:{width:(0,S.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},c.default.createElement(P.Dropdown,{label:h.default.t('CLASSIFICATION'),value:null!==la?la.practitioner_provider_class:'',data:null!==ae.result?null==(l=ae.result)?void 0:l.response:[],useNativeDriver:!0,onChangeText:function(t,l,n){zl('practitioner_provider_class_id'),Ql('practitioner_provider_class_id',t.id),console.log("Value",t)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),c.default.createElement(M.View,{ref:function(t){},style:{width:(0,S.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},c.default.createElement(P.Dropdown,{label:h.default.t('CONDITION_PRISE_CHARGE'),value:null!==la?la.care_condition:'',data:hl,useNativeDriver:!0,onChangeText:function(t,l,n){console.log("Value",t),ft(t),zl('care_condition'),Ql('care_condition',t)},valueExtractor:function(t){return t.value},labelExtractor:function(t){return t.label}})),c.default.createElement(s.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},c.default.createElement(A.default,{body2:!0},h.default.t('ACCIDENT')),c.default.createElement(s.View,{style:{width:(0,S.responsiveWidth)(40)}},c.default.createElement(B.default,{options:cl,initial:null!==la&&null!==la.accident_date?0:1,buttonColor:C.Color.accentColor,backgroundColor:C.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){console.log(t),Te('YES'===t)}}))),Se&&c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('DATE_ACCIDENT'),value:null!==Ce?Ce:'',onChangeText:Fl('date_accident'),onBlur:ql('date_accident'),onFocus:function(){Keyboard.dismiss(),ge(!0)},success:jl.date_accident&&!Hl.date_accident,touched:jl.date_accident,error:Hl.date_accident}),c.default.createElement(s.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},c.default.createElement(A.default,{body2:!0},h.default.t('GROSSESSE')),c.default.createElement(s.View,{style:$.contentSwitch},c.default.createElement(B.default,{options:fl,initial:null!==la&&null!==la.pregnancy_start_at?0:1,buttonColor:C.Color.accentColor,backgroundColor:C.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){et('YES'===t)}}))),$e&&c.default.createElement(c.default.Fragment,null,c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('DATE_DEBUT_GROSSESSE'),value:null!==je?je:'',onChangeText:Fl('date_debut_grossesse'),onBlur:ql('date_debut_grossesse'),onFocus:function(){Keyboard.dismiss(),rt(!0)},success:jl.date_debut_grossesse&&!Hl.date_debut_grossesse,touched:jl.date_debut_grossesse,error:Hl.date_debut_grossesse}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('DATE_FIN_GROSSESSE'),value:null!==Ke?Ke:'',onChangeText:Fl('date_fin_grossesse'),onBlur:ql('date_fin_grossesse'),onFocus:function(){Keyboard.dismiss(),ut(!0)},success:jl.date_fin_grossesse&&!Hl.date_fin_grossesse,touched:jl.date_fin_grossesse,error:Hl.date_fin_grossesse})),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('PASSWORD'),value:Gl.password,onChangeText:Fl('password'),onBlur:ql('password'),success:jl.password&&!Hl.password,touched:jl.password,error:Hl.password,secureTextEntry:!0}),c.default.createElement(s.View,{style:{marginTop:25}},c.default.createElement(s.View,{style:{flexDirection:'row',alignItems:'center',justifyContent:'space-between'}},c.default.createElement(s.TouchableOpacity,{style:[$.iconNavigationButton,{borderRadius:5,width:100,height:30,flexDirection:"row",backgroundColor:C.Color.primaryColor,borderColor:C.Color.primaryColor}],onPress:function(t){fa(!0)}},c.default.createElement(A.default,{whiteColor:!0},h.default.t('PRESTATION')),c.default.createElement(j.default,{name:"medical-bag",size:20,color:C.Color.whiteColor})),c.default.createElement(s.TouchableOpacity,{style:[$.iconNavigationButton,{borderRadius:5,width:100,height:30,flexDirection:"row",backgroundColor:C.Color.primaryColor,borderColor:C.Color.primaryColor}],onPress:function(t){ua(!0)}},c.default.createElement(A.default,{whiteColor:!0},h.default.t('EXAMEN')),c.default.createElement(V.default,{name:"file-medical",size:20,color:C.Color.whiteColor})),c.default.createElement(s.TouchableOpacity,{style:[$.iconNavigationButton,{borderRadius:5,width:110,height:30,flexDirection:"row",backgroundColor:C.Color.primaryColor,borderColor:C.Color.primaryColor}],onPress:function(t){Ta(!0),Dt(null)}},c.default.createElement(A.default,{whiteColor:!0},h.default.t('MEDICAMENT')),c.default.createElement(Q.default,{name:"drug-pack",size:20,color:C.Color.whiteColor})))))}];return c.default.createElement(w.ScreenComponent,null,c.default.createElement(I.default,{ref:function(t){return Sl=t}}),c.default.createElement(s.KeyboardAvoidingView,{behavior:'android'===s.Platform.OS?'height':'padding',style:{flex:1}},c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:$.contain},c.default.createElement(v.default,{steps:Kl,currentStepIndex:Yt+1}),c.default.createElement(s.View,{style:{flexDirection:'column',alignItems:'center'}},c.default.createElement(O.default,{ref:Vt,activeStep:0,steps:Kl,useNativeDriver:!0,nextStepAnimation:"slideLeft",prevStepAnimation:"slideRight",isFirstStep:function(t){return Mt(t)},isLastStep:function(t){return Lt(t)},onNext:function(){Wl()},onPrev:function(){0===Yt&&bl((0,T.fetchGetUserByNameOrNumberReset)())},currentStep:function(t){var l=t.currentStep,n=t.isLastStep,o=t.isFirstStep;qt(l),Mt(o),Lt(n)}})),c.default.createElement(s.View,{style:$.iconNavigation},Bt?c.default.createElement(s.View,null):c.default.createElement(s.TouchableOpacity,{style:[$.iconNavigationButton,{backgroundColor:C.Color.primaryColor,borderColor:C.Color.primaryColor}],onPress:function(){return Vt.current.prev()}},c.default.createElement(V.default,{name:"arrow-left",size:20,color:C.Color.whiteColor})),2===Yt?c.default.createElement(b.default,{loading:oe.loading,onPress:Yl},h.default.t('SUBMIT_LABEL')):c.default.createElement(s.TouchableOpacity,{style:[$.iconNavigationButton,{backgroundColor:C.Color.primaryColor,borderColor:C.Color.primaryColor}],onPress:function(t){Yl(t),Wl()&&Vt.current.next()}},ee.loading||te.loading||J.loading?c.default.createElement(s.ActivityIndicator,{size:"small",color:"#fff"}):c.default.createElement(V.default,{name:"arrow-right",size:24,color:C.Color.whiteColor}))),xa&&(Ll=null!==vt&&null===vt.drugs?E.default.parseInt(vt.amount):'',console.log("AMOUNT",Ll),c.default.createElement(_.Formik,{validationSchema:Rl,initialValues:{amount_prestation:''+vt!==null&&null===vt.drugs?vt.amount:'',frais_deplacement:null!==vt&&null===vt.drugs?vt.home_visit_fees:'',code_acte:null!==vt&&null===vt.drugs?vt.act:'',insurance_amount:''+vt!==null&&null===vt.drugs?vt.insurance_amount:'',moderator_ticket:''+vt!==null&&null===vt.drugs?vt.moderator_ticket:''},onSubmit:function(t){console.log("values",t),Xt(W({},Kt,{performances:Kt.performances.map(function(l){return vt.id===l.id?W({},l,{act_id:t.code_acte.id,act:t.code_acte,amount:t.amount_prestation,home_visit_fees:t.frais_deplacement,to_delete:!1}):l})})),Ra(!1)}},function(t){var l,n=t.values,o=t.errors,u=t.touched,f=t.handleChange,p=t.handleBlur,E=t.setFieldValue,_=t.setFieldTouched,y=t.handleSubmit;return t.isSubmitting,c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:xa,onSwipeComplete:function(){Ra(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(A.default,{body2:!0,style:{marginTop:10}},h.default.t('MODIFY_PRESTATION')),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('DATE'),value:null!==vt&&null===vt.drugs?K(vt.created_at).format('YYYY-MM-DD HH:mm'):''+K(ke).format('YYYY-MM-DD HH:mm'),editable:!1}),c.default.createElement(M.View,{ref:function(t){Tl=t},style:{width:(0,S.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},c.default.createElement(P.Dropdown,{label:h.default.t('CODE_ACTE'),data:null!==re.result?null==(l=re.result)?void 0:l.response:[],useNativeDriver:!0,value:"number"!=typeof n.code_acte&&n.code_acte.name,onChangeText:function(t,l,n){_('code_acte'),E('code_acte',t)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('AMOUNT'),value:n.amount_prestation,onChangeText:function(t){E('amount_prestation',t),(0,T.fetchGetAmountConsultation)({network_id:De.id_network,amount:''+t,care_condition:st})},onBlur:p('amount_prestation'),success:u.amount_prestation&&!o.amount_prestation,touched:u.amount_prestation,error:o.amount_prestation}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('TICKET_MONDERATEUR'),editable:!1,value:null!==vt&&null===vt.drugs?n.moderator_ticket:null!==ne.result?ne.result.response.moderator_ticket:''}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('AMOUNT_PER_INSURANCE'),editable:!1,value:null!==vt&&null===vt.drugs?n.insurance_amount:null!==ne.result?ne.result.response.insurance_amount:''}),c.default.createElement(s.View,{style:{marginTop:10,width:"100%",flexDirection:'row',justifyContent:"space-between"}},c.default.createElement(A.default,{body2:!0},h.default.t('VISITE_DOMICILE')),c.default.createElement(s.View,{style:$.contentSwitch},c.default.createElement(B.default,{options:pl,initial:1,buttonColor:C.Color.accentColor,backgroundColor:C.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){yl('YES'===t)}}))),_l&&c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('FRAIS_DEPLACEMENT'),value:n.frais_deplacement,onChangeText:f('frais_deplacement'),onBlur:p('frais_deplacement'),success:u.frais_deplacement&&!o.frais_deplacement,touched:u.frais_deplacement,error:o.frais_deplacement}),c.default.createElement(b.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:function(){y(),console.log("Error",o)}},h.default.t('SUBMIT_LABEL'))))))})),sa&&c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:sa,onSwipeComplete:function(){fa(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(A.default,{body2:!0,style:{marginTop:10}},h.default.t('LIST_PRESTATION')),c.default.createElement(s.FlatList,{data:Kt.performances.filter(function(t){return!t.to_delete}),extraData:Kt.performances.filter(function(t){return!t.to_delete}),keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,c.default.createElement(s.View,{style:[$.contentActionModalBottom,{borderBottomColor:C.Color.borderColor,width:"100%"}],key:l.id},c.default.createElement(A.default,{body2:!0,semibold:!0,numberOfLines:5},(0,F.cutString)(l.act.name,30)+"\n \n "+h.default.t('AMOUNT_LABEL')+": "+l.amount+" \n \n "+h.default.t('AMOUNT_PER_INSURANCE')+": "+l.insurance_amount+" \n \n "+h.default.t('TICKET_MONDERATEUR')+": "+l.moderator_ticket+" "+(null!==l.home_visit_fees?'| '+l.home_visit_fees:'')),c.default.createElement(s.View,{style:$.iconRight},c.default.createElement(s.TouchableOpacity,{onPress:function(){Ot(W({},l,{drugs:null})),Ra(!0)}},c.default.createElement(V.default,{name:"edit",size:24,color:C.Color.primaryColor})),c.default.createElement(s.TouchableOpacity,{onPress:function(){Xt(W({},Kt,{performances:Kt.performances.map(function(t){return l.id===t.id?W({},t,{to_delete:!0}):t})}))}},c.default.createElement(V.default,{name:"minus-circle",size:24,color:C.Color.grayColor}))))}}),c.default.createElement(b.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return fa(!1)}},h.default.t('OK')))))),Va&&c.default.createElement(_.Formik,{validationSchema:xl,initialValues:{amount_prestation:'',frais_deplacement:'',code_acte:''},onSubmit:function(t){''===t.code_acte?Tl.shake(200):(Xa([{act_id:t.code_acte.id,act:t.code_acte,amount:t.amount_prestation,home_visit_fees:t.frais_deplacement}].concat((0,n.default)(Ka))),Na(!1),F.displayToast(h.default.t('PRESTATION_SUCCESSFULLY_MODIFY')))}},function(t){var l,n=t.values,o=t.errors,u=t.touched,f=t.handleChange,p=t.handleBlur,E=t.setFieldValue,_=t.setFieldTouched,y=t.handleSubmit;return t.isSubmitting,c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:Va,onSwipeComplete:function(){Na(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(A.default,{body2:!0,style:{marginTop:10}},h.default.t('MODIFY_PRESTATION')),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('DATE'),value:''+K(ke).format('YYYY-MM-DD HH:mm'),editable:!1}),c.default.createElement(M.View,{ref:function(t){Tl=t},style:{width:(0,S.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},c.default.createElement(P.Dropdown,{label:h.default.t('CODE_ACTE'),data:null!==re.result?null==(l=re.result)?void 0:l.response:[],useNativeDriver:!0,onChangeText:function(t,l,n){_('code_acte'),E('code_acte',t)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('AMOUNT'),value:n.amount_prestation,onChangeText:f('amount_prestation'),onBlur:p('amount_prestation'),success:u.amount_prestation&&!o.amount_prestation,touched:u.amount_prestation,error:o.amount_prestation,onKeyPress:function(){(0,T.fetchGetAmountConsultation)({network_id:De.id_network,amount:n.amount_prestation,care_condition:st})}}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('TICKET_MONDERATEUR'),editable:!1,value:null!==ne.result?ne.result.response.moderator_ticket:''}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('AMOUNT_PER_INSURANCE'),editable:!1,value:null!==ne.result?ne.result.response.insurance_amount:''}),c.default.createElement(s.View,{style:{marginTop:10,width:"100%",flexDirection:'row',justifyContent:"space-between"}},c.default.createElement(A.default,{body2:!0},h.default.t('VISITE_DOMICILE')),c.default.createElement(s.View,{style:$.contentSwitch},c.default.createElement(B.default,{options:pl,initial:1,buttonColor:C.Color.accentColor,backgroundColor:C.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){yl('YES'===t)}}))),_l&&c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('FRAIS_DEPLACEMENT'),value:n.frais_deplacement,onChangeText:f('frais_deplacement'),onBlur:p('frais_deplacement'),success:u.frais_deplacement&&!o.frais_deplacement,touched:u.frais_deplacement,error:o.frais_deplacement}),c.default.createElement(b.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:y},h.default.t('SUBMIT_LABEL'))))))}),Ma&&c.default.createElement(_.Formik,{validationSchema:Ol,initialValues:{drug_name:'',drug_posologie:'',drug_quantity:''},onSubmit:function(t){al([{drug_or_device_id:It.id,dosage:t.drug_posologie,quantity:t.drug_quantity}].concat((0,n.default)(tl))),Pa(!1),F.displayToast(h.default.t('PRESCRIPTIONS_SUCCESSFULLY_ADD'))}},function(t){var l=t.values,n=t.errors,o=t.touched,u=t.handleChange,f=t.handleBlur,p=t.handleSubmit;return t.isSubmitting,c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:Ma,onSwipeComplete:function(){Pa(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(A.default,{body2:!0,style:{marginTop:10}},h.default.t('AJOUTER_MEDICAMENT')),c.default.createElement(s.View,{style:{flexDirection:'row'}},c.default.createElement(x.default,{style:{marginTop:10,width:"90%"},placeholder:h.default.t('NAME'),value:null!==It?It.name:l.drug_name,onChangeText:u('drug_name'),onBlur:f('drug_name'),success:o.drug_name&&!n.drug_name,touched:o.drug_name,error:n.drug_name,editable:null===It}),c.default.createElement(s.TouchableOpacity,{style:[$.iconNavigationButton,{backgroundColor:C.Color.primaryColor,borderColor:C.Color.primaryColor,marginTop:10,width:40,height:40}],onPress:function(t){z(De.id_network,l.drug_name)}},le.loading?c.default.createElement(s.ActivityIndicator,{size:"small",color:"#fff"}):c.default.createElement(N.default,{name:"search",size:24,color:C.Color.whiteColor}))),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('POSOLOGIE'),value:l.drug_posologie,onChangeText:u('drug_posologie'),onBlur:f('drug_posologie'),success:o.drug_posologie&&!n.drug_posologie,touched:o.drug_posologie,error:n.drug_posologie}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('QUANTITE'),value:l.drug_quantity,onChangeText:u('drug_quantity'),onBlur:f('drug_quantity'),success:o.drug_quantity&&!n.drug_quantity,touched:o.drug_quantity,error:n.drug_quantity,keyboardType:"numeric"}),c.default.createElement(b.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:p},h.default.t('SUBMIT_LABEL'))))))}),Ua&&c.default.createElement(_.Formik,{validationSchema:Ol,initialValues:{drug_name:null!==vt&&vt.drugs?vt.drug_or_device.name:'',drug_posologie:null!==vt&&vt.drugs?vt.dosage:'',drug_quantity:null!==vt&&vt.drugs?vt.quantity:''},onSubmit:function(t){Xt(W({},Kt,{prescriptions:Kt.prescriptions.map(function(l){return vt.id===l.id?{id:l.id,drug_or_device_id:vt.drug_or_device.id,drug_or_device:vt.drug_or_device,dosage:t.drug_posologie,quantity:t.drug_quantity,unit_price:l.unit_price,to_delete:!1}:l})})),Fa(!1),F.displayToast(h.default.t('PRESCRIPTIONS_SUCCESSFULLY_MODIFY'))}},function(t){var l=t.values,n=t.errors,o=t.touched,u=t.handleChange,f=t.handleBlur,p=t.handleSubmit;return t.isSubmitting,c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:Ua,onSwipeComplete:function(){Fa(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(A.default,{body2:!0,style:{marginTop:10}},h.default.t('MODIFIER_MEDICAMENT')),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('NAME'),value:l.drug_name,onChangeText:u('drug_name'),onBlur:f('drug_name'),success:o.drug_name&&!n.drug_name,touched:o.drug_name,error:n.drug_name,editable:null===It}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('POSOLOGIE'),value:l.drug_posologie,onChangeText:u('drug_posologie'),onBlur:f('drug_posologie'),success:o.drug_posologie&&!n.drug_posologie,touched:o.drug_posologie,error:n.drug_posologie}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('QUANTITE'),value:''+l.drug_quantity,onChangeText:u('drug_quantity'),onBlur:f('drug_quantity'),success:o.drug_quantity&&!n.drug_quantity,touched:o.drug_quantity,error:n.drug_quantity,keyboardType:"numeric"}),c.default.createElement(b.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:p},h.default.t('SUBMIT_LABEL'))))))}),Ga&&c.default.createElement(_.Formik,{validationSchema:vl,initialValues:{examen_name:null!==vt?vt.drugs?'':vt.description:'',examen_quantite:''+vt!==null?vt.drugs?'':vt.quantity:'',code_acte:''+vt!==null?vt.drugs?'':vt.act:''},onSubmit:function(t){Xt(W({},Kt,{exams:Kt.exams.map(function(l){return vt.id===l.id?W({},l,{id:l.id,act_id:t.code_acte.id,act:t.code_acte,description:t.examen_name,quantity:t.examen_quantite,unit_price:l.unit_price,to_delete:!1}):l})})),Ha(!1),F.displayToast(h.default.t('EXAMENS_SUCCESSFULLY_MODIFY'))}},function(t){var l,n=t.values,o=t.errors,u=t.touched,f=t.handleChange,p=t.setFieldValue,E=t.setFieldTouched,_=t.handleBlur,y=t.handleSubmit;return t.isSubmitting,c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:Ga,onSwipeComplete:function(){Ha(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(A.default,{body2:!0,style:{marginTop:10}},h.default.t('MODIFIER_EXAMEN')),c.default.createElement(M.View,{ref:function(t){Tl=t},style:{width:(0,S.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},c.default.createElement(P.Dropdown,{label:h.default.t('CODE_ACTE'),data:null!==re.result?null==(l=re.result)?void 0:l.response:[],useNativeDriver:!0,value:"number"!=typeof n.code_acte&&n.code_acte.name,onChangeText:function(t,l,n){console.log("Value",t),E('code_acte'),p('code_acte',t)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('NAME'),value:n.examen_name,onChangeText:f('examen_name'),onBlur:_('examen_name'),success:u.examen_name&&!o.examen_name,touched:u.examen_name,error:o.examen_name}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('QUANTITE'),value:''+n.examen_quantite,onChangeText:f('examen_quantite'),onBlur:_('examen_quantite'),success:u.examen_quantite&&!o.examen_quantite,touched:u.examen_quantite,error:o.examen_quantite,keyboardType:"numeric"}),c.default.createElement(b.default,{style:{marginTop:20,marginBottom:20},full:!0,loading:ie.loading,onPress:function(){console.log("errors",o),console.log("values",n),y()}},h.default.t('SUBMIT_LABEL'))))))}),Ye&&c.default.createElement(G.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date(ke),mode:"date",display:"spinner",onChange:(y.object().shape({code:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),name:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),type:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),function(t,l){var n=l||''+K(new Date).format('YYYY-MM-DD');qe('ios'===s.Platform.OS),Le(n)})}),Ee&&c.default.createElement(G.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date,mode:"date",display:"spinner",onChange:Vl}),lt&&c.default.createElement(G.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date,mode:"date",display:"spinner",onChange:Nl}),it&&c.default.createElement(G.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date,mode:"date",display:"spinner",onChange:Al}),ia&&c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:ia,onSwipeComplete:function(){ua(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(A.default,{body2:!0,style:{marginTop:10}},h.default.t('EXAMEN')),c.default.createElement(s.FlatList,{data:Kt.exams.filter(function(t){return!t.to_delete}),extraData:Kt.exams.filter(function(t){return!t.to_delete}),keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,c.default.createElement(s.View,{style:[$.contentActionModalBottom,{borderBottomColor:C.Color.borderColor,width:"100%"}],key:l.id},c.default.createElement(A.default,{body2:!0,semibold:!0,numberOfLines:2},l.quantity+" "+l.description+" "+(l.unit_price?' - '+l.unit_price:'')+" \n "+l.act.name),c.default.createElement(s.View,{style:$.iconRight},c.default.createElement(s.TouchableOpacity,{onPress:function(){Ot(W({},l,{drugs:!1})),Ha(!0)}},c.default.createElement(V.default,{name:"edit",size:24,color:C.Color.primaryColor})),c.default.createElement(s.TouchableOpacity,{onPress:function(){Xt(W({},Kt,{exams:Kt.exams.map(function(t){return l.id===t.id?W({},t,{to_delete:!0}):t})}))}},c.default.createElement(V.default,{name:"minus-circle",size:24,color:C.Color.grayColor}))))}}),c.default.createElement(b.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return ua(!1)}},h.default.t('OK')))))),se&&c.default.createElement(p.default.Container,{contentStyle:{width:(0,S.responsiveWidth)(80)},useNativeDriver:!0,visible:se},c.default.createElement(p.default.Title,null,h.default.t('SCAN')),c.default.createElement(s.ScrollView,{style:[$.blockView,{borderBottomColor:C.Color.borderColor,maxHeight:300}]},c.default.createElement(A.default,null,h.default.t('BRING_YOUR_CAMERA_CLOSER_TO_SCAN_QR_CODE')),c.default.createElement(L.default,{onRead:function(t){fe(!1),console.log("result",t.data)},flashMode:U.RNCamera.Constants.FlashMode.off})),c.default.createElement(p.default.Button,{bold:!0,label:h.default.t('CLOSE'),onPress:function(){fe(!1)}})),Ca&&c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:Ca,onSwipeComplete:function(){ha(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(A.default,{body2:!0,style:{marginTop:10}},h.default.t('LIST_ASSURE')),c.default.createElement(s.FlatList,{data:null==(Pl=ee.result)?void 0:Pl.response,extraData:null==(kl=ee.result)?void 0:kl.response,ListEmptyComponent:c.default.createElement(A.default,{body2:!0},h.default.t('NO_ASSURE_MATCH_SEARCH')),keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,c.default.createElement(s.View,{style:{paddingVertical:15,alignItems:'flex-start'}},c.default.createElement(s.TouchableOpacity,{style:[$.contentActionModalBottom,{borderBottomColor:C.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){'PAID'!==l.state?s.Alert.alert(h.default.t('ERROR_LABEL'),h.default.t('ASSURE_NON_EN_REGLE'),[{text:h.default.t('OK'),onPress:function(){}}]):(Ct(l),bt(null),ul(1),ha(!1),Ql('lastname_patient',l.user.lastname),Ql('firstname_patient',l.user.firstname),H(l.user.id,'UNTREATED','CONSULTATION',"&network_agent_id="+De.network_agent_id))}},c.default.createElement(A.default,{body2:!0,semibold:!0},l.user.firstname+" "+l.user.lastname)),l.beneficiaries.map(function(t){return c.default.createElement(s.TouchableOpacity,{style:$.beneficiarySubSection,onPress:function(){Ct(l),bt(t),ul(0),ha(!1),Ql('lastname_patient',t.lastname),Ql('firstname_patient',t.firstname),H(l.user.id,'TO_BILL','CONSULTATION',"&beneficiary_id="+t.id)}},c.default.createElement(s.View,{style:{width:10}}),c.default.createElement(s.View,{style:{paddingHorizontal:10,alignItems:'flex-start'}},c.default.createElement(A.default,{subhead:!0,semibold:!0},t.firstname+" "+t.lastname+" ("+h.default.t('AYANT_DROITS')+")")))}))}}),c.default.createElement(b.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return ha(!1)}},h.default.t('OK')))))),Sa&&c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:Sa,onSwipeComplete:function(){Ta(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(A.default,{body2:!0,style:{marginTop:10}},h.default.t('MEDICAMENTS')),c.default.createElement(s.FlatList,{data:Kt.prescriptions.filter(function(t){return!t.to_delete}),extraData:Kt.prescriptions.filter(function(t){return!t.to_delete}),keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,c.default.createElement(s.View,{style:[$.contentActionModalBottom,{borderBottomColor:C.Color.borderColor,width:"100%"}],key:l.id},c.default.createElement(A.default,{body2:!0,semibold:!0,numberOfLines:2},l.quantity+" "+l.drug_or_device.name+" "+(l.unit_price?' - '+l.unit_price:'')+" \n "+l.dosage),c.default.createElement(s.View,{style:$.iconRight},c.default.createElement(s.TouchableOpacity,{onPress:function(){Ot(W({},l,{drugs:!0})),Fa(!0)}},c.default.createElement(V.default,{name:"edit",size:24,color:C.Color.primaryColor})),c.default.createElement(s.TouchableOpacity,{onPress:function(){Xt(W({},Kt,{prescriptions:Kt.prescriptions.map(function(t){return l.id===t.id?W({},t,{to_delete:!0}):t})}))}},c.default.createElement(V.default,{name:"minus-circle",size:24,color:C.Color.grayColor}))))}}),c.default.createElement(b.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return Ta(!1)}},h.default.t('OK')))))),jt&&c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:jt,onSwipeComplete:function(){Qt(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(A.default,{body2:!0,style:{marginTop:10}},h.default.t('LIST_CONSULTATION')),c.default.createElement(s.FlatList,{data:null==(Bl=J.result)?void 0:Bl.response,ListEmptyComponent:c.default.createElement(A.default,{body2:!0},h.default.t('NO_CONSULTATION')),extraData:null==(Ml=J.result)?void 0:Ml.response,keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,c.default.createElement(s.TouchableOpacity,{style:[$.contentActionModalBottom,{borderBottomColor:C.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){ra(l),ea(!0)}},c.default.createElement(A.default,{body2:!0,semibold:!0},l.type+" #"+l.health_care_sheet_id+" - "+K(l.created_at).format('YYYY-MM-DD')))}}),c.default.createElement(b.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return Qt(!1)}},h.default.t('OK')))))),$t&&c.default.createElement(p.default.Container,{useNativeDriver:!0,visible:$t},c.default.createElement(p.default.Title,null,h.default.t('DETAIL')),c.default.createElement(s.ScrollView,{persistentScrollbar:!0},c.default.createElement(s.View,{style:[$.blockView,{borderBottomColor:C.Color.borderColor}]},c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(A.default,{style:[$.body2]},h.default.t('PATIENT'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(A.default,{style:[q.Typography.caption1,C.Color.grayColor]},la.patient_lastname+" "+la.patient_firstname))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(A.default,{style:[$.body2]},"Situation")),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(A.default,{style:[q.Typography.caption1,C.Color.grayColor]},la.patient_situation.toLowerCase()))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(A.default,{style:[$.body2]},h.default.t('PRATICIEN'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(A.default,{style:[q.Typography.caption1,C.Color.grayColor]},la.practitioner_lastname+" "+la.practitioner_firstname))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(A.default,{style:[$.body2]},h.default.t('CLASSE_PRESTATAIRE'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(A.default,{style:[q.Typography.caption1,C.Color.grayColor]},(0,F.uppercaseFirstLetter)(la.practitioner_provider_class.toLowerCase())))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(A.default,{style:[$.body2]},h.default.t('STATE'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(A.default,{style:[q.Typography.caption1,C.Color.grayColor]},(0,F.uppercaseFirstLetter)(la.state.toLowerCase())))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(A.default,{style:[$.body2]},"Type")),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(A.default,{style:[q.Typography.caption1,C.Color.grayColor]},(0,F.uppercaseFirstLetter)(la.type.toLowerCase())))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(A.default,{style:[$.body2]},h.default.t('CONDITION_PRISE_CHARGE'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(A.default,{style:[q.Typography.caption1,C.Color.grayColor]},(0,F.uppercaseFirstLetter)(la.care_condition.toLowerCase())))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(A.default,{style:[$.body2]},h.default.t('INSTITUTE_NAME'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(A.default,{style:[q.Typography.caption1,C.Color.grayColor]},(0,F.uppercaseFirstLetter)(la.institution_name.toLowerCase())))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(A.default,{style:[$.body2]},"Date")),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(A.default,{style:[q.Typography.caption1,C.Color.grayColor]},K(la.created_at).format('YYYY-MM-DD')))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(A.default,{style:[$.body2]},h.default.t('PRESTATION'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},la.performances.map(function(t){return c.default.createElement(A.default,{style:[q.Typography.caption1,C.Color.grayColor]},t.act.name+" \n "+t.amount+" \n")}))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(A.default,{style:[$.body2]},h.default.t('EXAMEN'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},la.exams.map(function(t){return c.default.createElement(A.default,{style:[q.Typography.caption1,C.Color.grayColor]},t.description+" \n "+t.act.name+" \n")}))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(A.default,{style:[$.body2]},h.default.t('MEDICAMENT'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},la.prescriptions.map(function(t){return c.default.createElement(A.default,{style:[q.Typography.caption1,C.Color.grayColor]},t.drug_or_device.name+" \n "+t.dosage+" \n")}))))),c.default.createElement(p.default.Button,{bold:!0,label:h.default.t('CANCEL_LABEL'),onPress:function(){ea(!1)}}),c.default.createElement(p.default.Button,{bold:!0,label:h.default.t('OK'),onPress:function(){ea(!1),ha(!1),Qt(!1),Xt(W({},la,{exams:la.exams.map(function(t){return W({},t,{to_delete:!1})}),performances:la.performances.map(function(t){return W({},t,{to_delete:!1})}),prescriptions:la.prescriptions.map(function(t){return W({},t,{to_delete:!1})})})),ft(la.care_condition),Ql('practitioner_firstname',la.practitioner_firstname),Ql('practitioner_lastname',la.practitioner_lastname),Ql('pregnancy_start_at',la.pregnancy_start_at),Ql('accident_date',la.accident_date),Te(null!==la.accident_date),et(null!==la.pregnancy_start_at),Vt.current.next()}})),Ea&&c.default.createElement(_.Formik,{validationSchema:Dl,initialValues:{price:''},onSubmit:function(t){console.log("Value",vt),vt.examen?Xt(W({},Kt,{exams:Kt.exams.map(function(l){return vt.id===l.id?W({},l,{unit_price:t.price}):l})})):Xt(W({},Kt,{prescriptions:Kt.prescriptions.map(function(l){return vt.id===l.id?W({},l,{unit_price:t.price}):l})})),ga(!1)}},function(t){var l=t.values,n=t.errors,o=t.touched,u=t.handleChange,f=(t.setFieldValue,t.setFieldTouched,t.handleBlur),p=t.handleSubmit;return t.isSubmitting,c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:Ea,onSwipeComplete:function(){ga(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(A.default,{body2:!0,style:{marginTop:10}},h.default.t('AMOUNT_LABEL')),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('AMOUNT_LABEL_DESCRIPTION'),value:l.price,onChangeText:u('price'),onBlur:f('price'),success:o.price&&!n.price,touched:o.price,error:n.price,keyboardType:"numeric"}),c.default.createElement(b.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:p},h.default.t('OK'))))))})))))});e.default=te},2201,[4,1,33,7,27,15,18,1046,1639,938,1827,1950,1031,719,2147,2162,534,1779,2164,718,2158,2182,2186,2187,1013,538,2157,771,749,979,1823,2188,2194,1658,1107,1079,1763,2180,881,1032,1189]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),l=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=l(r(d[2])),n=l(r(d[3])),u=t(r(d[4])),c=r(d[5]),s=r(d[6]),f=l(r(d[7])),p=r(d[8]),E=t(r(d[9])),y=r(d[10]),C=l(r(d[11])),w=r(d[12]),h=l(r(d[13])),b=r(d[14]),_=r(d[15]),S=l(r(d[16])),T=r(d[17]),x=l(r(d[18])),I=r(d[19]),R=r(d[20]),V=l(r(d[21])),v=l(r(d[22])),O=l(r(d[23])),D=l(r(d[24])),P=l(r(d[25])),N=l(r(d[26])),B=t(r(d[27])),A=r(d[28]),k=l(r(d[29])),L=l(r(d[30])),M=r(d[31]),U=t(r(d[32])),F=r(d[33]),G=l(r(d[34])),j=r(d[35]);function z(t,l){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);l&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),o.push.apply(o,n)}return o}function H(t){for(var l=1;l0?Et(!0):Bt.alertWithType('warn',C.default.t('EMPTY_LIST'),C.default.t('NO_ASSURE_MATCH_SEARCH'))),K.error&&(Bt.alertWithType('error',C.default.t('ERROR_LABEL'),U.getErrorMsg(K)),Nt((0,_.fetchGetUserByNameOrNumberReset)()))},[K]),(0,u.useEffect)(function(){null!==Q.result&&Ye(!0),Q.error&&(Bt.alertWithType('error',C.default.t('ERROR_LABEL'),U.getErrorMsg(Q)),Nt((0,_.fetchGetConsultationReset)()))},[Q]),(0,u.useEffect)(function(){null!==W.result&&c.Alert.alert(C.default.t("SUCCESS"),W.result.response,[{text:C.default.t("OK"),onPress:function(){Nt((0,_.fetchModifyPrescriptionReset)()),$.goBack()}}],{cancelable:!1}),W.error&&(Bt.alertWithType('error',C.default.t('ERROR_LABEL'),U.getErrorMsg(W)),Nt((0,_.fetchModifyPrescriptionReset)()))},[W]);var At=E.object().shape({numero_assure:E.string().required(C.default.t('THIS_FIELD_IS_REQUIRED')),password:E.string().required(C.default.t('THIS_FIELD_IS_REQUIRED')),practitioner_lastname:E.string().required(C.default.t('THIS_FIELD_IS_REQUIRED')),practitioner_firstname:E.string().required(C.default.t('THIS_FIELD_IS_REQUIRED'))}),kt=E.object().shape({price:E.number().required(C.default.t('THIS_FIELD_IS_REQUIRED'))});console.log("consultaiton",Ke);var Lt,Mt,Ut,Ft,Gt=(0,p.useFormik)({validationSchema:At,initialValues:{numero_assure:'',password:'',firstname_patient:'',lastname_patient:'',practitioner_firstname:'',practitioner_lastname:'',agrement_praticien:null==ye?void 0:ye.code_membre,pregnancy_start_at:null,pregnancy_end_at:null},onSubmit:function(t){z(Ke.id,{network_agent_id:oe.network_agent_id,password:t.password,practitioner_lastname:t.practitioner_lastname,practitioner_firstname:t.practitioner_firstname,practitioner_provider_class_id:t.practitioner_provider_class_id,performances:Ke.performances,prescriptions:Ke.prescriptions})}}),jt=Gt.handleChange,zt=Gt.handleSubmit,Ht=Gt.handleBlur,Yt=Gt.values,Wt=Gt.errors,Qt=Gt.touched,Kt=Gt.setFieldValue,qt=Gt.setFieldTouched,Xt=(Gt.isValid,function(){switch(console.log("currentStep",Fe),Fe){case 0:return console.log("values",Yt),''!==Yt.numero_assure&&(Nt((0,_.fetchGetUserByNameOrNumberReset)()),o(oe.id_network,ue?"&insured_id="+Yt.numero_assure:fe?"&phone="+Yt.numero_assure:"&name="+Yt.numero_assure),console.log("errors",Wt)),!1;default:return!0}}),Jt=[{title:C.default.t('ASSURE'),content:u.default.createElement(c.View,null,u.default.createElement(x.default,{style:{marginTop:10},placeholder:ue?C.default.t('NUMERO_ASSURE'):fe?C.default.t('PHONE_NUMBER'):C.default.t('NOM_ASSURE'),value:Yt.numero_assure,keyboardType:fe?'numeric':'default',onChangeText:jt('numero_assure'),onBlur:Ht('numero_assure'),success:Qt.numero_assure&&!Wt.numero_assure,touched:Qt.numero_assure,error:Wt.numero_assure,icon:u.default.createElement(D.default,{style:{zIndex:10},name:ue?'lock':fe?'phone':'user',size:20})}),u.default.createElement(c.View,{style:{flexDirection:'row',position:'absolute',top:22,right:50,justifyContent:'space-between',width:50}},u.default.createElement(O.default,{style:{paddingRight:5},name:"lock",size:20,color:y.Color.primaryColor,onPress:function(){de(!0),me(!1)}}),u.default.createElement(O.default,{style:{paddingRight:5},name:"phone",size:20,color:y.Color.primaryColor,onPress:function(){de(!1),me(!0)}}),u.default.createElement(O.default,{style:{paddingRight:5},name:"user",size:20,color:y.Color.primaryColor,onPress:function(){de(!1),me(!1)}}),u.default.createElement(O.default,{style:{paddingRight:5},name:"qrcode",size:20,color:y.Color.primaryColor,onPress:function(){ae(!0)}})))},{title:C.default.t('PATIENT'),content:u.default.createElement(c.View,null,u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('NOM_CLIENT'),value:Yt.lastname_patient,onChangeText:jt('lastname_patient'),onBlur:Ht('lastname_patient'),success:Qt.lastname_patient&&!Wt.lastname_patient,touched:Qt.lastname_patient,editable:!1,error:Wt.lastname_patient}),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('PRENOM_CLIENT'),value:Yt.firstname_patient,editable:!1,onChangeText:jt('firstname_patient'),onBlur:Ht('firstname_patient'),success:Qt.firstname_patient&&!Wt.firstname_patient,touched:Qt.firstname_patient,error:Wt.firstname_patient}),u.default.createElement(c.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(P.default,{body2:!0},C.default.t('SITUATION')),u.default.createElement(c.View,{style:{width:(0,b.responsiveWidth)(60)}},u.default.createElement(N.default,{options:Rt,disabled:!0,value:Ot,initial:Ot,buttonColor:y.Color.accentColor,backgroundColor:y.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){}}))))},{title:C.default.t('PRATICIEN'),content:u.default.createElement(c.View,null,u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('CODE_AGREMENT'),value:Yt.agrement_praticien,editable:!1}),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('NOM_PRATICIEN'),value:Yt.practitioner_lastname,onChangeText:jt('practitioner_lastname'),onBlur:Ht('practitioner_lastname'),success:Qt.practitioner_lastname&&!Wt.practitioner_lastname,touched:Qt.practitioner_lastname,error:Wt.practitioner_lastname}),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('PRENOM_PRATICIEN'),value:Yt.practitioner_firstname,onChangeText:jt('practitioner_firstname'),onBlur:Ht('practitioner_firstname'),success:Qt.practitioner_firstname&&!Wt.practitioner_firstname,touched:Qt.practitioner_firstname,error:Wt.practitioner_firstname}),u.default.createElement(B.View,{ref:function(t){},style:{width:(0,b.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},u.default.createElement(A.Dropdown,{label:C.default.t('CLASSIFICATION'),value:null!==lt?lt.practitioner_provider_class:'',data:null!==J.result?null==(l=J.result)?void 0:l.response:[],useNativeDriver:!0,onChangeText:function(t,l,o){qt('practitioner_provider_class_id'),Kt('practitioner_provider_class_id',t.id),console.log("Value",t)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('PASSWORD'),value:Yt.password,onChangeText:jt('password'),onBlur:Ht('password'),success:Qt.password&&!Wt.password,touched:Qt.password,error:Wt.password,secureTextEntry:!0}),u.default.createElement(c.View,{style:{marginTop:25}},u.default.createElement(c.View,{style:{flexDirection:'row',alignItems:'center',justifyContent:'space-between'}},null!==Ke?!Ke.prescriptions.length>0?u.default.createElement(c.TouchableOpacity,{style:[q.iconNavigationButton,{borderRadius:5,width:100,height:30,flexDirection:"row",backgroundColor:y.Color.primaryColor,borderColor:y.Color.primaryColor}],onPress:function(t){Ke.prescriptions.filter(function(t){return t.checked}).length>0?(0,U.displayToast)("Vous avez deja renseigner les m\xe9dicaments"):it(!0)}},u.default.createElement(P.default,{whiteColor:!0},C.default.t('EXAMEN')),u.default.createElement(O.default,{name:"file-medical",size:20,color:y.Color.whiteColor})):u.default.createElement(c.View,null):null,null!==Ke?!Ke.exams.length>0?u.default.createElement(c.TouchableOpacity,{style:[q.iconNavigationButton,{borderRadius:5,width:110,height:30,flexDirection:"row",backgroundColor:y.Color.primaryColor,borderColor:y.Color.primaryColor}],onPress:function(t){Ke.exams.filter(function(t){return t.checked}).length>0?(0,U.displayToast)("Vous avez deja renseigner les examens"):wt(!0)}},u.default.createElement(P.default,{whiteColor:!0},C.default.t('MEDICAMENT')),u.default.createElement(G.default,{name:"drug-pack",size:20,color:y.Color.whiteColor})):u.default.createElement(c.View,null):null)))}];return u.default.createElement(w.ScreenComponent,null,u.default.createElement(S.default,{ref:function(t){return Bt=t}}),u.default.createElement(c.KeyboardAvoidingView,{behavior:'android'===c.Platform.OS?'height':'padding',style:{flex:1}},u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:q.contain},u.default.createElement(V.default,{steps:Jt,currentStepIndex:Fe+1}),u.default.createElement(c.View,{style:{flexDirection:'column',alignItems:'center'}},u.default.createElement(v.default,{ref:Oe,activeStep:0,steps:Jt,useNativeDriver:!0,nextStepAnimation:"slideLeft",prevStepAnimation:"slideRight",isFirstStep:function(t){return Be(t)},isLastStep:function(t){return Le(t)},onNext:function(){Xt()},onPrev:function(){0===Fe&&Nt((0,_.fetchGetUserByNameOrNumberReset)())},currentStep:function(t){var l=t.currentStep,o=t.isLastStep,n=t.isFirstStep;Ge(l),Be(n),Le(o)}})),u.default.createElement(c.View,{style:q.iconNavigation},Ne?u.default.createElement(c.View,null):u.default.createElement(c.TouchableOpacity,{style:[q.iconNavigationButton,{backgroundColor:y.Color.primaryColor,borderColor:y.Color.primaryColor}],onPress:function(){return Oe.current.prev()}},u.default.createElement(O.default,{name:"arrow-left",size:20,color:y.Color.whiteColor})),2===Fe?u.default.createElement(h.default,{loading:W.loading,onPress:zt},C.default.t('SUBMIT_LABEL')):u.default.createElement(c.TouchableOpacity,{style:[q.iconNavigationButton,{backgroundColor:y.Color.primaryColor,borderColor:y.Color.primaryColor}],onPress:function(t){zt(t),Xt()&&Oe.current.next()}},K.loading||X.loading||Q.loading?u.default.createElement(c.ActivityIndicator,{size:"small",color:"#fff"}):u.default.createElement(O.default,{name:"arrow-right",size:24,color:y.Color.whiteColor}))),nt&&u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(k.default,{isVisible:nt,onSwipeComplete:function(){it(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(P.default,{body2:!0,style:{marginTop:10}},C.default.t('EXAMEN')),u.default.createElement(c.FlatList,{data:Ke.exams,extraData:Ke.exams,keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(c.TouchableOpacity,{style:[q.contentActionModalBottom,{borderBottomColor:y.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){ve(H({},l,{examen:!0})),qe(H({},Ke,{exams:Ke.exams.map(function(t){return l.id===t.id?H({},t,{checked:!l.checked}):t})})),l.checked||st(!0)}},u.default.createElement(P.default,{body2:!0,semibold:!0,numberOfLines:2},l.quantity+" "+l.description+" "+(l.unit_price?' - '+l.unit_price:'')+" \n "+l.act.name),l.checked&&u.default.createElement(O.default,{name:"check",size:14,color:y.Color.primaryColor}))}}),u.default.createElement(h.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return it(!1)}},C.default.t('OK')))))),le&&u.default.createElement(f.default.Container,{contentStyle:{width:(0,b.responsiveWidth)(80)},useNativeDriver:!0,visible:le},u.default.createElement(f.default.Title,null,C.default.t('SCAN')),u.default.createElement(c.ScrollView,{style:[q.blockView,{borderBottomColor:y.Color.borderColor,maxHeight:300}]},u.default.createElement(P.default,null,C.default.t('BRING_YOUR_CAMERA_CLOSER_TO_SCAN_QR_CODE')),u.default.createElement(L.default,{onRead:function(t){ae(!1),console.log("result",t.data)},flashMode:M.RNCamera.Constants.FlashMode.off})),u.default.createElement(f.default.Button,{bold:!0,label:C.default.t('CLOSE'),onPress:function(){ae(!1)}})),pt&&u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(k.default,{isVisible:pt,onSwipeComplete:function(){Et(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(P.default,{body2:!0,style:{marginTop:10}},C.default.t('LIST_ASSURE')),u.default.createElement(c.FlatList,{data:null==(Ut=K.result)?void 0:Ut.response,extraData:null==(Ft=K.result)?void 0:Ft.response,ListEmptyComponent:u.default.createElement(P.default,{body2:!0},C.default.t('NO_ASSURE_MATCH_SEARCH')),keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(c.View,{style:{paddingVertical:15,alignItems:'flex-start'}},u.default.createElement(c.TouchableOpacity,{style:[q.contentActionModalBottom,{borderBottomColor:y.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){'PAID'!==l.state?c.Alert.alert(C.default.t('ERROR_LABEL'),C.default.t('ASSURE_NON_EN_REGLE'),[{text:C.default.t('OK'),onPress:function(){}}]):(he(l),Se(null),Dt(1),Et(!1),Kt('lastname_patient',l.user.lastname),Kt('firstname_patient',l.user.firstname),R(l.user.id,'UNTREATED','EXECUTION',"&network_agent_id="+oe.network_agent_id))}},u.default.createElement(P.default,{body2:!0,semibold:!0},l.user.firstname+" "+l.user.lastname)),l.beneficiaries.map(function(t){return u.default.createElement(c.TouchableOpacity,{style:q.beneficiarySubSection,onPress:function(){he(l),Se(t),Dt(0),Et(!1),Kt('lastname_patient',t.lastname),Kt('firstname_patient',t.firstname),R(l.user.id,'UNTREATED','EXECUTION',"&beneficiary_id="+t.id+"&network_agent_id="+oe.network_agent_id)}},u.default.createElement(c.View,{style:{width:10}}),u.default.createElement(c.View,{style:{paddingHorizontal:10,alignItems:'flex-start'}},u.default.createElement(P.default,{subhead:!0,semibold:!0},t.firstname+" "+t.lastname+" ("+C.default.t('AYANT_DROITS')+")")))}))}}),u.default.createElement(h.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return Et(!1)}},C.default.t('OK')))))),Ct&&u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(k.default,{isVisible:Ct,onSwipeComplete:function(){wt(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(P.default,{body2:!0,style:{marginTop:10}},C.default.t('MEDICAMENTS')),u.default.createElement(c.FlatList,{data:Ke.prescriptions,extraData:Ke.prescriptions,keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(c.TouchableOpacity,{style:[q.contentActionModalBottom,{borderBottomColor:y.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){ve(H({},l,{drugs:!0})),qe(H({},Ke,{prescriptions:Ke.prescriptions.map(function(t){return l.id===t.id?H({},t,{checked:!l.checked}):t})})),l.checked||st(!0)}},u.default.createElement(P.default,{body2:!0,semibold:!0,numberOfLines:2},l.quantity+" "+l.drug_or_device.name+" "+(l.unit_price?' - '+l.unit_price:'')+" \n "+l.dosage),l.checked&&u.default.createElement(O.default,{name:"check",size:14,color:y.Color.primaryColor}))}}),u.default.createElement(h.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return wt(!1)}},C.default.t('OK')))))),He&&u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(k.default,{isVisible:He,onSwipeComplete:function(){Ye(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(P.default,{body2:!0,style:{marginTop:10}},C.default.t('LIST_EXECUTION')),u.default.createElement(c.FlatList,{data:null==(Lt=Q.result)?void 0:Lt.response,extraData:null==(Mt=Q.result)?void 0:Mt.response,ListEmptyComponent:u.default.createElement(P.default,{body2:!0},C.default.t('NO_EXECUTION')),keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(c.TouchableOpacity,{style:[q.contentActionModalBottom,{borderBottomColor:y.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){at(l),$e(!0)}},u.default.createElement(P.default,{body2:!0,semibold:!0},l.type+" #"+l.health_care_sheet_id+" - "+Y(l.created_at).format('YYYY-MM-DD')))}}),u.default.createElement(h.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return Ye(!1)}},C.default.t('OK')))))),Ze&&u.default.createElement(f.default.Container,{useNativeDriver:!0,visible:Ze},u.default.createElement(f.default.Title,null,C.default.t('DETAIL')),u.default.createElement(c.ScrollView,{persistentScrollbar:!0},u.default.createElement(c.View,{style:[q.blockView,{borderBottomColor:y.Color.borderColor}]},u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(P.default,{style:[q.body2]},C.default.t('PATIENT'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(P.default,{style:[j.Typography.caption1,y.Color.grayColor]},lt.patient_lastname+" "+lt.patient_firstname))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(P.default,{style:[q.body2]},"Situation")),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(P.default,{style:[j.Typography.caption1,y.Color.grayColor]},lt.patient_situation.toLowerCase()))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(P.default,{style:[q.body2]},C.default.t('PRATICIEN'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(P.default,{style:[j.Typography.caption1,y.Color.grayColor]},lt.practitioner_lastname+" "+lt.practitioner_firstname))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(P.default,{style:[q.body2]},C.default.t('CLASSE_PRESTATAIRE'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(P.default,{style:[j.Typography.caption1,y.Color.grayColor]},(0,U.uppercaseFirstLetter)(lt.practitioner_provider_class.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(P.default,{style:[q.body2]},C.default.t('STATE'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(P.default,{style:[j.Typography.caption1,y.Color.grayColor]},(0,U.uppercaseFirstLetter)(lt.state.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(P.default,{style:[q.body2]},"Type")),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(P.default,{style:[j.Typography.caption1,y.Color.grayColor]},(0,U.uppercaseFirstLetter)(lt.type.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(P.default,{style:[q.body2]},C.default.t('CONDITION_PRISE_CHARGE'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(P.default,{style:[j.Typography.caption1,y.Color.grayColor]},(0,U.uppercaseFirstLetter)(lt.care_condition.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(P.default,{style:[q.body2]},C.default.t('INSTITUTE_NAME'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(P.default,{style:[j.Typography.caption1,y.Color.grayColor]},(0,U.uppercaseFirstLetter)(lt.institution_name.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(P.default,{style:[q.body2]},"Date")),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(P.default,{style:[j.Typography.caption1,y.Color.grayColor]},Y(lt.created_at).format('YYYY-MM-DD')))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(P.default,{style:[q.body2]},C.default.t('PRESTATION'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},lt.performances.map(function(t){return u.default.createElement(P.default,{style:[j.Typography.caption1,y.Color.grayColor]},t.act.name+" \n "+t.amount+" \n")}))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(P.default,{style:[q.body2]},C.default.t('EXAMEN'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},lt.exams.map(function(t){return u.default.createElement(P.default,{style:[j.Typography.caption1,y.Color.grayColor]},t.description+" \n "+t.act.name+" \n")}))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(P.default,{style:[q.body2]},C.default.t('MEDICAMENT'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},lt.prescriptions.map(function(t){return u.default.createElement(P.default,{style:[j.Typography.caption1,y.Color.grayColor]},t.drug_or_device.name+" \n "+t.dosage+" \n")}))))),u.default.createElement(f.default.Button,{bold:!0,label:C.default.t('CANCEL_LABEL'),onPress:function(){$e(!1)}}),u.default.createElement(f.default.Button,{bold:!0,label:C.default.t('OK'),onPress:function(){$e(!1),Et(!1),Ye(!1),qe(lt),Kt('practitioner_firstname',lt.practitioner_firstname),Kt('practitioner_lastname',lt.practitioner_lastname),Oe.current.next()}})),ct&&u.default.createElement(p.Formik,{validationSchema:kt,initialValues:{price:Ve.unit_price},onSubmit:function(t){console.log("Value",Ve),Ve.examen?qe(H({},Ke,{exams:Ke.exams.map(function(l){return Ve.id===l.id?H({},l,{unit_price:t.price}):l})})):qe(H({},Ke,{prescriptions:Ke.prescriptions.map(function(l){return Ve.id===l.id?H({},l,{unit_price:t.price}):l})})),st(!1)}},function(t){var l=t.values,o=t.errors,n=t.touched,s=t.handleChange,f=(t.setFieldValue,t.setFieldTouched,t.handleBlur),p=t.handleSubmit;return t.isSubmitting,u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(k.default,{isVisible:ct,onSwipeComplete:function(){st(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(P.default,{body2:!0,style:{marginTop:10}},C.default.t('AMOUNT_LABEL')),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('AMOUNT_LABEL_DESCRIPTION'),value:l.price,onChangeText:s('price'),onBlur:f('price'),success:n.price&&!o.price,touched:n.price,error:o.price,keyboardType:"numeric"}),u.default.createElement(h.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:p},C.default.t('OK'))))))})))))});e.default=J},2202,[4,1,7,27,15,18,1046,1639,1827,1950,1031,719,2147,2162,534,1779,2164,718,2158,2180,2182,2186,2187,1013,538,2157,771,749,979,1823,2188,2194,1658,1107,1032,1079,1189]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),l=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=l(r(d[2])),o=t(r(d[3])),f=r(d[4]),u=l(r(d[5])),c=r(d[6]),s=r(d[7]),y=l(r(d[8])),E=r(d[9]),p=r(d[10]),w=l(r(d[11])),C=r(d[12]),x=r(d[13]),T=r(d[14]),V=l(r(d[15])),b=t(r(d[16])),h=l(r(d[17])),_=r(d[18]),I=l(r(d[19])),D=l(r(d[20])),A=l(r(d[21])),R=r(d[22]),L=f.Dimensions.get('window'),S=(L.width,L.height,(0,C.createStructuredSelector)({subscriptionList:x.selectSubscriptionList,activatePaySubscription:x.selectActivatePaySubscription,getConsultation:x.selectGetConsultation,acceptRefuseConsultation:x.selectAcceptRefuseConsultation})),O=(0,c.connect)(S,{fetchActivePaySubscription:p.fetchActivePaySubscription,fetchGetConsultation:p.fetchGetConsultation,fetchAcceptRejectConsultation:p.fetchAcceptRejectConsultation,fetchGetSubscription:p.fetchGetSubscription,fetchGetDemandeAutorisationSoin:p.fetchGetDemandeAutorisationSoin})(function(t){t.navigation;var l=t.fetchGetConsultation,C=t.fetchGetSubscription,x=t.fetchGetDemandeAutorisationSoin,L=(t.fetchAcceptRejectConsultation,t.acceptRefuseConsultation,t.getConsultation),S=(0,c.useDispatch)(),O=(0,o.useState)(null),P=(0,n.default)(O,2),v=P[0],B=P[1],M=(0,o.useState)(!1),G=(0,n.default)(M,2),U=G[0],Y=G[1],k=(0,o.useState)({}),F=(0,n.default)(k,2),W=F[0],j=F[1],z=(0,o.useState)(1),H=(0,n.default)(z,2),K=H[0],q=H[1],X=(0,o.useState)(!1),J=(0,n.default)(X,2),Q=J[0],Z=J[1],$=(0,o.useState)([]),ee=(0,n.default)($,2),te=ee[0],le=ee[1],ae=null;var re,ne;re=(0,o.useState)(0),(ne=(0,n.default)(re,2))[0],ne[1];(0,o.useEffect)(function(){S((0,p.fetchGetConsultationReset)()),S((0,p.fetchAcceptRejectConsultationReset)()),(0,T.readUser)().then(function(t){B(t),console.log("User",t),l(t.id,'ALL','','&pagination=true&page=1')})},[]),(0,o.useEffect)(function(){null!==L.result&&(K0?pt(!0):Bt.alertWithType('warn',C.default.t('EMPTY_LIST'),C.default.t('NO_ASSURE_MATCH_SEARCH'))),K.error&&c.Alert.alert(C.default.t("ERROR_LABLE"),U.getErrorMsg(K),[{text:C.default.t("OK"),onPress:function(){Nt((0,_.fetchGetUserByNameOrNumberReset)())}}],{cancelable:!1})},[K]),(0,u.useEffect)(function(){null!==Q.result&&He(!0),Q.error&&c.Alert.alert(C.default.t("ERROR_LABLE"),U.getErrorMsg(Q),[{text:C.default.t("OK"),onPress:function(){Nt((0,_.fetchGetConsultationReset)())}}],{cancelable:!1})},[Q]),(0,u.useEffect)(function(){null!==J.result&&c.Alert.alert(C.default.t("SUCCESS"),J.result.response,[{text:C.default.t("OK"),onPress:function(){Nt((0,_.fetchExecutionPrescriptionReset)()),Z.goBack()}}],{cancelable:!1}),J.error&&c.Alert.alert(C.default.t("ERROR_LABLE"),U.getErrorMsg(J),[{text:C.default.t("OK"),onPress:function(){Nt((0,_.fetchExecutionPrescriptionReset)())}}],{cancelable:!1})},[J]);var Pt=E.object().shape({numero_assure:E.string().required(C.default.t('THIS_FIELD_IS_REQUIRED')),password:E.string().required(C.default.t('THIS_FIELD_IS_REQUIRED')),practitioner_lastname:E.string().required(C.default.t('THIS_FIELD_IS_REQUIRED')),practitioner_firstname:E.string().required(C.default.t('THIS_FIELD_IS_REQUIRED'))}),At=E.object().shape({price:E.number().required(C.default.t('THIS_FIELD_IS_REQUIRED'))});console.log("consultaiton",Ke);var Lt,kt,Mt,Ut,Ft=(0,p.useFormik)({validationSchema:Pt,initialValues:{numero_assure:'',password:'',firstname_patient:'',lastname_patient:'',practitioner_firstname:'',practitioner_lastname:'',agrement_praticien:null==Ee?void 0:Ee.code_membre,pregnancy_start_at:null,pregnancy_end_at:null},onSubmit:function(t){z({health_care_sheet_id:Ke.id,network_agent_id:re.network_agent_id,password:t.password,practitioner_lastname:t.practitioner_lastname,practitioner_firstname:t.practitioner_firstname,practitioner_provider_class_id:t.practitioner_provider_class_id,prescriptions:Ke.prescriptions.filter(function(t){return t.checked}).map(function(t){return{id:t.id,unit_price:t.unit_price}}),exams:Ke.exams.filter(function(t){return t.checked}).map(function(t){return{id:t.id,unit_price:t.unit_price}})})}}),Gt=Ft.handleChange,jt=Ft.handleSubmit,zt=Ft.handleBlur,Ht=Ft.values,Yt=Ft.errors,Qt=Ft.touched,Kt=Ft.setFieldValue,Wt=Ft.setFieldTouched,qt=(Ft.isValid,function(){switch(console.log("currentStep",Ue),Ue){case 0:return console.log("values",Ht),Nt((0,_.fetchGetUserByNameOrNumberReset)()),''!==Ht.numero_assure&&null===K.result&&(n(re.id_network,ie?"&insured_id="+Ht.numero_assure:se?"&phone="+Ht.numero_assure:"&name="+Ht.numero_assure),console.log("errors",Yt)),!1;default:return!0}}),Xt=[{title:C.default.t('ASSURE'),content:u.default.createElement(c.View,null,u.default.createElement(x.default,{style:{marginTop:10},placeholder:ie?C.default.t('NUMERO_ASSURE'):se?C.default.t('PHONE_NUMBER'):C.default.t('NOM_ASSURE'),value:Ht.numero_assure,keyboardType:se?'numeric':'default',onChangeText:Gt('numero_assure'),onBlur:zt('numero_assure'),success:Qt.numero_assure&&!Yt.numero_assure,touched:Qt.numero_assure,error:Yt.numero_assure,icon:u.default.createElement(D.default,{style:{zIndex:10},name:ie?'lock':se?'phone':'user',size:20})}),u.default.createElement(c.View,{style:{flexDirection:'row',position:'absolute',top:22,right:50,justifyContent:'space-between',width:50}},u.default.createElement(v.default,{style:{paddingRight:5},name:"lock",size:20,color:y.Color.primaryColor,onPress:function(){ue(!0),fe(!1)}}),u.default.createElement(v.default,{style:{paddingRight:5},name:"phone",size:20,color:y.Color.primaryColor,onPress:function(){ue(!1),fe(!0)}}),u.default.createElement(v.default,{style:{paddingRight:5},name:"user",size:20,color:y.Color.primaryColor,onPress:function(){ue(!1),fe(!1)}}),u.default.createElement(v.default,{style:{paddingRight:5},name:"qrcode",size:20,color:y.Color.primaryColor,onPress:function(){le(!0)}})))},{title:C.default.t('PATIENT'),content:u.default.createElement(c.View,null,u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('NOM_CLIENT'),value:Ht.lastname_patient,onChangeText:Gt('lastname_patient'),onBlur:zt('lastname_patient'),success:Qt.lastname_patient&&!Yt.lastname_patient,touched:Qt.lastname_patient,editable:!1,error:Yt.lastname_patient}),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('PRENOM_CLIENT'),value:Ht.firstname_patient,editable:!1,onChangeText:Gt('firstname_patient'),onBlur:zt('firstname_patient'),success:Qt.firstname_patient&&!Yt.firstname_patient,touched:Qt.firstname_patient,error:Yt.firstname_patient}),u.default.createElement(c.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(N.default,{body2:!0},C.default.t('SITUATION')),u.default.createElement(c.View,{style:{width:(0,b.responsiveWidth)(60)}},u.default.createElement(B.default,{options:It,disabled:!0,value:Ot,initial:Ot,buttonColor:y.Color.accentColor,backgroundColor:y.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){}}))))},{title:C.default.t('PRATICIEN'),content:u.default.createElement(c.View,null,u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('CODE_AGREMENT'),value:Ht.agrement_praticien,editable:!1}),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('NOM_PRATICIEN'),value:Ht.practitioner_lastname,onChangeText:Gt('practitioner_lastname'),onBlur:zt('practitioner_lastname'),success:Qt.practitioner_lastname&&!Yt.practitioner_lastname,touched:Qt.practitioner_lastname,error:Yt.practitioner_lastname}),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('PRENOM_PRATICIEN'),value:Ht.practitioner_firstname,onChangeText:Gt('practitioner_firstname'),onBlur:zt('practitioner_firstname'),success:Qt.practitioner_firstname&&!Yt.practitioner_firstname,touched:Qt.practitioner_firstname,error:Yt.practitioner_firstname}),u.default.createElement(P.View,{ref:function(t){},style:{width:(0,b.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},u.default.createElement(A.Dropdown,{label:C.default.t('CLASSIFICATION'),data:null!==X.result?null==(l=X.result)?void 0:l.response:[],useNativeDriver:!0,onChangeText:function(t,l,n){Wt('practitioner_provider_class_id'),Kt('practitioner_provider_class_id',t.id),console.log("Value",t)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('PASSWORD'),value:Ht.password,onChangeText:Gt('password'),onBlur:zt('password'),success:Qt.password&&!Yt.password,touched:Qt.password,error:Yt.password,secureTextEntry:!0}),u.default.createElement(c.View,{style:{marginTop:25}},u.default.createElement(c.View,{style:{flexDirection:'row',alignItems:'center',justifyContent:'space-between'}},null!==Ke?!Ke.prescriptions.filter(function(t){return t.checked}).length>0?u.default.createElement(c.TouchableOpacity,{style:[q.iconNavigationButton,{borderRadius:5,width:100,height:30,flexDirection:"row",backgroundColor:y.Color.primaryColor,borderColor:y.Color.primaryColor}],onPress:function(t){Ke.prescriptions.filter(function(t){return t.checked}).length>0?(0,U.displayToast)("Vous avez deja renseigner les m\xe9dicaments"):ot(!0)}},u.default.createElement(N.default,{whiteColor:!0},C.default.t('EXAMEN')),u.default.createElement(v.default,{name:"file-medical",size:20,color:y.Color.whiteColor})):u.default.createElement(c.View,null):null,null!==Ke?!Ke.exams.filter(function(t){return t.checked}).length>0?u.default.createElement(c.TouchableOpacity,{style:[q.iconNavigationButton,{borderRadius:5,width:110,height:30,flexDirection:"row",backgroundColor:y.Color.primaryColor,borderColor:y.Color.primaryColor}],onPress:function(t){Ke.exams.filter(function(t){return t.checked}).length>0?(0,U.displayToast)("Vous avez deja renseigner les examens"):Ct(!0)}},u.default.createElement(N.default,{whiteColor:!0},C.default.t('MEDICAMENT')),u.default.createElement(G.default,{name:"drug-pack",size:20,color:y.Color.whiteColor})):u.default.createElement(c.View,null):null)))}];return u.default.createElement(h.ScreenComponent,null,u.default.createElement(S.default,{ref:function(t){return Bt=t}}),u.default.createElement(c.KeyboardAvoidingView,{behavior:'android'===c.Platform.OS?'height':'padding',style:{flex:1}},u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:q.contain},u.default.createElement(R.default,{steps:Xt,currentStepIndex:Ue+1}),u.default.createElement(c.View,{style:{flexDirection:'column',alignItems:'center'}},u.default.createElement(O.default,{ref:Oe,activeStep:0,steps:Xt,useNativeDriver:!0,nextStepAnimation:"slideLeft",prevStepAnimation:"slideRight",isFirstStep:function(t){return Be(t)},isLastStep:function(t){return Le(t)},onNext:function(){qt()},onPrev:function(){0===Ue&&Nt((0,_.fetchGetUserByNameOrNumberReset)())},currentStep:function(t){var l=t.currentStep,n=t.isLastStep,o=t.isFirstStep;Fe(l),Be(o),Le(n)}})),u.default.createElement(c.View,{style:q.iconNavigation},Ne?u.default.createElement(c.View,null):u.default.createElement(c.TouchableOpacity,{style:[q.iconNavigationButton,{backgroundColor:y.Color.primaryColor,borderColor:y.Color.primaryColor}],onPress:function(){return Oe.current.prev()}},u.default.createElement(v.default,{name:"arrow-left",size:20,color:y.Color.whiteColor})),2===Ue?u.default.createElement(w.default,{loading:J.loading,onPress:jt},C.default.t('SUBMIT_LABEL')):u.default.createElement(c.TouchableOpacity,{style:[q.iconNavigationButton,{backgroundColor:y.Color.primaryColor,borderColor:y.Color.primaryColor}],onPress:function(t){jt(t),qt()&&Oe.current.next()}},K.loading||W.loading||Q.loading?u.default.createElement(c.ActivityIndicator,{size:"small",color:"#fff"}):u.default.createElement(v.default,{name:"arrow-right",size:24,color:y.Color.whiteColor}))),nt&&u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(L.default,{isVisible:nt,onSwipeComplete:function(){ot(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(N.default,{body2:!0,style:{marginTop:10}},C.default.t('EXAMEN')),u.default.createElement(c.FlatList,{data:Ke.exams,extraData:Ke.exams,keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(c.TouchableOpacity,{style:[q.contentActionModalBottom,{borderBottomColor:y.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){Re(H({},l,{examen:!0})),We(H({},Ke,{exams:Ke.exams.map(function(t){return l.id===t.id?H({},t,{checked:!l.checked}):t})})),l.checked||ct(!0)}},u.default.createElement(N.default,{body2:!0,semibold:!0,numberOfLines:2},l.quantity+" "+l.description+" "+(l.unit_price?' - '+l.unit_price:'')+" \n "+l.act.name),l.checked&&u.default.createElement(v.default,{name:"check",size:14,color:y.Color.primaryColor}))}}),u.default.createElement(w.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return ot(!1)}},C.default.t('OK')))))),te&&u.default.createElement(f.default.Container,{contentStyle:{width:(0,b.responsiveWidth)(80)},useNativeDriver:!0,visible:te},u.default.createElement(f.default.Title,null,C.default.t('SCAN')),u.default.createElement(c.ScrollView,{style:[q.blockView,{borderBottomColor:y.Color.borderColor,maxHeight:300}]},u.default.createElement(N.default,null,C.default.t('BRING_YOUR_CAMERA_CLOSER_TO_SCAN_QR_CODE')),u.default.createElement(k.default,{onRead:function(t){le(!1),console.log("result",t.data)},flashMode:M.RNCamera.Constants.FlashMode.off})),u.default.createElement(f.default.Button,{bold:!0,label:C.default.t('CLOSE'),onPress:function(){le(!1)}})),mt&&u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(L.default,{isVisible:mt,onSwipeComplete:function(){pt(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(N.default,{body2:!0,style:{marginTop:10}},C.default.t('LIST_ASSURE')),u.default.createElement(c.FlatList,{data:null==(Mt=K.result)?void 0:Mt.response,extraData:null==(Ut=K.result)?void 0:Ut.response,ListEmptyComponent:u.default.createElement(N.default,{body2:!0},C.default.t('NO_ASSURE_MATCH_SEARCH')),keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(c.View,{style:{paddingVertical:15,alignItems:'flex-start'}},u.default.createElement(c.TouchableOpacity,{style:[q.contentActionModalBottom,{borderBottomColor:y.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){'PAID'!==l.state?c.Alert.alert(C.default.t('ERROR_LABEL'),C.default.t('ASSURE_NON_EN_REGLE'),[{text:C.default.t('OK'),onPress:function(){}}]):(he(l),_e(null),vt(1),pt(!1),Kt('lastname_patient',l.user.lastname),Kt('firstname_patient',l.user.firstname),V(l.user.id,'TO_BILL','CONSULTATION'))}},u.default.createElement(N.default,{body2:!0,semibold:!0},(null!==l.user.firstname?l.user.firstname:'')+" "+(null!==l.user.lastname?l.user.lastname:''))),l.beneficiaries.map(function(t){return u.default.createElement(c.TouchableOpacity,{style:q.beneficiarySubSection,onPress:function(){he(l),_e(t),vt(0),pt(!1),Kt('lastname_patient',t.lastname),Kt('firstname_patient',t.firstname),V(l.user.id,'TO_BILL','CONSULTATION',"&beneficiary_id="+t.id)}},u.default.createElement(c.View,{style:{width:10}}),u.default.createElement(c.View,{style:{paddingHorizontal:10,alignItems:'flex-start'}},u.default.createElement(N.default,{subhead:!0,semibold:!0},(null!==t.firstname?t.firstname:'')+" "+(null!==t.lastname?t.lastname:'')+" ("+C.default.t('AYANT_DROITS')+")")))}))}}),u.default.createElement(w.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return pt(!1)}},C.default.t('OK')))))),gt&&u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(L.default,{isVisible:gt,onSwipeComplete:function(){Ct(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(N.default,{body2:!0,style:{marginTop:10}},C.default.t('MEDICAMENTS')),u.default.createElement(c.FlatList,{data:Ke.prescriptions,extraData:Ke.prescriptions,keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(c.TouchableOpacity,{style:[q.contentActionModalBottom,{borderBottomColor:y.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){Re(H({},l,{drugs:!0})),We(H({},Ke,{prescriptions:Ke.prescriptions.map(function(t){return l.id===t.id?H({},t,{checked:!l.checked}):t})})),l.checked||ct(!0)}},u.default.createElement(N.default,{body2:!0,semibold:!0,numberOfLines:2},l.quantity+" "+l.drug_or_device.name+" "+(l.unit_price?' - '+l.unit_price:'')+" \n "+l.dosage),l.checked&&u.default.createElement(v.default,{name:"check",size:14,color:y.Color.primaryColor}))}}),u.default.createElement(w.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return Ct(!1)}},C.default.t('OK')))))),ze&&u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(L.default,{isVisible:ze,onSwipeComplete:function(){He(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(N.default,{body2:!0,style:{marginTop:10}},C.default.t('LIST_CONSULTATION')),u.default.createElement(c.FlatList,{data:null==(Lt=Q.result)?void 0:Lt.response,extraData:null==(kt=Q.result)?void 0:kt.response,ListEmptyComponent:u.default.createElement(N.default,{body2:!0},C.default.t('NO_CONSULTATION')),keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(c.TouchableOpacity,{style:[q.contentActionModalBottom,{borderBottomColor:y.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){lt(l),Ze(!0)}},u.default.createElement(N.default,{body2:!0,semibold:!0},l.type+" #"+l.health_care_sheet_id+" - "+Y(l.created_at).format('YYYY-MM-DD')))}}),u.default.createElement(w.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return He(!1)}},C.default.t('OK')))))),Je&&u.default.createElement(f.default.Container,{useNativeDriver:!0,visible:Je},u.default.createElement(f.default.Title,null,C.default.t('DETAIL')),u.default.createElement(c.ScrollView,{persistentScrollbar:!0},u.default.createElement(c.View,{style:[q.blockView,{borderBottomColor:y.Color.borderColor}]},u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('PATIENT'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,y.Color.grayColor]},tt.patient_lastname+" "+tt.patient_firstname))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},"Situation")),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,y.Color.grayColor]},tt.patient_situation.toLowerCase()))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('PRATICIEN'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,y.Color.grayColor]},tt.practitioner_lastname+" "+tt.practitioner_firstname))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('CLASSE_PRESTATAIRE'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,y.Color.grayColor]},(0,U.uppercaseFirstLetter)(tt.practitioner_provider_class.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('STATE'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,y.Color.grayColor]},(0,U.uppercaseFirstLetter)(tt.state.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},"Type")),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,y.Color.grayColor]},(0,U.uppercaseFirstLetter)(tt.type.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('CONDITION_PRISE_CHARGE'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,y.Color.grayColor]},(0,U.uppercaseFirstLetter)(tt.care_condition.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('INSTITUTE_NAME'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,y.Color.grayColor]},(0,U.uppercaseFirstLetter)(tt.institution_name.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},"Date")),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(N.default,{style:[j.Typography.caption1,y.Color.grayColor]},Y(tt.created_at).format('YYYY-MM-DD')))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('PRESTATION'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},tt.performances.map(function(t){return u.default.createElement(N.default,{style:[j.Typography.caption1,y.Color.grayColor]},t.act.name+" \n "+t.amount+" \n")}))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('EXAMEN'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},tt.exams.map(function(t){return u.default.createElement(N.default,{style:[j.Typography.caption1,y.Color.grayColor]},t.description+" \n "+t.act.name+" \n")}))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(N.default,{style:[q.body2]},C.default.t('MEDICAMENT'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},tt.prescriptions.map(function(t){return u.default.createElement(N.default,{style:[j.Typography.caption1,y.Color.grayColor]},t.drug_or_device.name+" \n "+t.dosage+" \n")}))))),u.default.createElement(f.default.Button,{bold:!0,label:C.default.t('CANCEL_LABEL'),onPress:function(){Ze(!1)}}),u.default.createElement(f.default.Button,{bold:!0,label:C.default.t('OK'),onPress:function(){Ze(!1),pt(!1),He(!1),We(tt),Oe.current.next()}})),dt&&u.default.createElement(p.Formik,{validationSchema:At,initialValues:{price:''},onSubmit:function(t){console.log("Value",Ve),Ve.examen?We(H({},Ke,{exams:Ke.exams.map(function(l){return Ve.id===l.id?H({},l,{unit_price:t.price}):l})})):We(H({},Ke,{prescriptions:Ke.prescriptions.map(function(l){return Ve.id===l.id?H({},l,{unit_price:t.price}):l})})),ct(!1)}},function(t){var l=t.values,n=t.errors,o=t.touched,s=t.handleChange,f=(t.setFieldValue,t.setFieldTouched,t.handleBlur),p=t.handleSubmit;return t.isSubmitting,u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(L.default,{isVisible:dt,onSwipeComplete:function(){ct(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(N.default,{body2:!0,style:{marginTop:10}},C.default.t('AMOUNT_LABEL')),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('AMOUNT_LABEL_DESCRIPTION'),value:l.price,onChangeText:s('price'),onBlur:f('price'),success:o.price&&!n.price,touched:o.price,error:n.price,keyboardType:"numeric"}),u.default.createElement(w.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:p},C.default.t('OK'))))))})))))});e.default=J},2200,[4,1,7,27,15,18,1046,1639,1827,1950,1031,719,2147,2162,534,1779,2164,718,2158,2180,2182,2186,2187,1013,538,2157,771,749,979,1823,2188,2194,1658,1107,1032,1079,1189]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),l=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=l(r(d[2])),o=l(r(d[3])),u=l(r(d[4])),c=t(r(d[5])),s=r(d[6]),f=r(d[7]),p=l(r(d[8])),E=l(r(d[9])),_=r(d[10]),y=t(r(d[11])),C=r(d[12]),h=l(r(d[13])),w=r(d[14]),b=l(r(d[15])),S=r(d[16]),T=r(d[17]),I=l(r(d[18])),D=r(d[19]),x=l(r(d[20])),R=r(d[21]),v=l(r(d[22])),O=l(r(d[23])),V=l(r(d[24])),A=l(r(d[25])),N=l(r(d[26])),B=l(r(d[27])),M=t(r(d[28])),P=r(d[29]),k=l(r(d[30])),L=l(r(d[31])),U=r(d[32]),F=t(r(d[33])),Y=r(d[34]),q=r(d[35]),G=l(r(d[36])),H=r(d[37]),j=l(r(d[38])),Q=l(r(d[39]));function z(t,l){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);l&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),n.push.apply(n,o)}return n}function K(t){for(var l=1;l0?ha(!0):Sl.alertWithType('warn',h.default.t('EMPTY_LIST'),h.default.t('NO_ASSURE_MATCH_SEARCH'))),ee.error&&s.Alert.alert(h.default.t("ERROR_LABLE"),F.getErrorMsg(ee),[{text:h.default.t("OK"),onPress:function(){bl((0,T.fetchGetUserByNameOrNumberReset)())}}],{cancelable:!1})},[ee]),(0,c.useEffect)(function(){null!==J.result&&Qt(!0),J.error&&s.Alert.alert(h.default.t("ERROR_LABLE"),F.getErrorMsg(J),[{text:h.default.t("OK"),onPress:function(){bl((0,T.fetchGetConsultationReset)())}}],{cancelable:!1})},[J]),(0,c.useEffect)(function(){null!==ie.result&&s.Alert.alert(h.default.t("SUCCESS"),ie.result.response,[{text:h.default.t("OK"),onPress:function(){bl((0,T.fetchModifyPrescriptionReset)()),ue.goBack()}}],{cancelable:!1}),ie.error&&s.Alert.alert(h.default.t("ERROR_LABLE"),F.getErrorMsg(ie),[{text:h.default.t("OK"),onPress:function(){bl((0,T.fetchModifyPrescriptionReset)())}}],{cancelable:!1})},[ie]);var Il=y.object().shape({numero_assure:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),password:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),practitioner_lastname:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),practitioner_firstname:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),Dl=y.object().shape({price:y.number().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),xl=y.object().shape({amount_prestation:y.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),code_acte:y.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),frais_deplacement:y.number(),date_prestation:y.date(),ticker_moderateur:y.number()}),Rl=y.object().shape({amount_prestation:y.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),date_prestation:y.date()}),vl=(y.object().shape({examen_name:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),code_acte:y.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),examen_quantite:y.number().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),y.object().shape({examen_name:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),examen_quantite:y.number().required(h.default.t('THIS_FIELD_IS_REQUIRED'))})),Ol=y.object().shape({drug_name:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),drug_quantity:y.number().required(h.default.t('THIS_FIELD_IS_REQUIRED')),drug_posologie:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),Vl=(y.object().shape({code:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),name:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),type:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),function(t,l){var n=l||new Date;ge('ios'===s.Platform.OS),he(W(n).format('YYYY-MM-DD')),Ql('accident_date',W(n).format('YYYY-MM-DD'))}),Al=function(t,l){var n=l||new Date;nt('ios'===s.Platform.OS),Qe(W(n).format('YYYY-MM-DD')),Ql('pregnancy_start_at',W(n).format('YYYY-MM-DD'))},Nl=function(t,l){var n=l||new Date;ut('ios'===s.Platform.OS),Xe(W(n).format('YYYY-MM-DD')),Ql('pregnancy_end_at',W(n).format('YYYY-MM-DD'))};console.log("consultaiton",Wt);var Bl,Ml,Pl,kl,Ll,Ul=(0,_.useFormik)({validationSchema:Il,initialValues:{numero_assure:'',password:'',firstname_patient:'',lastname_patient:'',practitioner_firstname:'',practitioner_lastname:'',agrement_praticien:null==Et?void 0:Et.code_membre,pregnancy_start_at:null,pregnancy_end_at:null,accident_date:null},onSubmit:function(t){X(Wt.id,{network_agent_id:De.network_agent_id,password:t.password,practitioner_lastname:t.practitioner_lastname,practitioner_firstname:t.practitioner_firstname,practitioner_provider_class_id:t.practitioner_provider_class_id,care_condition:t.care_condition,accident_date:t.accident_date,pregnancy_start_at:t.pregnancy_start_at,pregnancy_end_at:t.pregnancy_end_at,performances:Wt.performances,prescriptions:Wt.prescriptions,exams:Wt.exams})}}),Fl=Ul.handleChange,Yl=Ul.handleSubmit,ql=Ul.handleBlur,Gl=Ul.values,Hl=Ul.errors,jl=Ul.touched,Ql=Ul.setFieldValue,zl=Ul.setFieldTouched,Kl=(Ul.isValid,function(){switch(console.log("currentStep",Yt),Yt){case 0:return console.log("values",Gl),''!==Gl.numero_assure&&null===ee.result&&(bl((0,T.fetchGetUserByNameOrNumberReset)()),o(De.id_network,ve?"&insured_id="+Gl.numero_assure:Ne?"&phone="+Gl.numero_assure:"&name="+Gl.numero_assure),console.log("errors",Hl)),!1;default:return!0}}),Wl=[{title:h.default.t('ASSURE'),content:c.default.createElement(s.View,null,c.default.createElement(x.default,{style:{marginTop:10},placeholder:ve?h.default.t('NUMERO_ASSURE'):Ne?h.default.t('PHONE_NUMBER'):h.default.t('NOM_ASSURE'),value:Gl.numero_assure,keyboardType:Ne?'numeric':'default',onChangeText:Fl('numero_assure'),onBlur:ql('numero_assure'),success:jl.numero_assure&&!Hl.numero_assure,touched:jl.numero_assure,error:Hl.numero_assure,icon:c.default.createElement(A.default,{style:{zIndex:10},name:ve?'lock':Ne?'phone':'user',size:20})}),c.default.createElement(s.View,{style:{flexDirection:'row',position:'absolute',top:22,right:50,justifyContent:'space-between',width:50}},c.default.createElement(V.default,{style:{paddingRight:5},name:"lock",size:20,color:C.Color.primaryColor,onPress:function(){Oe(!0),Be(!1)}}),c.default.createElement(V.default,{style:{paddingRight:5},name:"phone",size:20,color:C.Color.primaryColor,onPress:function(){Oe(!1),Be(!0)}}),c.default.createElement(V.default,{style:{paddingRight:5},name:"user",size:20,color:C.Color.primaryColor,onPress:function(){Oe(!1),Be(!1)}}),c.default.createElement(V.default,{style:{paddingRight:5},name:"qrcode",size:20,color:C.Color.primaryColor,onPress:function(){fe(!0)}})))},{title:h.default.t('PATIENT'),content:c.default.createElement(s.View,null,c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('NOM_CLIENT'),value:Gl.lastname_patient,onChangeText:Fl('lastname_patient'),onBlur:ql('lastname_patient'),success:jl.lastname_patient&&!Hl.lastname_patient,touched:jl.lastname_patient,editable:!1,error:Hl.lastname_patient}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('PRENOM_CLIENT'),value:Gl.firstname_patient,editable:!1,onChangeText:Fl('firstname_patient'),onBlur:ql('firstname_patient'),success:jl.firstname_patient&&!Hl.firstname_patient,touched:jl.firstname_patient,error:Hl.firstname_patient}),c.default.createElement(s.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},c.default.createElement(N.default,{body2:!0},h.default.t('SITUATION')),c.default.createElement(s.View,{style:{width:(0,S.responsiveWidth)(60)}},c.default.createElement(B.default,{options:nl,disabled:!0,value:il,initial:il,buttonColor:C.Color.accentColor,backgroundColor:C.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){}}))))},{title:h.default.t('PRATICIEN'),content:c.default.createElement(s.View,null,c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('CODE_AGREMENT'),value:Gl.agrement_praticien,editable:!1}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('NOM_PRATICIEN'),value:Gl.practitioner_lastname,onChangeText:Fl('practitioner_lastname'),onBlur:ql('practitioner_lastname'),success:jl.practitioner_lastname&&!Hl.practitioner_lastname,touched:jl.practitioner_lastname,error:Hl.practitioner_lastname}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('PRENOM_PRATICIEN'),value:Gl.practitioner_firstname,onChangeText:Fl('practitioner_firstname'),onBlur:ql('practitioner_firstname'),success:jl.practitioner_firstname&&!Hl.practitioner_firstname,touched:jl.practitioner_firstname,error:Hl.practitioner_firstname}),c.default.createElement(M.View,{ref:function(t){},style:{width:(0,S.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},c.default.createElement(P.Dropdown,{label:h.default.t('CLASSIFICATION'),value:null!==la?la.practitioner_provider_class:'',data:null!==ae.result?null==(l=ae.result)?void 0:l.response:[],useNativeDriver:!0,onChangeText:function(t,l,n){zl('practitioner_provider_class_id'),Ql('practitioner_provider_class_id',t.id),console.log("Value",t)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),c.default.createElement(M.View,{ref:function(t){},style:{width:(0,S.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},c.default.createElement(P.Dropdown,{label:h.default.t('CONDITION_PRISE_CHARGE'),value:null!==la?la.care_condition:'',data:hl,useNativeDriver:!0,onChangeText:function(t,l,n){console.log("Value",t),ft(t),zl('care_condition'),Ql('care_condition',t)},valueExtractor:function(t){return t.value},labelExtractor:function(t){return t.label}})),c.default.createElement(s.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},c.default.createElement(N.default,{body2:!0},h.default.t('ACCIDENT')),c.default.createElement(s.View,{style:{width:(0,S.responsiveWidth)(40)}},c.default.createElement(B.default,{options:cl,initial:null!==la&&null!==la.accident_date?0:1,buttonColor:C.Color.accentColor,backgroundColor:C.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){console.log(t),Te('YES'===t)}}))),Se&&c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('DATE_ACCIDENT'),value:null!==Ce?Ce:'',onChangeText:Fl('date_accident'),onBlur:ql('date_accident'),onFocus:function(){Keyboard.dismiss(),ge(!0)},success:jl.date_accident&&!Hl.date_accident,touched:jl.date_accident,error:Hl.date_accident}),c.default.createElement(s.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},c.default.createElement(N.default,{body2:!0},h.default.t('GROSSESSE')),c.default.createElement(s.View,{style:$.contentSwitch},c.default.createElement(B.default,{options:fl,initial:null!==la&&null!==la.pregnancy_start_at?0:1,buttonColor:C.Color.accentColor,backgroundColor:C.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){et('YES'===t)}}))),$e&&c.default.createElement(c.default.Fragment,null,c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('DATE_DEBUT_GROSSESSE'),value:null!==je?je:'',onChangeText:Fl('date_debut_grossesse'),onBlur:ql('date_debut_grossesse'),onFocus:function(){Keyboard.dismiss(),nt(!0)},success:jl.date_debut_grossesse&&!Hl.date_debut_grossesse,touched:jl.date_debut_grossesse,error:Hl.date_debut_grossesse}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('DATE_FIN_GROSSESSE'),value:null!==We?We:'',onChangeText:Fl('date_fin_grossesse'),onBlur:ql('date_fin_grossesse'),onFocus:function(){Keyboard.dismiss(),ut(!0)},success:jl.date_fin_grossesse&&!Hl.date_fin_grossesse,touched:jl.date_fin_grossesse,error:Hl.date_fin_grossesse})),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('PASSWORD'),value:Gl.password,onChangeText:Fl('password'),onBlur:ql('password'),success:jl.password&&!Hl.password,touched:jl.password,error:Hl.password,secureTextEntry:!0}),c.default.createElement(s.View,{style:{marginTop:25}},c.default.createElement(s.View,{style:{flexDirection:'row',alignItems:'center',justifyContent:'space-between'}},c.default.createElement(s.TouchableOpacity,{style:[$.iconNavigationButton,{borderRadius:5,width:100,height:30,flexDirection:"row",backgroundColor:C.Color.primaryColor,borderColor:C.Color.primaryColor}],onPress:function(t){fa(!0)}},c.default.createElement(N.default,{whiteColor:!0},h.default.t('PRESTATION')),c.default.createElement(j.default,{name:"medical-bag",size:20,color:C.Color.whiteColor})),c.default.createElement(s.TouchableOpacity,{style:[$.iconNavigationButton,{borderRadius:5,width:100,height:30,flexDirection:"row",backgroundColor:C.Color.primaryColor,borderColor:C.Color.primaryColor}],onPress:function(t){ua(!0)}},c.default.createElement(N.default,{whiteColor:!0},h.default.t('EXAMEN')),c.default.createElement(V.default,{name:"file-medical",size:20,color:C.Color.whiteColor})),c.default.createElement(s.TouchableOpacity,{style:[$.iconNavigationButton,{borderRadius:5,width:110,height:30,flexDirection:"row",backgroundColor:C.Color.primaryColor,borderColor:C.Color.primaryColor}],onPress:function(t){Ta(!0),Dt(null)}},c.default.createElement(N.default,{whiteColor:!0},h.default.t('MEDICAMENT')),c.default.createElement(Q.default,{name:"drug-pack",size:20,color:C.Color.whiteColor})))))}];return c.default.createElement(w.ScreenComponent,null,c.default.createElement(I.default,{ref:function(t){return Sl=t}}),c.default.createElement(s.KeyboardAvoidingView,{behavior:'android'===s.Platform.OS?'height':'padding',style:{flex:1}},c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:$.contain},c.default.createElement(v.default,{steps:Wl,currentStepIndex:Yt+1}),c.default.createElement(s.View,{style:{flexDirection:'column',alignItems:'center'}},c.default.createElement(O.default,{ref:Vt,activeStep:0,steps:Wl,useNativeDriver:!0,nextStepAnimation:"slideLeft",prevStepAnimation:"slideRight",isFirstStep:function(t){return Mt(t)},isLastStep:function(t){return Lt(t)},onNext:function(){Kl()},onPrev:function(){0===Yt&&bl((0,T.fetchGetUserByNameOrNumberReset)())},currentStep:function(t){var l=t.currentStep,n=t.isLastStep,o=t.isFirstStep;qt(l),Mt(o),Lt(n)}})),c.default.createElement(s.View,{style:$.iconNavigation},Bt?c.default.createElement(s.View,null):c.default.createElement(s.TouchableOpacity,{style:[$.iconNavigationButton,{backgroundColor:C.Color.primaryColor,borderColor:C.Color.primaryColor}],onPress:function(){return Vt.current.prev()}},c.default.createElement(V.default,{name:"arrow-left",size:20,color:C.Color.whiteColor})),2===Yt?c.default.createElement(b.default,{loading:oe.loading,onPress:Yl},h.default.t('SUBMIT_LABEL')):c.default.createElement(s.TouchableOpacity,{style:[$.iconNavigationButton,{backgroundColor:C.Color.primaryColor,borderColor:C.Color.primaryColor}],onPress:function(t){Yl(t),Kl()&&Vt.current.next()}},ee.loading||te.loading||J.loading?c.default.createElement(s.ActivityIndicator,{size:"small",color:"#fff"}):c.default.createElement(V.default,{name:"arrow-right",size:24,color:C.Color.whiteColor}))),xa&&(Ll=null!==vt&&null===vt.drugs?E.default.parseInt(vt.amount):'',console.log("AMOUNT",Ll),c.default.createElement(_.Formik,{validationSchema:Rl,initialValues:{amount_prestation:''+vt!==null&&null===vt.drugs?vt.amount:'',frais_deplacement:null!==vt&&null===vt.drugs?vt.home_visit_fees:'',code_acte:null!==vt&&null===vt.drugs?vt.act:'',insurance_amount:''+vt!==null&&null===vt.drugs?vt.insurance_amount:'',moderator_ticket:''+vt!==null&&null===vt.drugs?vt.moderator_ticket:''},onSubmit:function(t){console.log("values",t),Xt(K({},Wt,{performances:Wt.performances.map(function(l){return vt.id===l.id?K({},l,{act_id:t.code_acte.id,act:t.code_acte,amount:t.amount_prestation,home_visit_fees:t.frais_deplacement,to_delete:!1}):l})})),Ra(!1)}},function(t){var l,n=t.values,o=t.errors,u=t.touched,f=t.handleChange,p=t.handleBlur,E=t.setFieldValue,_=t.setFieldTouched,y=t.handleSubmit;return t.isSubmitting,c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:xa,onSwipeComplete:function(){Ra(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(N.default,{body2:!0,style:{marginTop:10}},h.default.t('MODIFY_PRESTATION')),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('DATE'),value:null!==vt&&null===vt.drugs?W(vt.created_at).format('YYYY-MM-DD HH:mm'):''+W(ke).format('YYYY-MM-DD HH:mm'),editable:!1}),c.default.createElement(M.View,{ref:function(t){Tl=t},style:{width:(0,S.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},c.default.createElement(P.Dropdown,{label:h.default.t('CODE_ACTE'),data:null!==ne.result?null==(l=ne.result)?void 0:l.response:[],useNativeDriver:!0,value:"number"!=typeof n.code_acte&&n.code_acte.name,onChangeText:function(t,l,n){_('code_acte'),E('code_acte',t)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('AMOUNT'),value:n.amount_prestation,onChangeText:function(t){E('amount_prestation',t),(0,T.fetchGetAmountConsultation)({network_id:De.id_network,amount:''+t,care_condition:st})},onBlur:p('amount_prestation'),success:u.amount_prestation&&!o.amount_prestation,touched:u.amount_prestation,error:o.amount_prestation}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('TICKET_MONDERATEUR'),editable:!1,value:null!==vt&&null===vt.drugs?n.moderator_ticket:null!==re.result?re.result.response.moderator_ticket:''}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('AMOUNT_PER_INSURANCE'),editable:!1,value:null!==vt&&null===vt.drugs?n.insurance_amount:null!==re.result?re.result.response.insurance_amount:''}),c.default.createElement(s.View,{style:{marginTop:10,width:"100%",flexDirection:'row',justifyContent:"space-between"}},c.default.createElement(N.default,{body2:!0},h.default.t('VISITE_DOMICILE')),c.default.createElement(s.View,{style:$.contentSwitch},c.default.createElement(B.default,{options:pl,initial:1,buttonColor:C.Color.accentColor,backgroundColor:C.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){yl('YES'===t)}}))),_l&&c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('FRAIS_DEPLACEMENT'),value:n.frais_deplacement,onChangeText:f('frais_deplacement'),onBlur:p('frais_deplacement'),success:u.frais_deplacement&&!o.frais_deplacement,touched:u.frais_deplacement,error:o.frais_deplacement}),c.default.createElement(b.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:function(){y(),console.log("Error",o)}},h.default.t('SUBMIT_LABEL'))))))})),sa&&c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:sa,onSwipeComplete:function(){fa(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(N.default,{body2:!0,style:{marginTop:10}},h.default.t('LIST_PRESTATION')),c.default.createElement(s.FlatList,{data:Wt.performances.filter(function(t){return!t.to_delete}),extraData:Wt.performances.filter(function(t){return!t.to_delete}),keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,c.default.createElement(s.View,{style:[$.contentActionModalBottom,{borderBottomColor:C.Color.borderColor,width:"100%"}],key:l.id},c.default.createElement(N.default,{body2:!0,semibold:!0,numberOfLines:5},(0,F.cutString)(l.act.name,30)+"\n \n "+h.default.t('AMOUNT_LABEL')+": "+l.amount+" \n \n "+h.default.t('AMOUNT_PER_INSURANCE')+": "+l.insurance_amount+" \n \n "+h.default.t('TICKET_MONDERATEUR')+": "+l.moderator_ticket+" "+(null!==l.home_visit_fees?'| '+l.home_visit_fees:'')),c.default.createElement(s.View,{style:$.iconRight},c.default.createElement(s.TouchableOpacity,{onPress:function(){Ot(K({},l,{drugs:null})),Ra(!0)}},c.default.createElement(V.default,{name:"edit",size:24,color:C.Color.primaryColor})),c.default.createElement(s.TouchableOpacity,{onPress:function(){Xt(K({},Wt,{performances:Wt.performances.map(function(t){return l.id===t.id?K({},t,{to_delete:!0}):t})}))}},c.default.createElement(V.default,{name:"minus-circle",size:24,color:C.Color.grayColor}))))}}),c.default.createElement(b.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return fa(!1)}},h.default.t('OK')))))),Va&&c.default.createElement(_.Formik,{validationSchema:xl,initialValues:{amount_prestation:'',frais_deplacement:'',code_acte:''},onSubmit:function(t){''===t.code_acte?Tl.shake(200):(Xa([{act_id:t.code_acte.id,act:t.code_acte,amount:t.amount_prestation,home_visit_fees:t.frais_deplacement}].concat((0,n.default)(Wa))),Aa(!1),F.displayToast(h.default.t('PRESTATION_SUCCESSFULLY_MODIFY')))}},function(t){var l,n=t.values,o=t.errors,u=t.touched,f=t.handleChange,p=t.handleBlur,E=t.setFieldValue,_=t.setFieldTouched,y=t.handleSubmit;return t.isSubmitting,c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:Va,onSwipeComplete:function(){Aa(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(N.default,{body2:!0,style:{marginTop:10}},h.default.t('MODIFY_PRESTATION')),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('DATE'),value:''+W(ke).format('YYYY-MM-DD HH:mm'),editable:!1}),c.default.createElement(M.View,{ref:function(t){Tl=t},style:{width:(0,S.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},c.default.createElement(P.Dropdown,{label:h.default.t('CODE_ACTE'),data:null!==ne.result?null==(l=ne.result)?void 0:l.response:[],useNativeDriver:!0,onChangeText:function(t,l,n){_('code_acte'),E('code_acte',t)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('AMOUNT'),value:n.amount_prestation,onChangeText:f('amount_prestation'),onBlur:p('amount_prestation'),success:u.amount_prestation&&!o.amount_prestation,touched:u.amount_prestation,error:o.amount_prestation,onKeyPress:function(){(0,T.fetchGetAmountConsultation)({network_id:De.id_network,amount:n.amount_prestation,care_condition:st})}}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('TICKET_MONDERATEUR'),editable:!1,value:null!==re.result?re.result.response.moderator_ticket:''}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('AMOUNT_PER_INSURANCE'),editable:!1,value:null!==re.result?re.result.response.insurance_amount:''}),c.default.createElement(s.View,{style:{marginTop:10,width:"100%",flexDirection:'row',justifyContent:"space-between"}},c.default.createElement(N.default,{body2:!0},h.default.t('VISITE_DOMICILE')),c.default.createElement(s.View,{style:$.contentSwitch},c.default.createElement(B.default,{options:pl,initial:1,buttonColor:C.Color.accentColor,backgroundColor:C.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){yl('YES'===t)}}))),_l&&c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('FRAIS_DEPLACEMENT'),value:n.frais_deplacement,onChangeText:f('frais_deplacement'),onBlur:p('frais_deplacement'),success:u.frais_deplacement&&!o.frais_deplacement,touched:u.frais_deplacement,error:o.frais_deplacement}),c.default.createElement(b.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:y},h.default.t('SUBMIT_LABEL'))))))}),Ma&&c.default.createElement(_.Formik,{validationSchema:Ol,initialValues:{drug_name:'',drug_posologie:'',drug_quantity:''},onSubmit:function(t){al([{drug_or_device_id:It.id,dosage:t.drug_posologie,quantity:t.drug_quantity}].concat((0,n.default)(tl))),Pa(!1),F.displayToast(h.default.t('PRESCRIPTIONS_SUCCESSFULLY_ADD'))}},function(t){var l=t.values,n=t.errors,o=t.touched,u=t.handleChange,f=t.handleBlur,p=t.handleSubmit;return t.isSubmitting,c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:Ma,onSwipeComplete:function(){Pa(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(N.default,{body2:!0,style:{marginTop:10}},h.default.t('AJOUTER_MEDICAMENT')),c.default.createElement(s.View,{style:{flexDirection:'row'}},c.default.createElement(x.default,{style:{marginTop:10,width:"90%"},placeholder:h.default.t('NAME'),value:null!==It?It.name:l.drug_name,onChangeText:u('drug_name'),onBlur:f('drug_name'),success:o.drug_name&&!n.drug_name,touched:o.drug_name,error:n.drug_name,editable:null===It}),c.default.createElement(s.TouchableOpacity,{style:[$.iconNavigationButton,{backgroundColor:C.Color.primaryColor,borderColor:C.Color.primaryColor,marginTop:10,width:40,height:40}],onPress:function(t){z(De.id_network,l.drug_name)}},le.loading?c.default.createElement(s.ActivityIndicator,{size:"small",color:"#fff"}):c.default.createElement(A.default,{name:"search",size:24,color:C.Color.whiteColor}))),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('POSOLOGIE'),value:l.drug_posologie,onChangeText:u('drug_posologie'),onBlur:f('drug_posologie'),success:o.drug_posologie&&!n.drug_posologie,touched:o.drug_posologie,error:n.drug_posologie}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('QUANTITE'),value:l.drug_quantity,onChangeText:u('drug_quantity'),onBlur:f('drug_quantity'),success:o.drug_quantity&&!n.drug_quantity,touched:o.drug_quantity,error:n.drug_quantity,keyboardType:"numeric"}),c.default.createElement(b.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:p},h.default.t('SUBMIT_LABEL'))))))}),Ua&&c.default.createElement(_.Formik,{validationSchema:Ol,initialValues:{drug_name:null!==vt&&vt.drugs?vt.drug_or_device.name:'',drug_posologie:null!==vt&&vt.drugs?vt.dosage:'',drug_quantity:null!==vt&&vt.drugs?vt.quantity:''},onSubmit:function(t){Xt(K({},Wt,{prescriptions:Wt.prescriptions.map(function(l){return vt.id===l.id?{id:l.id,drug_or_device_id:vt.drug_or_device.id,drug_or_device:vt.drug_or_device,dosage:t.drug_posologie,quantity:t.drug_quantity,unit_price:l.unit_price,to_delete:!1}:l})})),Fa(!1),F.displayToast(h.default.t('PRESCRIPTIONS_SUCCESSFULLY_MODIFY'))}},function(t){var l=t.values,n=t.errors,o=t.touched,u=t.handleChange,f=t.handleBlur,p=t.handleSubmit;return t.isSubmitting,c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:Ua,onSwipeComplete:function(){Fa(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(N.default,{body2:!0,style:{marginTop:10}},h.default.t('MODIFIER_MEDICAMENT')),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('NAME'),value:l.drug_name,onChangeText:u('drug_name'),onBlur:f('drug_name'),success:o.drug_name&&!n.drug_name,touched:o.drug_name,error:n.drug_name,editable:null===It}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('POSOLOGIE'),value:l.drug_posologie,onChangeText:u('drug_posologie'),onBlur:f('drug_posologie'),success:o.drug_posologie&&!n.drug_posologie,touched:o.drug_posologie,error:n.drug_posologie}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('QUANTITE'),value:''+l.drug_quantity,onChangeText:u('drug_quantity'),onBlur:f('drug_quantity'),success:o.drug_quantity&&!n.drug_quantity,touched:o.drug_quantity,error:n.drug_quantity,keyboardType:"numeric"}),c.default.createElement(b.default,{style:{marginTop:20,marginBottom:20},full:!0,onPress:p},h.default.t('SUBMIT_LABEL'))))))}),Ga&&c.default.createElement(_.Formik,{validationSchema:vl,initialValues:{examen_name:null!==vt?vt.drugs?'':vt.description:'',examen_quantite:''+vt!==null?vt.drugs?'':vt.quantity:'',code_acte:''+vt!==null?vt.drugs?'':vt.act:''},onSubmit:function(t){Xt(K({},Wt,{exams:Wt.exams.map(function(l){return vt.id===l.id?K({},l,{id:l.id,act_id:t.code_acte.id,act:t.code_acte,description:t.examen_name,quantity:t.examen_quantite,unit_price:l.unit_price,to_delete:!1}):l})})),Ha(!1),F.displayToast(h.default.t('EXAMENS_SUCCESSFULLY_MODIFY'))}},function(t){var l,n=t.values,o=t.errors,u=t.touched,f=t.handleChange,p=t.setFieldValue,E=t.setFieldTouched,_=t.handleBlur,y=t.handleSubmit;return t.isSubmitting,c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:Ga,onSwipeComplete:function(){Ha(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(N.default,{body2:!0,style:{marginTop:10}},h.default.t('MODIFIER_EXAMEN')),c.default.createElement(M.View,{ref:function(t){Tl=t},style:{width:(0,S.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},c.default.createElement(P.Dropdown,{label:h.default.t('CODE_ACTE'),data:null!==ne.result?null==(l=ne.result)?void 0:l.response:[],useNativeDriver:!0,value:"number"!=typeof n.code_acte&&n.code_acte.name,onChangeText:function(t,l,n){console.log("Value",t),E('code_acte'),p('code_acte',t)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('NAME'),value:n.examen_name,onChangeText:f('examen_name'),onBlur:_('examen_name'),success:u.examen_name&&!o.examen_name,touched:u.examen_name,error:o.examen_name}),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('QUANTITE'),value:''+n.examen_quantite,onChangeText:f('examen_quantite'),onBlur:_('examen_quantite'),success:u.examen_quantite&&!o.examen_quantite,touched:u.examen_quantite,error:o.examen_quantite,keyboardType:"numeric"}),c.default.createElement(b.default,{style:{marginTop:20,marginBottom:20},full:!0,loading:ie.loading,onPress:function(){console.log("errors",o),console.log("values",n),y()}},h.default.t('SUBMIT_LABEL'))))))}),Ye&&c.default.createElement(G.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date(ke),mode:"date",display:"spinner",onChange:(y.object().shape({code:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),name:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED')),type:y.string().required(h.default.t('THIS_FIELD_IS_REQUIRED'))}),function(t,l){var n=l||''+W(new Date).format('YYYY-MM-DD');qe('ios'===s.Platform.OS),Le(n)})}),Ee&&c.default.createElement(G.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date,mode:"date",display:"spinner",onChange:Vl}),lt&&c.default.createElement(G.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date,mode:"date",display:"spinner",onChange:Al}),it&&c.default.createElement(G.default,{timeZoneOffsetInMinutes:0,is24Hour:!0,value:new Date,mode:"date",display:"spinner",onChange:Nl}),ia&&c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:ia,onSwipeComplete:function(){ua(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(N.default,{body2:!0,style:{marginTop:10}},h.default.t('EXAMEN')),c.default.createElement(s.FlatList,{data:Wt.exams.filter(function(t){return!t.to_delete}),extraData:Wt.exams.filter(function(t){return!t.to_delete}),keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,c.default.createElement(s.View,{style:[$.contentActionModalBottom,{borderBottomColor:C.Color.borderColor,width:"100%"}],key:l.id},c.default.createElement(N.default,{body2:!0,semibold:!0,numberOfLines:2},l.quantity+" "+l.description+" "+(l.unit_price?' - '+l.unit_price:'')+" \n "+l.act.name),c.default.createElement(s.View,{style:$.iconRight},c.default.createElement(s.TouchableOpacity,{onPress:function(){Ot(K({},l,{drugs:!1})),Ha(!0)}},c.default.createElement(V.default,{name:"edit",size:24,color:C.Color.primaryColor})),c.default.createElement(s.TouchableOpacity,{onPress:function(){Xt(K({},Wt,{exams:Wt.exams.map(function(t){return l.id===t.id?K({},t,{to_delete:!0}):t})}))}},c.default.createElement(V.default,{name:"minus-circle",size:24,color:C.Color.grayColor}))))}}),c.default.createElement(b.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return ua(!1)}},h.default.t('OK')))))),se&&c.default.createElement(p.default.Container,{contentStyle:{width:(0,S.responsiveWidth)(80)},useNativeDriver:!0,visible:se},c.default.createElement(p.default.Title,null,h.default.t('SCAN')),c.default.createElement(s.ScrollView,{style:[$.blockView,{borderBottomColor:C.Color.borderColor,maxHeight:300}]},c.default.createElement(N.default,null,h.default.t('BRING_YOUR_CAMERA_CLOSER_TO_SCAN_QR_CODE')),c.default.createElement(L.default,{onRead:function(t){fe(!1),console.log("result",t.data)},flashMode:U.RNCamera.Constants.FlashMode.off})),c.default.createElement(p.default.Button,{bold:!0,label:h.default.t('CLOSE'),onPress:function(){fe(!1)}})),Ca&&c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:Ca,onSwipeComplete:function(){ha(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(N.default,{body2:!0,style:{marginTop:10}},h.default.t('LIST_ASSURE')),c.default.createElement(s.FlatList,{data:null==(Pl=ee.result)?void 0:Pl.response,extraData:null==(kl=ee.result)?void 0:kl.response,ListEmptyComponent:c.default.createElement(N.default,{body2:!0},h.default.t('NO_ASSURE_MATCH_SEARCH')),keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,c.default.createElement(s.View,{style:{paddingVertical:15,alignItems:'flex-start'}},c.default.createElement(s.TouchableOpacity,{style:[$.contentActionModalBottom,{borderBottomColor:C.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){'PAID'!==l.state?s.Alert.alert(h.default.t('ERROR_LABEL'),h.default.t('ASSURE_NON_EN_REGLE'),[{text:h.default.t('OK'),onPress:function(){}}]):(Ct(l),bt(null),ul(1),ha(!1),Ql('lastname_patient',l.user.lastname),Ql('firstname_patient',l.user.firstname),H(l.user.id,'UNTREATED','CONSULTATION',"&network_agent_id="+De.network_agent_id))}},c.default.createElement(N.default,{body2:!0,semibold:!0},(null!==l.user.firstname?l.user.firstname:'')+" "+(null!==l.user.lastname?l.user.lastname:''))),l.beneficiaries.map(function(t){return c.default.createElement(s.TouchableOpacity,{style:$.beneficiarySubSection,onPress:function(){Ct(l),bt(t),ul(0),ha(!1),Ql('lastname_patient',t.lastname),Ql('firstname_patient',t.firstname),H(l.user.id,'TO_BILL','CONSULTATION',"&beneficiary_id="+t.id)}},c.default.createElement(s.View,{style:{width:10}}),c.default.createElement(s.View,{style:{paddingHorizontal:10,alignItems:'flex-start'}},c.default.createElement(N.default,{subhead:!0,semibold:!0},(null!==t.firstname?t.firstname:'')+" "+(null!==t.lastname?t.lastname:'')+" ("+h.default.t('AYANT_DROITS')+")")))}))}}),c.default.createElement(b.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return ha(!1)}},h.default.t('OK')))))),Sa&&c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:Sa,onSwipeComplete:function(){Ta(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(N.default,{body2:!0,style:{marginTop:10}},h.default.t('MEDICAMENTS')),c.default.createElement(s.FlatList,{data:Wt.prescriptions.filter(function(t){return!t.to_delete}),extraData:Wt.prescriptions.filter(function(t){return!t.to_delete}),keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,c.default.createElement(s.View,{style:[$.contentActionModalBottom,{borderBottomColor:C.Color.borderColor,width:"100%"}],key:l.id},c.default.createElement(N.default,{body2:!0,semibold:!0,numberOfLines:2},l.quantity+" "+l.drug_or_device.name+" "+(l.unit_price?' - '+l.unit_price:'')+" \n "+l.dosage),c.default.createElement(s.View,{style:$.iconRight},c.default.createElement(s.TouchableOpacity,{onPress:function(){Ot(K({},l,{drugs:!0})),Fa(!0)}},c.default.createElement(V.default,{name:"edit",size:24,color:C.Color.primaryColor})),c.default.createElement(s.TouchableOpacity,{onPress:function(){Xt(K({},Wt,{prescriptions:Wt.prescriptions.map(function(t){return l.id===t.id?K({},t,{to_delete:!0}):t})}))}},c.default.createElement(V.default,{name:"minus-circle",size:24,color:C.Color.grayColor}))))}}),c.default.createElement(b.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return Ta(!1)}},h.default.t('OK')))))),jt&&c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:jt,onSwipeComplete:function(){Qt(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(N.default,{body2:!0,style:{marginTop:10}},h.default.t('LIST_CONSULTATION')),c.default.createElement(s.FlatList,{data:null==(Bl=J.result)?void 0:Bl.response,ListEmptyComponent:c.default.createElement(N.default,{body2:!0},h.default.t('NO_CONSULTATION')),extraData:null==(Ml=J.result)?void 0:Ml.response,keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,c.default.createElement(s.TouchableOpacity,{style:[$.contentActionModalBottom,{borderBottomColor:C.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){na(l),ea(!0)}},c.default.createElement(N.default,{body2:!0,semibold:!0},l.type+" #"+l.health_care_sheet_id+" - "+W(l.created_at).format('YYYY-MM-DD')))}}),c.default.createElement(b.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return Qt(!1)}},h.default.t('OK')))))),$t&&c.default.createElement(p.default.Container,{useNativeDriver:!0,visible:$t},c.default.createElement(p.default.Title,null,h.default.t('DETAIL')),c.default.createElement(s.ScrollView,{persistentScrollbar:!0},c.default.createElement(s.View,{style:[$.blockView,{borderBottomColor:C.Color.borderColor}]},c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(N.default,{style:[$.body2]},h.default.t('PATIENT'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(N.default,{style:[q.Typography.caption1,C.Color.grayColor]},la.patient_lastname+" "+la.patient_firstname))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(N.default,{style:[$.body2]},"Situation")),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(N.default,{style:[q.Typography.caption1,C.Color.grayColor]},la.patient_situation.toLowerCase()))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(N.default,{style:[$.body2]},h.default.t('PRATICIEN'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(N.default,{style:[q.Typography.caption1,C.Color.grayColor]},la.practitioner_lastname+" "+la.practitioner_firstname))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(N.default,{style:[$.body2]},h.default.t('CLASSE_PRESTATAIRE'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(N.default,{style:[q.Typography.caption1,C.Color.grayColor]},(0,F.uppercaseFirstLetter)(la.practitioner_provider_class.toLowerCase())))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(N.default,{style:[$.body2]},h.default.t('STATE'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(N.default,{style:[q.Typography.caption1,C.Color.grayColor]},(0,F.uppercaseFirstLetter)(la.state.toLowerCase())))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(N.default,{style:[$.body2]},"Type")),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(N.default,{style:[q.Typography.caption1,C.Color.grayColor]},(0,F.uppercaseFirstLetter)(la.type.toLowerCase())))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(N.default,{style:[$.body2]},h.default.t('CONDITION_PRISE_CHARGE'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(N.default,{style:[q.Typography.caption1,C.Color.grayColor]},(0,F.uppercaseFirstLetter)(la.care_condition.toLowerCase())))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(N.default,{style:[$.body2]},h.default.t('INSTITUTE_NAME'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(N.default,{style:[q.Typography.caption1,C.Color.grayColor]},(0,F.uppercaseFirstLetter)(la.institution_name.toLowerCase())))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(N.default,{style:[$.body2]},"Date")),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},c.default.createElement(N.default,{style:[q.Typography.caption1,C.Color.grayColor]},W(la.created_at).format('YYYY-MM-DD')))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(N.default,{style:[$.body2]},h.default.t('PRESTATION'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},la.performances.map(function(t){return c.default.createElement(N.default,{style:[q.Typography.caption1,C.Color.grayColor]},t.act.name+" \n "+t.amount+" \n")}))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(N.default,{style:[$.body2]},h.default.t('EXAMEN'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},la.exams.map(function(t){return c.default.createElement(N.default,{style:[q.Typography.caption1,C.Color.grayColor]},t.description+" \n "+t.act.name+" \n")}))),c.default.createElement(s.View,{style:{flexDirection:'row',marginTop:10}},c.default.createElement(s.View,{style:{flex:1}},c.default.createElement(N.default,{style:[$.body2]},h.default.t('MEDICAMENT'))),c.default.createElement(s.View,{style:{flex:1,alignItems:'flex-end'}},la.prescriptions.map(function(t){return c.default.createElement(N.default,{style:[q.Typography.caption1,C.Color.grayColor]},t.drug_or_device.name+" \n "+t.dosage+" \n")}))))),c.default.createElement(p.default.Button,{bold:!0,label:h.default.t('CANCEL_LABEL'),onPress:function(){ea(!1)}}),c.default.createElement(p.default.Button,{bold:!0,label:h.default.t('OK'),onPress:function(){ea(!1),ha(!1),Qt(!1),Xt(K({},la,{exams:la.exams.map(function(t){return K({},t,{to_delete:!1})}),performances:la.performances.map(function(t){return K({},t,{to_delete:!1})}),prescriptions:la.prescriptions.map(function(t){return K({},t,{to_delete:!1})})})),ft(la.care_condition),Ql('practitioner_firstname',la.practitioner_firstname),Ql('practitioner_lastname',la.practitioner_lastname),Ql('pregnancy_start_at',la.pregnancy_start_at),Ql('accident_date',la.accident_date),Te(null!==la.accident_date),et(null!==la.pregnancy_start_at),Vt.current.next()}})),Ea&&c.default.createElement(_.Formik,{validationSchema:Dl,initialValues:{price:''},onSubmit:function(t){console.log("Value",vt),vt.examen?Xt(K({},Wt,{exams:Wt.exams.map(function(l){return vt.id===l.id?K({},l,{unit_price:t.price}):l})})):Xt(K({},Wt,{prescriptions:Wt.prescriptions.map(function(l){return vt.id===l.id?K({},l,{unit_price:t.price}):l})})),ga(!1)}},function(t){var l=t.values,n=t.errors,o=t.touched,u=t.handleChange,f=(t.setFieldValue,t.setFieldTouched,t.handleBlur),p=t.handleSubmit;return t.isSubmitting,c.default.createElement(s.ScrollView,{style:{flex:1}},c.default.createElement(s.View,{style:[$.containModal,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(k.default,{isVisible:Ea,onSwipeComplete:function(){ga(!1)},swipeDirection:['down'],style:$.bottomModal},c.default.createElement(s.View,{style:[$.contentFilterBottom,{backgroundColor:C.Color.containerBackgroundColor}]},c.default.createElement(s.View,{style:$.contentSwipeDown},c.default.createElement(s.View,{style:$.lineSwipeDown})),c.default.createElement(N.default,{body2:!0,style:{marginTop:10}},h.default.t('AMOUNT_LABEL')),c.default.createElement(x.default,{style:{marginTop:10},placeholder:h.default.t('AMOUNT_LABEL_DESCRIPTION'),value:l.price,onChangeText:u('price'),onBlur:f('price'),success:o.price&&!n.price,touched:o.price,error:n.price,keyboardType:"numeric"}),c.default.createElement(b.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:p},h.default.t('OK'))))))})))))});e.default=te},2201,[4,1,33,7,27,15,18,1046,1639,938,1827,1950,1031,719,2147,2162,534,1779,2164,718,2158,2182,2186,2187,1013,538,2157,771,749,979,1823,2188,2194,1658,1107,1079,1763,2180,881,1032,1189]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),l=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=l(r(d[2])),o=l(r(d[3])),u=t(r(d[4])),c=r(d[5]),s=r(d[6]),f=l(r(d[7])),p=r(d[8]),E=t(r(d[9])),y=r(d[10]),C=l(r(d[11])),w=r(d[12]),h=l(r(d[13])),b=r(d[14]),_=r(d[15]),S=l(r(d[16])),T=r(d[17]),x=l(r(d[18])),I=r(d[19]),R=r(d[20]),V=l(r(d[21])),v=l(r(d[22])),O=l(r(d[23])),P=l(r(d[24])),D=l(r(d[25])),N=l(r(d[26])),B=t(r(d[27])),A=r(d[28]),k=l(r(d[29])),L=l(r(d[30])),M=r(d[31]),U=t(r(d[32])),F=r(d[33]),G=l(r(d[34])),j=r(d[35]);function z(t,l){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);l&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),n.push.apply(n,o)}return n}function H(t){for(var l=1;l0?Et(!0):Bt.alertWithType('warn',C.default.t('EMPTY_LIST'),C.default.t('NO_ASSURE_MATCH_SEARCH'))),W.error&&c.Alert.alert(C.default.t("ERROR_LABLE"),U.getErrorMsg(W),[{text:C.default.t("OK"),onPress:function(){Nt((0,_.fetchGetUserByNameOrNumberReset)())}}],{cancelable:!1})},[W]),(0,u.useEffect)(function(){null!==K.result&&Ye(!0),K.error&&c.Alert.alert(C.default.t("ERROR_LABLE"),U.getErrorMsg(K),[{text:C.default.t("OK"),onPress:function(){Nt((0,_.fetchGetConsultationReset)())}}],{cancelable:!1})},[K]),(0,u.useEffect)(function(){null!==Q.result&&c.Alert.alert(C.default.t("SUCCESS"),Q.result.response,[{text:C.default.t("OK"),onPress:function(){Nt((0,_.fetchModifyPrescriptionReset)()),$.goBack()}}],{cancelable:!1}),Q.error&&c.Alert.alert(C.default.t("ERROR_LABLE"),U.getErrorMsg(Q),[{text:C.default.t("OK"),onPress:function(){Nt((0,_.fetchModifyPrescriptionReset)())}}],{cancelable:!1})},[Q]);var At=E.object().shape({numero_assure:E.string().required(C.default.t('THIS_FIELD_IS_REQUIRED')),password:E.string().required(C.default.t('THIS_FIELD_IS_REQUIRED')),practitioner_lastname:E.string().required(C.default.t('THIS_FIELD_IS_REQUIRED')),practitioner_firstname:E.string().required(C.default.t('THIS_FIELD_IS_REQUIRED'))}),kt=E.object().shape({price:E.number().required(C.default.t('THIS_FIELD_IS_REQUIRED'))});console.log("consultaiton",We);var Lt,Mt,Ut,Ft,Gt=(0,p.useFormik)({validationSchema:At,initialValues:{numero_assure:'',password:'',firstname_patient:'',lastname_patient:'',practitioner_firstname:'',practitioner_lastname:'',agrement_praticien:null==ye?void 0:ye.code_membre,pregnancy_start_at:null,pregnancy_end_at:null},onSubmit:function(t){z(We.id,{network_agent_id:ne.network_agent_id,password:t.password,practitioner_lastname:t.practitioner_lastname,practitioner_firstname:t.practitioner_firstname,practitioner_provider_class_id:t.practitioner_provider_class_id,performances:We.performances,prescriptions:We.prescriptions})}}),jt=Gt.handleChange,zt=Gt.handleSubmit,Ht=Gt.handleBlur,Yt=Gt.values,Qt=Gt.errors,Kt=Gt.touched,Wt=Gt.setFieldValue,qt=Gt.setFieldTouched,Xt=(Gt.isValid,function(){switch(console.log("currentStep",Fe),Fe){case 0:return console.log("values",Yt),''!==Yt.numero_assure&&null===W.result&&(Nt((0,_.fetchGetUserByNameOrNumberReset)()),n(ne.id_network,ue?"&insured_id="+Yt.numero_assure:fe?"&phone="+Yt.numero_assure:"&name="+Yt.numero_assure),console.log("errors",Qt)),!1;default:return!0}}),Jt=[{title:C.default.t('ASSURE'),content:u.default.createElement(c.View,null,u.default.createElement(x.default,{style:{marginTop:10},placeholder:ue?C.default.t('NUMERO_ASSURE'):fe?C.default.t('PHONE_NUMBER'):C.default.t('NOM_ASSURE'),value:Yt.numero_assure,keyboardType:fe?'numeric':'default',onChangeText:jt('numero_assure'),onBlur:Ht('numero_assure'),success:Kt.numero_assure&&!Qt.numero_assure,touched:Kt.numero_assure,error:Qt.numero_assure,icon:u.default.createElement(P.default,{style:{zIndex:10},name:ue?'lock':fe?'phone':'user',size:20})}),u.default.createElement(c.View,{style:{flexDirection:'row',position:'absolute',top:22,right:50,justifyContent:'space-between',width:50}},u.default.createElement(O.default,{style:{paddingRight:5},name:"lock",size:20,color:y.Color.primaryColor,onPress:function(){de(!0),me(!1)}}),u.default.createElement(O.default,{style:{paddingRight:5},name:"phone",size:20,color:y.Color.primaryColor,onPress:function(){de(!1),me(!0)}}),u.default.createElement(O.default,{style:{paddingRight:5},name:"user",size:20,color:y.Color.primaryColor,onPress:function(){de(!1),me(!1)}}),u.default.createElement(O.default,{style:{paddingRight:5},name:"qrcode",size:20,color:y.Color.primaryColor,onPress:function(){ae(!0)}})))},{title:C.default.t('PATIENT'),content:u.default.createElement(c.View,null,u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('NOM_CLIENT'),value:Yt.lastname_patient,onChangeText:jt('lastname_patient'),onBlur:Ht('lastname_patient'),success:Kt.lastname_patient&&!Qt.lastname_patient,touched:Kt.lastname_patient,editable:!1,error:Qt.lastname_patient}),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('PRENOM_CLIENT'),value:Yt.firstname_patient,editable:!1,onChangeText:jt('firstname_patient'),onBlur:Ht('firstname_patient'),success:Kt.firstname_patient&&!Qt.firstname_patient,touched:Kt.firstname_patient,error:Qt.firstname_patient}),u.default.createElement(c.View,{style:{marginTop:10,flexDirection:'row',justifyContent:"space-between"}},u.default.createElement(D.default,{body2:!0},C.default.t('SITUATION')),u.default.createElement(c.View,{style:{width:(0,b.responsiveWidth)(60)}},u.default.createElement(N.default,{options:Rt,disabled:!0,value:Ot,initial:Ot,buttonColor:y.Color.accentColor,backgroundColor:y.Color.primaryDarkColor,textColor:"white",bold:!0,hasPadding:!0,height:32,onPress:function(t){}}))))},{title:C.default.t('PRATICIEN'),content:u.default.createElement(c.View,null,u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('CODE_AGREMENT'),value:Yt.agrement_praticien,editable:!1}),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('NOM_PRATICIEN'),value:Yt.practitioner_lastname,onChangeText:jt('practitioner_lastname'),onBlur:Ht('practitioner_lastname'),success:Kt.practitioner_lastname&&!Qt.practitioner_lastname,touched:Kt.practitioner_lastname,error:Qt.practitioner_lastname}),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('PRENOM_PRATICIEN'),value:Yt.practitioner_firstname,onChangeText:jt('practitioner_firstname'),onBlur:Ht('practitioner_firstname'),success:Kt.practitioner_firstname&&!Qt.practitioner_firstname,touched:Kt.practitioner_firstname,error:Qt.practitioner_firstname}),u.default.createElement(B.View,{ref:function(t){},style:{width:(0,b.responsiveWidth)(90),height:60,alignSelf:'center',borderRadius:10,paddingLeft:20,marginTop:10,paddingRight:20,backgroundColor:'white'}},u.default.createElement(A.Dropdown,{label:C.default.t('CLASSIFICATION'),value:null!==lt?lt.practitioner_provider_class:'',data:null!==J.result?null==(l=J.result)?void 0:l.response:[],useNativeDriver:!0,onChangeText:function(t,l,n){qt('practitioner_provider_class_id'),Wt('practitioner_provider_class_id',t.id),console.log("Value",t)},valueExtractor:function(t){return t},labelExtractor:function(t){return t.name}})),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('PASSWORD'),value:Yt.password,onChangeText:jt('password'),onBlur:Ht('password'),success:Kt.password&&!Qt.password,touched:Kt.password,error:Qt.password,secureTextEntry:!0}),u.default.createElement(c.View,{style:{marginTop:25}},u.default.createElement(c.View,{style:{flexDirection:'row',alignItems:'center',justifyContent:'space-between'}},null!==We?!We.prescriptions.length>0?u.default.createElement(c.TouchableOpacity,{style:[q.iconNavigationButton,{borderRadius:5,width:100,height:30,flexDirection:"row",backgroundColor:y.Color.primaryColor,borderColor:y.Color.primaryColor}],onPress:function(t){We.prescriptions.filter(function(t){return t.checked}).length>0?(0,U.displayToast)("Vous avez deja renseigner les m\xe9dicaments"):it(!0)}},u.default.createElement(D.default,{whiteColor:!0},C.default.t('EXAMEN')),u.default.createElement(O.default,{name:"file-medical",size:20,color:y.Color.whiteColor})):u.default.createElement(c.View,null):null,null!==We?!We.exams.length>0?u.default.createElement(c.TouchableOpacity,{style:[q.iconNavigationButton,{borderRadius:5,width:110,height:30,flexDirection:"row",backgroundColor:y.Color.primaryColor,borderColor:y.Color.primaryColor}],onPress:function(t){We.exams.filter(function(t){return t.checked}).length>0?(0,U.displayToast)("Vous avez deja renseigner les examens"):wt(!0)}},u.default.createElement(D.default,{whiteColor:!0},C.default.t('MEDICAMENT')),u.default.createElement(G.default,{name:"drug-pack",size:20,color:y.Color.whiteColor})):u.default.createElement(c.View,null):null)))}];return u.default.createElement(w.ScreenComponent,null,u.default.createElement(S.default,{ref:function(t){return Bt=t}}),u.default.createElement(c.KeyboardAvoidingView,{behavior:'android'===c.Platform.OS?'height':'padding',style:{flex:1}},u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:q.contain},u.default.createElement(V.default,{steps:Jt,currentStepIndex:Fe+1}),u.default.createElement(c.View,{style:{flexDirection:'column',alignItems:'center'}},u.default.createElement(v.default,{ref:Oe,activeStep:0,steps:Jt,useNativeDriver:!0,nextStepAnimation:"slideLeft",prevStepAnimation:"slideRight",isFirstStep:function(t){return Be(t)},isLastStep:function(t){return Le(t)},onNext:function(){Xt()},onPrev:function(){0===Fe&&Nt((0,_.fetchGetUserByNameOrNumberReset)())},currentStep:function(t){var l=t.currentStep,n=t.isLastStep,o=t.isFirstStep;Ge(l),Be(o),Le(n)}})),u.default.createElement(c.View,{style:q.iconNavigation},Ne?u.default.createElement(c.View,null):u.default.createElement(c.TouchableOpacity,{style:[q.iconNavigationButton,{backgroundColor:y.Color.primaryColor,borderColor:y.Color.primaryColor}],onPress:function(){return Oe.current.prev()}},u.default.createElement(O.default,{name:"arrow-left",size:20,color:y.Color.whiteColor})),2===Fe?u.default.createElement(h.default,{loading:Q.loading,onPress:zt},C.default.t('SUBMIT_LABEL')):u.default.createElement(c.TouchableOpacity,{style:[q.iconNavigationButton,{backgroundColor:y.Color.primaryColor,borderColor:y.Color.primaryColor}],onPress:function(t){zt(t),Xt()&&Oe.current.next()}},W.loading||X.loading||K.loading?u.default.createElement(c.ActivityIndicator,{size:"small",color:"#fff"}):u.default.createElement(O.default,{name:"arrow-right",size:24,color:y.Color.whiteColor}))),ot&&u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(k.default,{isVisible:ot,onSwipeComplete:function(){it(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(D.default,{body2:!0,style:{marginTop:10}},C.default.t('EXAMEN')),u.default.createElement(c.FlatList,{data:We.exams,extraData:We.exams,keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(c.TouchableOpacity,{style:[q.contentActionModalBottom,{borderBottomColor:y.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){ve(H({},l,{examen:!0})),qe(H({},We,{exams:We.exams.map(function(t){return l.id===t.id?H({},t,{checked:!l.checked}):t})})),l.checked||st(!0)}},u.default.createElement(D.default,{body2:!0,semibold:!0,numberOfLines:2},l.quantity+" "+l.description+" "+(l.unit_price?' - '+l.unit_price:'')+" \n "+l.act.name),l.checked&&u.default.createElement(O.default,{name:"check",size:14,color:y.Color.primaryColor}))}}),u.default.createElement(h.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return it(!1)}},C.default.t('OK')))))),le&&u.default.createElement(f.default.Container,{contentStyle:{width:(0,b.responsiveWidth)(80)},useNativeDriver:!0,visible:le},u.default.createElement(f.default.Title,null,C.default.t('SCAN')),u.default.createElement(c.ScrollView,{style:[q.blockView,{borderBottomColor:y.Color.borderColor,maxHeight:300}]},u.default.createElement(D.default,null,C.default.t('BRING_YOUR_CAMERA_CLOSER_TO_SCAN_QR_CODE')),u.default.createElement(L.default,{onRead:function(t){ae(!1),console.log("result",t.data)},flashMode:M.RNCamera.Constants.FlashMode.off})),u.default.createElement(f.default.Button,{bold:!0,label:C.default.t('CLOSE'),onPress:function(){ae(!1)}})),pt&&u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(k.default,{isVisible:pt,onSwipeComplete:function(){Et(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(D.default,{body2:!0,style:{marginTop:10}},C.default.t('LIST_ASSURE')),u.default.createElement(c.FlatList,{data:null==(Ut=W.result)?void 0:Ut.response,extraData:null==(Ft=W.result)?void 0:Ft.response,ListEmptyComponent:u.default.createElement(D.default,{body2:!0},C.default.t('NO_ASSURE_MATCH_SEARCH')),keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(c.View,{style:{paddingVertical:15,alignItems:'flex-start'}},u.default.createElement(c.TouchableOpacity,{style:[q.contentActionModalBottom,{borderBottomColor:y.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){'PAID'!==l.state?c.Alert.alert(C.default.t('ERROR_LABEL'),C.default.t('ASSURE_NON_EN_REGLE'),[{text:C.default.t('OK'),onPress:function(){}}]):(he(l),Se(null),Pt(1),Et(!1),Wt('lastname_patient',l.user.lastname),Wt('firstname_patient',l.user.firstname),R(l.user.id,'UNTREATED','EXECUTION',"&network_agent_id="+ne.network_agent_id))}},u.default.createElement(D.default,{body2:!0,semibold:!0},(null!==l.user.firstname?l.user.firstname:'')+" "+(null!==l.user.lastname?l.user.lastname:''))),l.beneficiaries.map(function(t){return u.default.createElement(c.TouchableOpacity,{style:q.beneficiarySubSection,onPress:function(){he(l),Se(t),Pt(0),Et(!1),Wt('lastname_patient',t.lastname),Wt('firstname_patient',t.firstname),R(l.user.id,'UNTREATED','EXECUTION',"&beneficiary_id="+t.id+"&network_agent_id="+ne.network_agent_id)}},u.default.createElement(c.View,{style:{width:10}}),u.default.createElement(c.View,{style:{paddingHorizontal:10,alignItems:'flex-start'}},u.default.createElement(D.default,{subhead:!0,semibold:!0},(null!==t.firstname?t.firstname:'')+" "+(null!==t.lastname?t.lastname:'')+" ("+C.default.t('AYANT_DROITS')+")")))}))}}),u.default.createElement(h.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return Et(!1)}},C.default.t('OK')))))),Ct&&u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(k.default,{isVisible:Ct,onSwipeComplete:function(){wt(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(D.default,{body2:!0,style:{marginTop:10}},C.default.t('MEDICAMENTS')),u.default.createElement(c.FlatList,{data:We.prescriptions,extraData:We.prescriptions,keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(c.TouchableOpacity,{style:[q.contentActionModalBottom,{borderBottomColor:y.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){ve(H({},l,{drugs:!0})),qe(H({},We,{prescriptions:We.prescriptions.map(function(t){return l.id===t.id?H({},t,{checked:!l.checked}):t})})),l.checked||st(!0)}},u.default.createElement(D.default,{body2:!0,semibold:!0,numberOfLines:2},l.quantity+" "+l.drug_or_device.name+" "+(l.unit_price?' - '+l.unit_price:'')+" \n "+l.dosage),l.checked&&u.default.createElement(O.default,{name:"check",size:14,color:y.Color.primaryColor}))}}),u.default.createElement(h.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return wt(!1)}},C.default.t('OK')))))),He&&u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(k.default,{isVisible:He,onSwipeComplete:function(){Ye(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(D.default,{body2:!0,style:{marginTop:10}},C.default.t('LIST_EXECUTION')),u.default.createElement(c.FlatList,{data:null==(Lt=K.result)?void 0:Lt.response,extraData:null==(Mt=K.result)?void 0:Mt.response,ListEmptyComponent:u.default.createElement(D.default,{body2:!0},C.default.t('NO_EXECUTION')),keyExtractor:function(t,l){return l},renderItem:function(t){var l=t.item;return t.index,u.default.createElement(c.TouchableOpacity,{style:[q.contentActionModalBottom,{borderBottomColor:y.Color.borderColor,width:"100%"}],key:l.id,onPress:function(){at(l),$e(!0)}},u.default.createElement(D.default,{body2:!0,semibold:!0},l.type+" #"+l.health_care_sheet_id+" - "+Y(l.created_at).format('YYYY-MM-DD')))}}),u.default.createElement(h.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:function(){return Ye(!1)}},C.default.t('OK')))))),Ze&&u.default.createElement(f.default.Container,{useNativeDriver:!0,visible:Ze},u.default.createElement(f.default.Title,null,C.default.t('DETAIL')),u.default.createElement(c.ScrollView,{persistentScrollbar:!0},u.default.createElement(c.View,{style:[q.blockView,{borderBottomColor:y.Color.borderColor}]},u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(D.default,{style:[q.body2]},C.default.t('PATIENT'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(D.default,{style:[j.Typography.caption1,y.Color.grayColor]},lt.patient_lastname+" "+lt.patient_firstname))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(D.default,{style:[q.body2]},"Situation")),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(D.default,{style:[j.Typography.caption1,y.Color.grayColor]},lt.patient_situation.toLowerCase()))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(D.default,{style:[q.body2]},C.default.t('PRATICIEN'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(D.default,{style:[j.Typography.caption1,y.Color.grayColor]},lt.practitioner_lastname+" "+lt.practitioner_firstname))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(D.default,{style:[q.body2]},C.default.t('CLASSE_PRESTATAIRE'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(D.default,{style:[j.Typography.caption1,y.Color.grayColor]},(0,U.uppercaseFirstLetter)(lt.practitioner_provider_class.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(D.default,{style:[q.body2]},C.default.t('STATE'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(D.default,{style:[j.Typography.caption1,y.Color.grayColor]},(0,U.uppercaseFirstLetter)(lt.state.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(D.default,{style:[q.body2]},"Type")),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(D.default,{style:[j.Typography.caption1,y.Color.grayColor]},(0,U.uppercaseFirstLetter)(lt.type.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(D.default,{style:[q.body2]},C.default.t('CONDITION_PRISE_CHARGE'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(D.default,{style:[j.Typography.caption1,y.Color.grayColor]},(0,U.uppercaseFirstLetter)(lt.care_condition.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(D.default,{style:[q.body2]},C.default.t('INSTITUTE_NAME'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(D.default,{style:[j.Typography.caption1,y.Color.grayColor]},(0,U.uppercaseFirstLetter)(lt.institution_name.toLowerCase())))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(D.default,{style:[q.body2]},"Date")),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},u.default.createElement(D.default,{style:[j.Typography.caption1,y.Color.grayColor]},Y(lt.created_at).format('YYYY-MM-DD')))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(D.default,{style:[q.body2]},C.default.t('PRESTATION'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},lt.performances.map(function(t){return u.default.createElement(D.default,{style:[j.Typography.caption1,y.Color.grayColor]},t.act.name+" \n "+t.amount+" \n")}))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(D.default,{style:[q.body2]},C.default.t('EXAMEN'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},lt.exams.map(function(t){return u.default.createElement(D.default,{style:[j.Typography.caption1,y.Color.grayColor]},t.description+" \n "+t.act.name+" \n")}))),u.default.createElement(c.View,{style:{flexDirection:'row',marginTop:10}},u.default.createElement(c.View,{style:{flex:1}},u.default.createElement(D.default,{style:[q.body2]},C.default.t('MEDICAMENT'))),u.default.createElement(c.View,{style:{flex:1,alignItems:'flex-end'}},lt.prescriptions.map(function(t){return u.default.createElement(D.default,{style:[j.Typography.caption1,y.Color.grayColor]},t.drug_or_device.name+" \n "+t.dosage+" \n")}))))),u.default.createElement(f.default.Button,{bold:!0,label:C.default.t('CANCEL_LABEL'),onPress:function(){$e(!1)}}),u.default.createElement(f.default.Button,{bold:!0,label:C.default.t('OK'),onPress:function(){$e(!1),Et(!1),Ye(!1),qe(lt),Wt('practitioner_firstname',lt.practitioner_firstname),Wt('practitioner_lastname',lt.practitioner_lastname),Oe.current.next()}})),ct&&u.default.createElement(p.Formik,{validationSchema:kt,initialValues:{price:Ve.unit_price},onSubmit:function(t){console.log("Value",Ve),Ve.examen?qe(H({},We,{exams:We.exams.map(function(l){return Ve.id===l.id?H({},l,{unit_price:t.price}):l})})):qe(H({},We,{prescriptions:We.prescriptions.map(function(l){return Ve.id===l.id?H({},l,{unit_price:t.price}):l})})),st(!1)}},function(t){var l=t.values,n=t.errors,o=t.touched,s=t.handleChange,f=(t.setFieldValue,t.setFieldTouched,t.handleBlur),p=t.handleSubmit;return t.isSubmitting,u.default.createElement(c.ScrollView,{style:{flex:1}},u.default.createElement(c.View,{style:[q.containModal,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(k.default,{isVisible:ct,onSwipeComplete:function(){st(!1)},swipeDirection:['down'],style:q.bottomModal},u.default.createElement(c.View,{style:[q.contentFilterBottom,{backgroundColor:y.Color.containerBackgroundColor}]},u.default.createElement(c.View,{style:q.contentSwipeDown},u.default.createElement(c.View,{style:q.lineSwipeDown})),u.default.createElement(D.default,{body2:!0,style:{marginTop:10}},C.default.t('AMOUNT_LABEL')),u.default.createElement(x.default,{style:{marginTop:10},placeholder:C.default.t('AMOUNT_LABEL_DESCRIPTION'),value:l.price,onChangeText:s('price'),onBlur:f('price'),success:o.price&&!n.price,touched:o.price,error:n.price,keyboardType:"numeric"}),u.default.createElement(h.default,{full:!0,style:{marginTop:10,marginBottom:20},onPress:p},C.default.t('OK'))))))})))))});e.default=J},2202,[4,1,7,27,15,18,1046,1639,1827,1950,1031,719,2147,2162,534,1779,2164,718,2158,2180,2182,2186,2187,1013,538,2157,771,749,979,1823,2188,2194,1658,1107,1032,1079,1189]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),l=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=l(r(d[2])),o=t(r(d[3])),f=r(d[4]),u=l(r(d[5])),c=r(d[6]),s=r(d[7]),y=l(r(d[8])),E=r(d[9]),p=r(d[10]),w=l(r(d[11])),C=r(d[12]),x=r(d[13]),T=r(d[14]),V=l(r(d[15])),b=t(r(d[16])),_=l(r(d[17])),h=r(d[18]),I=l(r(d[19])),D=l(r(d[20])),S=l(r(d[21])),A=r(d[22]),R=f.Dimensions.get('window'),L=(R.width,R.height,(0,C.createStructuredSelector)({subscriptionList:x.selectSubscriptionList,activatePaySubscription:x.selectActivatePaySubscription,getConsultation:x.selectGetConsultation,acceptRefuseConsultation:x.selectAcceptRefuseConsultation})),O=(0,c.connect)(L,{fetchActivePaySubscription:p.fetchActivePaySubscription,fetchGetConsultation:p.fetchGetConsultation,fetchAcceptRejectConsultation:p.fetchAcceptRejectConsultation,fetchGetSubscription:p.fetchGetSubscription,fetchGetDemandeAutorisationSoin:p.fetchGetDemandeAutorisationSoin})(function(t){t.navigation;var l=t.fetchGetConsultation,C=t.fetchGetSubscription,x=t.fetchGetDemandeAutorisationSoin,R=(t.fetchAcceptRejectConsultation,t.acceptRefuseConsultation,t.getConsultation),L=(0,c.useDispatch)(),O=(0,o.useState)(null),P=(0,n.default)(O,2),v=P[0],B=P[1],M=(0,o.useState)(!1),U=(0,n.default)(M,2),G=U[0],Y=U[1],k=(0,o.useState)({}),F=(0,n.default)(k,2),W=F[0],j=F[1],z=(0,o.useState)(1),H=(0,n.default)(z,2),K=H[0],q=H[1],X=(0,o.useState)(y.default.t('SOINS')),J=(0,n.default)(X,2),Q=J[0],Z=J[1],$=(0,o.useState)(!1),ee=(0,n.default)($,2),te=ee[0],le=ee[1],ae=(0,o.useState)([]),re=(0,n.default)(ae,2),ne=re[0],oe=re[1];var ie,fe;ie=(0,o.useState)(0),(fe=(0,n.default)(ie,2))[0],fe[1];(0,o.useEffect)(function(){L((0,p.fetchGetConsultationReset)()),L((0,p.fetchAcceptRejectConsultationReset)()),(0,T.readUser)().then(function(t){B(t),console.log("User",t),l(t.id,'ALL','','&pagination=true&page=1')})},[]),(0,o.useEffect)(function(){null!==R.result&&(K { }); }; +export const fetchRenewSubscription = (id, data) => { + return ApiAction({ + url: `${getInsuranceListUrl}/${id}/renew`, + data, + method: 'PUT', + onLoading: fetchStopSubscriptionPending, + onSuccess: fetchStopSubscriptionSuccess, + onError: fetchStopSubscriptionError, + }); +}; + /************************************************************/ export const fetchAddBeneficiaryToSubscriptionPending = () => ({ type: InsuranceActions.ADD_BENEFICIARY_TO_SUBSCRIPTION_PENDING, @@ -529,7 +540,7 @@ export const fetchGetConsultationError = (error: any) => ({ export const fetchGetConsultation = (user_id, state = 'UNTREATED', typeParam = 'CONSULTATION', otherParam = '') => { console.log("user_id", user_id); return ApiAction({ - url: `${consultationUrl}?user_id=${user_id}&state=${state}${otherParam}`, + url: `${consultationUrl}?user_id=${user_id}&state=${state}&type=${typeParam}${otherParam}`, method: 'GET', onLoading: fetchGetConsultationPending, onSuccess: fetchGetConsultationSuccess, diff --git a/screens/optionMenu/OptionsMenu.js b/screens/optionMenu/OptionsMenu.js index e9133a9d..6a9bb30c 100755 --- a/screens/optionMenu/OptionsMenu.js +++ b/screens/optionMenu/OptionsMenu.js @@ -274,7 +274,7 @@ export default class OptionsMenu extends Component { || item === 'epargnerArgentUser' || item === 'askNanoCredit' || item === 'casserEpargneUser' || item === 'envoieWalletToBankAgent' || item === 'reattachAccountUser' || item === 'insuranceSubscriptionScreen' || item === 'addBeneficiaryScreen' || item === 'activateBuySubscriptionScreen' || item === 'saisirFeuilleSoinScreen' || item === 'validateConsultationScreen' || item === 'validateConsultationDetailScreen' || item === 'executerPrescriptionScreen' || item === 'modifierFeuilleSoinScreen' || item === 'modifierExecutionPrescriptionScreen' || item === 'historiqueNanoSanteUserScreen' - || item === 'demandeAutorisationSoinScreen' || item === 'deleteBeneficiaryScreen' || item === 'StopSubscriptionScreen' || item === 'stopSubscriptionScreen') { + || item === 'demandeAutorisationSoinScreen' || item === 'deleteBeneficiaryScreen' || item === 'StopSubscriptionScreen' || item === 'stopSubscriptionScreen' || item === 'renewAssuranceScreen') { return null } else { const color = this.state.currentId === item.id ? theme.accent : "grey" diff --git a/screens/wallet/agent/ExecuterPrescriptionScreen.js b/screens/wallet/agent/ExecuterPrescriptionScreen.js index eb716103..fd8a10ce 100644 --- a/screens/wallet/agent/ExecuterPrescriptionScreen.js +++ b/screens/wallet/agent/ExecuterPrescriptionScreen.js @@ -28,6 +28,7 @@ import {ScreenComponent} from "../../../components/ScreenComponent"; import Button from "../../../components/Button"; import {responsiveWidth} from "react-native-responsive-dimensions"; import { + fetchAcceptRejectConsultationReset, fetchActivePaySubscription, fetchCreateConsultation, fetchCreateConsultationReset, @@ -357,12 +358,24 @@ const ExecuterPrescriptionScreen = ({ } if (getUserByNameOrNumber.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(getUserByNameOrNumber), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetUserByNameOrNumberReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(getUserByNameOrNumber), ); - dispatch(fetchGetUserByNameOrNumberReset()); + dispatch(fetchGetUserByNameOrNumberReset());*/ } }, [getUserByNameOrNumber]); @@ -372,12 +385,24 @@ const ExecuterPrescriptionScreen = ({ setModalConsultation(true); if (getConsultation.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(getConsultation), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetConsultationReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(getConsultation), ); - dispatch(fetchGetConsultationReset()); + dispatch(fetchGetConsultationReset());*/ } }, [getConsultation]); @@ -400,12 +425,24 @@ const ExecuterPrescriptionScreen = ({ } if (executionPrescription.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(executionPrescription), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchExecutionPrescriptionReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(executionPrescription), ); - dispatch(fetchExecutionPrescriptionReset()); + dispatch(fetchExecutionPrescriptionReset());*/ } }, [executionPrescription]); @@ -680,7 +717,7 @@ const ExecuterPrescriptionScreen = ({ } }}> - {`${item.user.firstname} ${item.user.lastname}`} + {`${item.user.firstname !== null ? item.user.firstname : ''} ${item.user.lastname !== null ? item.user.lastname : ''}`} {item.beneficiaries.map((beneficiary) => ( @@ -704,7 +741,7 @@ const ExecuterPrescriptionScreen = ({ - {`${beneficiary.firstname} ${beneficiary.lastname} (${I18n.t('AYANT_DROITS')})`} + {`${beneficiary.firstname !== null ? beneficiary.firstname : ''} ${beneficiary.lastname !== null ? beneficiary.lastname : ''} (${I18n.t('AYANT_DROITS')})`} @@ -1048,8 +1085,8 @@ const ExecuterPrescriptionScreen = ({ switch (currentStep) { case 0: console.log("values", values); - if (values.numero_assure !== '') { - dispatch(fetchGetUserByNameOrNumberReset()); + dispatch(fetchGetUserByNameOrNumberReset()); + if (values.numero_assure !== '' && getUserByNameOrNumber.result === null) { if (isNumeroAssureSearch) fetchGetUserByNameOrNumber(wallet.id_network, `&insured_id=${values.numero_assure}`); else if (isPhoneAssureSearch) diff --git a/screens/wallet/agent/ModifierExecutionPrescriptionScreen.js b/screens/wallet/agent/ModifierExecutionPrescriptionScreen.js index 8e479640..615c6726 100644 --- a/screens/wallet/agent/ModifierExecutionPrescriptionScreen.js +++ b/screens/wallet/agent/ModifierExecutionPrescriptionScreen.js @@ -362,12 +362,24 @@ const ModifierExecutionPrescriptionScreen = ({ } if (getUserByNameOrNumber.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(getUserByNameOrNumber), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetUserByNameOrNumberReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(getUserByNameOrNumber), ); - dispatch(fetchGetUserByNameOrNumberReset()); + dispatch(fetchGetUserByNameOrNumberReset());*/ } }, [getUserByNameOrNumber]); @@ -377,12 +389,24 @@ const ModifierExecutionPrescriptionScreen = ({ setModalConsultation(true); if (getConsultation.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(getConsultation), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetConsultationReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(getConsultation), ); - dispatch(fetchGetConsultationReset()); + dispatch(fetchGetConsultationReset());*/ } }, [getConsultation]); @@ -405,12 +429,24 @@ const ModifierExecutionPrescriptionScreen = ({ } if (modifyPrescription.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(modifyPrescription), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchModifyPrescriptionReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(modifyPrescription), ); - dispatch(fetchModifyPrescriptionReset()); + dispatch(fetchModifyPrescriptionReset());*/ } }, [modifyPrescription]); @@ -685,7 +721,7 @@ const ModifierExecutionPrescriptionScreen = ({ } }}> - {`${item.user.firstname} ${item.user.lastname}`} + {`${item.user.firstname !== null ? item.user.firstname : ''} ${item.user.lastname !== null ? item.user.lastname : ''}`} {item.beneficiaries.map((beneficiary) => ( @@ -709,7 +745,7 @@ const ModifierExecutionPrescriptionScreen = ({ - {`${beneficiary.firstname} ${beneficiary.lastname} (${I18n.t('AYANT_DROITS')})`} + {`${beneficiary.firstname !== null ? beneficiary.firstname : ''} ${beneficiary.lastname !== null ? beneficiary.lastname : ''} (${I18n.t('AYANT_DROITS')})`} @@ -1054,7 +1090,7 @@ const ModifierExecutionPrescriptionScreen = ({ switch (currentStep) { case 0: console.log("values", values); - if (values.numero_assure !== '') { + if (values.numero_assure !== '' && getUserByNameOrNumber.result === null) { dispatch(fetchGetUserByNameOrNumberReset()); if (isNumeroAssureSearch) fetchGetUserByNameOrNumber(wallet.id_network, `&insured_id=${values.numero_assure}`); diff --git a/screens/wallet/agent/ModifierFeuilleSoinScreen.js b/screens/wallet/agent/ModifierFeuilleSoinScreen.js index e124e862..f3632788 100644 --- a/screens/wallet/agent/ModifierFeuilleSoinScreen.js +++ b/screens/wallet/agent/ModifierFeuilleSoinScreen.js @@ -428,12 +428,24 @@ const ModifierFeuilleSoinScreen = ({ } if (getUserByNameOrNumber.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(getUserByNameOrNumber), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetUserByNameOrNumberReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(getUserByNameOrNumber), ); - dispatch(fetchGetUserByNameOrNumberReset()); + dispatch(fetchGetUserByNameOrNumberReset());*/ } }, [getUserByNameOrNumber]); @@ -443,12 +455,24 @@ const ModifierFeuilleSoinScreen = ({ setModalConsultation(true); if (getConsultation.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(getConsultation), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetConsultationReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(getConsultation), ); - dispatch(fetchGetConsultationReset()); + dispatch(fetchGetConsultationReset());*/ } }, [getConsultation]); @@ -471,12 +495,24 @@ const ModifierFeuilleSoinScreen = ({ } if (modifyPrescription.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(modifyPrescription), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchModifyPrescriptionReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(modifyPrescription), ); - dispatch(fetchModifyPrescriptionReset()); + dispatch(fetchModifyPrescriptionReset());*/ } }, [modifyPrescription]); @@ -1971,7 +2007,7 @@ const ModifierFeuilleSoinScreen = ({ } }}> - {`${item.user.firstname} ${item.user.lastname}`} + {`${item.user.firstname !== null ? item.user.firstname : ''} ${item.user.lastname !== null ? item.user.lastname : ''}`} {item.beneficiaries.map((beneficiary) => ( @@ -1994,7 +2030,7 @@ const ModifierFeuilleSoinScreen = ({ - {`${beneficiary.firstname} ${beneficiary.lastname} (${I18n.t('AYANT_DROITS')})`} + {`${beneficiary.firstname !== null ? beneficiary.firstname : ''} ${beneficiary.lastname !== null ? beneficiary.lastname : ''} (${I18n.t('AYANT_DROITS')})`} @@ -2383,7 +2419,7 @@ const ModifierFeuilleSoinScreen = ({ switch (currentStep) { case 0: console.log("values", values); - if (values.numero_assure !== '') { + if (values.numero_assure !== '' && getUserByNameOrNumber.result === null) { dispatch(fetchGetUserByNameOrNumberReset()); if (isNumeroAssureSearch) fetchGetUserByNameOrNumber(wallet.id_network, `&insured_id=${values.numero_assure}`); diff --git a/screens/wallet/agent/SaisirFeuilleSoinScreen.js b/screens/wallet/agent/SaisirFeuilleSoinScreen.js index 99c3a938..429a4e60 100644 --- a/screens/wallet/agent/SaisirFeuilleSoinScreen.js +++ b/screens/wallet/agent/SaisirFeuilleSoinScreen.js @@ -48,7 +48,7 @@ import { fetchGetUserByIdQRCode, fetchGetUserByIdQRCodeReset, fetchGetUserByNameOrNumber, - fetchGetUserByNameOrNumberReset + fetchGetUserByNameOrNumberReset, fetchModifyPrescriptionReset } from "../../../redux/insurance/insurance.actions"; import DropdownAlert from "react-native-dropdownalert"; import {readUser} from "../../../webservice/AuthApi"; @@ -403,12 +403,24 @@ const SaisirFeuilleSoinScreen = ({ } if (getUserByNameOrNumber.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(getUserByNameOrNumber), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetUserByNameOrNumberReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(getUserByNameOrNumber), ); - dispatch(fetchGetUserByNameOrNumberReset()); + dispatch(fetchGetUserByNameOrNumberReset());*/ } }, [getUserByNameOrNumber]); @@ -436,12 +448,24 @@ const SaisirFeuilleSoinScreen = ({ } if (getDrugAppareil.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(getDrugAppareil), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetDrugAppareilReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(getDrugAppareil), ); - dispatch(fetchGetDrugAppareilReset()); + dispatch(fetchGetDrugAppareilReset());*/ } }, [getDrugAppareil]); @@ -452,12 +476,24 @@ const SaisirFeuilleSoinScreen = ({ } if (addDrug.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(addDrug), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchAddDrugReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(addDrug), ); - dispatch(fetchAddDrugReset()); + dispatch(fetchAddDrugReset());*/ } }, [addDrug]); @@ -480,12 +516,24 @@ const SaisirFeuilleSoinScreen = ({ } if (createConsultation.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(createConsultation), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchCreateConsultationReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(createConsultation), ); - dispatch(fetchCreateConsultationReset()); + dispatch(fetchCreateConsultationReset());*/ } }, [createConsultation]); @@ -1246,13 +1294,13 @@ const SaisirFeuilleSoinScreen = ({ 'firstname_patient', item.user.firstname, ); - fetchGetNetworkActs(wallet.id_network, '', `&user_id=${item.id}`); + fetchGetNetworkActs(wallet.id_network, '', `&user_id=${item.user.id}`); dispatch(fetchGetUserByNameOrNumberReset()); wizard.current.next(); } }}> - {`${item.user.firstname} ${item.user.lastname}`} + {`${item.user.firstname !== null ? item.user.firstname : ''} ${item.user.lastname !== null ? item.user.lastname : ''}`} {item.beneficiaries.map((beneficiary) => ( @@ -1270,14 +1318,14 @@ const SaisirFeuilleSoinScreen = ({ 'firstname_patient', beneficiary.firstname, ); - fetchGetNetworkActs(wallet.id_network, '', `&user_id=${item.id}&beneficiary_id=${beneficiary.id}`); + fetchGetNetworkActs(wallet.id_network, '', `&user_id=${item.user.id}&beneficiary_id=${beneficiary.id}`); dispatch(fetchGetUserByNameOrNumberReset()); wizard.current.next(); }}> - {`${beneficiary.firstname} ${beneficiary.lastname} (${I18n.t('AYANT_DROITS')})`} + {`${beneficiary.firstname !== null ? beneficiary.firstname : ''} ${beneficiary.lastname !== null ? beneficiary.lastname : ''} (${I18n.t('AYANT_DROITS')})`} @@ -1387,11 +1435,22 @@ const SaisirFeuilleSoinScreen = ({ onSubmit: values => { if (prestations.length === 0) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + I18n.t('YOU_MUST_ADD_AT_LEAST_ONE_PRESTATION'), + [ + { + text: I18n.t("OK"), onPress: () => { + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), I18n.t('YOU_MUST_ADD_AT_LEAST_ONE_PRESTATION'), - ); + );*/ } else { fetchCreateConsultation({ insured_id: assure.insured_id, @@ -1418,8 +1477,8 @@ const SaisirFeuilleSoinScreen = ({ switch (currentStep) { case 0: console.log("values", values); - if (values.numero_assure !== '') { - dispatch(fetchGetUserByNameOrNumberReset()); + dispatch(fetchGetUserByNameOrNumberReset()); + if (values.numero_assure !== '' && getUserByNameOrNumber.result === null) { if (isNumeroAssureSearch) fetchGetUserByNameOrNumber(wallet.id_network, `&insured_id=${values.numero_assure}`); else if (isPhoneAssureSearch) diff --git a/screens/wallet/user/ActivateBuySubscriptionScreen.js b/screens/wallet/user/ActivateBuySubscriptionScreen.js index dbc6a4d3..476931b1 100644 --- a/screens/wallet/user/ActivateBuySubscriptionScreen.js +++ b/screens/wallet/user/ActivateBuySubscriptionScreen.js @@ -20,7 +20,7 @@ import FontAwesome from "react-native-vector-icons/FontAwesome"; import {responsiveWidth} from "react-native-responsive-dimensions"; import { fetchActivePaySubscription, - fetchActivePaySubscriptionReset, + fetchActivePaySubscriptionReset, fetchCreateConsultationReset, fetchGetSubscriptionList, fetchGetSubscriptionListReset } from "../../../redux/insurance/insurance.actions"; @@ -216,12 +216,24 @@ const ActivateBuySubscriptionScreen = ({ } if (subscriptionList.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(subscriptionList), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetSubscriptionListReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(subscriptionList), ); - dispatch(fetchGetSubscriptionListReset()); + dispatch(fetchGetSubscriptionListReset());*/ } }, [subscriptionList]); @@ -244,12 +256,24 @@ const ActivateBuySubscriptionScreen = ({ } if (activatePaySubscription.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(activatePaySubscription), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchActivePaySubscriptionReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(activatePaySubscription), ); - dispatch(fetchActivePaySubscriptionReset()); + dispatch(fetchActivePaySubscriptionReset());*/ } }, [activatePaySubscription]); diff --git a/screens/wallet/user/AddBeneficiaryScreen.js b/screens/wallet/user/AddBeneficiaryScreen.js index e22ca947..ca99d1e2 100644 --- a/screens/wallet/user/AddBeneficiaryScreen.js +++ b/screens/wallet/user/AddBeneficiaryScreen.js @@ -36,6 +36,7 @@ import {responsiveWidth} from "react-native-responsive-dimensions"; import SwitchSelector from "react-native-switch-selector"; import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons"; import { + fetchActivePaySubscriptionReset, fetchAddBeneficiaryToSubscription, fetchAddBeneficiaryToSubscriptionReset, fetchGetInsurancePrimeAmount, @@ -303,12 +304,24 @@ const AddBeneficiaryScreen = ({ } if (subscriptionList.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(subscriptionList), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetListInsuranceReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(subscriptionList), ); - dispatch(fetchGetListInsuranceReset()); + dispatch(fetchGetListInsuranceReset());*/ } }, [subscriptionList]); @@ -331,12 +344,24 @@ const AddBeneficiaryScreen = ({ } if (addBeneficiaryToSubscription.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(addBeneficiaryToSubscription), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchSubscribeInsuranceReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(addBeneficiaryToSubscription), ); - dispatch(fetchSubscribeInsuranceReset()); + dispatch(fetchSubscribeInsuranceReset());*/ } }, [addBeneficiaryToSubscription]); @@ -347,11 +372,22 @@ const AddBeneficiaryScreen = ({ if (subscription !== null) { if (beneficiaries.length === parseInt(subscription.max_number_of_beneficiaries)) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + I18n.t('NUMBER_MAX_BENEFICIARY'), + [ + { + text: I18n.t("OK"), onPress: () => { + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), I18n.t('NUMBER_MAX_BENEFICIARY'), - ); + );*/ } else { console.log("affiliation", affiliation); let beneficiariesTemp = beneficiaries; @@ -381,12 +417,24 @@ const AddBeneficiaryScreen = ({ } if (uploadInsuranceImages.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(uploadInsuranceImages), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchUploadInsuranceReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(uploadInsuranceImages), ); - dispatch(fetchUploadInsuranceReset()); + dispatch(fetchUploadInsuranceReset());*/ } }, [uploadInsuranceImages]); @@ -959,7 +1007,7 @@ const AddBeneficiaryScreen = ({ onPress={() => { if (subscription === null) { dropDownAlertRef.alertWithType( - 'error', + 'warn', I18n.t('ERROR_LABEL'), I18n.t('PLEASE_SELECT_INSURANCE_BEFORE'), ); diff --git a/screens/wallet/user/DeleteBeneficiaryScreen.js b/screens/wallet/user/DeleteBeneficiaryScreen.js index 5c265c96..d0a3aebe 100644 --- a/screens/wallet/user/DeleteBeneficiaryScreen.js +++ b/screens/wallet/user/DeleteBeneficiaryScreen.js @@ -250,12 +250,24 @@ const DeleteBeneficiaryScreen = ({ } if (subscriptionList.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(subscriptionList), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetListInsuranceReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(subscriptionList), ); - dispatch(fetchGetListInsuranceReset()); + dispatch(fetchGetListInsuranceReset());*/ } }, [subscriptionList]); @@ -278,12 +290,24 @@ const DeleteBeneficiaryScreen = ({ } if (deleteBeneficiary.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(deleteBeneficiary), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchDeleteBeneficiaryReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(deleteBeneficiary), ); - dispatch(fetchDeleteBeneficiaryReset()); + dispatch(fetchDeleteBeneficiaryReset());*/ } }, [deleteBeneficiary]); diff --git a/screens/wallet/user/DemandeAutorisationSoinScreen.js b/screens/wallet/user/DemandeAutorisationSoinScreen.js index ca036693..adb72b89 100644 --- a/screens/wallet/user/DemandeAutorisationSoinScreen.js +++ b/screens/wallet/user/DemandeAutorisationSoinScreen.js @@ -25,11 +25,15 @@ import {ScreenComponent} from "../../../components/ScreenComponent"; import { fetchAcceptRejectConsultation, fetchAcceptRejectConsultationReset, - fetchActivePaySubscription, fetchDemaneAutorisationSoin, fetchDemaneAutorisationSoinReset, + fetchActivePaySubscription, + fetchDeleteBeneficiaryReset, + fetchDemaneAutorisationSoin, + fetchDemaneAutorisationSoinReset, fetchGetConsultation, fetchGetConsultationReset, fetchGetListInsurance, - fetchGetListInsuranceReset, fetchGetListInsuranceWithBeneficiaries, + fetchGetListInsuranceReset, + fetchGetListInsuranceWithBeneficiaries, fetchGetNetworkActs } from "../../../redux/insurance/insurance.actions"; import DropdownAlert from "react-native-dropdownalert"; @@ -111,12 +115,24 @@ const DemandeAutorisationSoinScreen = ({ useEffect(() => { if (getConsultation.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(getConsultation), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetConsultationReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(getConsultation), ); - dispatch(fetchGetConsultationReset()); + dispatch(fetchGetConsultationReset());*/ } }, [getConsultation]); @@ -132,12 +148,24 @@ const DemandeAutorisationSoinScreen = ({ } if (insuranceList.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(insuranceList), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetListInsuranceReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(insuranceList), ); - dispatch(fetchGetListInsuranceReset()); + dispatch(fetchGetListInsuranceReset());*/ } }, [insuranceList]); @@ -160,12 +188,24 @@ const DemandeAutorisationSoinScreen = ({ } if (demandeAutorisationSoin.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(demandeAutorisationSoin), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchDemaneAutorisationSoinReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(demandeAutorisationSoin), ); - dispatch(fetchDemaneAutorisationSoinReset()); + dispatch(fetchDemaneAutorisationSoinReset());*/ } }, [demandeAutorisationSoin]); diff --git a/screens/wallet/user/HistoriqueNanoSanteUserScreen.js b/screens/wallet/user/HistoriqueNanoSanteUserScreen.js index 1d78c8a0..dcbadc8a 100644 --- a/screens/wallet/user/HistoriqueNanoSanteUserScreen.js +++ b/screens/wallet/user/HistoriqueNanoSanteUserScreen.js @@ -7,7 +7,7 @@ */ import React, {useEffect, useState} from 'react'; import { - ActivityIndicator, + ActivityIndicator, Alert, Dimensions, FlatList, Platform, @@ -25,7 +25,7 @@ import {ScreenComponent} from "../../../components/ScreenComponent"; import { fetchAcceptRejectConsultation, fetchAcceptRejectConsultationReset, - fetchActivePaySubscription, + fetchActivePaySubscription, fetchDemaneAutorisationSoinReset, fetchGetConsultation, fetchGetConsultationReset, fetchGetDemandeAutorisationSoin, fetchGetSubscription @@ -106,12 +106,24 @@ const HistoriqueNanoSanteUserScreen = ({ } if (getConsultation.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(getConsultation), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetConsultationReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(getConsultation), ); - dispatch(fetchGetConsultationReset()); + dispatch(fetchGetConsultationReset());*/ } //forceUpdate(); }, [getConsultation]); diff --git a/screens/wallet/user/InsuranceSubscriptionScreen.js b/screens/wallet/user/InsuranceSubscriptionScreen.js index 229cdfb6..4dc055a0 100644 --- a/screens/wallet/user/InsuranceSubscriptionScreen.js +++ b/screens/wallet/user/InsuranceSubscriptionScreen.js @@ -36,6 +36,7 @@ import {responsiveWidth} from "react-native-responsive-dimensions"; import SwitchSelector from "react-native-switch-selector"; import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons"; import { + fetchGetConsultationReset, fetchGetInsurancePrimeAmount, fetchGetInsurancePrimeAmountReset, fetchGetListInsurance, @@ -291,12 +292,24 @@ const InsuranceSubscriptionScreen = ({ } if (insuranceList.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(insuranceList), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetListInsuranceReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(insuranceList), ); - dispatch(fetchGetListInsuranceReset()); + dispatch(fetchGetListInsuranceReset());*/ } }, [insuranceList]); @@ -319,12 +332,24 @@ const InsuranceSubscriptionScreen = ({ } if (subscribeInsurance.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(subscribeInsurance), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchSubscribeInsuranceReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(subscribeInsurance), ); - dispatch(fetchSubscribeInsuranceReset()); + dispatch(fetchSubscribeInsuranceReset());*/ } }, [subscribeInsurance]); @@ -333,12 +358,24 @@ const InsuranceSubscriptionScreen = ({ setShowModalDetail(true); if (insurancePrimeAmount.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(insurancePrimeAmount), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetInsurancePrimeAmountReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(insurancePrimeAmount), ); - dispatch(fetchGetInsurancePrimeAmountReset()); + dispatch(fetchGetInsurancePrimeAmountReset());*/ } }, [insurancePrimeAmount]); @@ -352,11 +389,22 @@ const InsuranceSubscriptionScreen = ({ if (insurance !== null) { if (beneficiaries.length === parseInt(insurance.max_number_of_beneficiaries)) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + I18n.t("NUMBER_MAX_BENEFICIARY"), + [ + { + text: I18n.t("OK"), onPress: () => { + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), I18n.t('NUMBER_MAX_BENEFICIARY'), - ); + );*/ } else { console.log("affiliation", affiliation); let beneficiariesTemp = beneficiaries; @@ -385,12 +433,24 @@ const InsuranceSubscriptionScreen = ({ } if (uploadInsuranceImages.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(uploadInsuranceImages), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchUploadInsuranceReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(uploadInsuranceImages), ); - dispatch(fetchUploadInsuranceReset()); + dispatch(fetchUploadInsuranceReset());*/ } }, [uploadInsuranceImages]); @@ -1170,11 +1230,23 @@ const InsuranceSubscriptionScreen = ({ { if (insurance === null) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + I18n.t("PLEASE_SELECT_INSURANCE_BEFORE"), + Utils.getErrorMsg(uploadInsuranceImages), + [ + { + text: I18n.t("OK"), onPress: () => { + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), I18n.t('PLEASE_SELECT_INSURANCE_BEFORE'), - ); + );*/ } else { setModalVisible(true); setShowDateNaissancePicker(false); diff --git a/screens/wallet/user/RenewAssuranceScreen.js b/screens/wallet/user/RenewAssuranceScreen.js new file mode 100644 index 00000000..9ddcb078 --- /dev/null +++ b/screens/wallet/user/RenewAssuranceScreen.js @@ -0,0 +1,410 @@ +import React, {useEffect, useState} from 'react'; +import {Alert, Dimensions, KeyboardAvoidingView, Platform, ScrollView, StyleSheet, View,} from 'react-native'; +import {connect, useDispatch} from 'react-redux'; +import {Formik} from 'formik'; +import * as Yup from 'yup'; +import * as Utils from '../../../utils/UtilsFunction'; +import {Color} from "../../../config/Color"; +import I18n from 'react-native-i18n'; +import {ScreenComponent} from "../../../components/ScreenComponent"; +import PasswordInput from '../../../components/PasswordInput'; +import Button from "../../../components/Button"; +import FontAwesome from "react-native-vector-icons/FontAwesome"; +import {responsiveWidth} from "react-native-responsive-dimensions"; +import { + fetchStopSubscription, + fetchStopSubscriptionReset, + fetchGetSubscriptionList, + fetchGetSubscriptionListReset, + fetchGetListInsuranceReset, + fetchGetListInsuranceWithBeneficiaries, + fetchRenewSubscription, fetchUploadInsuranceReset +} from "../../../redux/insurance/insurance.actions"; +import DropdownAlert from "react-native-dropdownalert"; +import {readUser} from "../../../webservice/AuthApi"; +import * as Animatable from 'react-native-animatable'; +import {createStructuredSelector} from "reselect"; +import { + selectInsuranceList, + selectStopSubscription, + selectSubscriptionList +} from "../../../redux/insurance/insurance.selector"; + +import {Dropdown} from "react-native-material-dropdown"; + +let moment = require('moment-timezone'); + +const {width, height} = Dimensions.get('window'); +const CIRCLE_SIZE = width * 0.5; + +const styles = StyleSheet.create({ + textInput: { + height: 46, + backgroundColor: Color.fieldColor, + borderRadius: 5, + marginTop: 10, + padding: 10, + width: '100%', + }, + lineRow: { + flexDirection: 'row', + justifyContent: 'space-between', + paddingBottom: 20, + }, + contain: { + alignItems: 'center', + marginTop: 40, + paddingBottom: 20, + paddingLeft: 20, + paddingRight: 20, + flex: 1, + }, + circle: { + width: CIRCLE_SIZE, + height: CIRCLE_SIZE, + borderRadius: CIRCLE_SIZE / 2, + position: 'absolute', + top: '15%', + }, + circleContainer: { + alignItems: 'flex-end', + right: -(CIRCLE_SIZE / 3), + top: -(CIRCLE_SIZE / 1.5), + }, + lineSeparator: { + borderWidth: 1, + width: '40%', + height: 1, + alignSelf: 'center', + }, + line: { + width: 1, + height: 14, + backgroundColor: Color.grayColor, + marginLeft: 10, + }, + contentModeView: { + width: 30, + height: '100%', + alignItems: 'flex-end', + justifyContent: 'center', + }, + contentFilter: { + flexDirection: 'row', + alignItems: 'center', + marginLeft: 10, + }, + bottomModal: { + justifyContent: 'flex-end', + margin: 0, + }, + contentFilterBottom: { + width: "100%", + borderTopLeftRadius: 8, + borderTopRightRadius: 8, + paddingHorizontal: 20 + }, + contentSwipeDown: { + paddingTop: 10, + alignItems: 'center', + }, + lineSwipeDown: { + width: 30, + height: 2.5, + backgroundColor: Color.dividerColor, + }, + contentActionModalBottom: { + flexDirection: 'row', + paddingVertical: 15, + justifyContent: 'space-between', + borderBottomWidth: 1, + }, + containModal: { + paddingVertical: 10, + paddingHorizontal: 20, + flexDirection: 'row', + justifyContent: 'space-between', + }, + floatingButtonAdd: { + backgroundColor: Color.accentColor, + position: "absolute", + width: 25, + bottom: 0, + zIndex: 1000, + right: 20, + top: 35, + height: 25, + borderRadius: 12.5, + alignItems: 'center', + justifyContent: 'center', + }, + contentSwitch: { + width: responsiveWidth(40), + }, + switch: {}, + choosePhotoBtn: { + marginTop: 10, + marginBottom: 10, + width: "auto", + height: "auto", + padding: 5, + alignItems: 'center', + borderColor: Color.borderColor, + marginRight: 10, + elevation: 2, + }, + checkbox: { + alignSelf: "center", + color: "white" + }, + itemAmountPerMonth: { + paddingLeft: 10, + marginTop: 10, + flexDirection: 'row', + }, + dot: { + width: 12, + height: 12, + borderRadius: 6 + }, + blockView: { + paddingVertical: 10, + borderBottomWidth: 0.5, + }, +}); + +const RenewAssuranceScreen = ({ + stopSubscription, + fetchGetSubscriptionList, + fetchGetListInsuranceWithBeneficiaries, + insuranceList, + fetchRenewSubscription, + navigation + }) => { + + const [user, setUser] = useState(null); + const [password, setPassword] = useState(null); + const [subscriptions, setSubscriptions] = useState([]); + const [subscription, setSubscription] = useState(null); + + const dispatch = useDispatch(); + let dropDownAlertRef: any = null; + let subscriptionRef = null; + let amountPerMonthRef = null; + + useEffect(() => { + readUser().then((user) => { + setUser(user) + }); + dispatch(fetchGetListInsuranceReset()); + dispatch(fetchGetSubscriptionListReset()); + dispatch(fetchStopSubscriptionReset()); + }, []); + + useEffect(() => { + if (user !== null) { + console.log("user", user.id); + fetchGetListInsuranceWithBeneficiaries(`?user_id=${user.id}&type=STOPPED`); + //fetchGetSubscriptionList(user.id, 'ACCEPTED', true); + } + }, [user]); + + useEffect(() => { + if (insuranceList.result !== null) { + let insuranceListTemp = []; + insuranceList.result.response.map((subscriptionItem, index) => { + insuranceListTemp.push(subscriptionItem); + }); + setSubscriptions(insuranceListTemp); + } + + if (insuranceList.error) { + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(insuranceList), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetSubscriptionListReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( + 'error', + I18n.t('ERROR_LABEL'), + Utils.getErrorMsg(insuranceList), + ); + dispatch(fetchGetSubscriptionListReset());*/ + } + }, [insuranceList]); + + useEffect(() => { + if (stopSubscription.result !== null) { + Alert.alert( + I18n.t("SUCCESS"), + stopSubscription.result.response, + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchStopSubscriptionReset()); + navigation.goBack(); + } + } + + ], + {cancelable: false} + ) + } + + if (stopSubscription.error) { + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(stopSubscription), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchStopSubscriptionReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( + 'error', + I18n.t('ERROR_LABEL'), + Utils.getErrorMsg(stopSubscription), + ); + dispatch(fetchStopSubscriptionReset());*/ + } + }, [stopSubscription]); + + const RegisterSchema = Yup.object().shape({ + password: Yup.string() + .required(I18n.t('THIS_FIELD_IS_REQUIRED')) + }); + + return ( + + (dropDownAlertRef = ref)}/> + + + + { + if (user !== null) { + if (subscription === null) { + subscriptionRef.shake(800); + } else { + console.log("subscription", subscription); + fetchRenewSubscription(subscription.id, {password: values.password}); + } + } + }}> + + {({ + values, + errors, + touched, + handleChange, + handleBlur, + handleSubmit, + isSubmitting, + }) => ( + + { + subscriptionRef = comp + }} + style={{ + width: responsiveWidth(90), + height: 60, + alignSelf: 'center', + borderRadius: 10, + paddingLeft: 20, + paddingRight: 20, + backgroundColor: 'white' + }}> + { + console.log("Value", value); + setSubscription( + { + id: value.id, + insurance_subscription_id: value.insurance_subscription_id, + network_id: value.network_id, + user_id: value.user_id, + number_of_months: value.number_of_months, + bonus_amount: value.bonus_amount, + number_of_beneficiaries: value.number_of_beneficiaries, + total_bonus_amount: value.total_bonus_amount, + state: value.state, + created_at: value.created_at, + updated_at: value.updated_at, + start_at: value.start_at, + end_at: value.end_at, + reason: value.reason, + network: value.network, + beneficiaries: value.beneficiaries + } + ); + }} + valueExtractor={(value) => { + return value + }} + labelExtractor={(value) => { + return `${value.network.name} | ${I18n.t('ETAT')}: ${value.state} | ${I18n.t('AMOUNT_LABEL')}: ${value.total_bonus_amount}` + }} + /> + + + } + value={values.password} + onBlur={handleBlur('password')} + success={touched.password && !errors.password} + touched={touched.password} + error={errors.password} + /> + + + + )} + + + + + + ); +}; + +const mapStateToProps = createStructuredSelector({ + insuranceList: selectInsuranceList, + stopSubscription: selectStopSubscription +}); + +export default connect(mapStateToProps, { + fetchRenewSubscription, + fetchGetListInsuranceWithBeneficiaries, + fetchGetSubscriptionList, +})( + RenewAssuranceScreen, +); diff --git a/screens/wallet/user/StopSubscriptionScreen.js b/screens/wallet/user/StopSubscriptionScreen.js index 52120459..898dd9ff 100644 --- a/screens/wallet/user/StopSubscriptionScreen.js +++ b/screens/wallet/user/StopSubscriptionScreen.js @@ -15,13 +15,17 @@ import { fetchStopSubscription, fetchStopSubscriptionReset, fetchGetSubscriptionList, - fetchGetSubscriptionListReset + fetchGetSubscriptionListReset, fetchGetListInsuranceReset, fetchGetListInsuranceWithBeneficiaries } from "../../../redux/insurance/insurance.actions"; import DropdownAlert from "react-native-dropdownalert"; import {readUser} from "../../../webservice/AuthApi"; import * as Animatable from 'react-native-animatable'; import {createStructuredSelector} from "reselect"; -import {selectStopSubscription, selectSubscriptionList} from "../../../redux/insurance/insurance.selector"; +import { + selectInsuranceList, + selectStopSubscription, + selectSubscriptionList +} from "../../../redux/insurance/insurance.selector"; import {Dropdown} from "react-native-material-dropdown"; @@ -169,7 +173,8 @@ const styles = StyleSheet.create({ const StopSubscriptionScreen = ({ stopSubscription, fetchGetSubscriptionList, - subscriptionList, + fetchGetListInsuranceWithBeneficiaries, + insuranceList, fetchStopSubscription, navigation }) => { @@ -188,6 +193,7 @@ const StopSubscriptionScreen = ({ readUser().then((user) => { setUser(user) }); + dispatch(fetchGetListInsuranceReset()); dispatch(fetchGetSubscriptionListReset()); dispatch(fetchStopSubscriptionReset()); }, []); @@ -195,28 +201,41 @@ const StopSubscriptionScreen = ({ useEffect(() => { if (user !== null) { console.log("user", user.id); - fetchGetSubscriptionList(user.id, 'ACCEPTED', true); + fetchGetListInsuranceWithBeneficiaries(`?user_id=${user.id}&type=EDITABLE`); + //fetchGetSubscriptionList(user.id, 'ACCEPTED', true); } }, [user]); useEffect(() => { - if (subscriptionList.result !== null) { - let subscriptionListTemp = []; - subscriptionList.result.response.map((subscriptionItem, index) => { - subscriptionListTemp.push(subscriptionItem); + if (insuranceList.result !== null) { + let insuranceListTemp = []; + insuranceList.result.response.map((subscriptionItem, index) => { + insuranceListTemp.push(subscriptionItem); }); - setSubscriptions(subscriptionListTemp); + setSubscriptions(insuranceListTemp); } - if (subscriptionList.error) { - dropDownAlertRef.alertWithType( + if (insuranceList.error) { + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(insuranceList), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetSubscriptionListReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), - Utils.getErrorMsg(subscriptionList), + Utils.getErrorMsg(insuranceList), ); - dispatch(fetchGetSubscriptionListReset()); + dispatch(fetchGetSubscriptionListReset());*/ } - }, [subscriptionList]); + }, [insuranceList]); useEffect(() => { if (stopSubscription.result !== null) { @@ -237,12 +256,24 @@ const StopSubscriptionScreen = ({ } if (stopSubscription.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(stopSubscription), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchStopSubscriptionReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(stopSubscription), ); - dispatch(fetchStopSubscriptionReset()); + dispatch(fetchStopSubscriptionReset());*/ } }, [stopSubscription]); @@ -363,12 +394,13 @@ const StopSubscriptionScreen = ({ }; const mapStateToProps = createStructuredSelector({ - subscriptionList: selectSubscriptionList, + insuranceList: selectInsuranceList, stopSubscription: selectStopSubscription }); export default connect(mapStateToProps, { fetchStopSubscription, + fetchGetListInsuranceWithBeneficiaries, fetchGetSubscriptionList, })( StopSubscriptionScreen, diff --git a/screens/wallet/user/ValidateConsultationDetailScreen.js b/screens/wallet/user/ValidateConsultationDetailScreen.js index 5377c0ac..3ca338ed 100644 --- a/screens/wallet/user/ValidateConsultationDetailScreen.js +++ b/screens/wallet/user/ValidateConsultationDetailScreen.js @@ -23,7 +23,7 @@ import { fetchAcceptRejectConsultation, fetchAcceptRejectConsultationReset, fetchActivePaySubscription, - fetchGetConsultation + fetchGetConsultation, fetchStopSubscriptionReset } from "../../../redux/insurance/insurance.actions"; import * as Utils from "../../../utils/UtilsFunction"; import {uppercaseFirstLetter} from "../../../utils/UtilsFunction"; @@ -65,12 +65,24 @@ const ValidateConsultationDetailScreen = ({navigation, fetchAcceptRejectConsulta } if (acceptRefuseConsultation.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(acceptRefuseConsultation), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchAcceptRejectConsultationReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(acceptRefuseConsultation), ); - dispatch(fetchAcceptRejectConsultationReset()); + dispatch(fetchAcceptRejectConsultationReset());*/ } }, [acceptRefuseConsultation]); diff --git a/screens/wallet/user/ValidateConsultationScreen.js b/screens/wallet/user/ValidateConsultationScreen.js index 4b958c53..9b798ef3 100644 --- a/screens/wallet/user/ValidateConsultationScreen.js +++ b/screens/wallet/user/ValidateConsultationScreen.js @@ -75,12 +75,24 @@ const ValidateConsultationScreen = ({ useEffect(() => { if (getConsultation.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(getConsultation), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchGetConsultationReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(getConsultation), ); - dispatch(fetchGetConsultationReset()); + dispatch(fetchGetConsultationReset());*/ } }, [getConsultation]); @@ -106,12 +118,24 @@ const ValidateConsultationScreen = ({ } if (acceptRefuseConsultation.error) { - dropDownAlertRef.alertWithType( + Alert.alert( + I18n.t("ERROR_LABLE"), + Utils.getErrorMsg(acceptRefuseConsultation), + [ + { + text: I18n.t("OK"), onPress: () => { + dispatch(fetchAcceptRejectConsultationReset()); + } + } + ], + { cancelable: false } + ); +/* dropDownAlertRef.alertWithType( 'error', I18n.t('ERROR_LABEL'), Utils.getErrorMsg(acceptRefuseConsultation), ); - dispatch(fetchAcceptRejectConsultationReset()); + dispatch(fetchAcceptRejectConsultationReset());*/ setDisplayModalHistory(false); if (user !== null) fetchGetConsultation(user.id, 'UNTREATED'); diff --git a/utils/UtilsFunction.js b/utils/UtilsFunction.js index 4372f6b4..0ea03d0f 100755 --- a/utils/UtilsFunction.js +++ b/utils/UtilsFunction.js @@ -503,7 +503,7 @@ export const optionNanoSanteUserScreen = { }, { title: 'RENEW_INSSURANCE', - screen: '', + screen: 'renewAssuranceScreen', icon: "cash-refund" }, {