import { UmbBooleanState } from '../../../../libs/observable-api/index.js';
import { UmbBlockManagerContext } from '../../block/index.js';
/**
 * A implementation of the Block Manager specifically for the Block Single Editor.
 */
export class UmbBlockSingleManagerContext extends UmbBlockManagerContext {
    constructor() {
        super(...arguments);
        //
        this.#inlineEditingMode = new UmbBooleanState(undefined);
        this.inlineEditingMode = this.#inlineEditingMode.asObservable();
    }
    //
    #inlineEditingMode;
    setInlineEditingMode(inlineEditingMode) {
        this.#inlineEditingMode.setValue(inlineEditingMode ?? false);
    }
    getInlineEditingMode() {
        return this.#inlineEditingMode.getValue();
    }
    /**
     * @param contentElementTypeKey
     * @param partialLayoutEntry
     * @param _originData
     */
    async createWithPresets(contentElementTypeKey, partialLayoutEntry, 
    // This property is used by some implementations, but not used in this. Do not remove. [NL]
    _originData) {
        return await super._createBlockData(contentElementTypeKey, partialLayoutEntry);
    }
    insert(layoutEntry, content, settings, originData) {
        this._layouts.appendOneAt(layoutEntry, originData.index ?? -1);
        this.insertBlockData(layoutEntry, content, settings, originData);
        this.notifyBlockInserted(layoutEntry, originData);
        return true;
    }
}
