import { LitElement, nothing, PropertyValueMap } from 'lit'; import { PollOptionType } from '../types/polls.types'; import { ShadowPartsController } from '../controllers/shadow-parts-controller'; import { QueryController } from '../controllers/query-controller'; import { WeavySubComponent } from '../classes/weavy-sub-component'; declare global { interface HTMLElementTagNameMap { "wy-poll": WyPoll; "wy-poll-option": WyPollOption; } } /** * Poll container rendering a list of poll options. * * **Used sub components:** * * - [``](./wy-poll.ts) * * @csspart wy-poll - Root poll container. * * @fires {PollVoteEventType} vote - Emitted when a poll option is voted. */ export declare class WyPoll extends LitElement { static styles: import('lit').CSSResult[]; /** @internal */ protected exportParts: ShadowPartsController; /** * Poll options displayed in the list. */ pollOptions: PollOptionType[]; /** * Dispatch a `vote` event for the specified option. * * @param optionId - Identifier of the option to vote for. * @returns {boolean} True if the event was not canceled. */ private dispatchVote; render(): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1>; } /** * Poll option item showing vote meter, label and optional voter list sheet. * * **Used sub components:** * * - [``](./ui/wy-icon.ts) * - [``](./ui/wy-overlay.ts) * - [``](./ui/wy-container.ts) * - [``](./ui/wy-item.ts) * - [``](./ui/wy-avatar.ts) * - [``](./ui/wy-badge.ts) * * @csspart wy-poll-option - Root poll option container. * @csspart wy-poll-meter - Visual meter showing vote ratio. * @csspart wy-poll-image - Icon/indicator area. * @csspart wy-poll-title - Option label. * @csspart wy-poll-amount - Vote count badge with the share as hover text (clickable to open voter sheet). * * @fires {PollVoteEventType} vote - Emitted when this option is voted. */ export declare class WyPollOption extends WeavySubComponent { static styles: import('lit').CSSResult[]; protected exportParts: ShadowPartsController; /** * Total number of votes across all options. */ totalVotes: number; /** * Poll option rendered by this card. */ option?: PollOptionType; /** * Whether the voter sheet dialog is visible. * * @internal */ private showSheet; /** * Query controller fetching voters for the option. * * @internal */ getVotesQuery: QueryController; protected updated(changedProperties: PropertyValueMap): Promise; /** * Dispatch a `vote` event for the provided option id. * * @internal * @param optionId - Identifier of the option to vote for. * @returns {boolean} True if the event was not canceled. */ private dispatchVote; /** * Toggle the voter sheet and refresh vote data. * * @internal * @param e - Triggering user event. */ private openSheet; render(): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1> | typeof nothing; } //# sourceMappingURL=wy-poll.d.ts.map