/**
* Consent Permissions Web Component
*
* Renders a list of permission scopes that the agent is requesting.
* Can be interactive (with checkboxes) or display-only.
*
* @module components/consent-permissions
*/
import { LitElement, TemplateResult } from 'lit';
/**
* Permission item structure
*/
export interface PermissionItem {
/** Unique scope identifier */
id: string;
/** Human-readable label */
label: string;
/** Optional description */
description?: string;
/** Whether this permission is required (non-optional) */
required?: boolean;
}
/**
* ConsentPermissions - Permission list component
*
* @example
* ```html
*
*
*
*
*
* ```
*
* @fires change - Fired when permissions selection changes (interactive mode)
* @csspart list - The permissions list container
* @csspart item - Individual permission item
* @cssprop --consent-primary - Primary brand color for icons/checkboxes
*/
export declare class ConsentPermissions extends LitElement {
/**
* Permission scopes - can be string array or PermissionItem array
* Accepts JSON string for attribute binding
*/
scopes: (string | PermissionItem)[];
/**
* Enable interactive mode with checkboxes
*/
interactive: boolean;
/**
* Pre-select all scopes in interactive mode (default: only required scopes are pre-selected)
*/
selectAll: boolean;
/**
* Icon to show next to each permission
* Options: 'check', 'bullet', 'shield'
*/
iconStyle: 'check' | 'bullet' | 'shield';
/**
* Internal state for selected permissions in interactive mode
*/
private selectedScopes;
/**
* Track previous scope IDs to detect newly added scopes
* (used to distinguish new scopes from user-deselected scopes)
*/
private previousScopeIds;
static styles: import("lit").CSSResult;
connectedCallback(): void;
protected updated(changedProperties: Map): void;
/**
* Re-initialize selected scopes when scopes change dynamically.
* Preserves existing valid selections while adding new scopes based on selectAll/required settings.
*/
private reinitializeSelectedScopes;
private initializeSelectedScopes;
/**
* Normalize scopes to PermissionItem format
*/
private get normalizedScopes();
/**
* Convert scope ID to human-readable label
*/
private formatScopeLabel;
/**
* Get currently selected scopes
*/
getSelectedScopes(): string[];
private handleCheckboxChange;
private renderIcon;
private renderPermissionItem;
render(): TemplateResult<1>;
}
declare global {
interface HTMLElementTagNameMap {
'consent-permissions': ConsentPermissions;
}
}
//# sourceMappingURL=consent-permissions.d.ts.map