/*!
 * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
 */
import { h, Host } from "@stencil/core";
import classNames from "classnames";
export class SceneTreeTableResizeDivider {
    constructor() {
        this.hovering = false;
        this.dragging = false;
        this.handlePointerDown = () => {
            this.dragging = true;
            window.addEventListener('pointerup', this.handlePointerUp);
        };
        this.handlePointerUp = () => {
            this.dragging = false;
            window.removeEventListener('pointerup', this.handlePointerUp);
        };
        this.handleCellPointerEnter = () => {
            this.hovering = true;
        };
        this.handleCellPointerLeave = () => {
            this.hovering = false;
        };
    }
    render() {
        const isHighlighted = !!this.hovering || !!this.dragging;
        return (h(Host, { key: '1837908001e56d951a7cccb54a50a70b22b2179a', onPointerDown: this.handlePointerDown, onPointerEnter: this.handleCellPointerEnter, onPointerLeave: this.handleCellPointerLeave, style: {
                height: isHighlighted ? '100%' : 'var(--header-height)',
                padding: isHighlighted
                    ? '0 calc(var(--scene-tree-table-column-gap) / 2)'
                    : 'calc(var(--header-height) / 8) calc(var(--scene-tree-table-column-gap) / 2)',
            } }, h("slot", { key: '7204fb61738c9bbecc35254d4e7cda78b6c76167', name: "divider" }, h("div", { key: '453bb87ad579eb7fecf1d62e028573854b4d2a43', class: classNames('divider', {
                highlighted: isHighlighted,
            }) }))));
    }
    static get is() { return "vertex-scene-tree-table-resize-divider"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["scene-tree-table-resize-divider.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["scene-tree-table-resize-divider.css"]
        };
    }
    static get states() {
        return {
            "hovering": {},
            "dragging": {}
        };
    }
}
//# sourceMappingURL=scene-tree-table-resize-divider.js.map
