<template>
  <Button 
    icon="arrow-down-bold"
    :iconProps="{
      rotate: expanded ? 180 : 0,
    }"
    :text="expanded ? '收起详情' : '查看更多'"
    size="small"
    type="text"
    @click="emit('update:expanded', !props.expanded)"
  />
</template>

<script lang="ts" setup>
import Button from '@/components/basic/Button.vue';

const props = defineProps<{
  expanded: boolean;
}>();

const emit = defineEmits<{
  (e: 'update:expanded', value: boolean): void;
}>();

</script>