import React from 'react';
import { SafeAreaView, Text, Image, Alert, Linking, View } from 'react-native';
import { inject, observer } from "mobx-react"
import { observable, makeObservable } from 'mobx'
import { colors } from '../../assets/styles/colors-theme';
import { images } from '../../assets/images/imageIndex';
import AsyncStorage from '@react-native-community/async-storage';
import { getStatusBarHeight } from 'react-native-status-bar-height';
import CustomLoginButton from '../../components/customLoginButton'
import Setting from '../../components/setting'
const Confirm = inject("appStore")(observer(class Confirm extends React.Component {


    lang = this.props.appStore.lanuageSelection

    settingViewAble = false

    constructor(props) {
        super(props);
        this.store = props.appStore;
        makeObservable(this, {
            settingViewAble: observable,
            lang: observable,
        })
    }
    async componentDidMount() {

    }

    render() {
        return (
            <SafeAreaView
                style={{
                    flex: 1,
                    backgroundColor: 'white',
                }}>
                <View style={{ marginTop: Platform.OS === 'ios' ? 40 : getStatusBarHeight() }}>
                    <Image style={{ marginLeft: 40, }} source={images.title.logo} />
                </View>
                <View style={{ flex: 1 }}>
                    <View style={{ flex: 0.9, justifyContent: 'center', alignItems: 'center' }}>
                        <Text style={{ fontSize: 22, color: colors.buttonColor, fontWeight: '800' }}>
                            {'已確定訂單款式尺寸'}
                        </Text>
                        <View style={{ marginTop: 50 }}>
                            <CustomLoginButton title={'新增其他款式訂單'} width={4} onPress={() => { this.props.navigation.navigate('Select'); console.log(this.store.orderData) }} />
                        </View>
                        <View style={{ marginTop: 30 }}>
                            <CustomLoginButton title={'確認訂單'} width={6} onPress={() => { this.props.navigation.navigate('Order', { order: true }) }} />
                        </View>

                    </View>

                    <View style={{ flex: 0.1, justifyContent: 'center', alignItems: 'center', }}>


                        <Setting self={this} settingViewAble={this.settingViewAble} onPress={() => { this.settingViewAble = !this.settingViewAble }} />

                    </View>

                </View>
            </SafeAreaView>
        );
    }
}))
export default Confirm
