import { Package } from '@qodalis/cli-core';
import { CliKeyValueStore } from '../storage/cli-key-value-store';
import * as i0 from "@angular/core";
export declare class CliPackageManagerService {
    private readonly store;
    private readonly storageKey;
    QODALIS_COMMAND_PREFIX: string;
    constructor(store: CliKeyValueStore);
    /**
     * Retrieves the list of packages
     * @returns {Package[]} Array of packages
     */
    getPackages(): Promise<Package[]>;
    /**
     * Retrieves a package by name from the list.
     * @param packageName {string} The name of the package to retrieve
     * @returns {Package | undefined} The package if found, undefined otherwise
     */
    getPackage(packageName: string): Promise<Package | undefined>;
    /**
     * Checks if a package with the given name exists in the list.
     * @param packageName {string} The name of the package to check
     * @returns {boolean} True if the package exists, false otherwise
     */
    hasPackage(packageName: string): Promise<boolean>;
    /**
     * Adds a new package to the list and saves it in storage.
     * @param pkg {Package} The package to add
     */
    addPackage(pkg: Package): Promise<void>;
    /**
     * Removes a package by name and saves the updated list in storage
     * @param packageName {string} The name of the package to remove
     */
    removePackage(packageName: string): Promise<Package>;
    /**
     * Updates an existing package in the list and saves the updated list in storage.
     * @param pkg {Package} The updated package
     * @throws {Error} If the package to update is not found
     * @returns {void}
     * @throws {Error} If the package to update is not found
     * @returns {void}
     */
    updatePackage(pkg: Package): Promise<void>;
    /**
     * Saves the list of packages to storage.
     * @param packages {Package[]} The list of packages to save
     */
    private savePackages;
    static ɵfac: i0.ɵɵFactoryDeclaration<CliPackageManagerService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<CliPackageManagerService>;
}
