import * as _angular_core from '@angular/core';
import * as forty_cdk_core from 'forty-cdk/core';
import { ForFieldsetContext } from 'forty-cdk/core';
/**
* Headless grouping container that gives a set of related fields a shared
* accessible name — the styleless counterpart to a native `
` +
* ``, and the grouping companion to `ForField`.
*
* On a native ` ` it relies on the implicit grouping and emits no
* role; on any other element it emits `role="group"` + `aria-labelledby`
* pointing at the `[forFieldsetLegend]` (same host-tag detection idiom as
* `ForLabel`'s `` check).
*
* The `disabled` input reflects `data-disabled` and is provided via context so
* descendant `ForField` controls OR it into their own disabled state — native
* `` does not reach custom-role controls like `forSwitch`.
*
* @example
* ```html
*
* Shipping address
*
* Street
*
*
*
* ```
*/
declare class ForFieldset implements ForFieldsetContext {
#private;
/**
* Whether the group is disabled, as bound by the consumer via `[disabled]`.
* The host reflection and descendant controls read the composed
* {@link disabled} signal below, which also folds in an enclosing disabled
* `[forFieldset]`.
*/
readonly disabledInput: _angular_core.InputSignalWithTransform;
/**
* Effective disabled: the group's own `[disabled]` OR'd with an enclosing
* disabled `[forFieldset]`. Reflects `data-disabled`, emits the native
* `disabled` attribute on a `` (or `aria-disabled` elsewhere), and
* propagates to descendant controls via context — so a disabled fieldset
* reaches custom-role controls (`forSwitch`, `forCheckbox`, …) a native
* `` can't, and nesting composes like native fieldsets
* (a disabled outer group cannot be re-enabled by an inner one).
*/
readonly disabled: _angular_core.Signal;
/**
* Id of the legend element; the group's `aria-labelledby` resolves here. A
* generated `for-fieldset-legend-*` id, or the static `id` a consumer wrote on
* the `[forFieldsetLegend]` host once {@link adoptLegendId} has adopted it.
*/
readonly legendId: _angular_core.Signal;
/** Whether the host element is a native `` (no role/labelledby needed). */
protected readonly isNativeFieldset: _angular_core.Signal;
/**
* Native `disabled` is reflected only on a real `` (where it
* natively disables descendant controls); a non-`` host advertises
* its disabled state via `aria-disabled` instead.
*/
protected readonly nativeDisabled: _angular_core.Signal;
constructor();
/** `role="group"` on a non-`` element, else null. */
protected readonly roleAttr: _angular_core.Signal<"group" | null>;
/**
* Resolved `aria-labelledby`: a consumer-set static value when present, else
* the legend id on a non-`` element when a legend is registered,
* else null (a native ``/`` groups implicitly and needs
* none).
*/
protected readonly labelledBy: _angular_core.Signal;
/**
* Adopts a consumer-set static `id` on the `[forFieldsetLegend]` host into
* {@link legendId} — preserving external `aria-labelledby` /
* `aria-describedby` references, `` targets and test hooks —
* instead of letting the legend's `[id]` host binding clobber it with the
* generated fallback. {@link labelledBy} reads the same signal, so the group's
* `aria-labelledby` follows the adopted value with no second step.
*
* Only a **static** `id` is adopted: a consumer `[id]="expr"` property binding
* evaluates after the legend's construction, so it is invisible here and still
* fights the host binding.
*/
adoptLegendId(el: HTMLElement): void;
/**
* Mark a legend present; returns an unregister callback. A fieldset is labelled
* by a single legend — `legendId` is one id, not an id list — so one
* `[forFieldsetLegend]` per group is the supported shape, matching a native
* ``'s single ``. Registrations are counted (mirroring
* `ForField`'s label / description / error slots), so unmounting one of several
* accidental duplicates never drops the association while another is still
* mounted; the last one to register owns {@link legendId}, and a duplicate
* emits a dev-mode warning.
*/
registerLegend(): () => void;
static ɵfac: _angular_core.ɵɵFactoryDeclaration;
static ɵdir: _angular_core.ɵɵDirectiveDeclaration;
}
/**
* Accessible group label for a `[forFieldset]`. Inside a fieldset it emits the
* fieldset's `legendId` and registers itself so the group's `aria-labelledby`
* resolves; on a native ``/`` the id is harmless extra wiring
* (the browser groups implicitly).
*
* A consumer-set **static** `id` on the host wins: it is adopted into the
* fieldset's `legendId` at construction, so external references to it keep
* resolving and the group's `aria-labelledby` follows it. A `[id]="expr"`
* property binding is not adopted.
*
* Usable standalone outside a fieldset — there it is an inert marker.
*
* @example
* ```html
*
* Notification preferences
*
*
* ```
*/
declare class ForFieldsetLegend {
protected readonly ctx: forty_cdk_core.ForFieldsetContext | null;
/** The legend's id when inside a fieldset, else null. */
protected readonly legendId: _angular_core.Signal;
constructor();
static ɵfac: _angular_core.ɵɵFactoryDeclaration;
static ɵdir: _angular_core.ɵɵDirectiveDeclaration;
}
export { ForFieldset, ForFieldsetLegend };