// #region Imports
import { DomServiceLocator } from '../../Dom/Dom';
export function query(root, selector, options) {
    const opts = typeof options === 'boolean'
        ? { strict: options }
        : {
            strict: false,
            ...options
        };
    const el = DomServiceLocator.current.findDescendant(root, selector ?? '');
    if (opts.strict && !el) {
        throw new Error('The descendant element does not exist');
    }
    if (el) {
        return el;
    }
    console.warn(`[Query] Could not resolve element. From '${root.nodeName}' and descendant '${selector}'. Resolved in light DOM.`);
    return null;
}
//# sourceMappingURL=Query.js.map