import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2020-2026 GoodData Corporation
import { useIntl } from "react-intl";
import { isInsightWidget } from "@gooddata/sdk-model";
import { useDashboardSelector } from "../../../../../model/react/DashboardStoreProvider.js";
import { selectWidgetByRef } from "../../../../../model/store/tabs/layout/layoutSelectors.js";
import { isTemporaryIdentity } from "../../../../../model/utils/dashboardItemUtils.js";
import { ParameterDetail } from "./ParameterDetail.js";
export function WidgetIdParameterDetail({ title, widgetRef }) {
    const intl = useIntl();
    const widget = useDashboardSelector(selectWidgetByRef(widgetRef));
    let values = [];
    if (isInsightWidget(widget) && !isTemporaryIdentity(widget)) {
        values = [widget.identifier];
    }
    return (_jsx(ParameterDetail, { title: title, typeName: intl.formatMessage({
            id: "configurationPanel.drillIntoUrl.editor.identifierTypeLabel",
        }), useEllipsis: false, values: values }));
}
//# sourceMappingURL=WidgetIdParameterDetail.js.map