import { css } from '@emotion/css'; import React from 'react'; import { GrafanaTheme2, urlUtil } from '@grafana/data'; import { featureEnabled } from '@grafana/runtime'; import { LinkButton, useStyles2 } from '@grafana/ui'; import { UpgradeBox, UpgradeContentVertical } from 'app/core/components/Upgrade/UpgradeBox'; import { highlightTrial } from 'app/features/admin/utils'; import { ShareModalTabProps } from 'app/features/dashboard/components/ShareModal'; import { getTimeSrv } from 'app/features/dashboard/services/TimeSrv'; import { getVariablesUrlParams } from 'app/features/variables/getAllVariableValuesForUrl'; export const CreateReportTab = ({ dashboard, onDismiss }: ShareModalTabProps) => { const styles = useStyles2(getStyles); const getUrl = () => { const variablesQuery = urlUtil.toUrlParams(getVariablesUrlParams()); const timeRangeUrl = urlUtil.toUrlParams(getTimeSrv().timeRangeForUrl()); return `?${variablesQuery}&${timeRangeUrl}&db-uid=${dashboard.uid}&db-id=${dashboard.id}&db-name=${dashboard.title}`; }; const isReportsCreationDisabled = !featureEnabled('reports.creation'); if (isReportsCreationDisabled) { return (