import { PropertyValueMap } from 'lit'; import { ShadowPartsController } from '../controllers/shadow-parts-controller'; import { CommentType } from '../types/comments.types'; import { WeavySubAppComponent } from '../classes/weavy-sub-app-component'; declare global { interface HTMLElementTagNameMap { "wy-comment": WyComment; } } /** * Displays or edits a comment. * * **Used sub components** * * - [``](./ui/wy-avatar.ts) * - [``](./ui/wy-button.ts) * - [``](./ui/wy-dropdown.ts) * - [``](./ui/wy-icon.ts) * - [``](./ui/wy-item.ts) * - [``](./ui/wy-image-grid.ts) * - [``](./ui/wy-skeleton.ts) * - [``](./wy-annotation.ts) * - [``](./wy-attachment.ts) * - [``](./wy-embed.ts) * - [``](./wy-meeting-card.ts) * - [``](./wy-poll.ts) * - [``](./wy-preview.ts) * - [``](./wy-reactions.ts) * * @csspart wy-highlight - When the comment component should be briefly highlighted * @csspart wy-comment - Root comment container * @csspart wy-comment-reveal - When a comment has reveal transition * @csspart wy-comment-skeleton - When the comment should render as a skeleton during optimistic updates. * @csspart wy-comment-header - Header area (avatar, title, actions) * @csspart wy-comment-body - Body wrapper for comment content. * @csspart wy-comment-title - The title section of the comment body. * @csspart wy-comment-images - Images section. * @csspart wy-comment-footer - Section for reactions, attachments and annotations. * @csspart wy-trashed - When comment is trashed. * @csspart wy-content - HTML content area * @csspart wy-meta - Meta section. * @csspart wy-comment-reported - The filled flag in the meta section shown once the reader has reported the comment. Hide it with `::part(wy-comment-reported)` if reporting should be fire-and-forget. * * @fires {PollVoteEventType} vote - Emitted when a poll option is voted * @fires {CommentTrashEventType} trash - Emitted when the comment is trashed * @fires {CommentRestoreEventType} restore - Emitted when the comment is restored * @fires {WyPreviewOpenEventType} wy-preview-open - Fired when a preview overlay is about to open. * @fires {WyPreviewCloseEventType} wy-preview-close - Fired when a preview overlay is closed. */ export declare class WyComment extends WeavySubAppComponent { #private; static styles: import('lit').CSSResult[]; /** * Controller for exporting named shadow parts. * * @internal */ protected exportParts: ShadowPartsController; /** * The comment data. */ comment: CommentType; /** * The parent entity id the comment belongs to. * * Set this to ensure actions (edit/trash/restore) operate against the correct parent. */ parentId: number; /** * The place where the comment is located. * * @deprecated Use contextual app info instead. */ location: "posts" | "files" | "apps"; /** * Whether the comment should be visually highlighted. * * @internal */ highlight: boolean; /** * Whether to use a reveal transition when showing the comment. */ reveal: boolean; /** * Editing mode flag. * * @internal */ private editing; /** * Preview refs used to open preview overlays. * * @internal */ private previewAnnotationsRef; private previewAttachmentsRef; /** * Mutation controller used to update comments. * * @internal */ private updateCommentMutation; /** * Confirm and report the comment for moderation. * * Uses the native confirm rather than an in-app dialog, matching how reporting a message works: reporting cannot be * undone and there is no report to look up afterwards, so the interruption is the point. * * @internal */ private confirmReport; /** * Dispatch a poll vote event for this comment. * * @internal */ private dispatchVote; /** * Dispatch a trash event for this comment. * * @internal */ private dispatchTrash; /** * Dispatch a restore event for this comment. * * @internal */ private dispatchRestore; /** * Submit updated comment content via mutation and exit edit mode. * * @internal */ private updateComment; protected willUpdate(changedProperties: PropertyValueMap): Promise; render(): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1>; } //# sourceMappingURL=wy-comment.d.ts.map