import * as _masterteam_components_entities from '@masterteam/components/entities';
import * as _angular_core from '@angular/core';
import { ElementRef, NgZone } from '@angular/core';
import { HttpContext } from '@angular/common/http';
import { MTIcon } from '@masterteam/icons';
import { CdkDragDrop } from '@angular/cdk/drag-drop';

interface ComparisonValueSide {
    raw: unknown;
    value: unknown;
    display?: string | null;
}
interface ValueComparison {
    kind: 'Value';
    oldValue: ComparisonValueSide;
    newValue: ComparisonValueSide;
}
interface EntityComparisonField {
    propertyKey: string;
    label: string;
    value: unknown;
    display?: string | null;
}
type EntityComparisonOperation = 'CreateRecord' | 'UpdateRecord' | 'DeleteRecord';
interface EntityListComparisonRow {
    kind: 'ModuleRecord';
    operation: EntityComparisonOperation;
    entityId: number;
    oldValues: EntityComparisonField[];
    newValues: EntityComparisonField[];
}
interface EntityListComparison {
    kind: 'EntityList';
    targetModuleKey: string;
    rows: EntityListComparisonRow[];
}
type PropertyValueComparison = ValueComparison | EntityListComparison;

type EntityViewType = 'Text' | 'LongText' | 'Date' | 'DateTime' | 'Number' | 'Percentage' | 'Status' | 'Currency' | 'Checkbox' | 'User' | 'Lookup' | 'Attachment' | 'Location' | 'LookupMatrix' | 'LeafDetails';
type EntityLabelPosition = 'top' | 'bottom';
/** Entity size – controls column span (1-24) inside a 24-column grid */
type EntitySize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24;
interface EntityBaseConfig {
    /** Column span of the entity card (1-24). Default: 8 */
    size?: EntitySize;
    /** Whether to show a dashed border around the entity card */
    showBorder?: boolean;
    /** Whether to hide the entity name label. Prefer hideLabel for new config. */
    hideName?: boolean;
    /** Whether to hide the entity label */
    hideLabel?: boolean;
    /** Controls whether the label is rendered above or below the value */
    labelPosition?: EntityLabelPosition;
    /** Legacy misspelled alias kept for compatibility */
    labelPostion?: EntityLabelPosition;
    /** Whether the entity content is aligned to the end (right in LTR) */
    alignEnd?: boolean;
}
interface EntityUserConfig extends EntityBaseConfig {
    showDisplayName?: boolean;
    showPhoneNumber?: boolean;
    showEmail?: boolean;
}
interface EntityPercentageConfig extends EntityBaseConfig {
    color?: string;
}
interface LeafLevelSavedConfig {
    /** Position order for this level entity in the preview grid */
    order: number;
    /** Column span (1-24), persisted from drag-resize */
    size?: EntitySize;
    /** Status keys the user has chosen to display */
    selectedStatuses: string[];
}
interface EntityLeafDetailsConfig extends EntityBaseConfig {
    /** Per-level display overrides for LeafDetails entities */
    leafLevels?: Record<string, LeafLevelSavedConfig>;
}
type EntityConfiguration = EntityBaseConfig | EntityUserConfig | EntityPercentageConfig | EntityLeafDetailsConfig;
interface EntityStatusValue {
    key: string;
    display: string;
    color: string;
    description?: string;
}
interface EntityLookupValue {
    key: string;
    display: string;
    color: string;
    description?: string;
}
interface EntityUserValue {
    id?: string;
    userName?: string;
    name?: string;
    displayName?: string;
    photoUrl?: string;
    phoneNumber?: string;
    email?: string;
}
interface LeafDetailsStatusSummary {
    key: string;
    display: string;
    color: string | null;
    /** Always 0 in preview/configuration context; populated from runtime fetch */
    count: number;
}
interface LeafDetailsCatalogStatusValue {
    key: string;
    display: string;
    description?: string | null;
    color: string | null;
    icon?: string | null;
    order?: number;
}
interface LeafDetailsCatalogLevelValue {
    levelId: number;
    levelName: string;
    levelIcon: string;
    statuses: LeafDetailsCatalogStatusValue[];
}
interface LeafDetailsEntityValue {
    levelId: number;
    levelName: string;
    levelIcon: string;
    statuses: LeafDetailsStatusSummary[];
}
type LeafDetailsEntityCollectionValue = LeafDetailsEntityValue[];
type LeafDetailsCatalogConfiguration = LeafDetailsCatalogLevelValue[];
type EntityPropertyConfiguration = Record<string, unknown> | LeafDetailsCatalogConfiguration | null;
interface LeafDetailsRuntimeStatusDetails {
    key: string;
    display: string;
    color: string | null;
    description?: string | null;
    icon?: string | null;
    order?: number;
}
interface LeafDetailsRuntimeStatusCount {
    details: LeafDetailsRuntimeStatusDetails;
    count: number;
}
interface LeafDetailsRuntimeChildSchema {
    levelId: number;
    levelName: string;
    levelIcon: string;
    totalCount?: number;
    statuses: LeafDetailsRuntimeStatusCount[];
}
interface LeafDetailsRuntimeValue {
    totalCount?: number;
    childSchemas: LeafDetailsRuntimeChildSchema[];
}
interface EntityAttachmentItemValue {
    id?: string;
    name?: string;
    fileName?: string;
    contentType?: string;
    extension?: string;
    size?: number;
}
type EntityAttachmentValue = Array<EntityAttachmentItemValue | string>;
interface EntityLocationValue {
    display_name?: string;
    address?: string;
    lat?: string | number;
    lon?: string | number;
    lng?: string | number;
    [key: string]: unknown;
}
interface EntityData {
    id?: number;
    propertyId?: number;
    key?: string;
    normalizedKey?: string;
    name?: string;
    rawValue?: string;
    order?: number;
    propertyConfiguration?: EntityPropertyConfiguration;
    value: string | EntityStatusValue | EntityUserValue | EntityLookupValue | EntityAttachmentValue | EntityLocationValue | LeafDetailsEntityValue | LeafDetailsEntityCollectionValue | LeafDetailsRuntimeValue;
    viewType: EntityViewType;
    type?: string;
    configuration?: EntityConfiguration;
    /** Present on submitted ChangeRequest records — frozen old→new snapshot. */
    comparison?: PropertyValueComparison;
}
/** Emitted when an entity is resized via the drag handle */
interface EntityResizeEvent {
    entity: EntityData;
    previousSize: EntitySize;
    newSize: EntitySize;
}

type EntityFieldGap = 'compact' | 'normal' | 'relaxed';
declare class EntityField {
    readonly label: _angular_core.InputSignal<string>;
    readonly labelIconName: _angular_core.InputSignal<string | null>;
    readonly configuration: _angular_core.InputSignal<EntityConfiguration | null | undefined>;
    readonly gap: _angular_core.InputSignal<EntityFieldGap>;
    readonly hideLabel: _angular_core.Signal<boolean>;
    readonly labelPosition: _angular_core.Signal<_masterteam_components_entities.EntityLabelPosition>;
    readonly labelContainerClass: _angular_core.Signal<string>;
    readonly contentContainerClass: _angular_core.Signal<string>;
    readonly containerClass: _angular_core.Signal<string>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityField, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityField, "mt-entity-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelIconName": { "alias": "labelIconName"; "required": false; "isSignal": true; }; "configuration": { "alias": "configuration"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
}

declare class EntityText {
    /** Full entity data object */
    readonly data: _angular_core.InputSignal<EntityData | undefined>;
    /** Individual inputs (used when data is not provided) */
    readonly name: _angular_core.InputSignal<string | undefined>;
    readonly value: _angular_core.InputSignal<string | undefined>;
    readonly displayName: _angular_core.Signal<string>;
    readonly displayValue: _angular_core.Signal<string>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityText, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityText, "mt-entity-text", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class EntityDate {
    /** Full entity data object */
    readonly data: _angular_core.InputSignal<EntityData | undefined>;
    /** Individual inputs (used when data is not provided) */
    readonly name: _angular_core.InputSignal<string | undefined>;
    readonly value: _angular_core.InputSignal<unknown>;
    readonly viewType: _angular_core.InputSignal<"Date" | "DateTime">;
    readonly displayName: _angular_core.Signal<string>;
    readonly resolvedViewType: _angular_core.Signal<"date" | "dateTime">;
    readonly displayValue: _angular_core.Signal<unknown>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityDate, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityDate, "mt-entity-date", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "viewType": { "alias": "viewType"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class EntityStatus {
    /** Full entity data object */
    readonly data: _angular_core.InputSignal<EntityData | undefined>;
    /** Individual inputs (used when data is not provided) */
    readonly name: _angular_core.InputSignal<string | undefined>;
    readonly value: _angular_core.InputSignal<EntityStatusValue | undefined>;
    readonly displayName: _angular_core.Signal<string>;
    readonly statusValue: _angular_core.Signal<EntityStatusValue | null>;
    readonly badgeStyle: _angular_core.Signal<{
        color?: undefined;
        backgroundColor?: undefined;
    } | {
        color: string;
        backgroundColor: string;
    }>;
    readonly emptyLabel = "_";
    readonly statusLabel: _angular_core.Signal<string>;
    private hexToRgba;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityStatus, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityStatus, "mt-entity-status", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class EntityUser {
    readonly httpContext: HttpContext;
    /** Full entity data object */
    readonly data: _angular_core.InputSignal<EntityData | undefined>;
    readonly displayName: _angular_core.Signal<string>;
    /** Resolved user value object from data().value */
    private readonly userValue;
    readonly rawUserName: _angular_core.Signal<string | null>;
    readonly userName: _angular_core.Signal<string>;
    readonly userPhoto: _angular_core.Signal<string>;
    readonly labelText: _angular_core.Signal<string>;
    private readonly config;
    readonly showDisplayName: _angular_core.Signal<boolean>;
    readonly showPhoneNumber: _angular_core.Signal<boolean>;
    readonly showEmail: _angular_core.Signal<boolean>;
    readonly phoneNumber: _angular_core.Signal<string>;
    readonly email: _angular_core.Signal<string>;
    readonly hasContactInfo: _angular_core.Signal<boolean>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityUser, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityUser, "mt-entity-user", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class EntityPercentage {
    /** Full entity data object */
    readonly data: _angular_core.InputSignal<EntityData | undefined>;
    /** Individual inputs (used when data is not provided) */
    readonly name: _angular_core.InputSignal<string | undefined>;
    readonly value: _angular_core.InputSignal<string | undefined>;
    readonly rawValue: _angular_core.InputSignal<string | undefined>;
    readonly displayName: _angular_core.Signal<string>;
    readonly displayValue: _angular_core.Signal<string>;
    private readonly rawNumericValue;
    readonly hasNumericValue: _angular_core.Signal<boolean>;
    readonly numericValue: _angular_core.Signal<number>;
    readonly maxValue: _angular_core.Signal<number>;
    readonly hideName: _angular_core.Signal<boolean>;
    readonly progressColor: _angular_core.Signal<string>;
    private parseNumericValue;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityPercentage, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityPercentage, "mt-entity-percentage", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "rawValue": { "alias": "rawValue"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class EntityCurrency {
    /** Full entity data object */
    readonly data: _angular_core.InputSignal<EntityData | undefined>;
    /** Individual inputs (used when data is not provided) */
    readonly name: _angular_core.InputSignal<string | undefined>;
    readonly value: _angular_core.InputSignal<string | undefined>;
    readonly displayName: _angular_core.Signal<string>;
    readonly displayValue: _angular_core.Signal<string>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityCurrency, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityCurrency, "mt-entity-currency", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class EntityCheckbox {
    /** Full entity data object */
    readonly data: _angular_core.InputSignal<EntityData | undefined>;
    /** Individual inputs (used when data is not provided) */
    readonly name: _angular_core.InputSignal<string | undefined>;
    readonly value: _angular_core.InputSignal<string | undefined>;
    readonly rawValue: _angular_core.InputSignal<string | undefined>;
    readonly displayName: _angular_core.Signal<string>;
    readonly emptyLabel = "_";
    readonly hideName: _angular_core.Signal<boolean>;
    readonly checkboxState: _angular_core.Signal<boolean | null>;
    private parseBoolean;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityCheckbox, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityCheckbox, "mt-entity-checkbox", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "rawValue": { "alias": "rawValue"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class EntityLongText {
    /** Full entity data object */
    readonly data: _angular_core.InputSignal<EntityData | undefined>;
    /** Individual inputs (used when data is not provided) */
    readonly name: _angular_core.InputSignal<string | undefined>;
    readonly value: _angular_core.InputSignal<string | undefined>;
    readonly displayName: _angular_core.Signal<string>;
    readonly displayValue: _angular_core.Signal<string>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityLongText, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityLongText, "mt-entity-long-text", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class EntityLookup {
    /** Full entity data object */
    readonly data: _angular_core.InputSignal<EntityData | undefined>;
    /** Individual inputs (used when data is not provided) */
    readonly name: _angular_core.InputSignal<string | undefined>;
    readonly value: _angular_core.InputSignal<EntityLookupValue | undefined>;
    readonly displayName: _angular_core.Signal<string>;
    readonly lookupValue: _angular_core.Signal<EntityLookupValue | null>;
    readonly badgeStyle: _angular_core.Signal<{
        color?: undefined;
        backgroundColor?: undefined;
    } | {
        color: string;
        backgroundColor: string;
    }>;
    readonly emptyLabel = "_";
    readonly lookupLabel: _angular_core.Signal<string>;
    private hexToRgba;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityLookup, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityLookup, "mt-entity-lookup", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

type AttachmentReference = EntityAttachmentItemValue | string;
declare class EntityAttachment {
    readonly data: _angular_core.InputSignal<EntityData | undefined>;
    readonly name: _angular_core.InputSignal<string | undefined>;
    readonly shape: _angular_core.InputSignal<"compact" | "default">;
    readonly value: _angular_core.InputSignal<string | EntityAttachmentItemValue | EntityAttachmentValue | null | undefined>;
    readonly endPoint: _angular_core.InputSignal<string>;
    readonly context: _angular_core.InputSignal<HttpContext | undefined>;
    private readonly httpClient;
    private readonly transloco;
    readonly displayName: _angular_core.Signal<string>;
    readonly loading: _angular_core.WritableSignal<boolean>;
    readonly attachments: _angular_core.WritableSignal<EntityAttachmentItemValue[]>;
    /** Key of the compact chip currently hovered, so it can reveal the download affordance. */
    readonly hoveredAttachmentKey: _angular_core.WritableSignal<string | null>;
    readonly attachmentReferences: _angular_core.Signal<AttachmentReference[]>;
    readonly uploadValue: _angular_core.Signal<string | EntityAttachmentItemValue | (string | EntityAttachmentItemValue)[] | null>;
    readonly hasAttachments: _angular_core.Signal<boolean>;
    readonly isMultiple: _angular_core.Signal<boolean>;
    readonly acceptTypes: _angular_core.Signal<string | undefined>;
    protected readonly empty = "-";
    constructor();
    attachmentTrackBy(index: number, attachment: EntityAttachmentItemValue): string;
    attachmentTooltip(attachment: EntityAttachmentItemValue): string;
    /**
     * Compact chips are clickable downloads but only show a file-type glyph,
     * which doesn't read as actionable. Swap to a download icon while hovered
     * so the action is obvious.
     */
    attachmentActionIcon(index: number, attachment: EntityAttachmentItemValue): MTIcon;
    attachmentIcon(attachment: EntityAttachmentItemValue): MTIcon;
    onCompactAttachmentClick(event: MouseEvent, attachment: EntityAttachmentItemValue): void;
    downloadAttachment(attachment: EntityAttachmentItemValue): void;
    private resolveAttachment$;
    private normalizeAttachmentValue;
    private normalizeAttachmentItem;
    private requiresMetadataRequest;
    private isAttachmentItemValue;
    private resolveExtension;
    private normalizeAcceptTypes;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityAttachment, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityAttachment, "mt-entity-attachment", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "endPoint": { "alias": "endPoint"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class EntityLocation {
    readonly data: _angular_core.InputSignal<EntityData | undefined>;
    readonly displayName: _angular_core.Signal<string>;
    readonly location: _angular_core.Signal<EntityLocationValue | null>;
    readonly displayValue: _angular_core.Signal<string>;
    readonly coordinates: _angular_core.Signal<string>;
    readonly mapsUrl: _angular_core.Signal<string>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityLocation, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityLocation, "mt-entity-location", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class EntityLeafDetails {
    readonly data: _angular_core.InputSignal<EntityData>;
    readonly leafValue: _angular_core.Signal<LeafDetailsEntityValue | null>;
    /** Label shown below the badges: "Level Name (total)" */
    readonly labelWithTotal: _angular_core.Signal<string>;
    readonly labelIcon: _angular_core.Signal<string | null>;
    /** Default LeafDetails labels to top, while still honoring saved configuration */
    readonly fieldConfig: _angular_core.Signal<EntityBaseConfig>;
    statusColor(color: string | null): string;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityLeafDetails, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityLeafDetails, "mt-entity-leaf-details", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare const LEAF_DETAILS_KEY_SEPARATOR = "::leaflevel::";
declare function isLeafDetailsValue(value: unknown): value is LeafDetailsEntityValue;
declare function isLeafDetailsCollectionValue(value: unknown): value is LeafDetailsEntityCollectionValue;
declare function isLeafDetailsCatalogConfiguration(value: unknown): value is LeafDetailsCatalogConfiguration;
declare function isLeafDetailsRuntimeValue(value: unknown): value is LeafDetailsRuntimeValue;
declare function isLeafDetailsSyntheticKey(key?: string | null): boolean;
declare function expandLeafDetailsEntity(entity: EntityData): EntityData[];
declare function buildDisplayEntities(entities: EntityData[]): EntityData[];

declare class EntityPreview {
    readonly data: _angular_core.InputSignal<EntityData>;
    readonly attachmentShape: _angular_core.InputSignal<"compact" | "default">;
    readonly comparisonKind: _angular_core.Signal<"Value" | "EntityList" | null>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityPreview, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityPreview, "mt-entity-preview", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class EntityPreviewBody {
    readonly data: _angular_core.InputSignal<EntityData>;
    readonly attachmentShape: _angular_core.InputSignal<"compact" | "default">;
    readonly previewType: _angular_core.Signal<"Text" | "LongText" | "Date" | "DateTime" | "Number" | "Percentage" | "Status" | "Currency" | "Checkbox" | "User" | "Lookup" | "Attachment" | "Location" | "LeafDetails">;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityPreviewBody, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityPreviewBody, "mt-entity-preview-body", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class ComparisonValue {
    readonly data: _angular_core.InputSignal<EntityData>;
    readonly comparison: _angular_core.Signal<ValueComparison | null>;
    readonly oldEntity: _angular_core.Signal<EntityData | null>;
    readonly newEntity: _angular_core.Signal<EntityData | null>;
    private buildSide;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComparisonValue, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<ComparisonValue, "mt-comparison-value", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
}

interface OperationBadge {
    label: string;
    classes: string;
}
declare class ComparisonEntityList {
    private readonly transloco;
    readonly data: _angular_core.InputSignal<EntityData>;
    readonly comparison: _angular_core.Signal<EntityListComparison | null>;
    readonly rows: _angular_core.Signal<EntityListComparisonRow[]>;
    readonly targetModuleKey: _angular_core.Signal<string>;
    readonly label: _angular_core.Signal<string>;
    badgeFor(op: EntityComparisonOperation): OperationBadge;
    displayField(value: unknown, display?: string | null): string;
    rowId(_i: number, row: EntityListComparisonRow): number | string;
    oldField(row: EntityListComparisonRow, propertyKey: string): {
        value: unknown;
        display?: string | null;
    } | undefined;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComparisonEntityList, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<ComparisonEntityList, "mt-comparison-entity-list", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
}

interface EntityClickEvent {
    entity: EntityData;
    key: string;
    source: MouseEvent;
}
declare class EntitiesPreview {
    private readonly transloco;
    /** Array of entity data to display */
    readonly entities: _angular_core.InputSignal<EntityData[]>;
    readonly attachmentShape: _angular_core.InputSignal<"compact" | "default">;
    /**
     * Set of entity keys that should appear interactive (cursor pointer,
     * clicks emit). Pass `new Set([...])` from a computed signal in the host
     * for reactive enabling — when the host's set changes, Angular re-renders
     * via its normal change detection, no manual subscriptions required.
     */
    readonly clickableKeys: _angular_core.InputSignal<ReadonlySet<string>>;
    /**
     * Set of entity keys that should render with the "active" treatment
     * (e.g. currently the filter source). Same reactive pattern as
     * `clickableKeys` — host owns a computed signal and passes the value.
     */
    readonly activeKeys: _angular_core.InputSignal<ReadonlySet<string>>;
    /** Tooltip text shown on hover when an entity is clickable but not active. */
    readonly clickableTooltip: _angular_core.InputSignal<string>;
    /** Tooltip text shown on hover when an entity is the current active filter. */
    readonly activeTooltip: _angular_core.InputSignal<string>;
    /**
     * Emits when an individual entity slot is clicked. Only fires when the
     * entity's key is present in `clickableKeys`.
     */
    readonly entityClick: _angular_core.OutputEmitterRef<EntityClickEvent>;
    /** Entities expanded and sorted by order */
    readonly displayEntities: _angular_core.Signal<EntityData[]>;
    /** Returns the grid-column span for a given entity size (1-24) */
    getColSpan(entity: EntityData): string;
    /** Stable key resolution shared with the host — must agree on order. */
    private resolveKey;
    protected isClickable(entity: EntityData): boolean;
    protected isActive(entity: EntityData): boolean;
    protected onEntityClick(source: MouseEvent, entity: EntityData): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntitiesPreview, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntitiesPreview, "mt-entities-preview", never, { "entities": { "alias": "entities"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; "clickableKeys": { "alias": "clickableKeys"; "required": false; "isSignal": true; }; "activeKeys": { "alias": "activeKeys"; "required": false; "isSignal": true; }; "clickableTooltip": { "alias": "clickableTooltip"; "required": false; "isSignal": true; }; "activeTooltip": { "alias": "activeTooltip"; "required": false; "isSignal": true; }; }, { "entityClick": "entityClick"; }, never, never, true, never>;
}

/**
 * Base class that encapsulates all entity resize-via-drag logic.
 *
 * Extend this directive in any component that needs column-resize behaviour
 * on a 24-column CSS grid.  The subclass must:
 *   - Provide a `model.required<EntityData[]>()` (or equivalent) for the
 *     entity list so `updateEntitySize()` can be called after resize.
 *   - Contain a `.grid` element (or override `getGridElement()`).
 *
 * Resize flow:
 *   1. `onResizeStart(event, entity)` — called from a mousedown on the handle
 *   2. mousemove  → snaps to nearest column, updates `resizePreviewSize`
 *   3. mouseup    → emits `entityResized` with previous & new size
 */
declare abstract class EntitiesResizeBase {
    protected readonly elRef: ElementRef<any>;
    protected readonly zone: NgZone;
    protected readonly doc: Document;
    /** Emits when an entity is resized via the drag handle */
    readonly entityResized: _angular_core.OutputEmitterRef<EntityResizeEvent>;
    /** The entity currently being resized (null when idle) */
    readonly resizingEntity: _angular_core.WritableSignal<EntityData | null>;
    /** Live preview size while dragging */
    readonly resizePreviewSize: _angular_core.WritableSignal<EntitySize | null>;
    /** Bound listeners kept for cleanup */
    private _onMouseMove;
    private _onMouseUp;
    /**
     * Returns the grid element used to compute column widths.
     * Override if the grid selector differs.
     */
    protected getGridElement(): HTMLElement | null;
    /**
     * Returns the grid-column span string for a given entity.
     * While resizing the active entity, returns the preview size.
     */
    getResizeColSpan(entity: EntityData): string;
    /** Starts a resize operation from the right-edge handle */
    onResizeStart(event: MouseEvent, entity: EntityData): void;
    /**
     * Called when a resize operation completes with a changed size.
     * Subclasses should update the entity list and emit events here.
     */
    protected abstract onResizeComplete(entity: EntityData, previousSize: EntitySize, newSize: EntitySize): void;
    /** Removes global mouse listeners */
    private _cleanupListeners;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntitiesResizeBase, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<EntitiesResizeBase, never, never, {}, { "entityResized": "entityResized"; }, never, never, true, never>;
}

declare class EntitiesManage extends EntitiesResizeBase {
    /** Array of entity data – supports two-way binding to keep order in sync */
    readonly entities: _angular_core.ModelSignal<EntityData[]>;
    /** Emits the reordered entities array after each drag-drop */
    readonly entitiesReordered: _angular_core.OutputEmitterRef<EntityData[]>;
    /** Emits when an entity cell is clicked (for opening edit drawer) */
    readonly entityClicked: _angular_core.OutputEmitterRef<EntityData>;
    /** Entities expanded and sorted by their configured order */
    readonly displayEntities: _angular_core.Signal<EntityData[]>;
    /** Returns the grid-column span for a given entity size (1-24) */
    getColSpan(entity: EntityData): string;
    /** Handle drag-drop reorder */
    onDrop(event: CdkDragDrop<EntityData[]>): void;
    protected onResizeComplete(entity: EntityData, previousSize: EntitySize, newSize: EntitySize): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntitiesManage, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntitiesManage, "mt-entities-manage", never, { "entities": { "alias": "entities"; "required": true; "isSignal": true; }; }, { "entities": "entitiesChange"; "entitiesReordered": "entitiesReordered"; "entityClicked": "entityClicked"; }, never, never, true, never>;
}

export { ComparisonEntityList, ComparisonValue, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityCurrency, EntityDate, EntityField, EntityLeafDetails, EntityLocation, EntityLongText, EntityLookup, EntityPercentage, EntityPreview, EntityPreviewBody, EntityStatus, EntityText, EntityUser, LEAF_DETAILS_KEY_SEPARATOR, buildDisplayEntities, expandLeafDetailsEntity, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue };
export type { ComparisonValueSide, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityLocationValue, EntityLookupValue, EntityPercentageConfig, EntityPropertyConfiguration, EntityResizeEvent, EntitySize, EntityStatusValue, EntityUserConfig, EntityUserValue, EntityViewType, LeafDetailsCatalogConfiguration, LeafDetailsCatalogLevelValue, LeafDetailsCatalogStatusValue, LeafDetailsEntityCollectionValue, LeafDetailsEntityValue, LeafDetailsRuntimeChildSchema, LeafDetailsRuntimeStatusCount, LeafDetailsRuntimeStatusDetails, LeafDetailsRuntimeValue, LeafDetailsStatusSummary, LeafLevelSavedConfig, PropertyValueComparison, ValueComparison };
