const DEFAULT_OFFSET = 10;
export function getTargetZIndex(dataLayoutSelector, offset = DEFAULT_OFFSET) {
    const targetLayerElement = document.querySelector(`[data-layout="${dataLayoutSelector}"]`);
    if (!targetLayerElement) {
        return undefined;
    }
    const computedStyle = window.getComputedStyle(targetLayerElement);
    const targetZIndex = parseInt(computedStyle.zIndex, 10);
    if (!Number.isFinite(targetZIndex) || targetZIndex <= 0) {
        return undefined;
    }
    return targetZIndex + offset;
}
//# sourceMappingURL=get-target-z-index.js.map
