import { IStorageProvider, StorageLocationType, ICamstackAddon, IConfigurable, AddonManifest, AddonContext, CapabilityProviderMap, ConfigUISchema } from '@camstack/types';

/**
 * Filesystem storage provider — serves all location types from a local directory tree.
 *
 * Default layout:
 *   {rootPath}/recordings-high/
 *   {rootPath}/recordings-low/
 *   {rootPath}/recordings-clips/
 *   {rootPath}/event-images/
 *   {rootPath}/models/
 *   {rootPath}/addons-data/
 *   {rootPath}/logs/
 *   /tmp/camstack-cache/   (cache is always local)
 *
 * Individual location paths can be overridden.
 */
declare class FilesystemStorageProvider implements IStorageProvider {
    readonly id = "local";
    readonly name = "Local Filesystem";
    readonly supportedLocations: readonly StorageLocationType[];
    private readonly rootPath;
    private readonly locationPaths;
    constructor(rootPath: string, overrides?: Partial<Record<StorageLocationType, string>>);
    resolve(location: StorageLocationType, relativePath: string): string;
    write(location: StorageLocationType, relativePath: string, data: Buffer | NodeJS.ReadableStream): Promise<void>;
    read(location: StorageLocationType, relativePath: string): Promise<Buffer>;
    exists(location: StorageLocationType, relativePath: string): Promise<boolean>;
    list(location: StorageLocationType, prefix?: string): Promise<readonly string[]>;
    delete(location: StorageLocationType, relativePath: string): Promise<void>;
    getAvailableSpace(location: StorageLocationType): Promise<number | null>;
    initialize(): Promise<void>;
    shutdown(): Promise<void>;
    /** Get the resolved path for a location type */
    getLocationPath(location: StorageLocationType): string;
    /** Get the root path */
    getRootPath(): string;
}

/**
 * Filesystem Storage addon — provides local disk storage for all location types.
 * Capability: 'storage' (collection)
 */
declare class FilesystemStorageAddon implements ICamstackAddon, IConfigurable {
    readonly manifest: AddonManifest;
    private provider;
    private currentConfig;
    initialize(context: AddonContext): Promise<void>;
    shutdown(): Promise<void>;
    getCapabilityProvider<K extends keyof CapabilityProviderMap>(name: K): CapabilityProviderMap[K] | null;
    getProvider(): FilesystemStorageProvider | null;
    getConfigSchema(): ConfigUISchema;
    getConfig(): Record<string, unknown>;
    onConfigChange(config: Record<string, unknown>): Promise<void>;
}

export { FilesystemStorageAddon as F, FilesystemStorageProvider as a };
