import React from 'react';
import type { Option } from 'react-select';
import type { Application } from '../../application/application.model';
import type { IPipelineTemplate } from '../config/templates/PipelineTemplateReader';
import type { IPipeline } from '../../domain/IPipeline';
import type { IPipelineTemplateV2 } from '../../domain/IPipelineTemplateV2';
import './createPipelineModal.less';
export interface ICreatePipelineModalState {
    submitting: boolean;
    saveError: boolean;
    saveErrorMessage: string;
    loading: boolean;
    loadError: boolean;
    loadErrorMessage: string;
    command: ICreatePipelineCommand;
    existingNames: string[];
    configs: Array<Partial<IPipeline>>;
    configOptions: Option[];
    templates: IPipelineTemplate[];
    useTemplate: boolean;
    useManagedTemplate: boolean;
    loadingTemplateFromSource: boolean;
    loadingTemplateFromSourceError: boolean;
    templateSourceUrl: string;
    inheritTemplateParameters: boolean;
    inheritTemplateExpectedArtifacts: boolean;
    inheritTemplateTriggers: boolean;
}
export interface ICreatePipelineCommand {
    strategy: boolean;
    name: string;
    config: Partial<IPipeline>;
    template: IPipelineTemplate;
}
export interface ICreatePipelineModalProps {
    application: Application;
    pipelineSavedCallback: (pipelineId: string) => void;
    show: boolean;
    showCallback: (show: boolean) => void;
    preselectedTemplate?: IPipelineTemplateV2;
}
export declare class CreatePipelineModal extends React.Component<ICreatePipelineModalProps, ICreatePipelineModalState> {
    constructor(props: ICreatePipelineModalProps);
    static defaultProps: Partial<ICreatePipelineModalProps>;
    componentDidUpdate(prevProps: ICreatePipelineModalProps): void;
    private getDefaultConfig;
    private getDefaultState;
    submit: () => void;
    private submitPipelineTemplateConfig;
    private onSaveSuccess;
    private onSaveFailure;
    close: (evt?: React.MouseEvent<any>) => void;
    private handleTypeChange;
    private handleNameChange;
    private handleConfigChange;
    private handleSaveErrorDismiss;
    private handleLoadErrorDismiss;
    private handleTemplateSelection;
    private handleUseTemplateSelection;
    private handleUseManagedTemplateSelection;
    handleSourceUrlChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
    private configOptionRenderer;
    validateNameCharacters(): boolean;
    validateNameIsUnique(): boolean;
    loadPipelineTemplates(): void;
    private loadPipelineTemplateFromSource;
    private handleFormSubmit;
    render(): JSX.Element;
}
