import { AuthState } from '../../auth/types'; import { SiteConfig } from '../../core/site-config'; import { PropertyValues, LitElement, TemplateResult } from 'lit'; export interface SDKConfigErrorDetail { message: string; source: "attribute" | "property"; value: unknown; } /** * 组件授权基类。 * 所有业务组件继承该基类后,即可复用: * 1) 初始化授权检查 * 2) 配置变更自动重验 * 3) 统一的加载态和错误态 */ export declare abstract class BaseElement extends LitElement { static properties: { authState: { state: boolean; }; authReason: { state: boolean; }; siteConfig: { attribute: string; }; sdkConfigVersion: { state: boolean; }; }; protected authState: AuthState; protected authReason: string; siteConfig?: SiteConfig | string; protected sdkConfigVersion: number; private unsubscribeConfig; private validationVersion; private normalizedSiteConfig; private siteConfigError; private reportedInvalidSiteConfig; constructor(); /** * Lit 默认是 Shadow DOM。 * 为了让 Tailwind 工具类直接可用,统一改成 light DOM。 */ protected createRenderRoot(): HTMLElement | DocumentFragment; protected get isAuthorized(): boolean; protected get resolvedSiteConfig(): SiteConfig; protected get componentClassName(): string; connectedCallback(): void; disconnectedCallback(): void; protected refreshAuthState(force: boolean): Promise; protected renderAuthError(): TemplateResult; protected willUpdate(changedProperties: PropertyValues): void; private resolveSiteConfig; }