<template>
  <div class="binary-info">
    <div class="info-header">
      <span class="info-icon">ℹ️</span>
      <span class="info-title">二进制文件</span>
    </div>

    <div class="info-content">
      <pre>{{ content }}</pre>
    </div>

    <div class="info-tips">
      <p>💡 提示：</p>
      <ul>
        <li>右键菜单 → "使用系统程序打开" 在默认应用中打开</li>
        <li>右键菜单 → "在资源管理器中显示" 查看文件位置</li>
      </ul>
    </div>
  </div>
</template>

<script setup lang="ts">
// Props
interface Props {
  content: string
}

defineProps<Props>()
</script>

<style scoped>
.binary-info {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--color-fill-1);
  border-radius: 4px;
  overflow-y: auto;
}

.info-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.info-icon {
  font-size: 20px;
}

.info-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-1);
}

.info-content {
  flex: 1;
  margin-bottom: 16px;
}

.info-content pre {
  margin: 0;
  padding: 12px;
  background: var(--color-fill-2);
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  color: var(--color-text-2);
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
}

.info-tips {
  padding: 12px;
  background: var(--color-fill-2);
  border-radius: 4px;
}

.info-tips p {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: var(--color-text-1);
}

.info-tips ul {
  margin: 0;
  padding-left: 20px;
  font-size: 12px;
  color: var(--color-text-2);
}

.info-tips li {
  margin: 4px 0;
}
</style>
