<script setup>
import { ref } from 'vue'
defineOptions({
  name: 'FoldBar'
})
const model = defineModel({ type: Boolean })
const emits = defineEmits(['clickHandle'])

function clickHandle() {
  emits('clickHandle')
}
</script>

<template>
  <div class="fold-bar-wrapper" :class="{ collapse: model }" @click="clickHandle">
    <VIcon name="ArrowUp" size="14"></VIcon>
  </div>
</template>

<style>
.fold-bar-wrapper {
  width: calc(var(--v-bar-width) * 2);
  position: absolute;
  top: 100%;
  left: 50%;
  border-radius: 0 0 50% 50%;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--v-text-color);
  border: 1px solid var(--v-border-color);
  background-color: var(--v-light-bg);
  box-shadow: 0 2px 4px 0px rgba(0, 0, 0, 0.06);
  transform: translateX(50%);
  z-index: 1;
  cursor: pointer;
}
.fold-bar-wrapper.collapse .el-icon {
  transform: rotate(180deg);
}
</style>
