'use client';

import { FeatureGate } from '@/core/feature-flags';
import { useI18n } from '@/core/i18n';
import { DigitalSignaturesModule } from '@/modules/digital-signatures';

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

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

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