/**
 * @license Copyright (c) 2017-2025, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */

'use strict';

/**
 * Tree node used by API navigation tree.
 * @type {module.Node}
 */
module.exports = class Node {
	/**
	 * @param {NODE_TYPES} type
	 * @param {String} name Name of the node. The name will be displayed to the user in a nav tree.
	 * @param {String} path Node's path. Is used to find a node in a tree. Works like an id.
	 * @param {Object} data
	 */
	constructor( type, name, path, data = {} ) {
		this.type = type;

		this.name = name;

		this.path = path;

		this.longname = data.longname;

		this.isActive = data.isActive;

		this.isExpanded = data.isExpanded;

		this.access = data.access;
	}
};
