'use client'

/**
 * 安全合規 (/security-compliance) — Sprint 5 整合頁面
 * 整合: 安全掃描 + 合規報告
 * @updated 2026-04-09 Claude Opus 4.6 — 改用 Panel 元件解決 double AppLayout
 */

import { useTranslations } from 'next-intl'
import { AppLayout } from '@/components/layout'
import { PageTabs, type TabConfig } from '@/components/layout/page-tabs'
import { SecurityPanel } from '@/components/panels/SecurityPanel'
import { CompliancePanel } from '@/components/panels/CompliancePanel'

export default function SecurityCompliancePage({ params }: { params: { locale: string } }) {
  const t = useTranslations('nav')

  const tabs: TabConfig[] = [
    { id: 'security', label: t('security'), content: <SecurityPanel /> },
    { id: 'compliance', label: t('compliance'), content: <CompliancePanel /> },
  ]

  return (
    <AppLayout locale={params.locale}>
      <PageTabs tabs={tabs} defaultTab="security" syncWithUrl={true} />
    </AppLayout>
  )
}
