<template>
  <!-- 账号详情-->
  <a-modal class="add-custom custom-detail"
           title="账号详情"
           v-model:visible="visible"
           centered
           @cancel="cancel"
           width="890px">
    <template #footer>
      <a-button key="submit"
                type="primary"
                @click="cancel">关闭</a-button>
    </template>
    <Detail :selectedData="selectedData"
            :userList="userList"
            :secondeData="secondeData" />
  </a-modal>
</template>

<script lang="ts">
import { defineComponent, PropType, ref } from 'vue';
import { closeModal } from '@/common/setup/modal/index';
import { ErmcpLoginUserEx, ErmcpTaAccount, ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
import Detail from '../detail-commom-futures/index.vue';

export default defineComponent({
    name: 'trader-detail',
    components: { Detail },
    props: {
        selectedData: {
            type: Object as PropType<ErmcpTaAccountEx>,
            default: {},
        },
        secondeData: {
            default: {},
            type: Object as PropType<ErmcpTaAccount>,
        },
        userList: {
            type: Array as PropType<ErmcpLoginUserEx[]>,
            default: [],
        },
    },
    setup(props) {
        const { visible, cancel } = closeModal('detail');
        const loading = ref<boolean>(false);
        return {
            visible,
            cancel,
            loading,
        };
    },
});
</script>

<style lang="less">
.custom-detail {
    .ant-form.inlineForm {
        margin-top: 20px;
    }
}
</style>;
