<template>
  <!-- 商品合约 -->
  <section class="spot_warran">
    <component :is="componentId"
               v-if="componentId">
    </component>
    <thirdMenu :list="tabList"
               @selectMenu="changeTab"
               :value="'title'">
      <div class="goods-apply"
           v-if="componentId === 'commodity_contract_bargain'">
        <span>我的申请</span>
        <span>对方申请</span>
      </div>
    </thirdMenu>
  </section>
</template>

<script lang="ts">
import { defineAsyncComponent, defineComponent } from 'vue';
import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
import thirdMenu from '@/common/components/thirdMenu/index.vue';
import { handleOrderDetailList } from '@/common/setup/order/orderData';

export default defineComponent({
    name: enumOrderComponents.commodity_contract,
    components: {
        thirdMenu,
        [enumOrderComponents.commodity_contract_summary]: defineAsyncComponent(() => import('./components/commodity_contract_summary/index.vue')),
        [enumOrderComponents.commodity_contract_commission]: defineAsyncComponent(() => import('./components/commodity_contract_commission/index.vue')),
        [enumOrderComponents.commodity_contract_make_deal]: defineAsyncComponent(() => import('./components/commodity_contract_make_deal/index.vue')),
        [enumOrderComponents.commodity_contract_settlement]: defineAsyncComponent(() => import('./components/commodity_contract_settlement/index.vue')),
        commodity_contract_bargain: defineAsyncComponent(() => import('./components/commodity_contract_bargain/index.vue')),
    },
    setup() {
        return { ...handleOrderDetailList(enumOrderComponents.commodity_contract) };
    },
});
</script>

<style lang="less">
.goods-apply {
    position: absolute;
    bottom: 2px;
    right: 20px;
}
</style>;
