setState(state) {
        switch (state) {
        case this.state:
            return;
        case 'default':
            this.isOpen = false;
            this.#closeModal();
            this.selectionList.unfreeze();
            this.state = state;
            return;
        case 'open':
            if (this.state !== 'default') {
                return;
            }
            this.isOpen = true;
            this.selectionList.freeze();
            this.#closeModal();
            this.state = state;
            return;
        case 'modal':
            if (this.state !== 'open') {
                return;
            }
            this.isOpen = false;
            this.selectionList.freeze();
            this.state = state;
            return;
        case 'loading':
            if (this.state !== 'open' && this.state !== 'modal') {
                return;
            }
            this.isOpen = false;
            this.selectionList.freeze();
            this.state = state;
            return;
        }
    }
The current state of the context menu
@type {'default'|'open'|'modal'|'loading'}
default: default state
open: menu open
modal: modal open
loading: performing an action