import type { CSSResultArray, PropertyDeclarations } from 'lit-element'; import type { TemplateResult } from 'lit-html'; import type { NucleonV8N } from '../NucleonElement/types'; import type { ScopeRule } from '../../../utils/user-scope'; import type { Data } from './types'; import { BooleanSelector } from '@foxy.io/sdk/core'; import { InternalForm } from '../../internal/InternalForm/InternalForm'; declare const Base: typeof InternalForm & import("lit-element").Constructor & { defaultNS: string; }; export declare class UserInvitationForm extends Base { static get properties(): PropertyDeclarations; static get styles(): CSSResultArray; static get v8n(): NucleonV8N; /** When provided, displays a link to Store Dashboard in user layout. */ getStorePageHref: ((storeHref: string) => string) | null; /** Default host domain for stores that don't use a custom domain name, e.g. `foxycart.com`. */ defaultDomain: string | null; /** Currently viewed store URL. Used for determining when to emit `selfrevoked` event. */ currentStore: string | null; /** Currently logged in user resource URL. Used for determining when to emit `selfrevoked` event. */ currentUser: string | null; /** Admin layout will display user info, user layout (default) will display store info. */ layout: 'admin' | 'user' | null; private readonly __storeDomainGetValue; get scopeRules(): ScopeRule[]; get readonlySelector(): BooleanSelector; get hiddenSelector(): BooleanSelector; renderBody(): TemplateResult; protected _fetch(...args: Parameters): Promise; /** * `true` when the scope control is gated off, for any of three reasons: the consumer hid it, * the consumer supplied no granter scope, or the invitation already exists and its status * makes editing the scope pointless. A template form has no status yet, so it is gated only by * the first two. * * This is the single source of truth for scope gating. `hiddenSelector` hides the control when * it is `true` and the `scope` v8n rule stands down when it is `true`, so a control that is * required but not on screen is impossible by construction. * * IMPORTANT, three constraints on changing this: * * 1. Any future gating condition must be conjoined into this one expression. A separate, * weaker condition elsewhere would let the `!this.currentUserScope` default stop meaning * "gate the control off" — that default must never come to mean "offer everything". * 2. The `hiddenControls` *field* may be read, but only through optional chaining, and the * `hiddenSelector` *getter* must never be read. v8n rules are evaluated from * NucleonElement's constructor, before the ConfigurableMixin class fields exist, so * `this.hiddenControls` is `undefined` at that point — a non-optional read throws * "Cannot read properties of undefined (reading 'matches')" for every instance, verified. * `?.` absorbs that; the getter cannot be rescued the same way, because its throw happens * *inside* it, at `InternalForm`'s `super.hiddenSelector.toString()`, before any optional * chaining on its result could apply. Do not rely on a `||` term ahead of the field read * short-circuiting past it either — that is luck, not safety. * 3. `status` is a parameter rather than read from `this.data` because v8n runs inside the * xstate `assign` that computes `errors`, i.e. before `__service.state` is updated — so * `this.data` is one transition stale there and would judge the previous status. Callers * pass the freshest status they have: the v8n rule passes `form.status`, `hiddenSelector` * passes `this.data?.status`. */ private __isScopeGated; /** `true` when this is the current user's own invitation for the current store. */ private get __isOwnInvitationForCurrentStore(); private __getGravatar; private __renderAdminTemplateState; private __renderUserTemplateState; private __renderAdminSnapshotState; private __renderUserSnapshotState; } export {};