/**
 * This export default class requires the module {@link module./component}.
 * @requires ./component
 */
import Component from './component.js'

/**
 * Create component with selector 'div[@class="cdk-overlay-container"]'.
 */
export default class CdkOverlayContainer extends Component {

    /**
     * Constructor.
     * @param {string| Component object } parent - Expects parent
     * @param {string} selector - optional parameter for selector
     */
    constructor(parent, selector) {
        if (selector) {
            super(parent, selector);
        } else {
            super(parent, 'div[contains(@class, "cdk-overlay-container")]');
        }
    }

    /**
     * Get overlay pane.
     * @method overlayPane
     * @return {string} Returns string cdk-overlay-pane
     */
    get overlayPane() {
        let path = '//div[contains(@class,"cdk-overlay-pane")]';
        return this.currentPath + path;
    }
}
