'use client'; import { forwardRef, HTMLAttributes } from 'react'; import styles from './document-stamp.module.css'; export interface DocumentStampProps extends HTMLAttributes { /** Stamp text */ text: string; /** Stamp type */ type?: 'approved' | 'rejected' | 'confidential' | 'draft' | 'custom'; /** Stamp size */ size?: 'small' | 'medium' | 'large'; /** Stamp rotation */ rotation?: number; /** Stamp color */ color?: string; /** Stamp border width */ borderWidth?: number; /** Stamp opacity */ opacity?: number; /** Enable rotation animation */ animated?: boolean; } export const DocumentStamp = forwardRef( ( { text, type = 'approved', size = 'medium', rotation = -15, color, borderWidth = 3, opacity = 0.7, animated = false, className, style, ...props }, ref ) => { const defaultColor = { approved: '#00aa00', rejected: '#aa0000', confidential: '#aa00aa', draft: '#666666', custom: '#000000', }[type]; const finalColor = color || defaultColor; return (
{text}
{type === 'confidential' && (
)}
); } ); DocumentStamp.displayName = 'DocumentStamp'; export default DocumentStamp;