/** * Consent Capabilities Screen * * The composite layout from Peter's mockup: eyebrow + serif headline + * subhead + agent identity tile + capability rows + revocation notice + * action bar + footer. Used when the resolved consent config includes * `capabilities` (the new humanized layout). Falls back to the legacy * permissions list otherwise. * * This component is purely presentational. It accepts the resolved data * (capabilities, agent metadata, copy values) and emits `consent-allow` / * `consent-deny` events so the parent can submit the form / close the * window. Selection state for the checkboxes is owned here to keep the * parent simple. * * @module components/consent-capabilities-screen */ import { LitElement } from "lit"; import type { Capability, AgentMetadata, ConsentTheme, CedarTemplateContext } from "../types/capabilities.types.js"; import "./consent-agent-header.js"; import "./consent-capability-card.js"; import "./consent-action-bar.js"; import "./consent-footer.js"; import "./consent-revocation-notice.js"; import "./consent-connector-header.js"; /** * Detail emitted on `consent-allow` — the set of capability ids the user * approved. The parent uses this to compose the granted list. */ export interface CapabilitiesApproveDetail { selectedCapabilityIds: string[]; selectedScopes: string[]; } export declare class ConsentCapabilitiesScreen extends LitElement { capabilities: Capability[]; agentMetadata: AgentMetadata | undefined; cedarContext: CedarTemplateContext | undefined; orgName: string; headlineVerb: string; revocationPath: string; inactivityDays: number; theme: ConsentTheme; howItWorksUrl: string; loading: boolean; /** * Seed every capability as selected. The credential path grants a fixed, * all-or-nothing scope set, so every capability starts checked — the rows * remain interactive, same as the consent-only path. */ allSelected: boolean; /** * Externally computed disable state for the Allow button. Used by the * credential path to gate approval on the sign-in fields, which this * component does not own. */ allowDisabled: boolean; /** * Domain used to fetch the server brand logo when one isn't explicitly * configured via `agentMetadata.logoUrl` / branding. Passed to the * connector header for logo.dev resolution. */ serverDomain: string; /** * Optional logo.dev publishable token. Lets the connector header resolve * brand logos by domain when the operator hasn't supplied an explicit * one. Falls back to monogram tile when missing or on 404. */ logoDevToken: string; /** * Explicit override for the operator's server brand logo, forwarded to the * connector header. Lets the operator's configured branding (logo + name) * reach this screen the same way it reaches the other consent screens. */ serverLogoUrl: string; private selected; /** * Last capability set this component seeded `selected` from, per * `capabilitySeedKey`. Re-seeding is keyed on this value rather than on * `capabilities` array identity — see `seedDefaults`. */ private seedKey; connectedCallback(): void; willUpdate(changed: Map): void; /** * Seed `selected` from the capability defaults, but only when the * capability set actually changed. A parent that rebuilds its capability * array on every render (e.g. because a sibling `@state()` field changed) * produces a new array with the same contents on every keystroke; without * this guard `willUpdate` would re-seed on every one of those renders and * silently wipe whatever the user had already toggled. */ private seedDefaults; static styles: import("lit").CSSResult; private hostStyle; private onCapabilityToggle; private onAllow; private onDeny; private compileCapabilityCedar; private renderHeadline; render(): import("lit").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { "consent-capabilities-screen": ConsentCapabilitiesScreen; } } //# sourceMappingURL=consent-capabilities-screen.d.ts.map