//@ts-nocheck
import { useNavigation } from '@react-navigation/native';
import { observer } from 'mobx-react-lite';
import React, { useState } from 'react';
import { Linking, SafeAreaView, TouchableOpacity, View } from 'react-native';
import WebView from 'react-native-webview';
import { ScreenNames } from '../../navigation';
import { CallRed, GuideLineIcon, IconBack } from '../../assets/icons';
import { MText } from '../../components/MText';
import { color } from '../../theme';
import { commonStyles } from '../CommonStyles';
import ModalGuideline from './ModalGuideline';
import MHeader from '../../components/MHeader';

export const PaymentEvidence = observer(function PaymentEvidence(props: any) {
  const navigation = useNavigation();
  const [openActiveModal, setOpenActiveModal] = useState(true);
  return (
    <View style={{ flex: 1, backgroundColor: '#FFFFFF' }}>
      <MHeader title="Mục đích sử dụng" onBack={() => navigation.goBack()} />
      <SafeAreaView style={{ flex: 1 }}>
        <View style={{ flex: 1, marginBottom: 16, marginTop: 16 }}>
          <WebView
            source={{
              uri: props?.route.params?.url,
            }}
            style={{ flex: 1 }}
          />
        </View>
      </SafeAreaView>
      <ModalGuideline
        isOpen={openActiveModal}
        onClose={() => setOpenActiveModal(false)}
      />
    </View>
  );
});
