import { Container } from 'inversify';
import { IBetterLogger } from '@codiac.io/codiac-common';
import { ICredentialsStore } from '@codiac.io/codiac-ops-common';
import { UserContext, ProjectUserConfig, ImageExport, ProjectConfig } from '@codiac.io/codiac-relay-contracts';
import { IUserInputProvider, IOutputStyler } from '../ops';
import { RelayClient as GenRelayClient } from '../apis/codiac-relay';
import { ICodiacClient } from '../apis/codiac-api/i-client';
/** Interactively guides the user through assembling a properly built image export definition.
 *
 */
export declare class ImageConfigurator {
    private _tenantCode;
    private _codiacApi;
    private relayClient;
    private _projCfg;
    private _projUserCfg;
    private ui;
    private styler;
    private _projectRoot;
    private logger;
    private credsStore;
    private _userCntx?;
    private static readonly CHOICE_OTHER;
    private static readonly CHOICE_ENTER_MANUALLY;
    static bootstrap(ioc: Container): void;
    constructor(_tenantCode: string, _codiacApi: ICodiacClient, relayClient: GenRelayClient, _projCfg: ProjectConfig, _projUserCfg: ProjectUserConfig, ui: IUserInputProvider, styler: IOutputStyler, _projectRoot: string, logger: IBetterLogger, credsStore: ICredentialsStore, _userCntx?: UserContext | undefined);
    private imageCount;
    private currentEnterprise?;
    private _cliExec;
    /**
     *
     * @param argsImageName
     * @param definitionFile
     * @param port
     * @param buildParams
     * @returns
     */
    createImage(argsImageName?: string, definitionFile?: string, port?: number, buildParams?: string[] | undefined): Promise<ImageExport>;
    /** Walks user thru selection of a valid image definition file,
     * based on any existing files in the project
     * and preventing collisions with any definition files
     * that are already in use by other image exports.  */
    private selectDefinitionFile;
    /**
     * @param relPathName Relative path from the project root.
     * @param existingPathNames NOTE:  Must already be resolved and lowercased relative paths.
     */
    private isInUse;
    private buildDefaultDefinitionFileName;
    private authenticateWith;
    /** The goal is to present the user with a list of registries that are
     *  RELEVANT TO THE CURRENT PROJECT,
     *  so that the easiest path thru the UI is a valid one with minimal input.
     *  (an image misplaced into the wrong registry can have serious impact,
     *   especially for someone working against multiple tenants).
     *
     *  However, relevancy to a project is a moving target BECAUSE:
     *
     *  a) A codiac enterprise has the ability to pull images from ANY REGISTRY, as long as it has the creds to do so.
     *
     *  b) The tenant may not be defined yet at the time an image is defined.
     *
     *  c) The image project has only a loose affiliation with an enterprise (it's not an Asset project),
     *     so the current enterprise mapping can change from one moment to the next.
     *
     *  d) A tenant or an enterprise will tend to restrict its registries toa  short list,
     *     but it must have the ability to add images from other registries if needed.
     *
     *  e) Even though public registries (such as DockerHub) are always valid,
     *     they are often not RELEVANT for a given tenant or enterprise.
     *
     *  Thus...
     *
     *  The select list of image registries needs to be curated to account for:
     *  * The images in the PROJECT,
     *  * The registries favored by the TENANT,
     *  * The assets in the ENTERPRISE,
     *  * The registries of the current USER.
     *
     *
     * choices: if there are images in project, we use the registries from those images.
     * If the image has an enterprise binding, we use the registries from the existing enterprise (highlighted).
     * If we are logged into azure.
     *
     *  Scenario:  no images, no tenant, no enterprise or assets
     *    DefaultList: (DockerHub + az acr list + docker creds store list + **go find one**). Other leads to registry declaration workflow
     *
     *  Scenario: no images, tenant, no enterprise
     *    TenantDefaultList: (select distinct registries from all enterprise assets in all enterprises for tenant) + **other**
     *
     *  Scenario: no images, tenant, bound to enterprise, no assets
     *    DefaultList
     *
     *  Scenario: no images, bound to enterprise w assets
     *    EnterpriseDefaultList: Select distinct registries from asset images + **other** (other leads to DefaultList without existings)
     *
     *  Scenario: images exist, no enterprise
     *    LocalDefaultList: Just like enterprise list, but using local images instead of assets
     *
     *  Scenario: images exist, one or more enterprise bindings
     *    LocalDefaults + EnterpriseDefaults per binding
     *
     * **go find one** registry workflow: (assumes you’ve already chosen against docker hub)
     *  Registry Provider?
     *  ACR (Azure)
     *  Xyz (Aws)
     *  Pdq (Google)
     *  Custom (Must be a Docker registry instance)
     *  ---> Selection fires the applicable registry configurator
     *
     *  ACR:
     *  Use current account: mark.f@tb.onm.com (Y/n)?
     *  (Ensure az login, confirm current account)
     *  Azure Subscription? [Az account list]
     *  Acr?  [Az acr list --subscription asdf]
     *
     *  Custom Docker Registry
     *  Use current account
     *
     */
    private selectRegistry;
    private gatherAllRegistriesNotIn;
    /** Puts together the list of registries that are relevant for the current project. */
    private gatherRelevantRegistries;
    private getPublicRegistries;
    /** Each of these registries requires an account with the given cloud provider,
     *  and in most cases a provisioning of a container registry to have been previously performed. */
    private getRegistriesFromMajors;
    private getRegistriesFromProjectImages;
    private getRegistriesFromTenantAssets;
    private getRegistriesFromDockerCredsStore;
}
