<template>
  <div class="guardrail-page">
    <div class="page-header">
      <div class="header-content">
        <div class="title-section">
          <h1 class="page-title">输出护栏管理</h1>
          <p class="page-desc">配置禁词和行为规则，确保 AI 输出符合合规要求。</p>
        </div>
      </div>
    </div>

    <el-card shadow="hover">
      <el-tabs v-model="activeTab">
        <el-tab-pane label="禁词管理" name="forbidden-words">
          <forbidden-words-tab />
        </el-tab-pane>
        <el-tab-pane label="行为规则" name="behavior-rules">
          <behavior-rules-tab />
        </el-tab-pane>
      </el-tabs>
    </el-card>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import ForbiddenWordsTab from './components/ForbiddenWordsTab.vue'
import BehaviorRulesTab from './components/BehaviorRulesTab.vue'

const activeTab = ref('forbidden-words')
</script>

<style scoped>
.guardrail-page {
  padding: 24px;
}

.page-header {
  margin-bottom: 24px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.title-section {
  flex: 1;
  min-width: 300px;
}

.page-title {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--el-text-color-primary);
}

.page-desc {
  margin: 0;
  font-size: 14px;
  color: var(--el-text-color-secondary);
}
</style>
