import { Project, Config, CliTool } from './types';
export interface GlobalShortcut {
    id: string;
    label: string;
    command: string;
    parentId?: string;
}
export declare const DATA_DIR: string;
/** Atomic write: write to temp file then rename, preventing corruption on crash */
export declare function atomicWriteSync(filePath: string, data: string): void;
export declare function initDataDirs(): void;
export declare function getConfig(): Config;
export declare function getAdminUsername(): string | undefined;
export declare function isAdminUser(username?: string): boolean;
export declare function isProjectOwner(project: Project, username?: string): boolean;
/** Get the workspace root folder for a user. Admin → ~/Projects, others → ~/Projects{username} */
export declare function getUserWorkspace(username?: string): string;
export interface UserEntry {
    username: string;
    passwordHash: string;
}
/** Get all registered users (from users.json) */
export declare function getRegisteredUsers(): UserEntry[];
export declare function getProjects(): Project[];
export declare function saveProjects(projects: Project[]): void;
export declare function getProject(id: string): Project | undefined;
export declare function saveProject(project: Project): void;
export declare function deleteProject(id: string): void;
export declare function getGlobalShortcuts(username?: string): GlobalShortcut[];
export declare function saveGlobalShortcuts(shortcuts: GlobalShortcut[], username?: string): void;
export interface ProjectConfig {
    id: string;
    name: string;
    permissionMode: 'limited' | 'unlimited';
    cliTool: CliTool;
    createdAt: string;
}
export declare function ccwebDir(folderPath: string): string;
/** Write .ccweb/project.json into the project folder */
export declare function writeProjectConfig(folderPath: string, project: Project): void;
/** Read .ccweb/project.json from a project folder. Returns null if not found. */
export declare function readProjectConfig(folderPath: string): ProjectConfig | null;
export interface ProjectShortcut {
    id: string;
    label: string;
    command: string;
    /** True once any user has clicked this shortcut at least once. Drives the
     *  "new / never-used" visual (light blue) vs "used" (neutral) in the UI.
     *  Lives with the shortcut (in <project>/.ccweb/shortcuts.json) so it
     *  persists across browsers / devices, unlike the old per-browser
     *  localStorage flag (cc_used_shortcuts_<projectId>). */
    used?: boolean;
}
export declare function readProjectShortcuts(folderPath: string): ProjectShortcut[];
export declare function saveProjectShortcuts(folderPath: string, shortcuts: ProjectShortcut[]): void;
/** Update .ccweb/project.json (partial update) */
export declare function updateProjectConfig(folderPath: string, updates: Partial<ProjectConfig>): void;
//# sourceMappingURL=config.d.ts.map