import { EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
import { RoleInfo } from '@memberjunction/core';
import * as i0 from "@angular/core";
/**
 * Scope of an EntityFormOverride row. Mirrors the DB CHECK constraint
 * (see migrations/v5/V202605161430_*_Interactive_Forms.sql).
 */
export type OverrideScope = 'User' | 'Role' | 'Global';
/**
 * Override row status. Active = runtime serves this; Pending = AI / user
 * draft awaiting activation; Inactive = historical, never served.
 */
export type OverrideStatus = 'Active' | 'Inactive' | 'Pending';
/** Payload emitted by {@link FormOverrideDialogComponent} on confirm. */
export interface FormOverrideDialogResult {
    Name: string;
    Description: string | null;
    Notes: string | null;
    EntityName: string;
    Scope: OverrideScope;
    RoleID: string | null;
    Priority: number;
    Status: OverrideStatus;
}
/**
 * Modal shown after a form-role Component is saved. Lets the author create
 * an `EntityFormOverride` row pointing the just-saved Component at an
 * entity for User / Role / Global scope. Skip exits without persisting —
 * useful when authoring a Component that isn't ready to be activated.
 *
 * The dialog only collects intent. The dashboard wires the confirm event
 * to the write call (currently blocked on the EntityFormOverrideEntity
 * generated class; see Tasks 3 + 15).
 */
export declare class FormOverrideDialogComponent extends BaseAngularComponent implements OnInit, OnChanges {
    /**
     * Plain `@Input()`. Per-open re-sync of editable state happens in
     * `ngOnChanges` — that's the only Angular hook that fires AFTER all
     * inputs in a single change-detection cycle are bound. The earlier
     * setter-based approach fired BEFORE peer inputs (`InitialName`,
     * `InitialDescription`, etc.) were set, so the dialog rendered with
     * stale or empty pre-fill values.
     */
    Visible: boolean;
    ComponentName: string;
    EntityName: string;
    /** Pre-fill for the Description textarea (cockpit's input value). */
    InitialDescription: string | null;
    /** Pre-fill for the Name input (defaults to ComponentName). */
    InitialName: string | null;
    /** Pre-fill for the Notes textarea (when present in the cockpit). */
    InitialNotes: string | null;
    /** Pre-fill for the Status radio group. Default: 'Pending'. */
    InitialStatus: OverrideStatus | null;
    /** Pre-fill for the Scope radio group. Default: 'User'. */
    InitialScope: OverrideScope | null;
    /** Pre-fill for the Role select (when Scope='Role'). */
    InitialRoleID: string | null | undefined;
    /** Pre-fill for the Priority numeric input. Default: 0. */
    InitialPriority: number | undefined;
    /**
     * When true, render the dialog as "Edit form details" instead of
     * "Activate this form" — same fields, different framing. The
     * confirm button reads "Save changes" and the explanatory hint adapts.
     */
    EditMode: boolean;
    confirmed: EventEmitter<FormOverrideDialogResult>;
    dismissed: EventEmitter<void>;
    Name: string;
    Description: string | null;
    Notes: string | null;
    Scope: OverrideScope;
    RoleID: string | null;
    Priority: number;
    Status: OverrideStatus;
    validationError: string | null;
    availableRoles: RoleInfo[];
    private readonly cd;
    ngOnInit(): void;
    /**
     * Re-sync editable state every time `Visible` flips false→true, AFTER
     * Angular has bound all the peer `@Input()`s for the same change-
     * detection cycle. The previous setter-based approach fired BEFORE
     * sibling inputs (`InitialName`, etc.) had landed, leaving the dialog
     * pre-fill empty.
     */
    ngOnChanges(changes: SimpleChanges): void;
    /**
     * Sync editable state from `@Input()`s. Called on first open AND on
     * every subsequent Visible: false → true transition so the dialog
     * doesn't show stale data from a previous invocation.
     */
    private resetFromInputs;
    OnNameInput(e: Event): void;
    OnDescriptionInput(e: Event): void;
    OnNotesInput(e: Event): void;
    OnScopeChange(scope: OverrideScope): void;
    OnRoleChanged(e: Event): void;
    OnPriorityInput(e: Event): void;
    OnConfirmClick(): void;
    OnCancelClick(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<FormOverrideDialogComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<FormOverrideDialogComponent, "mj-form-override-dialog", never, { "Visible": { "alias": "Visible"; "required": false; }; "ComponentName": { "alias": "ComponentName"; "required": false; }; "EntityName": { "alias": "EntityName"; "required": false; }; "InitialDescription": { "alias": "InitialDescription"; "required": false; }; "InitialName": { "alias": "InitialName"; "required": false; }; "InitialNotes": { "alias": "InitialNotes"; "required": false; }; "InitialStatus": { "alias": "InitialStatus"; "required": false; }; "InitialScope": { "alias": "InitialScope"; "required": false; }; "InitialRoleID": { "alias": "InitialRoleID"; "required": false; }; "InitialPriority": { "alias": "InitialPriority"; "required": false; }; "EditMode": { "alias": "EditMode"; "required": false; }; }, { "confirmed": "confirmed"; "dismissed": "dismissed"; }, never, never, true, never>;
}
//# sourceMappingURL=form-override-dialog.component.d.ts.map