import { Trans } from '@grafana/i18n';
import { Text } from '@grafana/ui';
type DeleteTarget = 'folder' | 'dashboard';
interface DeletedDashboardsInfoProps {
/** What is being deleted - determines prefix and suffix text */
target: DeleteTarget;
}
function DeletedDashboardsCommonText() {
return (
Deleted dashboards will be kept in the history for up to 12 months. Users with delete permissions can restore the
dashboards they deleted, and admins can restore dashboards deleted by any user. The history is limited to 1000
dashboards — older ones may be removed sooner if the limit is reached.
);
}
export function DeletedDashboardsInfo({ target }: DeletedDashboardsInfoProps) {
if (target === 'folder') {
return (
This action will delete the selected folders immediately.
{' '}
{' '}
Folders cannot be restored.
);
}
return (
This action will delete the dashboard.
{' '}
);
}