/// <reference types="node" />
import '@iotize/device-client.js/config/iotize-studio/parser/xml';
import { SchematicContext } from '@angular-devkit/schematics';
import { Tree } from '@angular-devkit/schematics/src/tree/interface';
import { IotizeConfigModel } from '@iotize/device-client.js/config/iotize-studio';
import { TapConfigSchema, VariableConfig } from '@iotize/device-client.js/config/schema/v1';
import { NodeDependency } from '@schematics/angular/utility/dependencies';
import { getDependencyVersionFromGroup } from '../config-dependencies';
import { MenuItem, Page as AppGeneratorPage, TapAppGeneratorSchema } from '../schema/appconfig';
import { ConfigGenerator } from './config-generator';
import { AppProtocol, CordovaPluginInfo, RouteItem } from './definitions';
import { PWAHelper } from './pwa/pwa';
import { jsonify, variablenamify } from './util';
export declare const TAP_CONFIG_FILEPATH = ".iotize/tapconfig.json";
export declare const APP_CONFIG_FILEPATH = ".iotize/appconfig.json";
export declare const IOTIZE_STUDIO_CONFIG_FILEPATH = ".iotize/iotize-studio-config.iotz";
interface ConfigType {
    tapConfig?: TapConfigSchema;
    appConfig?: TapAppGeneratorSchema;
    iotizeStudioConfig?: string;
}
export declare function createAppConfigFromIoTizeStudio(iotizeStudioConfigString: string): ConfigGenerator;
export declare class Project {
    tree: Tree;
    context: SchematicContext;
    _tapConfig?: TapConfigSchema;
    private _iotizeStudioConfig?;
    private _appConfigBuilder?;
    private _iotizeStudioConfigString?;
    private _dependenciesManager?;
    get pwa(): PWAHelper;
    get communicationProtocols(): AppProtocol[];
    get tapConfig(): TapConfigSchema;
    get appConfigBuilder(): ConfigGenerator;
    get appConfigSchema(): TapAppGeneratorSchema;
    get logger(): any;
    getDeviceMenu(): MenuItem[];
    get 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[];
    get iotizeStudioConfigString(): string | undefined;
    get iotizeStudioConfig(): IotizeConfigModel | undefined;
    constructor(tree: Tree, context: SchematicContext);
    createTapConfig(tapConfigPath: string, appConfigPath?: string, regenerateAppConfig?: boolean): void;
    createAppConfig(): void;
    hasAppConfigFile(): boolean;
    hasTapConfigFile(): boolean;
    hasIotizeStudioFile(): boolean;
    protocolOptions(name: string): any;
    hasProtocol(name: string): boolean;
    toTemplate(): {
        decamelize(str: string): string;
        dasherize(str: string): string;
        camelize(str: string): string;
        classify(str: string): string;
        underscore(str: string): string;
        capitalize(str: string): string;
        levenshtein(a: string, b: string): number;
        hasProtocol: (name: string) => boolean;
        protocolOptions: (name: string) => any;
        useNFC: boolean;
        hasPage: (path: string) => boolean;
        pages: import("../schema/appconfig").Pages;
        isProductType: (type: string) => boolean;
        appRouting: RouteItem[];
        defaultPage: string;
        packageName: string;
        appName: string;
        appVersion: string;
        appId: string;
        jsonify: typeof jsonify;
        variablenamify: typeof variablenamify;
        getDependencyVersionFromGroup: typeof getDependencyVersionFromGroup;
    };
    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(configPath: string): void;
}
export declare class DependecyManager {
    tree: Tree;
    private _newDependencies;
    constructor(tree: Tree);
    get newDependencies(): NodeDependency[];
    addCordovaPlugin(packages: CordovaPluginInfo[]): this;
    addNpmDependencies(packages: (NodeDependency | string)[]): this;
    hasNewDependencies(): boolean;
}
export {};
