export class OptionAbstract {
    /**
     *
     * @type {OptionGroup|null}
     */
    parent = null;

    /**
     *
     * @param {string} id
     */
    constructor(id) {

        /**
         *
         * @type {string}
         */
        this.id = id;

    }

    /**
     * @returns {string[]}
     */
    computePath() {
        const r = [];

        let n = this;

        while (n !== null) {
            r.unshift(n.id);

            n = n.parent;
        }

        return r;
    }

}
