<script lang="ts" setup>
import { right } from '@/core/libs/svgs'

const props = defineProps({
  customClass: {
    type: String,
    default: () => '',
  },
  title: {
    type: String,
    default: () => '',
  },
  path: {
    type: String as PropType<string | undefined>,
    default: () => undefined,
    required: false,
  },
  size: {
    type: String as PropType<'base' | 'xl'>,
    default: () => 'xl',
  },
})
const handleMore = async () => {
  await uni.navigateTo({ url: props.path })
}
</script>
<template>
  <view class="flex justify-between items-center" :class="[customClass]">
    <div
      class="font-normal"
      :class="[`text-${size}`, { base: 'text-black/90', xl: 'text-black' }[size]]"
    >
      {{ title }}
    </div>
    <!-- <div
      v-if="path"
      class="text-right text-black/30 text-sm font-normal leading-tight"
      @click="handleMore"
    >
      查看全部
      <wd-img :src="right" width="10" height="10"></wd-img>
    </div> -->
  </view>
</template>
