import { Gib, Ib } from '@ibgib/ts-gib/dist/types.mjs'; import { AppData_V1, AppIbGib_V1, AppPromptResult } from './app-types.mjs'; import { IbGibAppAny } from './app-base-v1.mjs'; import { IbGibSpaceAny } from '../space/space-base-v1.mjs'; import { WitnessFormBuilder } from '../witness-form-builder.mjs'; import { MetaspaceService } from '../space/metaspace/metaspace-types.mjs'; export declare function getAppResultMetadata({ app }: { app: IbGibAppAny; }): string; export declare function validateCommonAppData({ appData, }: { appData: AppData_V1 | undefined; }): string[]; export declare function getAppIb({ appData, classname, }: { appData: AppData_V1; classname?: string; }): Ib; /** * Current schema is `app ${classname} ${name} ${uuid}` * * NOTE this is space-delimited */ export declare function getInfoFromAppIb({ appIb, }: { appIb: Ib; }): { appClassname: string; appName: string; appId: string; }; export declare function getAppInfoIb({ appData, appTjpGib, classname, }: { appData: AppData_V1; appTjpGib: Gib; /** * Not sure why i have this here, since it should always be in the appData.classname... */ classname?: string; }): Ib; /** * Current schema is `info_app ${classname} ${name} ${uuid} ${appTjpGib ?? 0}` * * NOTE this is space-delimited */ export declare function getInfoFromAppInfoIb({ appInfoIb, }: { appInfoIb: Ib; }): { appClassname: string; appName: string; appId: string; appTjpGib: Gib; }; /** * Prompts the user a form to build the app. * * Once prompted, the app is: * 1. validated * 2. persisted in the given {@link space} * 3. registered with the space * 4. related to the space's special apps index * 5. new app is returned * * @returns newly created app ibgib (witness) */ export declare function createNewApp({ fnPromptApp, ibgibs, space, }: { /** * factory function for creating/editing an app ibgib. * * @param space space within which we're working * @param ibGib set if editing app, null if creating * @returns TransformResult for app ibgib created/edited */ fnPromptApp: (space: IbGibSpaceAny, ibGib: AppIbGib_V1 | null) => Promise; /** * Either {@link common} or {@link ibgibs} is required * @hack */ ibgibs?: MetaspaceService; /** * space within which to create the app. if not provided, the * defaults to the local user space via {@link common} or {@link ibgibs}. */ space: IbGibSpaceAny; }): Promise; export declare class AppFormBuilder extends WitnessFormBuilder { protected lc: string; constructor(); icon({ of, required, defaultValue, iconsList, }: { of: string; required?: boolean; defaultValue?: string; iconsList: string[]; }): AppFormBuilder; } //# sourceMappingURL=app-helper.d.mts.map