export interface ShortenedLink { id: string; originalUrl: string; shortCode: string; shortUrl: string; title?: string; description?: string; clicks: number; createdAt: Date; expiresAt?: Date; metadata?: Record; } export interface LinkShortenerProps { /** * Base URL for shortened links * @default window.location.origin */ baseUrl?: string; /** * Callback when a link is created */ onCreate?: (link: ShortenedLink) => void | Promise; /** * Callback when a link is copied */ onCopy?: (link: ShortenedLink) => void; /** * Callback when a link is deleted */ onDelete?: (linkId: string) => void | Promise; /** * Existing shortened links */ links?: ShortenedLink[]; /** * Whether to show the link list * @default true */ showLinkList?: boolean; /** * Maximum length for custom short codes * @default 20 */ maxShortCodeLength?: number; /** * Additional CSS class */ className?: string; }