export var ComponentEvent;
(function (ComponentEvent) {
    ComponentEvent["CREATE"] = "create";
    ComponentEvent["INIT"] = "init";
    ComponentEvent["LOGIN"] = "login";
    ComponentEvent["MIGRATE"] = "migrate";
    ComponentEvent["PULL"] = "pull";
    ComponentEvent["PUSH"] = "push";
    ComponentEvent["REGISTER"] = "register";
    ComponentEvent["UPLOAD"] = "upload";
    ComponentEvent["DEPLOY"] = "deploy";
})(ComponentEvent || (ComponentEvent = {}));
// Necessary because the fallback route might not be saved until the user first modifies their routes
export const DEFAULT_ROUTE_ID = 'ahjjxoy521';
// Necessary for backwards compatibility with pre-multi-page applications
export function getDefaultRoute(pageId) {
    return {
        id: DEFAULT_ROUTE_ID,
        pageId,
        path: '/'
    };
}
export var ThemeMode;
(function (ThemeMode) {
    ThemeMode["LIGHT"] = "LIGHT";
    ThemeMode["DARK"] = "DARK";
    ThemeMode["AUTO"] = "AUTO";
})(ThemeMode || (ThemeMode = {}));
export const CUSTOM_THEME_TYPOGRAPHY_KEY = 'custom';
export function toExportedApplicationSettings(applicationSettings) {
    return {
        componentBaseUrl: applicationSettings.componentBaseUrl,
        registeredComponents: applicationSettings.registeredComponents,
        files: applicationSettings.files,
        sourceFiles: applicationSettings.sourceFiles,
        bundledFiles: applicationSettings.bundledFiles,
        cliVersion: applicationSettings.cliVersion,
        componentsLastUploaded: applicationSettings.componentsLastUploaded,
        theme: applicationSettings.theme
    };
}
export function toNonVersionedApplicationSettings(applicationSettings) {
    if (!applicationSettings) {
        return;
    }
    return {
        profiles: applicationSettings.profiles
    };
}
export function isFullApplicationV2Dto(value) {
    return (isExportedApplicationDto(value) &&
        'updated' in value.application &&
        'created' in value.application &&
        'deletedAt' in value.application &&
        'folderId' in value.application &&
        'isDeployed' in value.application &&
        'isPublic' in value.application &&
        'isEditable' in value.application &&
        'userPermissions' in value.application);
}
export function isExportedApplicationDto(value) {
    return Object.prototype.hasOwnProperty.call(value, 'application');
}
export var ApplicationScope;
(function (ApplicationScope) {
    ApplicationScope["APP"] = "APP";
    ApplicationScope["PAGE"] = "PAGE";
    ApplicationScope["GLOBAL"] = "GLOBAL";
})(ApplicationScope || (ApplicationScope = {}));
/**
 * Returns true if the application's template uses the SDK API structure.
 * Legacy apps (templateName null/undefined) use YAML API.
 *
 * Must stay in sync with the `sdkApi` field in packages/demo-apps/config.json.
 */
const SDK_API_TEMPLATES = new Set(['app-fullstack']);
export function isSdkApiTemplate(templateName) {
    if (!templateName)
        return false;
    return SDK_API_TEMPLATES.has(templateName);
}
//# sourceMappingURL=index.js.map