import type { ApiContext } from './_shared';
export type PreferencesScope = 'tenant' | 'global' | 'system';
export interface PreferencesScopeInfo {
    effectiveScope: PreferencesScope;
    hasTenantOverride: boolean;
    hasGlobalPreferences: boolean;
    currentTenantId: string | null;
}
export interface BorderRadiusDto {
    card: string;
    button: string;
    badge: string;
    input: string;
    modal: string;
    menuItem: string;
}
export interface UserPreferencesWithScopeDto {
    theme: string;
    language: string;
    timeZone: string | null;
    emailNotifications: boolean;
    pushNotifications: boolean;
    accentColorKey: string;
    borderRadius: BorderRadiusDto;
    itemPaletteKey: string;
    scope: PreferencesScopeInfo;
}
export type SettingSource = 'Database' | 'AppSettings' | 'Environment' | 'Computed';
export type SettingValueType = 'String' | 'Int' | 'Bool' | 'Json' | 'TimeSpan' | 'Decimal';
export interface SettingDto {
    category: string;
    key: string;
    value: string;
    defaultValue: string;
    valueType: SettingValueType;
    description: string | null;
    isEditable: boolean;
    isSensitive: boolean;
    displayOrder: number;
}
export interface SettingViewModel {
    category: string;
    key: string;
    value: string;
    displayValue: string;
    defaultValue: string | null;
    valueType: SettingValueType;
    description: string | null;
    isEditable: boolean;
    isSensitive: boolean;
    displayOrder: number;
    source: SettingSource;
    modifiedByUserName: string | null;
    modifiedAt: string | null;
}
export interface SettingHistoryDto {
    id: string;
    oldValue: string;
    newValue: string;
    changedByUserName: string | null;
    changedAt: string;
}
declare const _createSettingsApi: (apiContext: ApiContext) => {
    getAll: () => Promise<SettingViewModel[]>;
    getByCategory: (category: string) => Promise<SettingViewModel[]>;
    get: (category: string, key: string) => Promise<SettingDto>;
    update: (category: string, key: string, value: string) => Promise<SettingDto>;
    reset: (category: string, key: string) => Promise<SettingDto>;
    getHistory: (category: string, key: string) => Promise<SettingHistoryDto[]>;
    getCategories: () => Promise<string[]>;
};
export type SettingsApi = ReturnType<typeof _createSettingsApi>;
export declare const createSettingsApi: (apiContext: ApiContext) => SettingsApi;
declare const _createPreferencesApi: (apiContext: ApiContext) => {
    /** Get preferences with scope info (effective scope, has tenant override, etc.) */
    get: () => Promise<UserPreferencesWithScopeDto>;
    /** Get global preferences only (TenantId = null), ignoring tenant-specific overrides */
    getGlobal: () => Promise<UserPreferencesWithScopeDto>;
    /** Get preferences for a specific tenant (for editing without switching context) */
    getForTenant: (tenantId: string) => Promise<UserPreferencesWithScopeDto>;
    /** Get list of tenant IDs that have theme overrides */
    getThemeOverrides: () => Promise<string[]>;
    /** Delete tenant-specific preferences, reverting to global */
    deleteTenantOverride: () => Promise<UserPreferencesWithScopeDto>;
    /** Create tenant-specific preferences from current effective preferences */
    applyToTenant: () => Promise<UserPreferencesWithScopeDto>;
};
export type PreferencesApi = ReturnType<typeof _createPreferencesApi>;
export declare const createPreferencesApi: (apiContext: ApiContext) => PreferencesApi;
export {};
//# sourceMappingURL=settings.d.ts.map