import { UmbSelectionManager } from '../../utils/index.js';
export class UmbCollectionSelectionManager extends UmbSelectionManager {
    constructor() {
        super(...arguments);
        this.selectableFilter = () => true;
    }
    #config;
    /**
     * Sets the configuration for the selection manager.
     * @param {UmbCollectionSelectionManagerConfig | undefined} config - Initial configuration for the selection manager.
     */
    setConfig(config) {
        this.#config = config;
        this.setSelectable(this.#config?.selectable ?? false);
        this.setMultiple(this.#config?.multiple ?? false);
        this.setSelection(this.#config?.selection ?? []);
        const selectableFilter = this.#config?.selectableFilter;
        if (selectableFilter) {
            this.selectableFilter = selectableFilter;
        }
    }
    /**
     * The current configuration of the selection manager.
     * @returns {UmbCollectionSelectionManagerConfig | undefined} - The current configuration of the selection manager.
     */
    getConfig() {
        return this.#config;
    }
}
