import { nothing, PropertyValueMap } from 'lit'; import { FileType } from '../types/files.types'; import { WeavySubAppComponent } from '../classes/weavy-sub-app-component'; import { ShadowPartsController } from '../controllers/shadow-parts-controller'; declare global { interface HTMLElementTagNameMap { "wy-file-draft-badge": WyFileDraftBadge; } } /** * "Draft" badge shown next to a file name while the file has unsaved edits. * * The badge is only shown when the user can act on the draft, i.e. when the file is editable for them. A draft is * cached per file in the browser tab and can outlive the right to edit (revoked permission, file editing turned off), * and then it is better left unmentioned than advertised without a way to publish or discard it. * * Each badge observes the draft query of its own file, so file lists can drop one into every row and let the badge * appear and disappear as the editor saves or discards the draft, without the list tracking drafts itself. * * **Used sub components:** * * - [``](./ui/wy-badge.ts) * * @csspart wy-badge - The badge element. */ export declare class WyFileDraftBadge extends WeavySubAppComponent { static styles: import('lit').CSSResult[]; /** @internal */ protected exportParts: ShadowPartsController; /** * File whose draft is indicated. */ file?: FileType; /** * Id used for handling drafts. * @internal */ draftKey?: string; /** * Query controller for getting the file draft. * @internal */ private draftQuery; willUpdate(changedProperties: PropertyValueMap): Promise; render(): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1> | typeof nothing; } //# sourceMappingURL=wy-file-draft-badge.d.ts.map