import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
// (C) 2007-2026 GoodData Corporation
import { IconDragHandle, ShortenedText } from "@gooddata/sdk-ui-kit";
import { useTheme } from "@gooddata/sdk-ui-theme-provider";
import { useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
import { selectAllCatalogDateDatasetsMap } from "../../../model/store/catalog/catalogSelectors.js";
import { useCurrentDateFilterConfig } from "../useCurrentDateFilterConfig.js";
export function DefaultDateFilterDraggingComponent({ item }) {
    const theme = useTheme();
    const dateDataSetsMap = useDashboardSelector(selectAllCatalogDateDatasetsMap);
    const dateDataSet = dateDataSetsMap.get(item.filter.dateFilter.dataSet);
    const dataSetTitle = dateDataSet ? dateDataSet.dataSet.title : "";
    const { title } = useCurrentDateFilterConfig(item.filter.dateFilter.dataSet, dataSetTitle);
    if (!dateDataSet) {
        return null;
    }
    return (_jsxs("div", { className: "s-date-filter-drag attribute-filter-button is-dragging", children: [
            _jsx(IconDragHandle, { width: 7, height: 26, className: "drag-handle-icon", color: theme?.palette?.complementary?.c5 }), _jsx("div", { className: "button-content", children: _jsx("div", { className: "button-title", children: _jsx(ShortenedText, { children: title }) }) })
        ] }));
}
//# sourceMappingURL=DefaultDateFilterDraggingComponent.js.map