'use client';

import { FeatureGate } from '@/core/feature-flags';
import { useI18n } from '@/core/i18n';
import { PasswordVaultModule } from '@/modules/password-vault';

export default function PasswordVaultPage() {
  const { t } = useI18n();

  return (
    <FeatureGate flag="module.password-vault" fallback={<ModuleDisabled />}>
      <div className="mx-auto max-w-5xl space-y-6">
        <div>
          <h1 className="text-2xl font-bold tracking-tight">{t('password-vault.title')}</h1>
          <p className="text-muted-foreground">{t('password-vault.description')}</p>
        </div>
        <PasswordVaultModule />
      </div>
    </FeatureGate>
  );
}

function ModuleDisabled() {
  return (
    <div className="flex min-h-[40vh] items-center justify-center">
      <p className="text-muted-foreground">Modul dezactivat</p>
    </div>
  );
}
