import { EventEmitter, OnInit, OnChanges, SimpleChanges, ChangeDetectorRef } from '@angular/core'; import { FormArray, FormBuilder, FormGroup } from '@angular/forms'; import { DynamicSelectFieldConfig } from '../../dynamic-select/dynamic-select-field.component'; import { ActionTemplate } from '../../step-builder/step-builder-action/step-builder-action.component'; import * as i0 from "@angular/core"; export interface ConditionBranchSaveData { template: ActionTemplate | null; templateVariables: any[]; advancedSettingsVariables: any[]; action: string; /** Resolved HTML grammar with actual variable values substituted — use for display/conditionText */ resolvedAction: string; description: string; metadata: string; /** Derived from advancedSettingsVariables 'shouldSkip' entry — step should be skipped during execution */ shouldSkip: boolean; /** Derived from advancedSettingsVariables 'isStepOptional' entry — step failure should not fail the test */ ignoreStepResult: boolean; } /** * Lightweight single-condition editor used in debug mode to: * - Add a new ELSE IF branch (mode = 'add-else-if') * - Edit an existing IF or ELSE IF condition (mode = 'edit') * * This is a simplified variant of StepBuilderConditionComponent with one condition row. */ export declare class ConditionBranchEditorComponent implements OnInit, OnChanges { private fb; private cdr; /** 'add-else-if' shows "Add ELSE IF" title/button; 'edit' shows "Edit Condition" title/button */ mode: 'add-else-if' | 'edit'; /** List of condition action templates (filtered to IF_CONDITION type) */ conditionTemplates: ActionTemplate[]; /** Called to derive template variables from a selected template */ setConditionTemplateVariables: (template: ActionTemplate, testStep?: any) => any[]; /** Called to derive advanced settings variables */ setAdvancedSettingsVariables: (template: ActionTemplate, testStep?: any) => any[]; /** Centralised HTML grammar computation function */ computeHtmlGrammarFn?: (template: any, variables: any[]) => string; /** Element options for variable forms */ elementOptions: any[]; hasMoreElements: boolean; isLoadingElements: boolean; screenNameOptions: { id?: number; name: string; }[]; hasMoreScreenNames: boolean; isLoadingScreenNames: boolean; parameterOptions: any[]; hasMoreParameters: boolean; isLoadingParameters: boolean; environmentOptions: { id: string; name: string; value: string; environment: string; }[]; hasMoreEnvironments: boolean; isLoadingEnvironments: boolean; defaultTestDataProfileId?: number; defaultTestDataStartIndex?: number; /** When provided, pre-populates the form for edit mode. shape: { templateId, templateVariables, action } */ initialConditionData?: { templateId?: string | number; templateVariables?: any[]; action?: string; description?: string; metadata?: string; }; /** Raw branch step object — passed through to setConditionTemplateVariables so the service can extract saved values from step.event */ editTestStep?: any; /** Label shown next to the condition template dropdown (e.g. 'IF', 'ELSE IF'). Inferred from mode when not provided. */ branchLabel?: string; /** True while the parent is saving (disables/shows loader on Save button) */ isSaving: boolean; save: EventEmitter; cancelled: EventEmitter; loadMoreElements: EventEmitter; searchElements: EventEmitter; searchElementsByScreenName: EventEmitter<{ screenNameId: number; searchTerm?: string; }>; createElement: EventEmitter; searchScreenName: EventEmitter; loadMoreScreenNames: EventEmitter; createScreenNameRequest: EventEmitter; searchParameters: EventEmitter; loadMoreParameters: EventEmitter; searchEnvironments: EventEmitter; loadMoreEnvironments: EventEmitter; conditionForm: FormGroup; private selectedTemplate; private templateVariables; private variablesForm; private advancedSettingsVariables; private advancedVariablesForm; private advancedExpanded; private updatedHtmlGrammar; private valueConfigCache; private valueConfigWithHandler; get title(): string; get saveButtonLabel(): string; get conditionRowLabel(): string; constructor(fb: FormBuilder, cdr: ChangeDetectorRef); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; private prefillFromInitialData; private updateValueConfigCache; getValueConfig(): DynamicSelectFieldConfig; onTemplateValueChange(templateId: any): void; private buildVariablesForm; private clearVariablesForm; private buildAdvancedVariablesForm; private clearAdvancedVariablesForm; private updateHtmlGrammar; get currentHtmlGrammar(): string; getTemplateVariables(): any[]; getVariablesForm(): FormArray; getAdvancedVariables(): any[]; getAdvancedVariablesForm(): FormArray; get isAdvancedExpanded(): boolean; toggleAdvanced(): void; get hasSelectedTemplate(): ActionTemplate | null; onVariableValueChange(name: string, value: any): void; onVariableBooleanChange(name: string, value: boolean): void; onAdvancedVariableValueChange(name: string, value: any): void; onAdvancedVariableBooleanChange(name: string, value: boolean): void; isFormValid(): boolean; onCancel(): void; onSave(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }