// (C) 2025 GoodData Corporation
import { useRef, useState } from "react";
import { useElementSize } from "../../hooks/useElementSize.js";
export function useTagsElements() {
    const { ref: allContainerRef, width: allContainerWidth, height: allContainerHeight, } = useElementSize();
    const { ref: tagsContainerRef, width: tagsContainerWidth, height: tagsContainerHeight, } = useElementSize();
    const rootRef = useRef(null);
    const tooltipTagsContainerRef = useRef(null);
    const hiddenTagsContainerRef = useRef(null);
    const addButtonRef = useRef(null);
    const [tooltipTagsContainer, setTooltipContainer] = useState(null);
    return {
        rootRef,
        // container
        allContainerRef,
        allContainerWidth,
        allContainerHeight,
        // tags container
        tagsContainerRef,
        tagsContainerWidth,
        tagsContainerHeight,
        // hidden tags container
        hiddenTagsContainerRef,
        // tooltip tags container
        tooltipTagsContainerRef,
        tooltipTagsContainer,
        setTooltipContainer,
        // add button
        addButtonRef,
    };
}
