<template>
    <view class="main">
        <!-- nav -->
        <navigation>{{ i18n.WithdrawalRecord }}</navigation>
        <!-- headBtn -->
        <view class="head">
            <view class="headItem" @click="pageState = 'digitalCurrency'"
                :class="{ select: pageState === 'digitalCurrency' }">
                {{ i18n.DigitalCurrency }}
            </view>
            <view class="headItem" @click="pageState = 'onLine'" :class="{ select: pageState === 'onLine' }">
                {{ i18n.OnLine }}
            </view>
        </view>

        <view class="cardList">
            <view class="card" v-for="(item, index) in 4" :key="index">
                <!-- 卡片条件渲染 -->
                <!-- balance -->
                <card-header v-if="pageState === 'digitalCurrency'" iconName="../../static/withdrawal/money-send.png"
                    :title="'904.29483230ACTA'" rightName="Succeed" fontColor="#00E8A2">
                </card-header>
                <view class="dataBody" v-if="pageState === 'digitalCurrency'">
                    <view style="padding:20rpx 32rpx;">
                        <key-value-row :keyName="i18n.OrderID" :value="'293829773920223873676'"></key-value-row>
                        <key-value-row :keyName="i18n.Fees" :value="'10.0922'"></key-value-row>
                        <key-value-row :keyName="i18n.Time" :value="'2022/08/06 14:50:34'"></key-value-row>
                    </view>
                    <view style="border-top: 2rpx solid #323045;padding:0rpx 32rpx; margin-bottom: 20rpx;">
                        <show-more class="digitalShowMore">
                            <key-value-row :keyName="i18n.Address" :value="'dhiukyfdhi8797979870800'"></key-value-row>
                            <key-value-row :keyName="i18n.Hash" :value="'dhiukyfdhi8797979870800'"></key-value-row>
                            <view class="text">Postscript : ontact customer service on the top-left corner for identity
                                verific
                            </view>
                        </show-more>
                    </view>

                </view>


                <!-- contarct -->
                <card-header v-if="pageState === 'onLine'" iconName="../../static/withdrawal/money-send.png"
                    :title="'904.29483230ACTA'" rightName="Succeed" fontColor="#00E8A2">
                </card-header>
                <view class="dataBody" v-if="pageState === 'onLine'">
                    <view style="padding:20rpx 32rpx;">
                        <key-value-row :keyName="i18n.OrderID" :value="'293829773920223873676'"></key-value-row>
                        <key-value-row :keyName="i18n.Fees" :value="'10.0922'"></key-value-row>
                        <key-value-row :keyName="i18n.Time" :value="'2022/08/06 14:50:34'"></key-value-row>
                    </view>
                    <show-more class="onLineShowMore" style="border-top: 2rpx solid #323045;margin-bottom: 20rpx;">
                        <view style="padding:20rpx 32rpx;">
                            <key-value-row :keyName="i18n.USDTRate" :value="'19298'"></key-value-row>
                            <key-value-row :keyName="i18n.USDT" :value="'298237'"></key-value-row>
                        </view>
                        <view style="border-top: 2rpx solid #323045;padding:20rpx 32rpx;">
                            <key-value-row :keyName="i18n.CardNo" :value="'4349 9545 9893 9854 027'">
                            </key-value-row>
                            <key-value-row :keyName="i18n.Bank" :value="'Bank of Melbourne'"></key-value-row>
                            <key-value-row :keyName="i18n.Payee" :value="'Zhou jielun'"></key-value-row>
                            <view class="text">Postscript ：ontact customer service on the top-left corner for identity
                                verific
                            </view>
                        </view>
                    </show-more>

                </view>



            </view>
        </view>
    </view>
</template>

<script>
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
import CardHeader from '../../components/cardHeader/cardHeader.vue';
import ShowMore from '../../components/showMore/showMore.vue';
export default {
    components: { KeyValueRow, CardHeader, ShowMore },
    name: "withdrawalRecord",
    data() {
        return {
            pageState: 'digitalCurrency',
        };
    },
    computed: {
        i18n() {
            return this.$t("withdrawal");
        },
    },
    onLoad() {
    },
    onShow() { },
    methods: {
        change(e) {
            console.log(e);
        }

    },
}
</script>

<style lang="scss" scoped>
.main {

    .head {
        margin-top: 200rpx;
        margin-left: 60rpx;
        width: 632rpx;
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 48rpx 0;

        .headItem {
            width: 300rpx;
            height: 68rpx;
            line-height: 68rpx;
            background: #211F32;
            border-radius: 16rpx;
            text-align: center;
            font-size: 32rpx;
            color: #A1A0A8;

            &.select {
                background: #00E8A2;
                color: #15141F;
            }

        }
    }

    .cardList {
        padding-bottom: 40rpx;

        .card {
            overflow: hidden;
            background: #211F32;
            border-radius: 32rpx;
            margin: 0 32rpx 32rpx;



            .dataBody {
                box-sizing: border-box;

                .onLineShowMore {
                    /deep/.showMoreTool {
                        margin: 0 32rpx;
                    }
                }


                .text {
                    margin-top: 20rpx;
                    padding: 10rpx 16rpx;
                    background: #323045;
                    border-radius: 8rpx;
                    font-size: 24rpx;
                    color: #A1A0A8;
                }

            }

        }
    }

}
</style>
