<script setup>
import { computed } from 'vue';
import { useMessageContext } from '../provider.js';

const { contentAttributes } = useMessageContext();

const trackingNumber = computed(() => contentAttributes.value?.trackingNumber || 'Unknown');
const currentStep = computed(() => contentAttributes.value?.currentStep || 0);
</script>

<template>
  <div class="logistics-placeholder">
    <div class="placeholder-icon">
      <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
        <rect x="1" y="3" width="15" height="13"></rect>
        <polygon points="16 8 20 8 17 8 16 1"></polygon>
        <circle cx="5.5" cy="19.5" r="1.5"></circle>
        <path d="M8 19.5V22"></path>
      </svg>
    </div>
    <div class="placeholder-content">
      <h4 class="placeholder-title">Logistics</h4>
      <p class="placeholder-text">
        {{ trackingNumber }} • Step {{ currentStep + 1 }}/4
      </p>
    </div>
  </div>
</template>

<style scoped>
.logistics-placeholder {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: 8px;
  max-width: 320px;
}

.dark .logistics-placeholder {
  background: linear-gradient(135deg, #0c4a6e 0%, #075985 100%);
  border-color: #065f46;
}

.placeholder-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0284c7;
}

.dark .placeholder-icon {
  color: #22d3ee;
}

.placeholder-content {
  flex: 1;
}

.placeholder-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.dark .placeholder-title {
  color: #f1f5f9;
}

.placeholder-text {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.dark .placeholder-text {
  color: #94a3b8;
}
</style>
