<!-- src/views/Settings.vue -->
<script setup lang="ts">
import { ref } from 'vue'
import WorkScheduleModal from '@/components/team/WorkScheduleModal.vue'

const showScheduleModal = ref(false)
</script>

<template>
  <div class="settings-page">
    <h1>设置</h1>

    <div class="settings-list">
      <div class="setting-item">
        <div class="setting-info">
          <h3>工作时间</h3>
          <p>设置工作日和工作开始时间，系统会自动将你的状态设置为"工作中"</p>
        </div>
        <button class="setting-btn" @click="showScheduleModal = true">
          配置
        </button>
      </div>

      <div class="setting-item">
        <div class="setting-info">
          <h3>通知设置</h3>
          <p>配置邀请通知的显示方式</p>
        </div>
        <button class="setting-btn" disabled>
          即将推出
        </button>
      </div>

      <div class="setting-item">
        <div class="setting-info">
          <h3>隐私设置</h3>
          <p>控制谁可以看到你的在线状态</p>
        </div>
        <button class="setting-btn" disabled>
          即将推出
        </button>
      </div>
    </div>

    <work-schedule-modal v-model="showScheduleModal" />
  </div>
</template>

<style scoped>
.settings-page {
  max-width: 600px;
  margin: 0 auto;
}

.settings-page h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 24px;
  background: var(--gg-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: var(--gg-bg-card);
  border: 1px solid var(--gg-border);
  border-radius: var(--gg-radius-md);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.setting-item:hover {
  border-color: var(--gg-primary);
  box-shadow: 0 0 12px rgba(5, 150, 105, 0.1);
}

.setting-info {
  flex: 1;
}

.setting-info h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--gg-text);
}

.setting-info p {
  font-size: 13px;
  color: var(--gg-text-secondary);
  margin: 0;
}

.setting-btn {
  padding: 8px 20px;
  border: none;
  border-radius: var(--gg-radius-sm);
  background: var(--gg-gradient);
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s, box-shadow 0.2s;
}

.setting-btn:hover:not(:disabled) {
  opacity: 0.9;
  box-shadow: 0 0 12px rgba(5, 150, 105, 0.3);
}

.setting-btn:disabled {
  background: var(--gg-bg-elevated);
  color: var(--gg-text-muted);
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
</style>
