<script setup lang="ts">
const props = defineProps<{
  status: string;
}>();

const statusLabel = computed(() => {
  if (props.status === 'NEW' || props.status === 'MANAGER_PROCESSING') return 'Заявка';
  if (props.status === 'WAITING_DOUBLE_CONFIRM' || props.status === 'CONFIRMED') return 'Предложение';
  if (props.status === 'IN_PROGRESS') return 'В работе';
  if (props.status === 'COMPLETED') return 'Завершен';
  if (props.status === 'CLIENT_REJECTED' || props.status === 'MANAGER_REJECTED') return 'Отклонен';
  if (props.status === 'MANAGER_BLOCKED') return 'Пауза';
  return props.status;
});

const className = computed(() => {
  if (props.status === 'COMPLETED') return 'badge badge-success';
  if (props.status === 'CLIENT_REJECTED' || props.status === 'MANAGER_REJECTED') return 'badge badge-error';
  if (props.status === 'MANAGER_BLOCKED') return 'badge badge-warning';
  if (props.status === 'NEW' || props.status === 'MANAGER_PROCESSING') return 'badge badge-warning';
  return 'badge badge-info';
});
</script>

<template>
  <span :class="className">{{ statusLabel }}</span>
</template>
