import { IBetterLogger } from "@codiac.io/codiac-common";
import { AtLeast } from "@codiac.io/codiac-common/contracts";
import { RelayClient as GenRelayClient } from "../../apis/codiac-relay";
import { Asset, PortMapping } from "../../apis/codiac-api/contracts";
import { PromptChoice } from "../../cli-common";
import { IEntryValidator, IOutputStyler, IUserInputProvider, ValidationResult } from "../../ops";
import { Kit } from '../../apis/codiac-api/contracts';
import { RegistryReference } from '../image-registry-contextualizer';
import { ImageReference } from '../image-contextualizer';
export type AssetCreateRequest = Asset & {
    kit?: Kit;
    regInput?: RegistryReference;
    imgInput?: ImageReference;
};
export declare let ports: PromptChoice[];
export declare class AssetConfigurator {
    private _ui;
    private _styler;
    private genRelayClient;
    private logger;
    constructor(_ui: IUserInputProvider, _styler: IOutputStyler, genRelayClient: GenRelayClient, logger: IBetterLogger);
    isLoaded: boolean;
    /** The largest valid port number. */
    private readonly MAX_PORT_NUMBER;
    /** The value to select from a port number prompt
     *  indicating the intention to remove the port number
     *  assignment altogether. */
    private readonly REMOVE_PORT_NUMBER;
    load(assets: Asset[]): Promise<void>;
    /** Prompts for port, ingress, ingressInternal, HostName
     *
     * Throws any encountered exceptions. */
    editAsset(partial: AtLeast<AssetCreateRequest, "enterprise">): Promise<AtLeast<AssetCreateRequest, "enterprise" | "code" | "port" | "hasIngress">>;
    promptForAllPortAssignments(existingPorts: number | PortMapping | (number | PortMapping)[] | undefined): Promise<number | PortMapping | (number | PortMapping)[] | undefined>;
    /** Returns undefined if user opts to remove the given port assignment. */
    private promptForPortAssignment;
    private selectPortNumber;
    /** Assembles the options list for port selection.
   * Decorates any options for ports that are already taken by an existing asset.
  */
    private getPortOptionsList;
    /** @param otherAssets  CAN NOT include the current asset. */
    private portIsValid;
    private buildPortDesc;
    /** Parses strings in formats: a) `<number>:<number>` and `<number>:` and `<number>`,
     * eg: `8181` or `8181:80` or `8181:`
     * Throws invalids. */
    toPortMapping(portSpec: string): number | PortMapping;
    toPortString(portDef: number | PortMapping): string;
}
export declare class HostNameValidator implements IEntryValidator<string> {
    constructor();
    isValid(candidate: string | undefined): ValidationResult;
}
