async remove(force = false) {
		if (
			this.id === constants.DEFAULT_FILE_SESSION &&
			!editorManager.files.length
		)
			return;
		if (!force && this.isUnsaved) {
			const confirmation = await confirm(
				strings.warning.toUpperCase(),
				strings["unsaved file"],
			);
			if (!confirmation) return;
		}

		this.#destroy();

		editorManager.files = editorManager.files.filter(
			(file) => file.id !== this.id,
		);
		const { files, activeFile } = editorManager;
		if (activeFile.id === this.id) {
			editorManager.activeFile = null;
		}
		if (!files.length) {
			Sidebar.hide();
			editorManager.activeFile = null;
			new EditorFile();
		} else {
			files[files.length - 1].makeActive();
		}
		editorManager.onupdate("remove-file");
		editorManager.emit("remove-file", this);
	}
Remove and closes the file.
@param {boolean} force if true, will prompt to save the file