<script setup lang="ts">
import OrderList from "./order-list.vue";

type TabType = "current" | "history";

const props = defineProps<{ symbol: string }>();

const activeTab = ref<TabType>("current");
</script>

<template>
  <div class="flex flex-col h-full bg-(--ion-background-color)">
    <ui-tabs v-model="activeTab" size="small">
      <ui-tab-pane title="当前委托" name="current">
        <OrderList show-cancel :symbol="props.symbol" :status="['open', 'partial_filled', 'pending', 'rejected']" />
      </ui-tab-pane>
      <ui-tab-pane title="历史记录" name="history">
        <OrderList :symbol="props.symbol" :status="['filled', 'cancelled']" />
      </ui-tab-pane>
    </ui-tabs>
  </div>
</template>
