import type { NobjcObject } from "objc-js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSSecureCoding } from "../Foundation/NSSecureCoding.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { _NSURL } from "../Foundation/NSURL.js";
import type { _NSColor } from "./NSColor.js";
export declare class _NSColorList extends _NSObject {
    static alloc(): _NSColorList;
    static new(): _NSColorList;
    init(): _NSColorList;
    /** Returns the named color list from availableColorLists */
    static colorListNamed$(name: _NSString): _NSColorList | null;
    /**
     * Returns all color lists in the user's color list path, including those added at runtime. Creating a named color list and saving with writeToFile:nil will add it to this list; removeFile will remove it from this list. (That is what happens as the user creates and destroys color lists in the color panel.)
     */
    static availableColorLists(): _NSArray;
    /**
     * Creates a color list; specify @"" if you don't want a name. NOTE that this does not add the color list to availableColorLists until the color list is saved into the user's path with writeToFile:nil.
     */
    initWithName$(name: _NSString): _NSColorList;
    initWithName$fromFile$(name: _NSString, path: _NSString | null): _NSColorList | null;
    /**
     * If key already exists, sets the corresponding color. Otherwise inserts the color at the end.
     */
    setColor$forKey$(color: _NSColor, key: _NSString): void;
    /**
     * Inserts color at the specified location. If a color by the same key is already in the list but at a different location it is removed from there.
     */
    insertColor$key$atIndex$(color: _NSColor, key: _NSString, loc: number): void;
    /** No-op if key doesn't exist. */
    removeColorWithKey$(key: _NSString): void;
    /** Returns nil if key doesn't exist. */
    colorWithKey$(key: _NSString): _NSColor | null;
    /**
     * Save the color list using secure keyed archive format. Specify nil to save to the user's private colorlists directory (and also update availableColorLists), using the name of the color list.
     */
    writeToURL$error$(url: _NSURL | null, errPtr: NobjcObject | null): boolean;
    /**
     * Save the color list using unkeyed archive format. Specify nil to save to the user's private colorlists directory (and also update availableColorLists), using the name of the color list. Use of the unkeyed archive format (and hence this API) is discouraged since it cannot represent some colors (including custom colorspace based ones) without loss. Use writeToURL:error: instead.
     * @deprecated Use -writeToURL:error: instead
     */
    writeToFile$(path: _NSString | null): boolean;
    /**
     * If the color list is in the user's private colorlists directory, removes the corresponding file and the color list from availableColorLists. If there are no outstanding references to the color list this might deallocate the object as well.
     */
    removeFile(): void;
    /** Name of the color list */
    name(): _NSString | null;
    /**
     * Use this array to get count of colors and enumerate them according to the ordering specified when inserting.
     */
    allKeys(): _NSArray;
    /** Depends on the source of the colorlist file */
    editable(): boolean;
}
export interface _NSColorList extends _NSSecureCoding {
}
