import { Obj, Type } from '@ephox/katamari';
import { nuState } from '../common/BehaviourState';
export const init = () => {
    let state = {};
    const set = (id, data) => {
        state[id] = data;
    };
    const get = (id) => Obj.get(state, id);
    const clear = (id) => {
        if (Type.isNonNullable(id)) {
            delete state[id];
        }
        else {
            state = {};
        }
    };
    return nuState({
        readState: () => state,
        clear,
        set,
        get
    });
};
//# sourceMappingURL=PositioningState.js.map