<script setup lang="ts">
const { t } = useI18n()

const props = defineProps({
  isAutoJump: {
    type: Boolean,
    default: true
  }
})
const emit = defineEmits<{
  (e: 'clickSearch'): void
}>()

function handleClickSearch() {
  if(props.isAutoJump) {
    uni.navigateTo({
      url: '/pages/search/index',
    })
  } else {
    emit('clickSearch')
  }
}
</script>

<template>
<view @click="handleClickSearch" class="flex items-center h-88rpx bg-#F2F3F6 rounded-44rpx pl-36rpx">
  <image src="@img/chef/100222.png" class="w-28rpx h-28rpx"></image>
  <text class="text-30rpx text-#434343 ml-16rpx tracking-[.04em] font-500">{{ t('components.search.placeholder') }}</text>
</view>
</template>

<style scoped lang="scss">

</style>