import { NostrBaseComponent, NCStatus } from '../base/base-component/nostr-base-component'; /** * * Attributes: * - url (optional) : URL to like (default: current page URL) * - text (optional) : custom text (default "Like") (Max 32 characters) * - relays (optional) : comma-separated relay URLs * - data-theme (optional) : "light" | "dark" (default light) * * Features: * - URL-based likes using NIP-25 kind 17 events * - Click count to view likers */ export default class NostrLike extends NostrBaseComponent { protected likeActionStatus: { set: (s: NCStatus, e?: string) => void; get: () => NCStatus; }; protected likeListStatus: { set: (s: NCStatus, e?: string) => void; get: () => NCStatus; }; private currentUrl; private isLiked; private likeCount; private cachedLikeDetails; private loadSeq; private isResyncingLikeCount; private needsResyncLikeCount; constructor(); connectedCallback(): void; static get observedAttributes(): string[]; attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void; /** Base class functions */ protected validateInputs(): boolean; protected onStatusChange(_status: NCStatus): void; protected onNostrRelaysConnected(): void; /** Private functions */ /** * Lazy initializer for currentUrl - ensures it's set before like/unlike operations */ private ensureCurrentUrl; private updateLikeCount; private queueAuthoritativeCountResync; private handleLikeMutationFailure; private handleLikeClick; private handleLike; private handleUnlike; private handleCountClick; private handleHelpClick; private attachDelegatedListeners; protected renderContent(): void; }