<template>
  <div class="min-h-screen bg-gray-900 text-white">
    <!-- 导航菜单 -->
    <nav class="border-b border-gray-700">
      <div class="container mx-auto px-4">
        <div class="flex space-x-8 overflow-x-auto">
          <button
              v-for="tab in tabs"
              :key="tab.id"
              :class="[
              'py-4 px-2 font-medium text-sm whitespace-nowrap border-b-2 transition-colors',
              activeTab === tab.id
                ? 'border-blue-500 text-blue-400'
                : 'border-transparent text-gray-400 hover:text-gray-300'
            ]"
              @click="activeTab = tab.id"
          >
            {{ tab.title }}
          </button>
        </div>
      </div>
    </nav>

    <!-- 内容区域 -->
    <div class="container mx-auto px-4 py-12">
      <!-- 解决方案 -->
      <div v-show="activeTab === 'solutions'" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
        <div
v-for="service in solutions" :key="service"
             class="bg-gray-800 rounded-lg p-6 hover:bg-gray-750 transition-colors">
          <div class="flex items-center space-x-3">
            <div class="w-3 h-3 bg-blue-500 rounded-full"/>
            <h3 class="text-lg font-medium">{{ service }}</h3>
          </div>
        </div>
      </div>

      <!-- 行业方案 -->
      <div v-show="activeTab === 'industry'" class="grid grid-cols-1 md:grid-cols-2 gap-8">
        <div
v-for="service in industrySolutions" :key="service"
             class="bg-gray-800 rounded-lg p-6 hover:bg-gray-750 transition-colors">
          <div class="flex items-center space-x-3">
            <div class="w-3 h-3 bg-green-500 rounded-full"/>
            <h3 class="text-lg font-medium">{{ service }}</h3>
          </div>
        </div>
      </div>

      <!-- 软件开发 -->
      <div v-show="activeTab === 'software'" class="grid grid-cols-1 md:grid-cols-2 gap-8">
        <div
v-for="service in softwareDevelopment" :key="service"
             class="bg-gray-800 rounded-lg p-6 hover:bg-gray-750 transition-colors">
          <div class="flex items-center space-x-3">
            <div class="w-3 h-3 bg-purple-500 rounded-full"/>
            <h3 class="text-lg font-medium">{{ service }}</h3>
          </div>
        </div>
      </div>

      <!-- 智能硬件 -->
      <div v-show="activeTab === 'hardware'" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
        <div
v-for="service in smartHardware" :key="service"
             class="bg-gray-800 rounded-lg p-6 hover:bg-gray-750 transition-colors">
          <div class="flex items-center space-x-3">
            <div class="w-3 h-3 bg-orange-500 rounded-full"/>
            <h3 class="text-lg font-medium">{{ service }}</h3>
          </div>
        </div>
      </div>

      <!-- 联系我们 -->
      <div v-show="activeTab === 'contact'" class="max-w-2xl mx-auto">
        <div class="bg-gray-800 rounded-lg p-8">
          <h2 class="text-2xl font-bold mb-6">联系我们</h2>
          <div class="space-y-4">
            <div class="flex items-center space-x-4">
              <div class="w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center">
                <svg class="w-4 h-4 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                  <path
d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" stroke-linecap="round" stroke-linejoin="round"
                        stroke-width="2"/>
                </svg>
              </div>
              <div>
                <p class="text-gray-400">客服电话</p>
                <p class="text-lg font-medium">400-XXX-XXXX</p>
              </div>
            </div>
            <div class="flex items-center space-x-4">
              <div class="w-8 h-8 bg-green-500 rounded-full flex items-center justify-center">
                <svg class="w-4 h-4 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                  <path
d="M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" stroke-linecap="round" stroke-linejoin="round"
                        stroke-width="2"/>
                </svg>
              </div>
              <div>
                <p class="text-gray-400">商务合作</p>
                <p class="text-lg font-medium">XXX-XXXX-XXXX</p>
              </div>
            </div>
            <div class="flex items-center space-x-4">
              <div class="w-8 h-8 bg-purple-500 rounded-full flex items-center justify-center">
                <svg class="w-4 h-4 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                  <path
d="M3 8l7.89 4.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" stroke-linecap="round" stroke-linejoin="round"
                        stroke-width="2"/>
                </svg>
              </div>
              <div>
                <p class="text-gray-400">反馈邮箱</p>
                <p class="text-lg font-medium">feedback@example.com</p>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import {ref} from 'vue'

const activeTab = ref('solutions')

const tabs = [
  {id: 'solutions', title: '解决方案'},
  {id: 'industry', title: '行业方案'},
  {id: 'software', title: '软件开发'},
  {id: 'hardware', title: '智能硬件'},
  {id: 'contact', title: '联系我们'}
]

const solutions = [
  '共享单车',
  '共享滑板车',
  '共享陪护床',
  '共享电动车',
  '共享充电宝'
]

const industrySolutions = [
  '智慧餐饮',
  '智慧公寓',
  '智能电动车'
]

const softwareDevelopment = [
  '微信开发',
  'APP开发',
  '小程序开发'
]

const smartHardware = [
  '物联网应用定制',
  '物联网智能硬件',
  '物联网IOT云平台'
]
</script>

<style scoped>
.bg-gray-750 {
  background-color: #374151;
}

/* 滚动条样式 */
nav::-webkit-scrollbar {
  height: 4px;
}

nav::-webkit-scrollbar-track {
  background: #1f2937;
}

nav::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 2px;
}

nav::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}
</style>