/// <reference types="node" />
import { AppProtocol, RouteItem, CordovaPluginInfo } from "./definitions";
import { variablenamify } from "./index";
import { TapConfigSchema, VariableConfig } from "@iotize/device-admin.js";
import { Tree } from "@angular-devkit/schematics/src/tree/interface";
import { SchematicContext } from "@angular-devkit/schematics";
import { IotizeConfigModel } from "@iotize/device-config.js/model";
import { TapAppGeneratorSchema, Page as AppGeneratorPage, TapConnectionPage, MenuItem } from "../schema/appconfig";
import { ConfigGenerator } from "./config-generator";
import { NodeDependency } from "@schematics/angular/utility/dependencies";
import { PWAHelper } from "./pwa/pwa";
interface ConfigType {
    tapConfig?: TapConfigSchema;
    appConfig?: TapAppGeneratorSchema;
    iotizeStudioConfig?: string;
}
export declare class Project {
    tree: Tree;
    context: SchematicContext;
    _tapConfig?: TapConfigSchema;
    private _iotizeStudioConfig?;
    private _appConfigBuilder?;
    private _iotizeStudioConfigString;
    private _dependenciesManager?;
    readonly pwa: PWAHelper;
    readonly communicationProtocols: AppProtocol[];
    readonly tapConfig: TapConfigSchema;
    readonly appConfigBuilder: ConfigGenerator;
    readonly appConfigSchema: TapAppGeneratorSchema;
    readonly logger: import("@angular-devkit/core/src/logger").LoggerApi;
    getDeviceMenu(): MenuItem[];
    readonly dependencies: DependecyManager;
    createRoutesForPages<T extends AppGeneratorPage>(parentPage: AppGeneratorPage | undefined, pages: T[], lineModifier?: (page: T) => any): RouteItem[];
    setConfig(configContent: ConfigType): void;
    private setTapConfig;
    private setAppConfig;
    private setIotizeStudioConfig;
    reloadConfig(): void;
    getAppRouting(): RouteItem[];
    readonly iotizeStudioConfigString: string | undefined;
    readonly iotizeStudioConfig: IotizeConfigModel | undefined;
    constructor(tree: Tree, context: SchematicContext);
    createTapConfig(tapConfigPath: string, appConfigPath?: string, regenerateAppConfig?: boolean): void;
    createAppConfig(): void;
    hasAppConfigFile(): boolean;
    hasTapConfigFile(): boolean;
    hasIotizeStudioFile(): boolean;
    hasProtocol(name: string): boolean;
    toTemplate(): {
        hasProtocol: any;
        useNFC: boolean;
        hasPage: any;
        pages: {
            [k: string]: any;
            TapConnectionPage?: TapConnectionPage | undefined;
            TapDevicePage?: import("../schema/appconfig").TapDevicePage | undefined;
            AboutPage?: import("../schema/appconfig").AboutPage | undefined;
            NotFoundPage?: import("../schema/appconfig").NotFoundPage | undefined;
        };
        isProductType: (type: string) => boolean;
        appRouting: RouteItem[];
        defaultPage: string;
        appName: string;
        appId: string;
        jsonify: (input: any) => string;
        variablenamify: typeof variablenamify;
    };
    save(): void;
    /**
     * TODO only overwrite if file changed
     * @param path
     * @param data
     */
    private _overwriteJson;
    createOrOverwrite(path: string, content: string | Buffer, overwrite?: boolean): void;
    listVariables(): VariableConfig[];
    private loadAppBuilder;
    loadAppConfigFromFile(filepath: string): TapAppGeneratorSchema;
    loadAppConfig(): TapAppGeneratorSchema;
    loadIoTizeStudioConfigFromFile(): IotizeConfigModel;
    loadTapConfig(): TapConfigSchema;
    createFromConfigFile(config: string): void;
}
export declare class DependecyManager {
    tree: Tree;
    private _newDependencies;
    constructor(tree: Tree);
    readonly newDependencies: NodeDependency[];
    addCordovaPlugin(packages: CordovaPluginInfo[]): this;
    addNpmDependencies(packages: (NodeDependency | string)[]): this;
    hasNewDependencies(): boolean;
}
export {};
